Skip to content

Commit faa50df

Browse files
authored
Merge pull request #2817 from jepler/stm-linker-scripts
Standardize on FLASH_FIRMWARE section name in linker scripts
2 parents 2b1d3c2 + 7f0f0b3 commit faa50df

19 files changed

+132
-133
lines changed

ports/litex/boards/fomu/fomu-spi.ld

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ ENTRY(_start)
77
/* Specify the memory areas */
88
MEMORY
99
{
10-
FLASH (rx) : ORIGIN = 0x20040000, LENGTH = 0x100000 /* entire flash, 1 MiB */
11-
RAM (xrw) : ORIGIN = 0x10000000, LENGTH = 0x00020000 /* 128 KiB */
10+
FLASH (rx) : ORIGIN = 0x20040000, LENGTH = 0x100000 /* entire flash, 1 MiB */
11+
FLASH_FIRMWARE (rx) : ORIGIN = 0x20040000, LENGTH = 0x100000 /* entire flash, 1 MiB */
12+
RAM (xrw) : ORIGIN = 0x10000000, LENGTH = 0x00020000 /* 128 KiB */
1213
}
1314

1415
/* top end of the stack */
@@ -19,7 +20,7 @@ SECTIONS
1920
{
2021
/* This is the initialized data section
2122
The program executes knowing that the data is in the RAM
22-
but the loader puts the initial values in the FLASH (inidata).
23+
but the loader puts the initial values in the FLASH_FIRMWARE (inidata).
2324
It is one task of the startup to copy the initial values from FLASH to RAM. */
2425
.data : AT ( _sidata )
2526
{
@@ -73,7 +74,7 @@ SECTIONS
7374
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
7475
} >RAM
7576

76-
/* The program code and other data goes into FLASH */
77+
/* The program code and other data goes into FLASH_FIRMWARE */
7778
.text :
7879
{
7980
. = ALIGN(4);
@@ -88,7 +89,7 @@ SECTIONS
8889
. = ALIGN(4);
8990
_etext = .; /* define a global symbol at end of code */
9091
_sidata = _etext; /* This is used by the startup in order to initialize the .data secion */
91-
} >FLASH
92+
} >FLASH_FIRMWARE
9293

9394
/* Uninitialized data section */
9495
.bss :

ports/mimxrt10xx/linking/common.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ MEMORY
2121
/* This can't move because the bootrom looks at this address. */
2222
FLASH_IVT (rx) : ORIGIN = 0x60001000, LENGTH = 4K
2323
/* Place the ISRs 48k in to leave room for the bootloader when it is available. */
24-
FLASH_TEXT (rx) : ORIGIN = 0x6000C000, LENGTH = code_size - 48K
24+
FLASH_FIRMWARE (rx) : ORIGIN = 0x6000C000, LENGTH = code_size - 48K
2525
FLASH_FATFS (r) : ORIGIN = 0x60100000, LENGTH = _ld_flash_size - code_size - _ld_reserved_flash_size
2626
/* Teensy uses the last bit of flash for recovery. */
2727
RESERVED_FLASH : ORIGIN = 0x60100000 + _ld_flash_size - _ld_reserved_flash_size, LENGTH = _ld_reserved_flash_size
@@ -67,15 +67,15 @@ SECTIONS
6767
) .text*) /* .text* sections (code) */
6868
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
6969
. = ALIGN(4);
70-
} > FLASH_TEXT
70+
} > FLASH_FIRMWARE
7171

7272
.ARM.exidx :
7373
{
7474
*(.ARM.exidx*)
7575
*(.gnu.linkonce.armexidx.*)
7676
_etext = .; /* define a global symbol at end of code */
7777
__etext = .; /* define a global symbol at end of code */
78-
} > FLASH_TEXT
78+
} > FLASH_FIRMWARE
7979

8080
_ld_filesystem_start = ORIGIN(FLASH_FATFS);
8181
_ld_filesystem_end = _ld_filesystem_start + LENGTH(FLASH_FATFS);
@@ -87,7 +87,7 @@ SECTIONS
8787
*flexspi_nor_flash_ops.o(.text*)
8888
*fsl_flexspi.o(.text*)
8989
. = ALIGN(4);
90-
} > OCRAM AT> FLASH_TEXT
90+
} > OCRAM AT> FLASH_FIRMWARE
9191
_ld_ocram_data_destination = ADDR(.data);
9292
_ld_ocram_data_flash_copy = LOADADDR(.data);
9393
_ld_ocram_data_size = SIZEOF(.data);
@@ -114,7 +114,7 @@ SECTIONS
114114
*(.itcm.*)
115115

