Memory Map on At91Samx256 in GDB

Hello,

if i use the OpenOCD Feature to send the Memory-Map to my GDB the command “info mem” returns:

~“Using memory regions provided by the target.\n”

~“Num Enb Low Addr High Addr Attrs \n”

~“0 y \t0x00000000 0x00100000 rw nocache \n”

~“1 y \t0x00100000 0x00140000 flash blocksize 0x4000 nocache \n”

~“2 y \t0x00140000 0x100000000 rw nocache \n”

I use this standard cfg “openocd -f interface/olimex-jtag-tiny.cfg -f target/sam7x256.cfg”.

Where does OpenOCD get the MemoryMap from? I think this map is not correct because:

  1. region 0 could be flash before remap command, after it´s RAM!?

  2. region 1 seems to be ok, but what does the blocksize mean?

  3. region 2 is RAM, Abort and Internal Peripherals!? rw?

Could anyone please help me to understand where these values come from, and why.

For now i use the “gdb_memory_map disable” OpenOCD Command and with this the debugging gets nomore DataAborts…I just want to unterstand whats going on with this “auto memory map”…

Thank you!

The memory map is created from the flash config line, for example.

flash bank at91sam7 0 0 0 0 0 0 0 0 0 0 0 0 18432

In your case the values are probed from the actual target.

the only line of interest is the flash one - this helps gdb decide when to use hardware breakpoints and what addresses to program when a load cmd is given.

The blocksize is the smallest flash sector in the device.

This will be the size used when gdb tried to erase the target.

Cheers

Spen