diff options
Diffstat (limited to 'picosoc/sections.lds')
-rw-r--r-- | picosoc/sections.lds | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/picosoc/sections.lds b/picosoc/sections.lds index 5f74459..f38d813 100644 --- a/picosoc/sections.lds +++ b/picosoc/sections.lds @@ -1,7 +1,15 @@ +#ifdef ICEBREAKER +# define MEM_TOTAL 0x20000 /* 128 KB */ +#elif HX8KDEMO +# define MEM_TOTAL 0x200 /* 2 KB */ +#else +# error "Set -DICEBREAKER or -DHX8KDEMO when compiling firmware.c" +#endif + MEMORY { FLASH (rx) : ORIGIN = 0x00100000, LENGTH = 0x400000 /* entire flash, 4 MiB */ - RAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0x000400 /* 1 KB */ + RAM (xrw) : ORIGIN = 0x00000000, LENGTH = MEM_TOTAL } SECTIONS { |