Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic SRAM size for F4 memory map #1390

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/st-util/gdb-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,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
Loading