Why MCUXpresso binary code is so big?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Why MCUXpresso binary code is so big?

966 次查看
li-chinwang
Contributor II

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?

标签 (1)
0 项奖励
回复
1 回复

843 次查看
BlackNight
NXP Employee
NXP Employee

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