File tree Expand file tree Collapse file tree 6 files changed +59
-23
lines changed
TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L073RZ/device Expand file tree Collapse file tree 6 files changed +59
-23
lines changed Original file line number Diff line number Diff line change 27
27
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
28
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29
29
30
+ #if !defined(MBED_APP_START)
31
+ #define MBED_APP_START 0x08000000
32
+ #endif
33
+
34
+ #if !defined(MBED_APP_SIZE)
35
+ #define MBED_APP_SIZE 0x30000
36
+ #endif
37
+
30
38
; STM32L073RZ: 192KB FLASH (0x30000) + 20KB RAM (0x5000)
31
- LR_IROM1 0x08000000 0x30000 { ; load region size_region
39
+ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
32
40
33
- ER_IROM1 0x08000000 0x30000 { ; load address = execution address
41
+ ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
34
42
*.o (RESET, +First)
35
43
*(InRoot$$Sections)
36
44
.ANY (+RO)
Original file line number Diff line number Diff line change 32
32
#define MBED_BOOT_STACK_SIZE 0x400
33
33
#endif
34
34
35
+ #if !defined(MBED_APP_START)
36
+ #define MBED_APP_START 0x08000000
37
+ #endif
38
+
39
+ #if !defined(MBED_APP_SIZE)
40
+ #define MBED_APP_SIZE 0x30000
41
+ #endif
42
+
35
43
#define Stack_Size MBED_BOOT_STACK_SIZE
36
44
37
45
; STM32L073RZ: 192KB FLASH (0x30000) + 20KB RAM (0x5000)
38
- LR_IROM1 0x08000000 0x30000 { ; load region size_region
46
+ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
39
47
40
- ER_IROM1 0x08000000 0x30000 { ; load address = execution address
48
+ ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
41
49
*.o (RESET, +First)
42
50
*(InRoot$$Sections)
43
51
.ANY (+RO)
Original file line number Diff line number Diff line change 1
- /* Linker script to configure memory regions. */
2
-
3
- #if !defined(MBED_BOOT_STACK_SIZE)
4
- #define MBED_BOOT_STACK_SIZE 0x400
5
- #endif
6
-
7
- STACK_SIZE = MBED_BOOT_STACK_SIZE;
8
-
9
- MEMORY
10
- {
11
- FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 192k
12
- RAM (rwx) : ORIGIN = 0x200000C0, LENGTH = 20K - 0xC0
13
- }
14
-
15
1
/* Linker script to place sections and symbol values. Should be used together
16
2
* with other linker script that defines memory regions FLASH and RAM.
17
3
* It references following symbols, which must be defined in code :
@@ -39,6 +25,28 @@ MEMORY
39
25
* __stack
40
26
* _estack
41
27
*/
28
+
29
+ #if !defined(MBED_APP_START)
30
+ #define MBED_APP_START 0x08000000
31
+ #endif
32
+
33
+ #if !defined(MBED_APP_SIZE)
34
+ #define MBED_APP_SIZE 0x30000
35
+ #endif
36
+
37
+ #if !defined(MBED_BOOT_STACK_SIZE)
38
+ #define MBED_BOOT_STACK_SIZE 0x400
39
+ #endif
40
+
41
+ STACK_SIZE = MBED_BOOT_STACK_SIZE;
42
+
43
+ /* Linker script to configure memory regions. */
44
+ MEMORY
45
+ {
46
+ FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
47
+ RAM (rwx) : ORIGIN = 0x200000C0, LENGTH = 20K - 0xC0
48
+ }
49
+
42
50
ENTRY (Reset_Handler )
43
51
44
52
SECTIONS
Original file line number Diff line number Diff line change 1
- /* [ROM = 192kb = 0x30000] */
2
- define symbol __intvec_start__ = 0x08000000;
3
- define symbol __region_ROM_start__ = 0x08000000;
4
- define symbol __region_ROM_end__ = 0x0802FFFF;
1
+ if (!isdefinedsymbol(MBED_APP_START)) {
2
+ define symbol MBED_APP_START = 0x08000000;
3
+ }
4
+
5
+ if (!isdefinedsymbol(MBED_APP_SIZE)) {
6
+ define symbol MBED_APP_SIZE = 0x3000;
7
+ }
8
+
9
+ define symbol __intvec_start__ = MBED_APP_START;
10
+ define symbol __region_ROM_start__ = MBED_APP_SIZE;
11
+ define symbol __region_ROM_end__ = MBED_APP_START - MBED_APP_SIZE - 1;
5
12
6
13
/* [RAM = 20kb = 0x5000] Vector table dynamic copy: 48 vectors = 192 bytes (0xC0) to be reserved in RAM */
7
14
define symbol __NVIC_start__ = 0x20000000;
Original file line number Diff line number Diff line change @@ -82,8 +82,12 @@ void SystemInit (void)
82
82
#ifdef VECT_TAB_SRAM
83
83
SCB -> VTOR = SRAM_BASE | VECT_TAB_OFFSET ; /* Vector Table Relocation in Internal SRAM */
84
84
#else
85
+ #ifdef APPLICATION_ADDR
86
+ SCB -> VTOR = APPLICATION_ADDR ; /* Vector Table Relocation in Internal FLASH to offset application*/
87
+ #else
85
88
SCB -> VTOR = FLASH_BASE | VECT_TAB_OFFSET ; /* Vector Table Relocation in Internal FLASH */
86
- #endif
89
+ #endif // end APPLICATION_ADDR
90
+ #endif // end VECT_TAB_SRAM
87
91
88
92
}
89
93
Original file line number Diff line number Diff line change 3139
3139
" MPU"
3140
3140
],
3141
3141
"release_versions" : [" 2" , " 5" ],
3142
+ "bootloader_supported" : true ,
3142
3143
"device_name" : " STM32L073RZ"
3143
3144
},
3144
3145
"NUCLEO_L152RE" : {
You can’t perform that action at this time.
0 commit comments