reworks memory map for flash

This commit is contained in:
Matthew McGowan 2021-09-27 13:39:13 -07:00
parent 48f67d007e
commit 2a05b22f42
2 changed files with 7 additions and 6 deletions

View File

@ -5,9 +5,10 @@
/* Specify the memory areas */ /* Specify the memory areas */
MEMORY MEMORY
{ {
FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 2048K - 64K /* entire flash, sans bootloader region */ FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* entire flash */
FLASH_ISR (rx) : ORIGIN = 0x08010000, LENGTH = 64K /* sector 0 */ FLASH_ISR (rx) : ORIGIN = 0x08010000, LENGTH = 4K /* ISR vector. Kind of wasteful. */
FLASH_FIRMWARE (rx) : ORIGIN = 0x08020000, LENGTH = 2048K - 64K - 64K /* sectors 5+ */ FLASH_FIRMWARE (rx) : ORIGIN = 0x08011000, LENGTH = 1024K-128K-64K-4K /* For now, limit to 1MB so that bank switching is still possible. */
FLASH_FS (rw) : ORIGIN = 0x080e0000, LENGTH = 128K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 640K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 640K
} }

View File

@ -6,9 +6,9 @@
MEMORY MEMORY
{ {
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* entire flash */ FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* entire flash */
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 4K /* todo - wasteful with 4K pages. */ FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 4K /* ISR vector. Kind of wasteful. */
FLASH_FIRMWARE (rx) : ORIGIN = 0x08010000, LENGTH = 1024K-128K-64K FLASH_FIRMWARE (rx) : ORIGIN = 0x08001000, LENGTH = 1024K-128K-4K /* For now, limit to 1MB so that bank switching is still possible. */
FLASH_FS (rw) : ORIGIN = 0x080e0000, LENGTH = 128K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 640K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 640K
} }