Hi Harold Vogel
You didn't mention your device. If you're using kinetis, the optimization options in CodeWarrior can be set up in the GCC compiler settings:
You can also check this post:
https://mcuoneclipse.com/2012/11/11/optimizing-the-kinetis-gcc-startup/
About the code size you can check these posts by our colleague Erich:
https://mcuoneclipse.com/2012/09/24/code-size-information-with-gcc-for-armkinetis/
https://mcuoneclipse.com/2014/05/04/printing-code-size-information-in-eclipse/
Have a great day,
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
which IDE and device you use?
Regards,
Martin
Also, how do I know how much memory is being used by the code? I can see the size of the .ELF and .HEX files but not sure how that relates to the code being stored in the on-board Flash?
Sincerely,
H. John Vogel
Hi John,
in case you are using S08: the linker prints the code/data size to the console.
Otherwise, if using the GNU size utility, this one might be helpful: https://mcuoneclipse.com/2013/04/14/text-data-and-bss-code-and-data-size-explained/
In any case, all the details are in the .map (produced by the linker) file.
I hope this helps,
Erich
Hello Erich,
If by device you mean the CPU it is MKL36Z256VLL4, this is a Kinetis device using Code Warrior with GCC complier.
John
I hope that this helps:
CodeWarrior Development Studio
(c) Freescale Semiconductor, Inc. 2014. All rights reserved.
Learn more about CodeWarrior at
http://www.freescale.com/codewarrior
Installed Products:
- CodeWarrior for MCU
Version: 10.6
Build Id:140329