Using GDB convenience vars with monitor commands

1

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?

c
arm
gdb
embedded
segger-jlink
asked on Stack Overflow Apr 25, 2016 by John M • edited Mar 15, 2020 by Frant

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0