start of stack for RL78 G10 in e2 studio
start of stack for RL78 G10 in e2 studio
I am using e2 studio 6.3.0 with GCC for Renesas RL78 4.9.2… for the G10 R5F10Y47. I’ve used the RL78 processor with IAR but I am new to e2 studio and GCC. My first aim is to initialize a DS3231.
I started with a very simple program, just using P00 and have the IICA0 code generated, the program jumped to some non-code address prior to reaching main().
The stack has been manipulated by the generated r_cg_cgc_user.c. The stack is initialized to FFED0 but the compiler is using temporary storage at FFEC8 and FFECA (R8, R10) as well. That overlaps at a call depth of 2, what is the case with R_CDC_Get_ResetSource in r_cg_cgc_user.c. The calling routine can not return properly.
Changing the _stack symbol in the linker_script.ld file to FFEC8 solved the problem.
Is this a bug in the generated linker file or compiler switches (should not use that RAM for temp storage), or did I do something wrong?
Kind Regards
Rolf
Hello,
You are absolutely right, stack top <should> be at 0xFFEC8.
The linker description is provided by Renesas, we will forward your finding to them to fix as soon as possible, since this is a serious problem affecting S1 cores.
Please modify in the meantime linker script stack address to 0xFFEC8.
Thank you very much for reporting this issue,
The GNU Tools Team