Locating Stack Pointer, Stack Start Address and End Address - RA2L1

Hello All,

I want to locate stack pointer, stack start and end address in linker file.

And change it for my customize address, pointing the stack pointer to the base address of the stack in SRAM.

MCU - RA2L1 Series

Help Required

1. to trace down the stack address.

2. How to customize the stack address.

Thanks in Advance.

Parents
  • Hello,

    Thanks for reaching out to Renesas Engineering Community.

    The stack pointer is stored in 'SP' register. You can see its value from the 'Registers' tab under the General Registers.

    To find the start and end address of the stack open the .map file in the Debug folder of your project and search for  .stack.

    In the below project the size of the stack is 0x500 as specified on the BSP tab and the memory range is 0x20000148 - 0x20000648.

    Why do you want to customize the stack address ?

    Best regards

Reply
  • Hello,

    Thanks for reaching out to Renesas Engineering Community.

    The stack pointer is stored in 'SP' register. You can see its value from the 'Registers' tab under the General Registers.

    To find the start and end address of the stack open the .map file in the Debug folder of your project and search for  .stack.

    In the below project the size of the stack is 0x500 as specified on the BSP tab and the memory range is 0x20000148 - 0x20000648.

    Why do you want to customize the stack address ?

    Best regards

Children