forked from auracaster/openocd
server/gdb: Add support for NVM banks without sectors
This is necessary for non-flash NVM which does not have the concept of sectors, such as RRAM. Also small flash memory regions without sectors, such as configuration areas, can now be exposed to GDB. Tested with nRF54L15-DK, tested for regression with AT32F421C8T7. Change-Id: Ifc96ddca7dcfcd4ab17683c0e59f1be912901941 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/9290 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
This commit is contained in:
@@ -2010,6 +2010,15 @@ static int gdb_memory_map(struct connection *connection,
|
||||
"length=\"0x%x\"/>\n",
|
||||
p->base, p->size);
|
||||
} else {
|
||||
if (p->num_sectors == 0) {
|
||||
xml_printf(&retval, &xml, &pos, &size,
|
||||
"<memory type=\"flash\" "
|
||||
"start=\"" TARGET_ADDR_FMT "\" "
|
||||
"length=\"0x%x\">"
|
||||
"<property name=\"blocksize\">0x%x</property>\n"
|
||||
"</memory>\n", p->base, p->size, p->size);
|
||||
}
|
||||
|
||||
/* Report adjacent groups of same-size sectors. So for
|
||||
* example top boot CFI flash will list an initial region
|
||||
* with several large sectors (maybe 128KB) and several
|
||||
|
||||
Reference in New Issue
Block a user