File tree Expand file tree Collapse file tree 5 files changed +39
-10
lines changed
targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC Expand file tree Collapse file tree 5 files changed +39
-10
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ void SystemInit(void)
110
110
#ifdef VECT_TAB_SRAM
111
111
SCB -> VTOR = SRAM_BASE | VECT_TAB_OFFSET ; /* Vector Table Relocation in Internal SRAM */
112
112
#else
113
- SCB -> VTOR = FLASH_BASE | VECT_TAB_OFFSET ; /* Vector Table Relocation in Internal FLASH */
113
+ SCB -> VTOR = NVIC_FLASH_VECTOR_ADDRESS ; /* Vector Table Relocation in Internal FLASH */
114
114
#endif
115
115
116
116
}
Original file line number Diff line number Diff line change
1
+ #! armcc -E
1
2
; Scatter-Loading Description File
2
3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
4
; Copyright (c) 2015, STMicroelectronics
27
28
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29
30
31
+ #if !defined(MBED_APP_START)
32
+ #define MBED_APP_START 0x08000000
33
+ #endif
34
+
35
+ #if !defined(MBED_APP_SIZE)
36
+ #define MBED_APP_SIZE 0x40000
37
+ #endif
38
+
30
39
; 256KB FLASH (0x40000) + 64KB SRAM (0x10000)
31
- LR_IROM1 0x08000000 0x40000 { ; load region size_region
40
+ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
32
41
33
- ER_IROM1 0x08000000 0x40000 { ; load address = execution address
42
+ ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
34
43
*.o (RESET, +First)
35
44
*(InRoot$$Sections)
36
45
.ANY (+RO)
Original file line number Diff line number Diff line change
1
+ #! armcc -E
1
2
; Scatter-Loading Description File
2
3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
4
; Copyright (c) 2015, STMicroelectronics
27
28
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29
30
31
+ #if !defined(MBED_APP_START)
32
+ #define MBED_APP_START 0x08000000
33
+ #endif
34
+
35
+ #if !defined(MBED_APP_SIZE)
36
+ #define MBED_APP_SIZE 0x40000
37
+ #endif
38
+
30
39
; 256KB FLASH (0x40000) + 64KB SRAM (0x10000)
31
- LR_IROM1 0x08000000 0x40000 { ; load region size_region
40
+ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
32
41
33
- ER_IROM1 0x08000000 0x40000 { ; load address = execution address
42
+ ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
34
43
*.o (RESET, +First)
35
44
*(InRoot$$Sections)
36
45
.ANY (+RO)
Original file line number Diff line number Diff line change
1
+ #if !defined(MBED_APP_START)
2
+ #define MBED_APP_START 0x08000000
3
+ #endif
4
+
5
+ #if !defined(MBED_APP_SIZE)
6
+ #define MBED_APP_SIZE 256k
7
+ #endif
8
+
1
9
/* Linker script to configure memory regions. */
2
10
MEMORY
3
11
{
4
- FLASH (rx) : ORIGIN = 0x08000000 , LENGTH = 256K
12
+ FLASH (rx) : ORIGIN = MBED_APP_START , LENGTH = MBED_APP_SIZE
5
13
SRAM1 (rwx) : ORIGIN = 0x20000188, LENGTH = 64k - 0x188
6
14
}
7
15
Original file line number Diff line number Diff line change
1
+ if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x08000000; }
2
+ if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x40000; }
3
+
1
4
/* [ROM = 256kb = 0x40000] */
2
- define symbol __intvec_start__ = 0x08000000 ;
3
- define symbol __region_ROM_start__ = 0x08000000 ;
4
- define symbol __region_ROM_end__ = 0x0803FFFF ;
5
+ define symbol __intvec_start__ = MBED_APP_START ;
6
+ define symbol __region_ROM_start__ = MBED_APP_START ;
7
+ define symbol __region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1 ;
5
8
6
- /* [RAM = 48kb + 16kb = 0xC000 ] */
9
+ /* [RAM = 48kb + 16kb = 0x10000 ] */
7
10
/* Vector table dynamic copy: Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM */
8
11
define symbol __NVIC_start__ = 0x20000000;
9
12
define symbol __NVIC_end__ = 0x20000187; /* Aligned on 8 bytes (392 = 49 x 8) */
You can’t perform that action at this time.
0 commit comments