File tree Expand file tree Collapse file tree 5 files changed +43
-12
lines changed
targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH Expand file tree Collapse file tree 5 files changed +43
-12
lines changed Original file line number Diff line number Diff line change 31
31
32
32
#include "stm32f4xx.h"
33
33
#include "mbed_error.h"
34
-
34
+ #include "nvic_addr.h"
35
35
36
36
/*!< Uncomment the following line if you need to relocate your vector Table in
37
37
Internal SRAM. */
@@ -94,7 +94,7 @@ void SystemInit(void)
94
94
#ifdef VECT_TAB_SRAM
95
95
SCB -> VTOR = SRAM_BASE | VECT_TAB_OFFSET ; /* Vector Table Relocation in Internal SRAM */
96
96
#else
97
- SCB -> VTOR = FLASH_BASE | VECT_TAB_OFFSET ; /* Vector Table Relocation in Internal FLASH */
97
+ SCB -> VTOR = NVIC_FLASH_VECTOR_ADDRESS ; /* Vector Table Relocation in Internal FLASH */
98
98
#endif
99
99
100
100
/* In DISCO_F413ZH board, Arduino connector and Wifi embeded module are sharing the same SPI pins */
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) 2017, STMicroelectronics
27
28
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29
30
30
- ; STM32F413ZH: 1536 KB FLASH (0x150000) + 320 KB SRAM (0x50000)
31
- LR_IROM1 0x08000000 0x150000 { ; load region size_region
31
+ #if !defined(MBED_APP_START)
32
+ #define MBED_APP_START 0x08000000
33
+ #endif
32
34
33
- ER_IROM1 0x08000000 0x150000 { ; load address = execution address
35
+ ; 1536KB FLASH (0x150000)
36
+ #if !defined(MBED_APP_SIZE)
37
+ #define MBED_APP_SIZE 0x150000
38
+ #endif
39
+
40
+ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
41
+
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)
37
46
}
38
47
48
+ ; 320KB SRAM (0x50000)
39
49
; Total: 118 vectors = 472 bytes (0x1D8) to be reserved in RAM
40
50
RW_IRAM1 (0x20000000+0x1D8) (0x50000-0x1D8) { ; RW data
41
51
.ANY (+RW +ZI)
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) 2017, STMicroelectronics
27
28
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29
30
30
- ; STM32F413ZH: 1536 KB FLASH (0x150000) + 320 KB SRAM (0x50000)
31
- LR_IROM1 0x08000000 0x150000 { ; load region size_region
31
+ #if !defined(MBED_APP_START)
32
+ #define MBED_APP_START 0x08000000
33
+ #endif
32
34
33
- ER_IROM1 0x08000000 0x150000 { ; load address = execution address
35
+ ; 1536KB FLASH (0x150000)
36
+ #if !defined(MBED_APP_SIZE)
37
+ #define MBED_APP_SIZE 0x150000
38
+ #endif
39
+
40
+ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
41
+
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)
37
46
}
38
47
48
+ ; 320KB SRAM (0x50000)
39
49
; Total: 118 vectors = 472 bytes (0x1D8) to be reserved in RAM
40
50
RW_IRAM1 (0x20000000+0x1D8) (0x50000-0x1D8) { ; RW data
41
51
.ANY (+RW +ZI)
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 1536K
7
+ #endif
8
+
1
9
/* Linker script to configure memory regions. */
2
10
MEMORY
3
11
{
4
- FLASH (rx) : ORIGIN = 0x08000000 , LENGTH = 1536K
12
+ FLASH (rx) : ORIGIN = MBED_APP_START , LENGTH = MBED_APP_SIZE
5
13
RAM (rwx) : ORIGIN = 0x200001D8, LENGTH = 320K - 0x1D8
6
14
}
7
15
Original file line number Diff line number Diff line change 1
1
/* [ROM = 1536kb = 0x180000] */
2
- define symbol __intvec_start__ = 0x08000000;
3
- define symbol __region_ROM_start__ = 0x08000000;
4
- define symbol __region_ROM_end__ = 0x0817FFFF;
2
+ if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x08000000; }
3
+ if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x180000; }
4
+
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 = 320kb = 0x50000] Vector table dynamic copy: 118 vectors = 472 bytes (0x1D8) to be reserved in RAM */
7
10
define symbol __NVIC_start__ = 0x20000000;
You can’t perform that action at this time.
0 commit comments