Page 1 of 1

[GCC vs arduinoCLI] Compilation speed ? Argument pb ?

Posted: Sun Mar 29, 2020 11:08 pm
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.

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

Posted: Mon Mar 30, 2020 9:09 am
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.

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

Posted: Mon Mar 30, 2020 10:11 am
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.

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

Posted: Mon Mar 30, 2020 1:29 pm
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.

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

Posted: Mon Mar 30, 2020 3:27 pm
by scanet
Thanks, I'll try to understand how it works, which arguments keep and try it.

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

Posted: Mon Mar 30, 2020 4:23 pm
by fpiSTM
You can activate the verbose with arduino-cli or Arduino IDE to see the command lines ;)

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

Posted: Tue Mar 31, 2020 8:40 am
by scanet
Yes :) , very useful, I already did it, asap I'll test and tell you.
Thanks.