[GCC vs arduinoCLI] Compilation speed ? Argument pb ?

Post here all questions related to STM32 core if you can't find a relevant section!
Post Reply
scanet
Posts: 11
Joined: Thu Mar 26, 2020 3:49 pm

[GCC vs arduinoCLI] Compilation speed ? Argument pb ?

Post by scanet »

Hi,
I tried to use mbed.h and compile with argument thanks to gcc on my Windows 7x64 computer. And it's awfully slow....very slow....
I tried with arduino-cli and STM32Duino, and it takes about 40s to compile a simple blink.

Do you think my argument are wrong ? Where can I find the argument you use for gcc in STM32Duino tools ?
With gcc, do you know why I need to download all mbed-os (more than 1Gb !!!) before compilation?

many thanks for your help.
User avatar
fpiSTM
Posts: 1745
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: [GCC vs arduinoCLI] Compilation speed ? Argument pb ?

Post by fpiSTM »

Hi @scanet,

I guess you try the new Arduino core base on Mbed-OS for the portenta H7 ?

There is no argument issue, the build process if different. AFAIK, Mbed always compile all its libraries and then link only what is relevant that's why it is slow.
scanet
Posts: 11
Joined: Thu Mar 26, 2020 3:49 pm

Re: [GCC vs arduinoCLI] Compilation speed ? Argument pb ?

Post by scanet »

Hi,
I'm working on a simple Nucleo L476RG, and test only with the 'blink' example.

Ok for mbed, and for arduino-cli ST compilation, how dos it work ? Can I reproduce it manually with only gcc ?

Thanks.
User avatar
fpiSTM
Posts: 1745
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: [GCC vs arduinoCLI] Compilation speed ? Argument pb ?

Post by fpiSTM »

scanet wrote: Mon Mar 30, 2020 10:11 am for arduino-cli ST compilation, how dos it work ? Can I reproduce it manually with only gcc ?

Thanks.
Well, we follow the Arduino Platform specification https://arduino.github.io/arduino-cli/p ... ification/

So all gcc options are specified in the platform options:

https://github.com/stm32duino/Arduino_C ... atform.txt

You can try to reproduce it manually but I never do that.
scanet
Posts: 11
Joined: Thu Mar 26, 2020 3:49 pm

Re: [GCC vs arduinoCLI] Compilation speed ? Argument pb ?

Post by scanet »

Thanks, I'll try to understand how it works, which arguments keep and try it.
User avatar
fpiSTM
Posts: 1745
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: [GCC vs arduinoCLI] Compilation speed ? Argument pb ?

Post by fpiSTM »

You can activate the verbose with arduino-cli or Arduino IDE to see the command lines ;)
scanet
Posts: 11
Joined: Thu Mar 26, 2020 3:49 pm

Re: [GCC vs arduinoCLI] Compilation speed ? Argument pb ?

Post by scanet »

Yes :) , very useful, I already did it, asap I'll test and tell you.
Thanks.
Post Reply

Return to “General discussion”