Skip to content

Commit

Permalink
fixup ldscripts: no need for such a large stack
Browse files Browse the repository at this point in the history
Signed-off-by: John Sanpe <[email protected]>
  • Loading branch information
sanpeqf committed Feb 13, 2024
1 parent a04dd72 commit 85381a2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
10 changes: 4 additions & 6 deletions ldscripts/py32f003x6.ld
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */
Generate a link error if heap and stack don't fit into RAM.
These numbers affect the USED size of RAM
*/
_Min_Heap_Size = 0x200; /* required amount of heap: 512 bytes */
_Min_Stack_Size = 0x400; /* required amount of stack: 1024 bytes */
_Min_Heap_Size = 0x100; /* required amount of heap: 256 bytes */
_Min_Stack_Size = 0x200; /* required amount of stack: 512 bytes */

/* Specify the memory areas */
MEMORY
Expand Down Expand Up @@ -108,7 +108,7 @@ SECTIONS
_sidata = LOADADDR(.data);

/* Initialized data sections goes into RAM, load LMA copy after code */
.data :
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
Expand All @@ -119,7 +119,7 @@ SECTIONS
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH


/* Uninitialized data section */
. = ALIGN(4);
.bss :
Expand Down Expand Up @@ -157,5 +157,3 @@ SECTIONS

.ARM.attributes 0 : { *(.ARM.attributes) }
}


10 changes: 4 additions & 6 deletions ldscripts/py32f003x8.ld
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */
Generate a link error if heap and stack don't fit into RAM.
These numbers affect the USED size of RAM
*/
_Min_Heap_Size = 0x200; /* required amount of heap: 512 bytes */
_Min_Stack_Size = 0x400; /* required amount of stack: 1024 bytes */
_Min_Heap_Size = 0x100; /* required amount of heap: 256 bytes */
_Min_Stack_Size = 0x200; /* required amount of stack: 512 bytes */

/* Specify the memory areas */
MEMORY
Expand Down Expand Up @@ -108,7 +108,7 @@ SECTIONS
_sidata = LOADADDR(.data);

/* Initialized data sections goes into RAM, load LMA copy after code */
.data :
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
Expand All @@ -119,7 +119,7 @@ SECTIONS
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH


/* Uninitialized data section */
. = ALIGN(4);
.bss :
Expand Down Expand Up @@ -157,5 +157,3 @@ SECTIONS

.ARM.attributes 0 : { *(.ARM.attributes) }
}


10 changes: 4 additions & 6 deletions ldscripts/py32f030x6.ld
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */
Generate a link error if heap and stack don't fit into RAM.
These numbers affect the USED size of RAM
*/
_Min_Heap_Size = 0x200; /* required amount of heap: 512 bytes */
_Min_Stack_Size = 0x400; /* required amount of stack: 1024 bytes */
_Min_Heap_Size = 0x100; /* required amount of heap: 256 bytes */
_Min_Stack_Size = 0x200; /* required amount of stack: 512 bytes */

/* Specify the memory areas */
MEMORY
Expand Down Expand Up @@ -108,7 +108,7 @@ SECTIONS
_sidata = LOADADDR(.data);

/* Initialized data sections goes into RAM, load LMA copy after code */
.data :
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
Expand All @@ -119,7 +119,7 @@ SECTIONS
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH


/* Uninitialized data section */
. = ALIGN(4);
.bss :
Expand Down Expand Up @@ -157,5 +157,3 @@ SECTIONS

.ARM.attributes 0 : { *(.ARM.attributes) }
}


10 changes: 4 additions & 6 deletions ldscripts/py32f030x8.ld
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */
Generate a link error if heap and stack don't fit into RAM.
These numbers affect the USED size of RAM
*/
_Min_Heap_Size = 0x200; /* required amount of heap: 512 bytes */
_Min_Stack_Size = 0x400; /* required amount of stack: 1024 bytes */
_Min_Heap_Size = 0x100; /* required amount of heap: 256 bytes */
_Min_Stack_Size = 0x200; /* required amount of stack: 512 bytes */

/* Specify the memory areas */
MEMORY
Expand Down Expand Up @@ -108,7 +108,7 @@ SECTIONS
_sidata = LOADADDR(.data);

/* Initialized data sections goes into RAM, load LMA copy after code */
.data :
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
Expand All @@ -119,7 +119,7 @@ SECTIONS
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH


/* Uninitialized data section */
. = ALIGN(4);
.bss :
Expand Down Expand Up @@ -157,5 +157,3 @@ SECTIONS

.ARM.attributes 0 : { *(.ARM.attributes) }
}


0 comments on commit 85381a2

Please sign in to comment.