How do I set the stack size in linker flash S32K344.ld

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

How do I set the stack size in linker flash S32K344.ld

1,450 次查看
shunyizhang
Contributor IV

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?

 

 

0 项奖励
回复
3 回复数

1,395 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @shunyizhang,

This is already there.

Linker file from RTD 2.0.1 attached.

 

0 项奖励
回复

1,423 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @shunyizhang,

If you use RTD, the linker file defines sections for the stacks.

danielmartynek_0-1696857121484.png

If you change the stack sections, you need to adjust the adjacent sections accordingly.

 

Regards,

Daniel

 

 

0 项奖励
回复

1,404 次查看
shunyizhang
Contributor IV

@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);

0 项奖励
回复