116116
. = ALIGN(4);
117-
} > ITCM AT> FLASH_TEXT
117+
} > ITCM AT> FLASH_FIRMWARE
118118
_ld_itcm_destination = ADDR(.itcm);
119119
_ld_itcm_flash_copy = LOADADDR(.itcm);
120120
_ld_itcm_size = SIZEOF(.itcm);
@@ -126,7 +126,7 @@ SECTIONS
126126
*(.dtcm_data.*)
127127

128128
. = ALIGN(4);
129-
} > DTCM AT> FLASH_TEXT
129+
} > DTCM AT> FLASH_FIRMWARE
130130
_ld_dtcm_data_destination = ADDR(.dtcm_data);
131131
_ld_dtcm_data_flash_copy = LOADADDR(.dtcm_data);
132132
_ld_dtcm_data_size = SIZEOF(.dtcm_data);

ports/stm/boards/STM32F401xd_fs.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 384K /* entire flash */
9-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10-
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11-
FLASH_TEXT (rx) : ORIGIN = 0x08010000, LENGTH = 320K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
8+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 384K /* entire flash */
9+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10+
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08010000, LENGTH = 320K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
1313
}
1414

1515
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32F401xe_boot.ld

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 512K - 64K /* entire flash, sans bootloader region */
9-
FLASH_ISR (rx) : ORIGIN = 0x08010000, LENGTH = 64K /* sector 4 */
10-
FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 384K /* sectors 5,6,7 are 128K */
11-
RAM (xrw) : ORIGIN = 0x20000194, LENGTH = 96K - 0x194
8+
FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 512K - 64K /* entire flash, sans bootloader region */
9+
FLASH_ISR (rx) : ORIGIN = 0x08010000, LENGTH = 64K /* sector 4 */
10+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08020000, LENGTH = 384K /* sectors 5,6,7 are 128K */
11+
RAM (xrw) : ORIGIN = 0x20000194, LENGTH = 96K - 0x194
1212
}
1313

1414
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32F401xe_fs.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K /* entire flash */
9-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10-
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11-
FLASH_TEXT (rx) : ORIGIN = 0x08010000, LENGTH = 448K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
8+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K /* entire flash */
9+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10+
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08010000, LENGTH = 448K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
1313
}
1414

1515
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32F405_boot.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 1024K - 64K /* entire flash, sans bootloader region */
9-
FLASH_ISR (rx) : ORIGIN = 0x08010000, LENGTH = 64K /* sector 0 */
10-
FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 1024K - 64K - 64K /* sectors 5+ */
11-
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
12-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
8+
FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 1024K - 64K /* entire flash, sans bootloader region */
9+
FLASH_ISR (rx) : ORIGIN = 0x08010000, LENGTH = 64K /* sector 0 */
10+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08020000, LENGTH = 1024K - 64K - 64K /* sectors 5+ */
11+
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
12+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
1313
}
1414

1515
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32F405_default.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
9-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10-
FLASH_TEXT (rx) : ORIGIN = 0x08004000, LENGTH = 1008K /* sectors 0-7*/
11-
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
12-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
8+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
9+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08004000, LENGTH = 1008K /* sectors 0-7*/
11+
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
12+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
1313
}
1414

1515
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32F405_fs.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
9-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10-
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11-
FLASH_TEXT (rx) : ORIGIN = 0x08010000, LENGTH = 960K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12-
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
13-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
8+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
9+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10+
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08010000, LENGTH = 960K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12+
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
13+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
1414
}
1515

1616
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32F407_fs.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
9-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10-
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11-
FLASH_TEXT (rx) : ORIGIN = 0x08010000, LENGTH = 960K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12-
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
13-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
8+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
9+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10+
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08010000, LENGTH = 960K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12+
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
13+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
1414
}
1515

1616
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32F411_fs.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K /* entire flash */
9-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10-
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11-
FLASH_TEXT (rx) : ORIGIN = 0x08010000, LENGTH = 448K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
8+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K /* entire flash */
9+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10+
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08010000, LENGTH = 448K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
1313
}
1414

1515
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32F411_nvm.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K /* entire flash */
9-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10-
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 32K /* sectors 1,2 are 16K */
11-
FLASH_NVM (rwx) : ORIGIN = 0x0800C000, LENGTH = 16K /* sector 3 is 16K */
12-
FLASH_TEXT (rx) : ORIGIN = 0x08010000, LENGTH = 448K /* sector 4 is 64K, sectors 5,6,7 are 128K */
13-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
8+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K /* entire flash */
9+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10+
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 32K /* sectors 1,2 are 16K */
11+
FLASH_NVM (rwx) : ORIGIN = 0x0800C000, LENGTH = 16K /* sector 3 is 16K */
12+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08010000, LENGTH = 448K /* sector 4 is 64K, sectors 5,6,7 are 128K */
13+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
1414
}
1515

