aboutsummaryrefslogtreecommitdiff
path: root/ports/stm32/boards
diff options
context:
space:
mode:
authorJim Mussared2020-08-20 18:12:44 +1000
committerDamien George2020-09-08 23:53:02 +1000
commit30e8162ac49d333b00bae4a7f719a1f24692b062 (patch)
tree01590c9768621e1b690ebb690d55170d2c61e1cd /ports/stm32/boards
parentb27edb8073409a3caee921dd4e2c1b182bd4c0fb (diff)
stm32/rfcore: Update rfcore.c to match how ST examples work.
- Split tables and buffers into SRAM2A/2B. - Use structs rather than word offsets to access tables. - Use FLASH_IPCCDBA register value rather than option bytes directly.
Diffstat (limited to 'ports/stm32/boards')
-rw-r--r--ports/stm32/boards/stm32wb55xg.ld13
1 files changed, 12 insertions, 1 deletions
diff --git a/ports/stm32/boards/stm32wb55xg.ld b/ports/stm32/boards/stm32wb55xg.ld
index dbeccc189..c3dc5f519 100644
--- a/ports/stm32/boards/stm32wb55xg.ld
+++ b/ports/stm32/boards/stm32wb55xg.ld
@@ -9,7 +9,8 @@ MEMORY
FLASH_APP (rx) : ORIGIN = 0x08004000, LENGTH = 496K /* sectors 4-127 */
FLASH_FS (r) : ORIGIN = 0x08080000, LENGTH = 256K /* sectors 128-191 */
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K /* SRAM1 */
- RAM2A (xrw) : ORIGIN = 0x20030020, LENGTH = 8K /* SRAM2A */
+ RAM2A (xrw) : ORIGIN = 0x20030000, LENGTH = 10K /* SRAM2A */
+ RAM2B (xrw) : ORIGIN = 0x20038000, LENGTH = 10K /* SRAM2B */
}
/* produce a link error if there is not this amount of RAM for these sections */
@@ -36,10 +37,20 @@ _flash_fs_end = ORIGIN(FLASH_FS) + LENGTH(FLASH_FS);
SECTIONS
{
+ /* Put all IPCC tables into SRAM2A. */
.ram2a_bss :
{
. = ALIGN(4);
+ . = . + 64; /* Leave room for the mb_ref_table_t (assuming IPCCDBA==0). */
*rfcore.o(.bss.ipcc_mem_*)
. = ALIGN(4);
} >RAM2A
+
+ /* Put all IPCC buffers into SRAM2B. */
+ .ram2b_bss :
+ {
+ . = ALIGN(4);
+ *rfcore.o(.bss.ipcc_membuf_*)
+ . = ALIGN(4);
+ } >RAM2B
}