File tree Expand file tree Collapse file tree 6 files changed +42
-12
lines changed
TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG Expand file tree Collapse file tree 6 files changed +42
-12
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ void SystemInit(void)
97
97
#ifdef VECT_TAB_SRAM
98
98
SCB -> VTOR = SRAM_BASE | VECT_TAB_OFFSET ; /* Vector Table Relocation in Internal SRAM */
99
99
#else
100
- SCB -> VTOR = FLASH_BASE | VECT_TAB_OFFSET ; /* Vector Table Relocation in Internal FLASH */
100
+ SCB -> VTOR = NVIC_FLASH_VECTOR_ADDRESS ; /* Vector Table Relocation in Internal FLASH */
101
101
#endif
102
102
103
103
}
@@ -214,7 +214,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
214
214
return 0 ; // FAIL
215
215
}
216
216
#endif
217
-
217
+
218
218
// Select LSE output as LPUART1 clock source
219
219
RCC_PeriphClkInit .PeriphClockSelection = RCC_PERIPHCLK_RTC | RCC_PERIPHCLK_LPUART1 ;
220
220
RCC_PeriphClkInit .Lpuart1ClockSelection = RCC_LPUART1CLKSOURCE_LSE ;
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 0x100000
37
+ #endif
38
+
30
39
; 1MB FLASH (0x100000) + 128KB SRAM (0x20000)
31
- LR_IROM1 0x08000000 0x100000 { ; load region size_region
40
+ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
32
41
33
- ER_IROM1 0x08000000 0x100000 { ; 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 0x100000
37
+ #endif
38
+
30
39
; 1MB FLASH (0x100000) + 128KB SRAM (0x20000)
31
- LR_IROM1 0x08000000 0x100000 { ; load region size_region
40
+ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
32
41
33
- ER_IROM1 0x08000000 0x100000 { ; 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 1024k
7
+ #endif
8
+
1
9
/* Linker script to configure memory regions. */
2
10
MEMORY
3
- {
4
- FLASH (rx) : ORIGIN = 0x08000000 , LENGTH = 1024K
11
+ {
12
+ FLASH (rx) : ORIGIN = MBED_APP_START , LENGTH = MBED_APP_SIZE
5
13
SRAM2 (rwx) : ORIGIN = 0x10000188, LENGTH = 32k - 0x188
6
14
SRAM1 (rwx) : ORIGIN = 0x20000000, LENGTH = 96k
7
15
}
10
18
* with other linker script that defines memory regions FLASH and RAM.
11
19
* It references following symbols, which must be defined in code :
12
20
* Reset_Handler : Entry of reset handler
13
- *
21
+ *
14
22
* It defines following symbols, which code can use without definition :
15
23
* __exidx_start
16
24
* __exidx_end
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 = 0x80000; }
3
+
1
4
/* [ROM = 1024kb = 0x100000] */
2
- define symbol __intvec_start__ = 0x08000000 ;
3
- define symbol __region_ROM_start__ = 0x08000000 ;
4
- define symbol __region_ROM_end__ = 0x080FFFFF ;
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
9
/* [RAM = 96kb + 32kb = 0x20000] */
7
10
/* Vector table dynamic copy: Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM */
Original file line number Diff line number Diff line change 1718
1718
"device_has_remove" : [" LPTICKER" ],
1719
1719
"release_versions" : [" 5" ],
1720
1720
"device_name" : " STM32L486RG" ,
1721
+ "bootloader_supported" : true ,
1721
1722
"OUTPUT_EXT" : " hex"
1722
1723
},
1723
1724
"ARCH_MAX" : {
You can’t perform that action at this time.
0 commit comments