When I load a simple C target binary built with arm-non-eabi tool chain loaded on the ARmCortex-M7 Fast Model in the fast Models framework it fails to show the local variables complaining "??? (can't read from memory from 0xFFFFFFFFFFFFFFF4 (size =4).
My compile command is utterly simple:
arm-none-eabi-gcc -march=armv6-m -mthumb -g3 -c -o <source>.o <source>.c
Anyone has an idea what's wrong ?
Well, then there should be some way / hook to turn that so called optimization off to debug embedded code, shouldn't it be - like the compiler writers do not know that - I do not believe it. Do u know how to get around it if you think that is the reason ? There is an option -Og that tells the compiler to "optimize" code that is debugger friendly, have not tried it, but am 99% skeptical it won't work. Will check that out. On the same lines - and to your point - I plan to build it with armcc when I get the cycles to do so and update my findings
I found a resolution to this - finally.
The model debugger successfully shows the local variables when target is built with DWARF2 debugging format, so building the target code with -gwarf-2 option fixed the issue. The default format of debugging info, I believe stabs does not work