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, utzig, tfAteba, barthess

User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Location: Luleå, Sweden
Has thanked: 5 times
Been thanked: 6 times
Contact:

Compiling different files with different flags?

Postby Korken » Fri Oct 13, 2017 9:40 pm

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Compiling different files with different flags?  Topic is solved

Postby Giovanni » Sat Oct 14, 2017 6:29 am

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
Location: Luleå, Sweden
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: Compiling different files with different flags?

Postby Korken » Sat Oct 14, 2017 12:21 pm

Ahh, simplest way. Totally forgot that :)

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Compiling different files with different flags?

Postby Giovanni » Sat Oct 14, 2017 1:26 pm

Captain Obvious strikes again ;)

Giovanni


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 14 guests