summaryrefslogtreecommitdiff
path: root/stmhal/boards
diff options
context:
space:
mode:
authorDave Hylands <dhylands@gmail.com>2016-09-27 23:11:36 -0700
committerDamien George <damien.p.george@gmail.com>2016-10-04 14:31:19 +1100
commit1f433c719b1d29a44c52befdf1476d154ebb3c68 (patch)
treee5daed73647319899ca1da9652de51f443e4316e /stmhal/boards
parentbd925b59c3177542fa69c3c95f9f1a40ced18039 (diff)
stmhal: Fix linker map for STM32L476 chips.
In particular, this makes the L4 .isr_vector section 16K in size so it's the same as the F4/F7 MCUs. The patch also moves the L4 filesystem to the end of flash, which allows for 512K filesystem on the 1Mb devices like the STM32L476DISC.
Diffstat (limited to 'stmhal/boards')
-rw-r--r--stmhal/boards/LIMIFROG/mpconfigboard.mk1
-rw-r--r--stmhal/boards/STM32L476DISC/mpconfigboard.mk1
-rw-r--r--stmhal/boards/stm32l476xe.ld9
-rw-r--r--stmhal/boards/stm32l476xg.ld9
4 files changed, 14 insertions, 6 deletions
diff --git a/stmhal/boards/LIMIFROG/mpconfigboard.mk b/stmhal/boards/LIMIFROG/mpconfigboard.mk
index cb89e25f5..a1304b655 100644
--- a/stmhal/boards/LIMIFROG/mpconfigboard.mk
+++ b/stmhal/boards/LIMIFROG/mpconfigboard.mk
@@ -2,3 +2,4 @@ MCU_SERIES = l4
CMSIS_MCU = STM32L476xx
AF_FILE = boards/stm32l476_af.csv
LD_FILE = boards/stm32l476xe.ld
+TEXT_ADDR = 0x08004000
diff --git a/stmhal/boards/STM32L476DISC/mpconfigboard.mk b/stmhal/boards/STM32L476DISC/mpconfigboard.mk
index 7049d7206..abb4a3570 100644
--- a/stmhal/boards/STM32L476DISC/mpconfigboard.mk
+++ b/stmhal/boards/STM32L476DISC/mpconfigboard.mk
@@ -2,3 +2,4 @@ MCU_SERIES = l4
CMSIS_MCU = STM32L476xx
AF_FILE = boards/stm32l476_af.csv
LD_FILE = boards/stm32l476xg.ld
+TEXT_ADDR = 0x08004000
diff --git a/stmhal/boards/stm32l476xe.ld b/stmhal/boards/stm32l476xe.ld
index a0fad47a8..114158d8c 100644
--- a/stmhal/boards/stm32l476xe.ld
+++ b/stmhal/boards/stm32l476xe.ld
@@ -6,9 +6,9 @@
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
- FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0000800 /* sector 0, 2 KiB */
- FLASH_FS (r) : ORIGIN = 0x08000800, LENGTH = 0x001F800 /* sectors 1-63 (2K each = 126 KiB) */
- FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x0060000 /* Sector starting @ 64 */
+ FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0004000 /* sectors 0-7, 16 KiB */
+ FLASH_TEXT (rx) : ORIGIN = 0x08004000, LENGTH = 0x005C000 /* sectors 8-191, 368 KiB */
+ FLASH_FS (r) : ORIGIN = 0x08060000, LENGTH = 0x0020000 /* sectors 192-255, 128 KiB */
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
SRAM2 (xrw) : ORIGIN = 0x10000000, LENGTH = 32K
}
@@ -30,3 +30,6 @@ _ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
_heap_start = _ebss; /* heap starts just after statically allocated memory */
_heap_end = 0x20014000; /* tunable */
+
+_flash_fs_start = ORIGIN(FLASH_FS);
+_flash_fs_end = ORIGIN(FLASH_FS) + LENGTH(FLASH_FS);
diff --git a/stmhal/boards/stm32l476xg.ld b/stmhal/boards/stm32l476xg.ld
index 4ca3078cc..b9c29d624 100644
--- a/stmhal/boards/stm32l476xg.ld
+++ b/stmhal/boards/stm32l476xg.ld
@@ -6,9 +6,9 @@
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
- FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0000800 /* sector 0, 2 KiB */
- FLASH_FS (r) : ORIGIN = 0x08000800, LENGTH = 0x001F800 /* sectors 1-63 (2K each = 126 KiB) */
- FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x0080000 /* Sector starting @ 64 */
+ FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0004000 /* sectors 0-7, 16 KiB */
+ FLASH_TEXT (rx) : ORIGIN = 0x08004000, LENGTH = 0x007C000 /* sectors 8-255, 496 KiB */
+ FLASH_FS (r) : ORIGIN = 0x08080000, LENGTH = 0x0080000 /* sectors 256-511 512 KiB */
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
SRAM2 (xrw) : ORIGIN = 0x10000000, LENGTH = 32K
}
@@ -32,3 +32,6 @@ _ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
_heap_start = _ebss; /* heap starts just after statically allocated memory */
_heap_end = 0x20014000; /* tunable */
+
+_flash_fs_start = ORIGIN(FLASH_FS);
+_flash_fs_end = ORIGIN(FLASH_FS) + LENGTH(FLASH_FS);