Compiler optimization on modustool box

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
save_4621331
Level 1
Level 1
First question asked Welcome!

Iam trying to find compiler optimization in modustoolbox, not yet found.

I found that on editing CFLAGS variable in the make file will works, but still iam unable to see the optimized code.

Can you please guide me on this ?

Thanks inadvance.

0 Likes
2 Replies
Qi_Colin
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 5 questions asked

Hi @save_4621331 :

In makefile, use CFLAGS and CXXFLAGS: Add -Os or -Oz for different optimization level, then build the project.

More optimization level you can refer to this website below:

https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

Best Regards,

Colin

0 Likes
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

If you want to use a custom optimization, set "CONFIG=Custom" in the makefile.

0 Likes