AnsweredAssumed Answered

How can I access linker file keywords in my C code?

Question asked by juliusjai on Dec 9, 2018
Latest reply on Dec 12, 2018 by juliusjai

Hi,

 

I'm using MPC5744P MCU and S32DS IDE.

I need to access the range of allocated Stack memory after compilation.

My linker file includes the keywords:

.stack (NOLOAD) : ALIGN(16)
{
_stack_end = . ;
. += __STACK_SIZE ;
_stack_addr = . ;
__SP_INIT = . ;
. += 4;
} > m_data

 

How can I access _stack_end and _stack_addr in my C source code?

 

I will be using these addresses to monitor stack overflow/underflow during runtime.

 

Thanks in advance.

Julius

Outcomes