Skip to main content
Renesas Electronics Europe - Knowledgebase

How to check where the stack is allocated?

Latest Updated:05/18/2015


I am using the CC-RL compiler for RL78 devices and the default startup routine. How can I check where the stack is allocated?


If you have designated the -device option for the linker, find a continuous area of RAM which is not in use, then create the following symbols.
・__STACK_ADDR_START: Highest address of the area + 1
・__STACK_ADDR_END: Lowest address of the area

The symbol list is output to the linkage list file by the –show-symbol linker option; the area between the two symbols (__STACK_ADDR_START and __STACK_ADDR_END) will be the stack area.

Example: Excerpt from linkage list

*** Symbol List ***
FILE=                               START        END    SIZE
SYMBOL                            ADDR        SIZE    INFO      COUNTS  OPT
000ffe20         0   none ,g         *
000fef04         0   none ,g         *

Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family