Reserve 4 bytes at end of RAM for magic number

This will be used during firmware updates so that the main firmware can
communicate to the bootloader that it should stay in the bootloader for
a firmware update rather than run the main firmware again.
This commit is contained in:
Doug Brown 2023-08-06 20:35:27 -07:00
parent b61d56ed7b
commit 895d96c65d
2 changed files with 4 additions and 4 deletions

View File

@ -185,8 +185,8 @@ SECTIONS
} > RAM
/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
* size of stack_dummy section. Reserve 4 bytes at end of RAM for magic number. */
__StackTop = ORIGIN(RAM) + LENGTH(RAM) - 4;
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop);

View File

@ -185,8 +185,8 @@ SECTIONS
} > RAM
/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
* size of stack_dummy section. Reserve 4 bytes at end of RAM for magic number. */
__StackTop = ORIGIN(RAM) + LENGTH(RAM) - 4;
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop);