I'm using arm-none-eabi-gdb
and JLinkGDBServer
to debug an embedded system using a JLink SAM-ICE. The embedded system uses an ATSAMD21 MCU.
From reading page 25 of the JLinkGDBServer documentation, I learned that I can read a memory location on the microcontroller using the following command:
(gdb) monitor MemU32 0x0000
Reading from address 0x00000000 (Data = 0x20004000)
And that works great. Now, the issue I'm having is that I need to automate this and read a range of memories, so I tried to do this:
(gdb) set $addr = 0x804000
(gdb) monitor MemU32 $addr
Expected an decimal digit (0-9)
But clearly that's not working for me. Does anyone know what's going on? How can I read memory locations like this?
User contributions licensed under CC BY-SA 3.0