Closed sense-Jo closed 2 years ago
I faced the same issue and got it working by replacing monitor foo bar
commands by more basics commands:
read: cmd = "x /x {:#x}".format(addr)
write: cmd = "set *(int *){:#x} = {:#x}".format(addr, val)
I had to use these in order to get the script working on pyocd (as I had trouble to use openocd on a TF-M use case). Since using these basics commands could solve multiple issues, I think these would be useful, for instance when it is known that mmu is not in play. @1udo6arre Are you open to add an option to use these basic commands instead of mmu safe ones ?
Hi
yes the monitor mdw
is a specific command for openocd (Memory Display Word, can be physical for processor with mmu) .
I will take account your issue (good point), and i will propose a solution to be independent of debug probe.
sorry for the latency and thank erwan for your comment
Hi, thank you for this nice tool. It seem there is an additional requirement that GDB includes support for the
monitor mdw
command. The arm-none-eabi-gdb binary on my system, as well as the one from the Zephyr SDK, did not support this command, what caused svd-tools to print onlyDataAbort
in the output file. This is caused by GDB outputtingunrecognized command 'mdw'
, which causes the following exceptions:(I added some additional exception handling to gdb-svd.py, thus the line number might differ slightly)
I couldn't find out which versions of GDB support the
monitor mdw
command. In the end, I resorted to the GDB provided by NixOS.