1、S32DS v3.5 + SDK 4.0.1
2、Example:uart_pal_echo_s32k144
3、The original S32K144_64_flash.ld file.
4、The modified S32K144_64_flash_modify.ld file.
5、Compile uart_pal_echo_s32k144 separately with these two ld files.
6、arm-none-eabi-size --format=berkeley uart_pal_echo_s32k144.elf
- S32K144_64_flash.ld
text data bss dec hex filename
16492 628 3592 20712 50e8 uart_pal_echo_s32k144.elf
- S32K144_64_flash_modify.ld
text data bss dec hex filename
16848 1696 36384 54928 d690 uart_pal_echo_s32k144.elf
The question:
1、Why is the size of bss measured by arm-none-eabi-size consistent with the size increased by Heap/Stack?
2、Is it true that in S32K144 both Stack and Heap define a global array of all zeros, and then implement specific memory management through that array? If so, can you find the reference code in SDK 4.0.1?
Solved! Go to Solution.
Compiler uses bss section for putting of uninitilized variables and from this point of view stack/heap is the same category.
RAM area used for stack/heap should be cleared anyway as startup initialized RAM memory for ECC.
Compiler uses bss section for putting of uninitilized variables and from this point of view stack/heap is the same category.
RAM area used for stack/heap should be cleared anyway as startup initialized RAM memory for ECC.