Hi,
I have an application that I have ported from MQX3.7 to MQX4.0 and the project with no change grew 25KB and overflowed my flash allocation. Basically the project is:
Codewarrior 4
MQX4
52259demo
Win7
First thing I did was looked at my map and realised ICMP functions, although disabled, are there, is this normal?
In my user_config I have
#define RTCSCFG_ENABLE_ICMP 0
#define RTCSCFG_ENABLE_ICMP_STATS 0
Then I rebuild PSP, BSP, RTCS and I get the following lines taking up a huge amount of code space:
3003FF5C 0000006C .text ICMP_init | (rtcs.a icmp_c.o ) |
3003FFC8 00000776 .text ICMP_service | (rtcs.a icmp_c.o ) |
3004073E 0000059A .text ICMP_send_error_internal | (rtcs.a icmp_c.o ) |
30040CD8 00000048 .text ICMP_send_error | (rtcs.a icmp_c.o ) |
Not sure why my program grew 25KB with a simple MQX3.7 to MQX4.0 port? I know I did turn off register coloring because MQX4.0 has stack optimisation issues for release versions.
Anyone know of what else is causing my 25KB overhead?
Check the paths to the include headers and libraries you compile and link your application with. It is not normal with the ICMP. I quickly did the test below with MQX 4.0.1 and CW 10.4 and twrmcf52259:
rtcs shell application
default user_config.h (ICMP is enabled):
CW 10.4 Debug:
00000000 00000000 00000400 .vectors vectorrom
00000400 00000400 00000018 .cfmprotect cfmprotrom
00000420 00000420 0005F508 .main_application rom
20000000 0005F928 000001C0 .main_application_data ram
200001C0 200001C0 00000468 .main_application_bss ram
modified user_config.h (ICMP disabled):
CW 10.4 Debug:
00000000 00000000 00000400 .vectors vectorrom
00000400 00000400 00000018 .cfmprotect cfmprotrom
00000420 00000420 000599A4 .main_application rom
20000000 00059DC4 00000188 .main_application_data ram
20000188 20000188 00000464 .main_application_bss ram
seems about 20 KB less by not including the ICMP.