File tree Expand file tree Collapse file tree 5 files changed +53
-7
lines changed
targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/device Expand file tree Collapse file tree 5 files changed +53
-7
lines changed Original file line number Diff line number Diff line change 228
228
"DISCO_F407VG" : {
229
229
"crash-capture-enabled" : true ,
230
230
"fatal-error-auto-reboot-enabled" : true
231
+ },
232
+ "DISCO_F413ZH" : {
233
+ "crash-capture-enabled" : true ,
234
+ "fatal-error-auto-reboot-enabled" : true
231
235
}
232
236
}
233
237
}
Original file line number Diff line number Diff line change 54
54
; Total: 118 vectors = 472 bytes (0x1D8) to be reserved in RAM
55
55
#define VECTOR_SIZE 0x1D8
56
56
57
- #define RAM_FIXED_SIZE (MBED_BOOT_STACK_SIZE+VECTOR_SIZE)
57
+ #define MBED_CRASH_REPORT_RAM_SIZE 0x100
58
+
59
+ #define MBED_IRAM1_START (MBED_RAM_START + VECTOR_SIZE + MBED_CRASH_REPORT_RAM_SIZE)
60
+ #define MBED_IRAM1_SIZE (MBED_RAM_SIZE - VECTOR_SIZE - MBED_CRASH_REPORT_RAM_SIZE)
61
+
62
+ #define RAM_FIXED_SIZE (MBED_BOOT_STACK_SIZE+VECTOR_SIZE+MBED_CRASH_REPORT_RAM_SIZE)
58
63
59
64
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
60
65
@@ -64,7 +69,11 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
64
69
.ANY (+RO)
65
70
}
66
71
67
- RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-VECTOR_SIZE) { ; RW data
72
+ RW_m_crash_data (MBED_RAM_START+VECTOR_SIZE) EMPTY MBED_CRASH_REPORT_RAM_SIZE { ; RW data
73
+ }
74
+
75
+
76
+ RW_IRAM1 MBED_IRAM1_START MBED_IRAM1_SIZE { ; RW data
68
77
.ANY (+RW +ZI)
69
78
}
70
79
Original file line number Diff line number Diff line change 43
43
44
44
#define Stack_Size MBED_BOOT_STACK_SIZE
45
45
46
+ #define MBED_RAM_START 0x20000000
47
+ ; 320KB SRAM (0x50000)
48
+ #define MBED_RAM_SIZE 0x50000
49
+ #define MBED_VECTTABLE_RAM_START (MBED_RAM_START)
50
+ ; Total: 118 vectors = 472 bytes (0x1D8) to be reserved in RAM
51
+ #define MBED_VECTTABLE_RAM_SIZE 0x1D8
52
+ #define MBED_CRASH_REPORT_RAM_START (MBED_VECTTABLE_RAM_START + MBED_VECTTABLE_RAM_SIZE)
53
+ #define MBED_CRASH_REPORT_RAM_SIZE 0x100
54
+ #define MBED_RAM0_START (MBED_CRASH_REPORT_RAM_START + MBED_CRASH_REPORT_RAM_SIZE)
55
+ #define MBED_RAM0_SIZE (MBED_RAM_SIZE - MBED_VECTTABLE_RAM_SIZE - MBED_CRASH_REPORT_RAM_SIZE)
56
+
46
57
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
47
58
48
59
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
@@ -51,13 +62,14 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
51
62
.ANY (+RO)
52
63
}
53
64
54
- ; 320KB SRAM (0x50000)
55
- ; Total: 118 vectors = 472 bytes (0x1D8) to be reserved in RAM
56
- RW_IRAM1 (0x20000000+0x1D8) (0x50000-0x1D8-Stack_Size) { ; RW data
65
+ RW_m_crash_data MBED_CRASH_REPORT_RAM_START EMPTY MBED_CRASH_REPORT_RAM_SIZE { ; RW data
66
+ }
67
+
68
+ RW_IRAM1 (MBED_RAM0_START) (MBED_RAM0_SIZE-Stack_Size) { ; RW data
57
69
.ANY (+RW +ZI)
58
70
}
59
71
60
- ARM_LIB_STACK (0x20000000+0x50000 ) EMPTY -Stack_Size { ; stack
72
+ ARM_LIB_STACK (MBED_RAM0_START+MBED_RAM0_SIZE ) EMPTY -Stack_Size { ; stack
61
73
}
62
74
}
63
75
Original file line number Diff line number Diff line change 12
12
13
13
STACK_SIZE = MBED_BOOT_STACK_SIZE;
14
14
15
+ M_CRASH_DATA_RAM_SIZE = 0x100;
16
+
15
17
/* Linker script to configure memory regions. */
16
18
MEMORY
17
19
{
@@ -91,6 +93,18 @@ SECTIONS
91
93
__etext = .;
92
94
_sidata = .;
93
95
96
+ .crash_data_ram :
97
+ {
98
+ . = ALIGN (8);
99
+ __CRASH_DATA_RAM__ = .;
100
+ __CRASH_DATA_RAM_START__ = .; /* Create a global symbol at data start */
101
+ KEEP(*(.keep.crash_data_ram))
102
+ *(.m_crash_data_ram) /* This is a user defined section */
103
+ . += M_CRASH_DATA_RAM_SIZE;
104
+ . = ALIGN (8);
105
+ __CRASH_DATA_RAM_END__ = .; /* Define a global symbol at data end */
106
+ } > RAM
107
+
94
108
.data : AT (__etext)
95
109
{
96
110
__data_start__ = .;
Original file line number Diff line number Diff line change @@ -9,14 +9,21 @@ define symbol __region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
9
9
/* [RAM = 320kb = 0x50000] Vector table dynamic copy: 118 vectors = 472 bytes (0x1D8) to be reserved in RAM */
10
10
define symbol __NVIC_start__ = 0x20000000;
11
11
define symbol __NVIC_end__ = 0x200001D7;
12
- define symbol __region_RAM_start__ = 0x200001D8; /* Aligned on 8 bytes */
12
+ define symbol __region_CRASH_DATA_RAM_start__ = 0x200001D8;
13
+ define symbol __region_CRASH_DATA_RAM_end__ = 0x200002D7;
14
+ define symbol __region_RAM_start__ = 0x200002D8; /* Aligned on 8 bytes */
13
15
define symbol __region_RAM_end__ = 0x2004FFFF;
14
16
15
17
/* Memory regions */
16
18
define memory mem with size = 4G;
17
19
define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM_end__];
20
+ define region CRASH_DATA_RAM_region = mem:[from __region_CRASH_DATA_RAM_start__ to __region_CRASH_DATA_RAM_end__];
18
21
define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
19
22
23
+ /* Define Crash Data Symbols */
24
+ define exported symbol __CRASH_DATA_RAM_START__ = __region_CRASH_DATA_RAM_start__;
25
+ define exported symbol __CRASH_DATA_RAM_END__ = __region_CRASH_DATA_RAM_end__;
26
+
20
27
/* Stack and Heap */
21
28
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
22
29
define symbol MBED_BOOT_STACK_SIZE = 0x400;
You can’t perform that action at this time.
0 commit comments