board manager for RogerClark's version + arduino IDE2.0

Development environment specific, Arduino, Eclipse, VS2013, Em::Blocks etc
mrbbp
Posts: 6
Joined: Tue Mar 02, 2021 10:12 pm

board manager for RogerClark's version + arduino IDE2.0

Post by mrbbp »

Hello,

i'm newb with stm32
i find a great lib to play video on small 128x160 TFT on bluepill.
the sketch compile only with the Roger Clark board definition.
To add the STM boards on Arduino IDE1.8, you just copy the stm32 def in the hardware folder of the Arduino sketch.
But in the IDE2.0, you must have a package_json file to declare the boards and add it...

Is there somebody who build this file?
could i use and modify the official json file?
i'm not sure how. to implement the tools, are they the same?

regards
ag123
Posts: 717
Joined: Thu Dec 19, 2019 5:30 am
Answers: 3

Re: board manager for RogerClark's version + arduino IDE2.0

Post by ag123 »

first off IDE2.0 is pretty new announced just 2 days back
https://blog.arduino.cc/2021/03/01/anno ... -2-0-beta/

to get familiar with stm32duino the usual places to start are
viewtopic.php?f=2&t=301
viewtopic.php?f=2&t=3

the (old) community libmaple (roger's) core pretty much depends on a 'manual' installation i.e. hardware folder
https://arduino.github.io/arduino-cli/l ... ification/

if you want to use the board manager, currently i think only the official stm32 core has it
https://github.com/stm32duino/wiki/wiki

alternatively, you may want to try working it out as it probably doesn't exist
https://arduino.github.io/arduino-cli/p ... ification/
my guess is, it may be possible to work out something similar based on the package.json used in the official core to make one for the libmaple core
https://raw.githubusercontent.com/stm32 ... index.json
the same tools (e.g. xpack-arm-none-eabi-gcc, arm-none-eabi-gcc) can possibly be re-used, cmsis isn't needed for libmaple core.
what is less straightforward is the bundle of the firmware download / flash tools
in the official core it is 'STM32Tools',

libmaple uses those in the 'hardware' folder under 'tools' directory for the respective os. e.g. dfu-util (for usb dfu based firmware download), stm32flash for st-link v2 based firmware download. these together with the rest of the package installs and work normally in the 'old' ide. but they don't bundle separately as 'tools'.

my thoughts though is that if you are willing to install the firmware bin files manually, it may be possible to do without the 'flash install tools' or even using 'STM32Tools' in the official package. but they won't 'integrate' straight into configuration in the IDE. i.e. it is likely possible to just have the xpack-arm-none-eabi-gcc, arm-none-eabi-gcc. and install the compiled firmware manually (normally found in the 'temp' folder after compilation)

if you are new to this it is probably easier either using the official core (which has board manager package json),
using the 'old' ide
or alternatively, find out further on where in the arduino cli (or rather IDE 2.0) keeps its 'hardware' folder
https://arduino.github.io/arduino-cli/l ... ification/
it would possibly take some digging around, in the new ide 2.0 or perhaps enquire in the relevant forums related about ide 2.0 and its features
e.g.
https://forum.arduino.cc/index.php?board=2.0
ag123
Posts: 717
Joined: Thu Dec 19, 2019 5:30 am
Answers: 3

Re: board manager for RogerClark's version + arduino IDE2.0

Post by ag123 »

if what you would like to do is to simply build the sketch with the associated library, i'd suggest you could use the 'old' java Arduino IDE 1.8.13
https://www.arduino.cc/en/software

as for myself i'm using eclipse and in addition i'm using makefiles in linux
viewtopic.php?f=47&t=37

i could literally go 'ide'-less by simply typing 'make' on the command line. the compilers can be the same ones used in the official core xpack-arm-none-eabi-gcc, arm-none-eabi-gcc. the alternative for 'make' is that arduino-cli which is actually the build tool used in arduino IDE 2.0

i install my sketch / firmware manually using the tools found in the 'hardware' folder. in particular dfu-util or st-flash. The alternatives from stm official core 'STM32Tools' works as well. i think that is mostly the STM32CubeProgrammer https://www.st.com/en/development-tools ... eprog.html
User avatar
Juraj
Posts: 33
Joined: Fri Jan 03, 2020 7:47 pm
Answers: 1
Location: Slovakia
Contact:

Re: board manager for RogerClark's version + arduino IDE2.0

Post by Juraj »

you can use http://dan.drown.org/stm32duino/package ... index.json for Roger's core boards manager installation
mrbbp
Posts: 6
Joined: Tue Mar 02, 2021 10:12 pm

Re: board manager for RogerClark's version + arduino IDE2.0

Post by mrbbp »

Juraj wrote:
Wed Mar 03, 2021 5:56 am
you can use http://dan.drown.org/stm32duino/package ... index.json for Roger's core boards manager installation
Thanks Juraj, this is exactly what i'm looking for.

Why don't you make a commit on the RogerClarkMelbourne repo?
https://github.com/rogerclarkmelbourne/Arduino_STM32

This is a really usefull piece for a clean board install on Arduino IDE!

Respect!
ag123
Posts: 717
Joined: Thu Dec 19, 2019 5:30 am
Answers: 3

Re: board manager for RogerClark's version + arduino IDE2.0

Post by ag123 »

the only minor catch is that those archives / zip may not be updated as the repository. hence, if there are issues, it may take a little effort to fetch the repository and manually update that in the installed location. the archives are fetched from dan brown's site if you review the package.json
mrbbp
Posts: 6
Joined: Tue Mar 02, 2021 10:12 pm

Re: board manager for RogerClark's version + arduino IDE2.0

Post by mrbbp »

Well well well.
for my particular needs (bluePill + 1.88 TFT + ST7735_STM library), no serial, noDebugger (so why i want the new IDE?)
the IDE 2.0 compile with the Dan Drown package_index.json to add the bluepill board.
and able to upload the code to the STM with ST-LINK v2 (a chinese clone)...

First time all compile, but code did not work on the bluepill (no video on the display)
i closed the doors and windows and retried a compile + an upload with cubeProgrammer.
it worked after some changes on the "optimize" version... i've tried fast, faster, fastest
i retried with the "smallest" (default value) and it worked again...
I closed the door again (relaunch IDE, to have a new temp compile folder)
It works, compile, upload, reset the board.
mrbbp
Posts: 6
Joined: Tue Mar 02, 2021 10:12 pm

Re: board manager for RogerClark's version + arduino IDE2.0

Post by mrbbp »

ag123 wrote:
Wed Mar 03, 2021 11:23 am
the only minor catch is that those archives / zip may not be updated as the repository. hence, if there are issues, it may take a little effort to fetch the repository and manually update that in the installed location. the archives are fetched from dan brown's site if you review the package.json
An other problem with this file, is the versions are not cumulatives, therefor when you install a version (last by default) it does not have all the boards, just the last added...
ag123
Posts: 717
Joined: Thu Dec 19, 2019 5:30 am
Answers: 3

Re: board manager for RogerClark's version + arduino IDE2.0

Post by ag123 »

i'm not familiar with package-index.json, but i'd guess i'd try to work it out a little at some point.
one of those things is whether url like file:// can be used, as if file:// can be used it can be used to refer to files on the local host pc.
'packaging' may then involved 'zip'ing up core sources as an archive and perhaps it can be installed from the board manager UI.
things has been 'manual' all along for 'libmaple' core as it is after all a community core, and it depends on public contributions for maintenance.
but if there is a way to map local files to package-index.json, it may be possible to use a 'template' and perhaps have a script or some instructions to make the archives.

in the meantime, figuring out where those same files live with IDE 2.0 would help as it is possible to substitute those with that in the origin repository.
mrburnette
Posts: 410
Joined: Thu Dec 19, 2019 1:23 am
Answers: 1

Re: board manager for RogerClark's version + arduino IDE2.0

Post by mrburnette »

Juraj wrote:
Wed Mar 03, 2021 5:56 am
you can use http://dan.drown.org/stm32duino/package ... index.json for Roger's core boards manager installation
"size" : 8953132,
"architecture" : "STM32F1",
"checksum" : "SHA-256:1bab3a6c8027981182cfd61c8588503d69b7b92a9e2b547a8d4fb86a167ea4cf",
"toolsDependencies" : [
{
"version" : "2020.1.17",
"name" : "stm32tools",
"packager" : "stm32duino"
},
{
"version" : "4.8.3-2014q1",
"name" : "arm-none-eabi-gcc",
"packager" : "arduino"
}
],
"url" : "http://dan.drown.org/stm32duino/STM32F1-2020.1.17.zip",
"category" : "STM32",
"archiveFileName" : "STM32F1-2020.1.17.zip"
},
I have no idea if the ZIP is insync with Roger's 14 months ago or was created 14 months ago from Dan's 4-year out-of-sync github. Personally, I recommend caution.
Post Reply

Return to “IDE's”