Skip to content

Commit 9245555

Browse files
committed
Bugfix for linker script
The previous commits needed more stack size than was previously allocated, and changed the STACK_SIZE variable in configure.py accordingly. Strangely, however, the linker still only allocated 2KB to the stack. On further investigation, the line STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x800; doesn't work, it always sets STACK_SIZE to 0x800. But changing it to STACK_SIZE = __stack_size__ works perfectly
1 parent 45846c6 commit 9245555

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

firmware/scripts/samd21g18a.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ SRAM_SIZE = 0x8000; /* 32kB, 32,768 bytes */
7373
* https://gcc.gnu.org/onlinedocs/gnat_ugn/Static-Stack-Usage-Analysis.html
7474
* https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
7575
*/
76-
STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x800;
76+
STACK_SIZE = __stack_size__;
7777

7878
/*
7979
Memory space definition.

0 commit comments

Comments
 (0)