Skip to content

Commit 7052573

Browse files
zapb-0tom-van
authored andcommitted
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 <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/9290 Reviewed-by: Tomas Vanek <[email protected]> Reviewed-by: Antonio Borneo <[email protected]> Tested-by: jenkins
1 parent 129e9d3 commit 7052573

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/server/gdb_server.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,6 +2010,15 @@ static int gdb_memory_map(struct connection *connection,
20102010
"length=\"0x%x\"/>\n",
20112011
p->base, p->size);
20122012
} else {
2013+
if (p->num_sectors == 0) {
2014+
xml_printf(&retval, &xml, &pos, &size,
2015+
"<memory type=\"flash\" "
2016+
"start=\"" TARGET_ADDR_FMT "\" "
2017+
"length=\"0x%x\">"
2018+
"<property name=\"blocksize\">0x%x</property>\n"
2019+
"</memory>\n", p->base, p->size, p->size);
2020+
}
2021+
20132022
/* Report adjacent groups of same-size sectors. So for
20142023
* example top boot CFI flash will list an initial region
20152024
* with several large sectors (maybe 128KB) and several

0 commit comments

Comments
 (0)