Skip to content

Commit b7ec147

Browse files
committed
variants(WB): update linker script
SRAM2a is sufficient to answer BLE secure contraint imposed by Firmware Stack HCI Layer. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 1faff22 commit b7ec147

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

Diff for: variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/ldscript.ld

+9-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,15 @@ SECTIONS
170170
.ARM.attributes 0 : { *(.ARM.attributes) }
171171
MAPPING_TABLE (NOLOAD) : { *(MAPPING_TABLE) } >RAM_SHARED
172172
MB_MEM1 (NOLOAD) : { *(MB_MEM1) } >RAM_SHARED
173-
MB_MEM2 (NOLOAD) : { _sMB_MEM2 = . ; *(MB_MEM2) ; _eMB_MEM2 = . ; } >RAM_SHARED
173+
174+
/* used by the startup to initialize .MB_MEM2 data */
175+
_siMB_MEM2 = LOADADDR(.MB_MEM2);
176+
.MB_MEM2 (NOLOAD) :
177+
{
178+
_sMB_MEM2 = . ;
179+
*(MB_MEM2) ;
180+
_eMB_MEM2 = . ;
181+
} >RAM_SHARED
174182
}
175183

176184

Diff for: variants/STM32WBxx/WB55R(C-E-G)V/ldscript.ld

+12-5
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ MEMORY
4747
{
4848
FLASH (rx) : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
4949
RAM1 (xrw) : ORIGIN = 0x20000004, LENGTH = LD_MAX_DATA_SIZE - 4
50-
RAM_SHARED_SRAM2a (xrw) : ORIGIN = 0x20030000, LENGTH = 2K /* Limited by OptionByte SBRSA when loading firmware Full stack extended */
51-
RAM_SHARED_SRAM2b (xrw) : ORIGIN = 0x20038000, LENGTH = 10K /* Limited by OptionByte SNBRSA when loading firmware Full stack extended */
50+
RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K
5251
}
5352

5453
/* Define output sections */
@@ -169,7 +168,15 @@ SECTIONS
169168
}
170169

171170
.ARM.attributes 0 : { *(.ARM.attributes) }
172-
MAPPING_TABLE (NOLOAD) : { *(MAPPING_TABLE) } >RAM_SHARED_SRAM2a
173-
MB_MEM1 (NOLOAD) : { *(MB_MEM1) } >RAM_SHARED_SRAM2a
174-
MB_MEM2 (NOLOAD) : { _sMB_MEM2 = . ; *(MB_MEM2) ; _eMB_MEM2 = . ; } >RAM_SHARED_SRAM2b
171+
MAPPING_TABLE (NOLOAD) : { *(MAPPING_TABLE) } >RAM_SHARED
172+
MB_MEM1 (NOLOAD) : { *(MB_MEM1) } >RAM_SHARED
173+
174+
/* used by the startup to initialize .MB_MEM2 data */
175+
_siMB_MEM2 = LOADADDR(.MB_MEM2);
176+
.MB_MEM2 (NOLOAD) :
177+
{
178+
_sMB_MEM2 = . ;
179+
*(MB_MEM2) ;
180+
_eMB_MEM2 = . ;
181+
} >RAM_SHARED
175182
}

Diff for: variants/STM32WBxx/WB5MMGH/ldscript.ld

+9-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,13 @@ SECTIONS
170170
.ARM.attributes 0 : { *(.ARM.attributes) }
171171
MAPPING_TABLE (NOLOAD) : { *(MAPPING_TABLE) } >RAM_SHARED
172172
MB_MEM1 (NOLOAD) : { *(MB_MEM1) } >RAM_SHARED
173-
MB_MEM2 (NOLOAD) : { _sMB_MEM2 = . ; *(MB_MEM2) ; _eMB_MEM2 = . ; } >RAM_SHARED
174-
}
175-
176173

174+
/* used by the startup to initialize .MB_MEM2 data */
175+
_siMB_MEM2 = LOADADDR(.MB_MEM2);
176+
.MB_MEM2 (NOLOAD) :
177+
{
178+
_sMB_MEM2 = . ;
179+
*(MB_MEM2) ;
180+
_eMB_MEM2 = . ;
181+
} >RAM_SHARED
182+
}

0 commit comments

Comments
 (0)