Previously developed the S32K146 chip, modifying the stack size in the linked file is also relatively simple,
S32K146_128_flash.ld:
HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x00000400;
STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x00000400;
linker_flash_s32k344.ld:
HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x00002000;
__STANDBY_RAM_LIMIT_END = 0x20419000; /* 100Kbyte for standby ram */
What should I do if I want to change the stack size in the linker_flash_s32k344.ld file?
Hi @shunyizhang,
If you use RTD, the linker file defines sections for the stacks.
If you change the stack sections, you need to adjust the adjacent sections accordingly.
Regards,
Daniel
@danielmartynek ,Hi,
After allocating the Stack size, should I add the following code?
__Stack_end_c0 = ORIGIN(int_sram_stack_c0);
__Stack_start_c0 = ORIGIN(int_sram_stack_c0) + LENGTH(int_sram_stack_c0);
__Stack_end_c1 = ORIGIN(int_sram_stack_c1);
__Stack_start_c1 = ORIGIN(int_sram_stack_c1) + LENGTH(int_sram_stack_c1);