1616
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32F412_fs.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
9-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10-
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11-
FLASH_TEXT (rx) : ORIGIN = 0x08010000, LENGTH = 960K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K
8+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
9+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
10+
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
11+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08010000, LENGTH = 960K /* sector 4 is 64K, sectors 5,6,7 are 128K */
12+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K
1313
}
1414

1515
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32F746xG_fs.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
/* Specify the memory areas */
3030
MEMORY
3131
{
32-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
33-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 32K /* sector 0 */
34-
FLASH_FS (rx) : ORIGIN = 0x08008000, LENGTH = 96K /* sectors 1,2,3 are 32K */
35-
FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 896K /* sector 4 is 128K, sectors 5,6,7 are 256K */
36-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K
37-
ITCM (xrw) : ORIGIN = 0x00000000, LENGTH = 16K
32+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
33+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 32K /* sector 0 */
34+
FLASH_FS (rx) : ORIGIN = 0x08008000, LENGTH = 96K /* sectors 1,2,3 are 32K */
35+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08020000, LENGTH = 896K /* sector 4 is 128K, sectors 5,6,7 are 256K */
36+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K
37+
ITCM (xrw) : ORIGIN = 0x00000000, LENGTH = 16K
3838
}
3939

4040
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32F767_fs.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
/* Specify the memory areas */
66
MEMORY
77
{
8-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* entire flash */
9-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 32K /* sector 0 */
10-
FLASH_FS (rx) : ORIGIN = 0x08008000, LENGTH = 96K /* sectors 1,2,3 are 32K */
11-
FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 1920K /* sector 4 is 128K, sectors 5,6,7 are 256K */
12-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K
8+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* entire flash */
9+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 32K /* sector 0 */
10+
FLASH_FS (rx) : ORIGIN = 0x08008000, LENGTH = 96K /* sectors 1,2,3 are 32K */
11+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08020000, LENGTH = 1920K /* sector 4 is 128K, sectors 5,6,7 are 256K */
12+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K
1313
}
1414

1515
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/STM32H743_fs.ld

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ _ld_default_stack_size = 24K;
1010
/* Specify the memory areas */
1111
MEMORY
1212
{
13-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
14-
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 128K /* sector 0, 128K */
15-
FLASH_FS (r) : ORIGIN = 0x08020000, LENGTH = 128K /* sector 1, 128K */
16-
FLASH_TEXT (rx) : ORIGIN = 0x08040000, LENGTH = 1792K /* sectors 6*128 + 8*128 */
17-
DTCM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
18-
RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 512K /* AXI SRAM */
19-
SRAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K /* AHB1 SRAM */
20-
SRAM_D3 (xrw) : ORIGIN = 0x30040000, LENGTH = 64K /* AHB2 SRAM */
21-
ITCM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
13+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
14+
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 128K /* sector 0, 128K */
15+
FLASH_FS (r) : ORIGIN = 0x08020000, LENGTH = 128K /* sector 1, 128K */
16+
FLASH_FIRMWARE (rx) : ORIGIN = 0x08040000, LENGTH = 1792K /* sectors 6*128 + 8*128 */
17+
DTCM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
18+
RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 512K /* AXI SRAM */
19+
SRAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K /* AHB1 SRAM */
20+
SRAM_D3 (xrw) : ORIGIN = 0x30040000, LENGTH = 64K /* AHB2 SRAM */
21+
ITCM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
2222
}
2323

2424
/* produce a link error if there is not this amount of RAM for these sections */

ports/stm/boards/common_default.ld

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/* Memory layout for default case.
22

3-
FLASH_ISR .isr_vector
4-
FLASH_TEXT .text
5-
FLASH_TEXT .data
6-
FLASH_FS // ignored for fs use
7-
8-
RAM .data
9-
RAM .bss
10-
RAM .heap
11-
RAM .stack
3+
FLASH_ISR .isr_vector
4+
FLASH_FIRMWARE .text
5+
FLASH_FIRMWARE .data
6+
FLASH_FS // ignored for fs use
7+
8+
RAM .data
9+
RAM .bss
10+
RAM .heap
11+
RAM .stack
1212
*/
1313

1414
ENTRY(Reset_Handler)
@@ -42,7 +42,7 @@ SECTIONS
4242

4343
. = ALIGN(4);
4444
_etext = .; /* define a global symbol at end of code */
45-
} >FLASH_TEXT
45+
} >FLASH_FIRMWARE
4646

4747
/* used by the startup to initialize data */
4848
_sidata = LOADADDR(.data);
@@ -59,7 +59,7 @@ SECTIONS
5959

6060
. = ALIGN(4);
6161
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
62-
} >RAM AT> FLASH_TEXT
62+
} >RAM AT> FLASH_FIRMWARE
6363

6464
/* Uninitialized data section */
6565
.bss :

0 commit comments

Comments
 (0)