MQX build sizes

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

MQX build sizes

1,163 次查看
dry
Senior Contributor I

I was checking how much space the MQX builds take, and it seems I get them not so small.

For the simple MQX "hello" example, I get about 34Kbytes binary build.

arm-none-eabi-size  gcc_arm/ram_release/hello_twrvf65gs10_m4.elf
   text       data        bss        dec        hex    filename
  33216       1120        376      34712       8798    gcc_arm/ram_release/hello_twrvf65gs10_m4.elf

This is with GCC-5.4.1, and as you see above this is release build (from folder name). The release build uses the optimized for size compiler options, and removing unused sections by the linker, as I checked from the make output.

(-O2; -gc-sections )

Is this size is what I should expect, or do others get it much smaller?

0 项奖励
回复
3 回复数

964 次查看
dry
Senior Contributor I

This is after changing linking against libc_nano.  ~1k less

 text       data        bss        dec        hex    filename
  32948        144        520      33612       834c    gcc_arm/ram_release/hello_twrvf65gs10_m4.elf

(There should be a global option to build all examples against libc_nano , libsupc++_nano)

0 项奖励
回复

964 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi D.RY:

There is a benchmrk codesize example in the MQX installation folder, you can refer to it.

C:\Freescale\Freescale_MQX_4_2\mqx\examples\benchmrk\codesize

There are three different configurations for MQX RTOS kernel. They are maximum configuration with all the optional and core components of MQX RTOS,   typical configurations without some optional components like semaphores, events, logs, etc... and the small configuration with some core components of MQX RTOS.

Regards

Daniel

0 项奖励
回复

964 次查看
dry
Senior Contributor I

Thanks, I need to try that.

0 项奖励
回复