File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -331,6 +331,14 @@ uint32_t *port_stack_get_top(void) {
331331 return & _estack ;
332332}
333333
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+
334342// Place the word to save 8k from the end of RAM so we and the bootloader don't clobber it.
335343#ifdef SAMD21
336344uint32_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) {
8585 return rtcb -> adj_stack_ptr ;
8686}
8787
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+
8896extern uint32_t _ebss ;
8997
9098// Place the word to save just after our BSS section that gets blanked.
Original file line number Diff line number Diff line change 88#include "fsl_flexspi_nor_boot.h"
99#include "fsl_flexspi_nor_config.h"
1010
11- /* Component ID definition, used by tools. */
12- #ifndef FSL_COMPONENT_ID
13- #define FSL_COMPONENT_ID "platform.drivers.xip_device"
14- #endif
15-
1611__attribute__((section (".boot_hdr.ivt" )))
1712/*************************************
1813 * IVT Data
@@ -38,7 +33,6 @@ const BOOT_DATA_T boot_data = {
3833 PLUGIN_FLAG , /* Plugin flag*/
3934 0xFFFFFFFF /* empty - extra data word */
4035};
41- #endif
4236
4337__attribute__((section (".boot_hdr.conf" )))
4438// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
Original file line number Diff line number Diff line change 88#include "fsl_flexspi_nor_boot.h"
99#include "fsl_flexspi_nor_config.h"
1010
11- /* Component ID definition, used by tools. */
12- #ifndef FSL_COMPONENT_ID
13- #define FSL_COMPONENT_ID "platform.drivers.xip_device"
14- #endif
15-
1611__attribute__((section (".boot_hdr.ivt" )))
1712
1813/*************************************
@@ -39,7 +34,6 @@ const BOOT_DATA_T boot_data = {
3934 PLUGIN_FLAG , /* Plugin flag*/
4035 0xFFFFFFFF /* empty - extra data word */
4136};
42- #endif
4337
4438__attribute__((section (".boot_hdr.conf" )))
4539// 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) {
146146 NVIC_SystemReset ();
147147}
148148
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+
149157uint32_t * port_stack_get_limit (void ) {
150158 return & _ebss ;
151159}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ safe_mode_t port_init(void) {
5050 stm32f4_peripherals_gpio_init ();
5151
5252 tick_init ();
53- board_init ();
53+ board_init ();
5454
5555 return NO_SAFE_MODE ;
5656}
@@ -71,6 +71,14 @@ void reset_cpu(void) {
7171 NVIC_SystemReset ();
7272}
7373
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+
7482uint32_t * port_stack_get_limit (void ) {
7583 return & _ebss ;
7684}
You can’t perform that action at this time.
0 commit comments