Skip to content
Snippets Groups Projects
Commit 373f9a7e authored by Cenk Gündoğan's avatar Cenk Gündoğan
Browse files

Merge pull request #4310 from haukepetersen/opt_cortex_vectorcleanup

cpu/cortexm_common: fixes to vectors_cortexm.c
parents c5813167 c389f5be
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,14 @@
#include "kernel_internal.h"
#include "vectors_cortexm.h"
/**
* @brief Interrupt stack canary value
*
* @note 0xe7fe is the ARM Thumb machine code equivalent of asm("bl #-2\n") or
* 'while (1);', i.e. an infinite loop.
*/
#define STACK_CANARY_WORD 0xE7FEE7FEu
/**
* @brief Memory markers, defined in the linker script
* @{
......@@ -47,14 +55,6 @@ extern uint32_t _sram;
extern uint32_t _eram;
/** @} */
/**
* @brief Interrupt stack canary value
*
* @note 0xe7fe is the ARM Thumb machine code equivalent of asm("bl #-2\n") or
* 'while (1);', i.e. an infinite loop.
*/
#define STACK_CANARY_WORD 0xE7FEE7FEu
/**
* @brief Allocation of the interrupt stack
*/
......@@ -81,6 +81,7 @@ void reset_handler_default(void)
pre_startup();
#ifdef DEVELHELP
uint32_t *top;
/* Fill stack space with canary values up until the current stack pointer */
/* Read current stack pointer from CPU register */
......@@ -89,6 +90,7 @@ void reset_handler_default(void)
while (dst < top) {
*(dst++) = STACK_CANARY_WORD;
}
#endif
/* load data section from flash to ram */
for (dst = &_srelocate; dst < &_erelocate; ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment