Page 1 of 1

Compiling different files with different flags?

Posted: Fri Oct 13, 2017 9:40 pm
by Korken
Hi all,

I have a problem where I am using a math library that creates a code explosion when compiled with O0.
So I would like to define a few files which have their own optimization level.
What would be the easiest way to do this in ChibiOS?

Thanks!

Re: Compiling different files with different flags?

Posted: Sat Oct 14, 2017 6:29 am
by Giovanni
Hi,

1) Compile your library into a library using a separate makefile.
2) Import the library in ChibiOS makefile.

Giovanni

Re: Compiling different files with different flags?

Posted: Sat Oct 14, 2017 12:21 pm
by Korken
Ahh, simplest way. Totally forgot that :)

Re: Compiling different files with different flags?

Posted: Sat Oct 14, 2017 1:26 pm
by Giovanni
Captain Obvious strikes again ;)

Giovanni