We are developing some code for a small project using Kinetis instead of HCS08 microcontrollers.
We are using a Freedom with a KL03 micro Kinetis (frdm-kl03z). By compiling the demo "hello world" I found this code size:
arm-none-eabi-size --format=berkeley "hello_world_frdmkl03z48m.elf"
text data bss dec hex filename
10500 116 1404 12020 2ef4 hello_world_frdmkl03z48m.elf
Using KDS with gcc compiler.
It seems to me a lot of memory for a simple project like that. Also if I delete everything leaving only hardware_init(); instruction, I have more than 6kbyte of text flash.
Do you have an idea how to reduce library impact on code?
How can we optimize it? (I try to change optimization in toolchain settings but nothing changes).
We absolutely need to stay far under 16k flash for an application using SPI UART and flash read/write.
Thanks and best regards