X-Git-Url: https://git.patrickod.com/blog/commit/?a=blobdiff_plain;f=keywing%2Fmemory.x;fp=keywing%2Fmemory.x;h=bbbe065c20707311b34cf9d9b3510736f67be204;hb=2c5a6ce701efb11787525a42b6ced9957e32e6ca;hp=46f1278ab358d182831714b7a96c1bbe0a11d32a;hpb=ae7e9009c24193d06daa77bdfcde9caeb37053e4;p=keywing-rs.git diff --git a/keywing/memory.x b/keywing/memory.x index 46f1278..bbbe065 100644 --- a/keywing/memory.x +++ b/keywing/memory.x @@ -1,10 +1,13 @@ MEMORY { - /* NOTE K = KiBi = 1024 bytes */ - FLASH : ORIGIN = 0x00000000, LENGTH = 1M - RAM : ORIGIN = 0x20000000, LENGTH = 255K - PANDUMP: ORIGIN = 0x2003FC00, LENGTH = 1K + /* Leave 16k for the default bootloader on the Feather M4 */ + FLASH (rx) : ORIGIN = 0x00000000 + 16K, LENGTH = 512K - 16K + /* Usually 192K RAM. Reserve 1K at the end for storing panic dumps */ + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 191K + PANDUMP (rw) : ORIGIN = 0x20000000 + 191K, LENGTH = 1K } +_stack_start = ORIGIN(RAM) + LENGTH(RAM); _panic_dump_start = ORIGIN(PANDUMP); -_panic_dump_end = ORIGIN(PANDUMP) + LENGTH(PANDUMP); +_panic_dump_end = ORIGIN(PANDUMP) + LENGTH(PANDUMP); +