Skip to content

Commit 2a05b22

Browse files
committed
reworks memory map for flash
1 parent 48f67d0 commit 2a05b22

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

ports/stm/boards/STM32L4R5_boot.ld

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 2048K - 64K /* entire flash, sans bootloader region */
9-
FLASH_ISR (rx) : ORIGIN = 0x08010000, LENGTH = 64K /* sector 0 */
10-
FLASH_FIRMWARE (rx) : ORIGIN = 0x08020000, LENGTH = 2048K - 64K - 64K /* sectors 5+ */
8+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* entire flash */
9+
FLASH_ISR (rx) : ORIGIN = 0x08010000, LENGTH = 4K /* ISR vector. Kind of wasteful. */
10+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08011000, LENGTH = 1024K-128K-64K-4K /* For now, limit to 1MB so that bank switching is still possible. */
11+
FLASH_FS (rw) : ORIGIN = 0x080e0000, LENGTH = 128K
1112
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 640K
1213
}
1314

ports/stm/boards/STM32L4R5_default.ld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
MEMORY
77
{
88
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* entire flash */
9-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 4K /* todo - wasteful with 4K pages. */
10-
FLASH_FIRMWARE (rx) : ORIGIN = 0x08010000, LENGTH = 1024K-128K-64K
11-
9+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 4K /* ISR vector. Kind of wasteful. */
10+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08001000, LENGTH = 1024K-128K-4K /* For now, limit to 1MB so that bank switching is still possible. */
11+
FLASH_FS (rw) : ORIGIN = 0x080e0000, LENGTH = 128K
1212
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 640K
1313
}
1414

0 commit comments

Comments
 (0)