Topics

How can I configure optimization_level for my project?

Kai Ren
 

Hello,

I'm using gcc-arm-none-eabi as the compiler, as I know, this compiler can be configured for optimization_level, like no-optimization, optimizing size or optimizing speed. 
I'm curious that how can I set it up?

Thanks. 

Kai

Andrei Gansari
 

Hello Kai,

 

I’ve previously used -DCONFIG_NO_OPTIMIZATIONS=y when compiling to use O0. (default zephyr_sdk, should work for gcc-arm-none-eabi)

Have a look at zephyr\cmake\compiler\gcc\target_optimizations.cmake and zephyr\CMakeLists.txt for options.

 

Andrei Gansari

 

From: devel@... <devel@...> On Behalf Of Kai Ren via Lists.Zephyrproject.Org
Sent: Thursday, March 7, 2019 7:23 AM
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] How can I configure optimization_level for my project?

 

Hello,

I'm using gcc-arm-none-eabi as the compiler, as I know, this compiler can be configured for optimization_level, like no-optimization, optimizing size or optimizing speed. 
I'm curious that how can I set it up?

Thanks. 

Kai