Fixed memory layout to avoid running into segfaults

This commit is contained in:
Sebastian 2025-12-28 13:07:42 +01:00
parent 524ed8f2c6
commit 24b46a5fff
2 changed files with 7 additions and 27 deletions

View file

@ -1,23 +1,9 @@
MEMORY
{
FLASH : ORIGIN = 0x08000000, LENGTH = 256K
UNINIT : ORIGIN = 0x20000000, LENGTH = 0x10
RAM : ORIGIN = 0x20000010, LENGTH = 64K - LENGTH(UNINIT)
RAM : ORIGIN = 0x20000000, LENGTH = 64K
}
SECTIONS {
.uninit_flags (NOLOAD) : ALIGN(4)
{
. = ALIGN(4);
__suninit_flags = .;
_dfu_magic = .; . += 4;
*(.uninit_flags .uninit_flags.*)
. = ALIGN(4);
__euninit_flags = .;
} > UNINIT
}
/* This is where the call stack will be allocated. */
/* The stack is of the full descending type. */
/* NOTE Do NOT modify `_stack_start` unless you know what you are doing */