Skip to content

Commit

Permalink
Merge pull request #1159 from c-grant/develop
Browse files Browse the repository at this point in the history
[STM32H72X/3X]: Added full access to all device memory
  • Loading branch information
Nightwalker-87 committed Jul 14, 2021
2 parents 01418b5 + 8839822 commit 61e7109
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/st-util/gdb-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,24 @@ static const char* const memory_map_template_H7 =
" <memory type=\"rom\" start=\"0x1ff00000\" length=\"0x20000\"/>" // bootrom
"</memory-map>";

static const char* const memory_map_template_H72X3X =
"<?xml version=\"1.0\"?>"
"<!DOCTYPE memory-map PUBLIC \"+//IDN gnu.org//DTD GDB Memory Map V1.0//EN\""
" \"http://sourceware.org/gdb/gdb-memory-map.dtd\">"
"<memory-map>"
" <memory type=\"rom\" start=\"0x00000000\" length=\"0x40000\"/>" // ITCMRAM 64kB + Optional remap
" <memory type=\"ram\" start=\"0x20000000\" length=\"0x20000\"/>" // DTCMRAM 128kB
" <memory type=\"ram\" start=\"0x24000000\" length=\"0x80000\"/>" // RAM D1 320kB
" <memory type=\"ram\" start=\"0x30000000\" length=\"0x08000\"/>" // RAM D2 23kB
" <memory type=\"ram\" start=\"0x38000000\" length=\"0x04000\"/>" // RAM D3 16kB
" <memory type=\"ram\" start=\"0x38800000\" length=\"0x01000\"/>" // Backup RAM 4kB
" <memory type=\"flash\" start=\"0x08000000\" length=\"0x%x\">"
" <property name=\"blocksize\">0x%x</property>"
" </memory>"
" <memory type=\"ram\" start=\"0x40000000\" length=\"0x1fffffff\"/>" // peripheral regs
" <memory type=\"ram\" start=\"0xe0000000\" length=\"0x1fffffff\"/>" // cortex regs
" <memory type=\"rom\" start=\"0x1ff00000\" length=\"0x20000\"/>" // bootrom
"</memory-map>";

static const char* const memory_map_template_F4_DE =
"<?xml version=\"1.0\"?>"
Expand Down Expand Up @@ -563,7 +581,11 @@ char* make_memory_map(stlink_t *sl) {
snprintf(map, sz, memory_map_template_L496,
(unsigned int)sl->flash_size,
(unsigned int)sl->flash_size);
} else {
} else if (sl->chip_id == STLINK_CHIPID_STM32_H72X) {
snprintf(map, sz, memory_map_template_H72X3X,
(unsigned int)sl->flash_size,
(unsigned int)sl->flash_pgsz);
} else {
snprintf(map, sz, memory_map_template,
(unsigned int)sl->flash_size,
(unsigned int)sl->sram_size,
Expand Down

0 comments on commit 61e7109

Please sign in to comment.