diff options
author | Steffen Vogel <post@steffenvogel.de> | 2019-02-11 23:44:47 +0100 |
---|---|---|
committer | Steffen Vogel <post@steffenvogel.de> | 2019-02-11 23:44:47 +0100 |
commit | eb64df6c3e5184ee982bb57c8828b80c798ce1b6 (patch) | |
tree | d30af171f188fe67b658e5d948375b3e2d2871cf /picosoc/sections.lds | |
parent | f3b1246c862c37108f2a472816e2ed2e5b37e269 (diff) | |
download | picorv32-eb64df6c3e5184ee982bb57c8828b80c798ce1b6.tar.gz picorv32-eb64df6c3e5184ee982bb57c8828b80c798ce1b6.zip |
picosoc: use preprocessor for generating target-specific linker script
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 { |