Visible to Intel only — GUID: fxq1641803451892
Ixiasoft
Visible to Intel only — GUID: fxq1641803451892
Ixiasoft
5.2.4.4. Configuring Optimization and Debugger Options
You can specify the optimization and debug level for the application and BSP projects, and any user library projects you might be using. Use the BSP Editor settings hal.make.cflags_debug and hal.make.cflags_optimization to specify the optimization and debug level for the whole project.
-
To configure the whole software project for debugging:
When creating a new BSP:niosv-bsp --create --qsys=<Platform Designer system> --type=hal --cmd=”set_setting hal.make.cflags_debug {-g}” --cmd=”set_setting hal.make.cflags_optimization {-O0}” settings.bsp
When updating an existing BSP:niosv-bsp --update --cmd=”set_setting hal.make.cflags_debug {-g}” --cmd=”set_setting hal.make.cflags_optimization {-O0}” settings.bsp
When your project is fully debugged and ready for release, you might want to enable optimization and omit the symbol table, to achieve faster, smaller executable code. To enable optimization and turn off the symbol table, edit the BSP Editor settings as shown in the following example. The absence of a value in hal.make.cflags_debug causes the compiler to omit generating a symbol table.
- To configure the whole software project for release:
When creating a new BSP:
niosv-bsp --create --qsys=<Platform Designer system> --type=hal --cmd=”set_setting hal.make.cflags_debug {none}” --cmd=”set_setting hal.make.cflags_optimization {-O3}” settings.bsp
When updating an existing BSP:niosv-bsp --update --cmd=”set_setting hal.make.cflags_debug {none}” --cmd=”set_setting hal.make.cflags_optimization {-O3}” settings.bsp