cpu/cortexm_common: define ISR stacksize in cpu.h
This commit is contained in:
parent
31920f9698
commit
cf11b073d6
@ -64,6 +64,15 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Stack size used for the exception (ISR) stack
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#ifndef ISR_STACKSIZE
|
||||||
|
#define ISR_STACKSIZE (512U)
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Some members of the Cortex-M family have architecture specific
|
* @brief Some members of the Cortex-M family have architecture specific
|
||||||
* atomic operations in atomic_arch.c
|
* atomic operations in atomic_arch.c
|
||||||
|
|||||||
@ -31,11 +31,6 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
|||||||
OUTPUT_ARCH(arm)
|
OUTPUT_ARCH(arm)
|
||||||
SEARCH_DIR(.)
|
SEARCH_DIR(.)
|
||||||
|
|
||||||
/* Define the default stack size for interrupt mode. As no context is
|
|
||||||
saved on this stack and ISRs are supposed to be short, it can be fairly
|
|
||||||
small. 512 byte should be a save assumption here */
|
|
||||||
STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : 0x200; /* 512 byte */
|
|
||||||
|
|
||||||
/* Section Definitions */
|
/* Section Definitions */
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
@ -134,7 +129,7 @@ SECTIONS
|
|||||||
{
|
{
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
_sstack = .;
|
_sstack = .;
|
||||||
. = . + STACK_SIZE;
|
KEEP (*(.isr_stack))
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
_estack = .;
|
_estack = .;
|
||||||
} > ram
|
} > ram
|
||||||
|
|||||||
@ -55,6 +55,11 @@ extern uint32_t _eram;
|
|||||||
*/
|
*/
|
||||||
#define STACK_CANARY_WORD 0xE7FEE7FEu
|
#define STACK_CANARY_WORD 0xE7FEE7FEu
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Allocation of the interrupt stack
|
||||||
|
*/
|
||||||
|
__attribute__((used,section(".isr_stack"))) uint8_t isr_stack[ISR_STACKSIZE];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Pre-start routine for CPU-specific settings
|
* @brief Pre-start routine for CPU-specific settings
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user