Fix other builds missing new heap bounds functions
This commit is contained in:
parent
834259a2cf
commit
1c39606345
@ -331,6 +331,14 @@ uint32_t *port_stack_get_top(void) {
|
|||||||
return &_estack;
|
return &_estack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t *port_heap_get_bottom(void) {
|
||||||
|
return port_stack_get_limit();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t *port_heap_get_top(void) {
|
||||||
|
return port_stack_get_top();
|
||||||
|
}
|
||||||
|
|
||||||
// Place the word to save 8k from the end of RAM so we and the bootloader don't clobber it.
|
// Place the word to save 8k from the end of RAM so we and the bootloader don't clobber it.
|
||||||
#ifdef SAMD21
|
#ifdef SAMD21
|
||||||
uint32_t* safe_word = (uint32_t*) (HMCRAMC0_ADDR + HMCRAMC0_SIZE - 0x2000);
|
uint32_t* safe_word = (uint32_t*) (HMCRAMC0_ADDR + HMCRAMC0_SIZE - 0x2000);
|
||||||
|
@ -85,6 +85,14 @@ uint32_t *port_stack_get_top(void) {
|
|||||||
return rtcb->adj_stack_ptr;
|
return rtcb->adj_stack_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t *port_heap_get_bottom(void) {
|
||||||
|
return port_stack_get_limit();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t *port_heap_get_top(void) {
|
||||||
|
return port_stack_get_top();
|
||||||
|
}
|
||||||
|
|
||||||
extern uint32_t _ebss;
|
extern uint32_t _ebss;
|
||||||
|
|
||||||
// Place the word to save just after our BSS section that gets blanked.
|
// Place the word to save just after our BSS section that gets blanked.
|
||||||
|
@ -8,11 +8,6 @@
|
|||||||
#include "fsl_flexspi_nor_boot.h"
|
#include "fsl_flexspi_nor_boot.h"
|
||||||
#include "fsl_flexspi_nor_config.h"
|
#include "fsl_flexspi_nor_config.h"
|
||||||
|
|
||||||
/* Component ID definition, used by tools. */
|
|
||||||
#ifndef FSL_COMPONENT_ID
|
|
||||||
#define FSL_COMPONENT_ID "platform.drivers.xip_device"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
__attribute__((section(".boot_hdr.ivt")))
|
__attribute__((section(".boot_hdr.ivt")))
|
||||||
/*************************************
|
/*************************************
|
||||||
* IVT Data
|
* IVT Data
|
||||||
@ -38,7 +33,6 @@ const BOOT_DATA_T boot_data = {
|
|||||||
PLUGIN_FLAG, /* Plugin flag*/
|
PLUGIN_FLAG, /* Plugin flag*/
|
||||||
0xFFFFFFFF /* empty - extra data word */
|
0xFFFFFFFF /* empty - extra data word */
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
__attribute__((section(".boot_hdr.conf")))
|
__attribute__((section(".boot_hdr.conf")))
|
||||||
// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
|
// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
|
||||||
|
@ -8,11 +8,6 @@
|
|||||||
#include "fsl_flexspi_nor_boot.h"
|
#include "fsl_flexspi_nor_boot.h"
|
||||||
#include "fsl_flexspi_nor_config.h"
|
#include "fsl_flexspi_nor_config.h"
|
||||||
|
|
||||||
/* Component ID definition, used by tools. */
|
|
||||||
#ifndef FSL_COMPONENT_ID
|
|
||||||
#define FSL_COMPONENT_ID "platform.drivers.xip_device"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
__attribute__((section(".boot_hdr.ivt")))
|
__attribute__((section(".boot_hdr.ivt")))
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
@ -39,7 +34,6 @@ const BOOT_DATA_T boot_data = {
|
|||||||
PLUGIN_FLAG, /* Plugin flag*/
|
PLUGIN_FLAG, /* Plugin flag*/
|
||||||
0xFFFFFFFF /* empty - extra data word */
|
0xFFFFFFFF /* empty - extra data word */
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
__attribute__((section(".boot_hdr.conf")))
|
__attribute__((section(".boot_hdr.conf")))
|
||||||
// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
|
// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
|
||||||
|
@ -146,6 +146,14 @@ void reset_cpu(void) {
|
|||||||
NVIC_SystemReset();
|
NVIC_SystemReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t *port_heap_get_bottom(void) {
|
||||||
|
return port_stack_get_limit();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t *port_heap_get_top(void) {
|
||||||
|
return port_stack_get_top();
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t *port_stack_get_limit(void) {
|
uint32_t *port_stack_get_limit(void) {
|
||||||
return &_ebss;
|
return &_ebss;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ safe_mode_t port_init(void) {
|
|||||||
stm32f4_peripherals_gpio_init();
|
stm32f4_peripherals_gpio_init();
|
||||||
|
|
||||||
tick_init();
|
tick_init();
|
||||||
board_init();
|
board_init();
|
||||||
|
|
||||||
return NO_SAFE_MODE;
|
return NO_SAFE_MODE;
|
||||||
}
|
}
|
||||||
@ -71,6 +71,14 @@ void reset_cpu(void) {
|
|||||||
NVIC_SystemReset();
|
NVIC_SystemReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t *port_heap_get_bottom(void) {
|
||||||
|
return port_stack_get_limit();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t *port_heap_get_top(void) {
|
||||||
|
return port_stack_get_top();
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t *port_stack_get_limit(void) {
|
uint32_t *port_stack_get_limit(void) {
|
||||||
return &_ebss;
|
return &_ebss;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user