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,023件の閲覧回数
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 返答(返信)

968件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @shunyizhang,

This is already there.

Linker file from RTD 2.0.1 attached.

 

0 件の賞賛
返信

996件の閲覧回数
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 件の賞賛
返信

977件の閲覧回数
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 件の賞賛
返信