Skip to content

Commit

Permalink
Merge pull request #1390 from Rocky04/fix_f4_sram_memory_map
Browse files Browse the repository at this point in the history
Dynamic SRAM size for F4 memory map
  • Loading branch information
Nightwalker-87 committed May 13, 2024
2 parents 765ebda + 44c02d9 commit dce9d6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/st-util/gdb-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ char* make_memory_map(stlink_t *sl) {
if (sl->chip_id == STM32_CHIPID_F4 ||
sl->chip_id == STM32_CHIPID_F446 ||
sl->chip_id == STM32_CHIPID_F411xx) {
strcpy(map, memory_map_template_F4);
snprintf(map, sz, memory_map_template_F4,
sl->sram_size);
} else if (sl->chip_id == STM32_CHIPID_F4_DE) {
strcpy(map, memory_map_template_F4_DE);
} else if (sl->core_id == STM32_CORE_ID_M7F_SWD) {
Expand Down
2 changes: 1 addition & 1 deletion src/st-util/memory-map.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static const char* const memory_map_template_F4 =
"<memory-map>"
" <memory type=\"rom\" start=\"0x00000000\" length=\"0x100000\"/>" // code = sram, bootrom or flash; flash is bigger
" <memory type=\"ram\" start=\"0x10000000\" length=\"0x10000\"/>" // ccm ram
" <memory type=\"ram\" start=\"0x20000000\" length=\"0x20000\"/>" // sram
" <memory type=\"ram\" start=\"0x20000000\" length=\"0x%x\"/>" // sram
" <memory type=\"flash\" start=\"0x08000000\" length=\"0x10000\">" // Sectors 0...3
" <property name=\"blocksize\">0x4000</property>" // 16 kB
" </memory>"
Expand Down

0 comments on commit dce9d6e

Please sign in to comment.