MKE04Z8VFK4 SDK overflow the program memory

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MKE04Z8VFK4 SDK overflow the program memory

894 Views
jingtian_li
Contributor II

Hello,

I tried to use the MKE04Z8VFK4 for build a project but the console showed the program memory was overflowed, the interesting thing was my project was empty, it contained nothing but pins and devices definitions.

So I created the new one which imported the examples (HelloWorld, UART_interrupt, UART_polling) of the SDK to see how they would be, they still showed the memory overflow, from 128%-140%.

Finally I created a empty project without any definitions but SDK, it still used 89.26% of program flash.

Anyone know how to reduce the size of the SDK significantly? Or the other ways which I can make the chip works? 10.74% is definitely not enough if I want to use the features of the chip.

My MCUXpresso is 11.1.0. SDK version 2.7.0 (Stage 736), Manifest Version 3.6.0. Config Tools 7.0.0

Thanks

make -r -j4 all
Building target: frdmke04z_sample_uart_polling.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="frdmke04z_sample_uart_polling.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -Xlinker --sort-section=alignment -Xlinker --cref -mcpu=cortex-m0plus -mthumb -T frdmke04z_sample_uart_polling_Debug.ld -o "frdmke04z_sample_uart_polling.axf" ./utilities/fsl_assert.o ./utilities/fsl_debug_console.o ./startup/startup_mke04z4.o ./source/semihost_hardfault.o ./source/uart_polling.o ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_gpio.o ./drivers/fsl_port.o ./drivers/fsl_uart.o ./device/system_MKE04Z4.o ./component/uart/uart_adapter.o ./component/lists/generic_list.o ./board/board.o ./board/clock_config.o ./board/pin_mux.o
Memory region Used Size Region Size %age Used
PROGRAM_FLASH: 10564 B 8 KB 128.96%
c:/nxp/mcuxpressoide_11.1.0_3209/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352/tools/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: frdmke04z_sample_uart_polling.axf section `.text' will not fit in region `PROGRAM_FLASH'
c:/nxp/mcuxpressoide_11.1.0_3209/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.1.0.201909161352/tools/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: region `PROGRAM_FLASH' overflowed by 2372 bytes
SRAM: 536 B 1 KB 52.34%
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:39: frdmke04z_sample_uart_polling.axf] Error 1
"make -r -j4 all" terminated with exit code 2. Build might be incomplete.

09:10:11 Build Failed. 3 errors, 0 warnings. (took 425ms)

Labels (1)
0 Kudos
Reply
1 Reply

783 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi jingtian,

printf occupies most of the code space. Please refer to Reduce source code size for Kinetis Series MKL03 

If space is still not enough, you can upgrade the compile optimize level. https://community.nxp.com/message/1053737?commentID=1053737#comment-1053737 

Regards,

Jing

0 Kudos
Reply