File tree Expand file tree Collapse file tree 6 files changed +33
-13
lines changed Expand file tree Collapse file tree 6 files changed +33
-13
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,14 @@ uint32_t *port_stack_get_top(void) {
331
331
return & _estack ;
332
332
}
333
333
334
+ uint32_t * port_heap_get_bottom (void ) {
335
+ return port_stack_get_limit ();
336
+ }
337
+
338
+ uint32_t * port_heap_get_top (void ) {
339
+ return port_stack_get_top ();
340
+ }
341
+
334
342
// Place the word to save 8k from the end of RAM so we and the bootloader don't clobber it.
335
343
#ifdef SAMD21
336
344
uint32_t * safe_word = (uint32_t * ) (HMCRAMC0_ADDR + HMCRAMC0_SIZE - 0x2000 );
Original file line number Diff line number Diff line change @@ -85,6 +85,14 @@ uint32_t *port_stack_get_top(void) {
85
85
return rtcb -> adj_stack_ptr ;
86
86
}
87
87
88
+ uint32_t * port_heap_get_bottom (void ) {
89
+ return port_stack_get_limit ();
90
+ }
91
+
92
+ uint32_t * port_heap_get_top (void ) {
93
+ return port_stack_get_top ();
94
+ }
95
+
88
96
extern uint32_t _ebss ;
89
97
90
98
// Place the word to save just after our BSS section that gets blanked.
Original file line number Diff line number Diff line change 8
8
#include "fsl_flexspi_nor_boot.h"
9
9
#include "fsl_flexspi_nor_config.h"
10
10
11
- /* Component ID definition, used by tools. */
12
- #ifndef FSL_COMPONENT_ID
13
- #define FSL_COMPONENT_ID "platform.drivers.xip_device"
14
- #endif
15
-
16
11
__attribute__((section (".boot_hdr.ivt" )))
17
12
/*************************************
18
13
* IVT Data
@@ -38,7 +33,6 @@ const BOOT_DATA_T boot_data = {
38
33
PLUGIN_FLAG , /* Plugin flag*/
39
34
0xFFFFFFFF /* empty - extra data word */
40
35
};
41
- #endif
42
36
43
37
__attribute__((section (".boot_hdr.conf" )))
44
38
// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
Original file line number Diff line number Diff line change 8
8
#include "fsl_flexspi_nor_boot.h"
9
9
#include "fsl_flexspi_nor_config.h"
10
10
11
- /* Component ID definition, used by tools. */
12
- #ifndef FSL_COMPONENT_ID
13
- #define FSL_COMPONENT_ID "platform.drivers.xip_device"
14
- #endif
15
-
16
11
__attribute__((section (".boot_hdr.ivt" )))
17
12
18
13
/*************************************
@@ -39,7 +34,6 @@ const BOOT_DATA_T boot_data = {
39
34
PLUGIN_FLAG , /* Plugin flag*/
40
35
0xFFFFFFFF /* empty - extra data word */
41
36
};
42
- #endif
43
37
44
38
__attribute__((section (".boot_hdr.conf" )))
45
39
// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
Original file line number Diff line number Diff line change @@ -146,6 +146,14 @@ void reset_cpu(void) {
146
146
NVIC_SystemReset ();
147
147
}
148
148
149
+ uint32_t * port_heap_get_bottom (void ) {
150
+ return port_stack_get_limit ();
151
+ }
152
+
153
+ uint32_t * port_heap_get_top (void ) {
154
+ return port_stack_get_top ();
155
+ }
156
+
149
157
uint32_t * port_stack_get_limit (void ) {
150
158
return & _ebss ;
151
159
}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ safe_mode_t port_init(void) {
50
50
stm32f4_peripherals_gpio_init ();
51
51
52
52
tick_init ();
53
- board_init ();
53
+ board_init ();
54
54
55
55
return NO_SAFE_MODE ;
56
56
}
@@ -71,6 +71,14 @@ void reset_cpu(void) {
71
71
NVIC_SystemReset ();
72
72
}
73
73
74
+ uint32_t * port_heap_get_bottom (void ) {
75
+ return port_stack_get_limit ();
76
+ }
77
+
78
+ uint32_t * port_heap_get_top (void ) {
79
+ return port_stack_get_top ();
80
+ }
81
+
74
82
uint32_t * port_stack_get_limit (void ) {
75
83
return & _ebss ;
76
84
}
You can’t perform that action at this time.
0 commit comments