Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Øyvind Kolås
firmware
Commits
beab46e5
Commit
beab46e5
authored
Oct 17, 2020
by
schneider
Browse files
change(startup): Move stack sizes to linker scripts
parent
3804e445
Changes
5
Hide whitespace changes
Inline
Side-by-side
lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/max32665.ld
View file @
beab46e5
...
...
@@ -57,6 +57,8 @@ SRAM_ADDR = DEFINED(ARM_SRAM_START) ? ARM_SRAM_START : (SDMA_CODE_ADDR + SDMA_CO
/* SRAM_SIZE must be defined */
SRAM_LEN = SRAM_SIZE + SRAM_ORIGIN - SRAM_ADDR;
STACK_SIZE = 0x1000;
/* SPID and SPIX Sections here are maximum possible sizes */
/* If used, they should be adjusted for the external Flash/RAM size */
MEMORY {
...
...
@@ -191,18 +193,11 @@ SECTIONS {
_ebss = ALIGN(., 4);
} > SRAM
/* Setup the stack for Core 1, it will only be used if the user code
* includes a definition of Stack_Size_Core1, which defines the space
* reserved above the main core's stack for core 1's stack */
__StackTop_Core1 = ORIGIN(SRAM) + LENGTH(SRAM);
__StackLimit_Core1 = DEFINED(Stack_Size_Core1) ? __StackTop_Core1 - Stack_Size_Core1 : __StackTop_Core1;
/* Set stack top to end of RAM, and stack limit move down by Stack_Size.
* If core 1 is used, set the stack to the bottom of Core 1's stack region */
__StackTop = DEFINED(Stack_Size_Core1) ? __StackLimit_Core1 : ORIGIN(SRAM) + LENGTH(SRAM);
__StackLimit = __StackTop - Stack_Size;
/* Set stack top to end of RAM, and stack limit move down by Stack_Size. */
__StackTop = ORIGIN(SRAM) + LENGTH(SRAM);
/*__StackLimit = __StackTop - Stack_Size; */
__StackLimit = __StackTop - STACK_SIZE;
.heap (COPY):
{
...
...
lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/max32665_boot.ld
View file @
beab46e5
...
...
@@ -34,6 +34,8 @@
*
******************************************************************************/
STACK_SIZE = 0x1000;
/* SPID and SPIX Sections here are maximum possible sizes */
/* If used, they should be adjusted for the external Flash/RAM size */
MEMORY {
...
...
@@ -120,18 +122,11 @@ SECTIONS {
_ebss = ALIGN(., 4);
} > SRAM
/* Setup the stack for Core 1, it will only be used if the user code
* includes a definition of Stack_Size_Core1, which defines the space
* reserved above the main core's stack for core 1's stack */
__StackTop_Core1 = ORIGIN(SRAM) + LENGTH(SRAM);
__StackLimit_Core1 = DEFINED(Stack_Size_Core1) ? __StackTop_Core1 - Stack_Size_Core1 : __StackTop_Core1;
/* Set stack top to end of RAM, and stack limit move down by Stack_Size.
* If core 1 is used, set the stack to the bottom of Core 1's stack region */
__StackTop = DEFINED(Stack_Size_Core1) ? __StackLimit_Core1 : ORIGIN(SRAM) + LENGTH(SRAM);
__StackLimit = __StackTop - Stack_Size;
/* Set stack top to end of RAM, and stack limit move down by Stack_Size. */
__StackTop = ORIGIN(SRAM) + LENGTH(SRAM);
/*__StackLimit = __StackTop - Stack_Size; */
__StackLimit = __StackTop - STACK_SIZE;
.heap (COPY):
{
...
...
lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/max32665_core0.ld
View file @
beab46e5
...
...
@@ -34,6 +34,8 @@
*
******************************************************************************/
STACK_SIZE = 0x1000;
/* SPID and SPIX Sections here are maximum possible sizes */
/* If used, they should be adjusted for the external Flash/RAM size */
MEMORY {
...
...
@@ -120,18 +122,11 @@ SECTIONS {
_ebss = ALIGN(., 4);
} > SRAM
/* Setup the stack for Core 1, it will only be used if the user code
* includes a definition of Stack_Size_Core1, which defines the space
* reserved above the main core's stack for core 1's stack */
__StackTop_Core1 = ORIGIN(SRAM) + LENGTH(SRAM);
__StackLimit_Core1 = DEFINED(Stack_Size_Core1) ? __StackTop_Core1 - Stack_Size_Core1 : __StackTop_Core1;
/* Set stack top to end of RAM, and stack limit move down by Stack_Size.
* If core 1 is used, set the stack to the bottom of Core 1's stack region */
__StackTop = DEFINED(Stack_Size_Core1) ? __StackLimit_Core1 : ORIGIN(SRAM) + LENGTH(SRAM);
__StackLimit = __StackTop - Stack_Size;
/* Set stack top to end of RAM, and stack limit move down by Stack_Size. */
__StackTop = ORIGIN(SRAM) + LENGTH(SRAM);
/*__StackLimit = __StackTop - Stack_Size; */
__StackLimit = __StackTop - STACK_SIZE;
.heap (COPY):
{
...
...
lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/max32665_core1.ld
View file @
beab46e5
...
...
@@ -34,6 +34,8 @@
*
******************************************************************************/
STACK_SIZE = 0x2000;
/* SPID and SPIX Sections here are maximum possible sizes */
/* If used, they should be adjusted for the external Flash/RAM size */
MEMORY {
...
...
@@ -120,18 +122,11 @@ SECTIONS {
_ebss = ALIGN(., 4);
} > SRAM
/* Setup the stack for Core 1, it will only be used if the user code
* includes a definition of Stack_Size_Core1, which defines the space
* reserved above the main core's stack for core 1's stack */
__StackTop_Core1 = ORIGIN(SRAM) + LENGTH(SRAM);
__StackLimit_Core1 = DEFINED(Stack_Size_Core1) ? __StackTop_Core1 - Stack_Size_Core1 : __StackTop_Core1;
/* Set stack top to end of RAM, and stack limit move down by Stack_Size.
* If core 1 is used, set the stack to the bottom of Core 1's stack region */
__StackTop = DEFINED(Stack_Size_Core1) ? __StackLimit_Core1 : ORIGIN(SRAM) + LENGTH(SRAM);
__StackLimit = __StackTop - Stack_Size;
/* Set stack top to end of RAM, and stack limit move down by Stack_Size. */
__StackTop = ORIGIN(SRAM) + LENGTH(SRAM);
/*__StackLimit = __StackTop - Stack_Size; */
__StackLimit = __StackTop - STACK_SIZE;
.heap (COPY):
{
...
...
lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/startup_max32665.S
View file @
beab46e5
...
...
@@ -63,12 +63,16 @@
.
equ
ARM_SRAM_START
,
__ARM_SRAM_START
#endif
/*
XXX
:
card10
:
Stack
size
moved
to
linker
scripts
.
.
globl
Stack_Size
#ifdef __STACK_SIZE
.
equ
Stack_Size
,
__STACK_SIZE
#else
.
equ
Stack_Size
,
0x00001000
#endif
.
globl
__StackTop
.
globl
__StackLimit
__StackLimit
:
...
...
@@ -76,7 +80,7 @@ __StackLimit:
.
size
__StackLimit
,
.
-
__StackLimit
__StackTop
:
.
size
__StackTop
,
.
-
__StackTop
*/
.
section
.
heap
.
align
3
#ifdef __HEAP_SIZE
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment