Compiling different files with different flags? Topic is solved

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Has thanked: 5 times
Been thanked: 6 times

Compiling different files with different flags?

Post 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!
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Compiling different files with different flags?

Post by Giovanni »

Hi,

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

Giovanni
User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Has thanked: 5 times
Been thanked: 6 times

Re: Compiling different files with different flags?

Post by Korken »

Ahh, simplest way. Totally forgot that :)
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Compiling different files with different flags?

Post by Giovanni »

Captain Obvious strikes again ;)

Giovanni
Post Reply