Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
When I build my code with the following compiler option on STM32L4R9AI (Cortex M4) board with TizenRT (https://github.com/Samsung/TizenRT)
ARCHOPTIMIZATION += -fno-omit-frame-pointer -mapcs -mno-sched-prolog
I do not get a frame pointer (fp) for every call stack of the source code build.
When I take the object dump, I get following call stack >>
08000fb0 <stm32l4_dbgmonitor>: 8000fb0: b580 push {r7, lr}
Whereas, for cortex-R the object dump using the same compiler option (for artik053 board) looks as below >>
I am currently using using gcc version 6.3.0.
Any pointers on this issue would be helpful.
Thanks & Regards,
Vidisha Thapa
You cannot force the compiler to use a frame-pointer. At least I haven't seen one.
But it works in case of cortex R
## for cortex-R the object dump using the same compiler option (for artik053 board) looks as below >>
You compare different C code. This makes no sense.
Hi,I tested it using the same C code >
When I build with R-series I get the frame pointer >
"arm-none-eabi-gcc -c -mcpu=cortex-r7 -fno-omit-frame-pointer test.c"
00000000 <main>: 0: e92d4800 push {fp, lr}
Whereas in cortex M-series I do not get the frame pointer >
"arm-none-eabi-gcc -c -mcpu=cortex-m4 -fno-omit-frame-pointer test.c"
00000000 <main>:
0: b580 push {r7, lr}
R7 is being used as the frame pointer on the M4.