Forum Discussion
Altera_Forum
Honored Contributor
12 years agoApplication makefile created by Nios2 sw build tools should contain APP_CFLAGS_OPTIMIZATION, set it to
-O2 or -O3..6. Changing BSP optimization flags can be done by passing --set hal.make.bsp_cflags_optimization -O2 to nios2-bsp. You chould check Nios2 Software Build Tools documentation for more. On a side note you might wan't to check the newly released sourcery gcc 4.7.3. I've found it generates much better - faster - code in some cases than the old gcc from Altera. But beware it has some serious issues with custom floating point instructions.