Customer select LPC804 to develop one project. The code compiler by MCUXpresso is almost hit max 32K.
But same source compiler by Keil C is only 12K. Since customer still want to add some features into code. It will exceed 32K I guess. Customer doesn't want to change IDE right now. Could give me suggestion how can I optimize the code size like Keil?
Hello,
could you provide details which binary you mean? If it is the .axf/.elf file, then this has much more information in it than the code itself (means includes debug information).
If it is the .bin (binary), then it depends on the memory map as the .bin is basically a memory dump.
In any case: have you turned on optimizations in the compiler settings (e.g. -O3)?
The other thought is that code size heavily depends on how you are using the standard library (newlib? newlib-nano?, redlib?) and if you are using things like printf().
I hope this helps,
Erich