STM32 Compile Time Seems Long IDE 1.8.16

Post here first, or if you can't find a relevant section!
Post Reply
imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

STM32 Compile Time Seems Long IDE 1.8.16

Post by imk »

Hello,
Well after couple of stalled day figuring the STM32 (Black Pill) environment etc, I have had a good days coding.
One thing that seem really noticeable compared to compiling VS2019 Wins Apps is how long it taking to compile/link code for the STM32F411 chip.
My STM32 app is only two small modules the main .ino of about 100 lines including comments and a .cpp of about same size.
This maybe 150 lines of code is taking about 40 seconds to build, anyone think this is unusual?
System is IDE 1.8.16 Win 10 Pro i5 CPU, SSD and loads of free RAM
Four cores run at 50% for about 30 seconds the all four run at 100% for last 10 seconds or so.
Many thanks for previous help imk
1201 Alarm
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: STM32 Compile Time Seems Long IDE 1.8.16

Post by ag123 »

you may like to try vscode
https://github.com/stm32duino/wiki/wiki ... -extension

there is also platformio but it lifts the core from a different repository
https://github.com/stm32duino/wiki/wiki ... PlatformIO

STM core targets a large number of mcus and boards, hence it takes time to resolve dependencies not relevant to your build.
Arduino IDE, Arduino CLI i'd guess isn't quite as sophisticated as some other tools that are there presently.

ideally is to have things like cmake where you can specify the dependency like your mcu and your board, and those dependencies are *injected* so that only those are compiled. That'd takes using things like CMake
https://cmake.org/

someone has ventured there
https://github.com/ketone/stm32Duino-cmake
you may like to try it out.

As for myself, I'm acutally using my own makefile in eclipse
viewtopic.php?f=41&t=183
there is also sloeber, but I've not been using that.
imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

Re: STM32 Compile Time Seems Long IDE 1.8.16

Post by imk »

Update
I just tried to do the build on Arduino ver 2 beta 12
I seems to compile a few seconds quicker and produces code thus:
Upload code size is 106116 IDE 1.8.16 and 36168 for IDE 2 Beta 12. With same Compile Option
That's about a third of the version 1.8.16 code size :-)

However i have an upload error:
https://forum.arduino.cc/t/arduino-2-be ... ror/921351

thanks again imk
1201 Alarm
Post Reply

Return to “General discussion”