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/Makefile | |
parent | f3b1246c862c37108f2a472816e2ed2e5b37e269 (diff) | |
download | picorv32-eb64df6c3e5184ee982bb57c8828b80c798ce1b6.tar.gz picorv32-eb64df6c3e5184ee982bb57c8828b80c798ce1b6.zip |
picosoc: use preprocessor for generating target-specific linker script
Diffstat (limited to 'picosoc/Makefile')
-rw-r--r-- | picosoc/Makefile | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/picosoc/Makefile b/picosoc/Makefile index 29a3b07..ab01df4 100644 --- a/picosoc/Makefile +++ b/picosoc/Makefile @@ -33,8 +33,11 @@ hx8kprog: hx8kdemo.bin hx8kdemo_fw.bin hx8kprog_fw: hx8kdemo_fw.bin iceprog -o 1M hx8kdemo_fw.bin -hx8kdemo_fw.elf: sections.lds start.s firmware.c - riscv32-unknown-elf-gcc -DHX8KDEMO -march=rv32imc -Wl,-Bstatic,-T,sections.lds,--strip-debug -ffreestanding -nostdlib -o hx8kdemo_fw.elf start.s firmware.c +hx8kprog_sections.lds: sections.lds + riscv32-unknown-elf-cpp -P -DHX8KDEMO -o $@ $^ + +hx8kdemo_fw.elf: hx8kdemo_sections.lds start.s firmware.c + riscv32-unknown-elf-gcc -DHX8KDEMO -march=rv32imc -Wl,-Bstatic,-T,hx8kdemo_sections.lds,--strip-debug -ffreestanding -nostdlib -o hx8kdemo_fw.elf start.s firmware.c hx8kdemo_fw.hex: hx8kdemo_fw.elf riscv32-unknown-elf-objcopy -O verilog hx8kdemo_fw.elf hx8kdemo_fw.hex @@ -76,8 +79,11 @@ icebprog: icebreaker.bin icebreaker_fw.bin icebprog_fw: icebreaker_fw.bin iceprog -o 1M icebreaker_fw.bin -icebreaker_fw.elf: sections.lds start.s firmware.c - riscv32-unknown-elf-gcc -DICEBREAKER -march=rv32ic -Wl,-Bstatic,-T,sections.lds,--strip-debug -ffreestanding -nostdlib -o icebreaker_fw.elf start.s firmware.c +icebreaker_sections.lds: sections.lds + riscv32-unknown-elf-cpp -P -DICEBREAKER -o $@ $^ + +icebreaker_fw.elf: icebreaker_sections.lds start.s firmware.c + riscv32-unknown-elf-gcc -DICEBREAKER -march=rv32ic -Wl,-Bstatic,-T,icebreaker_sections.lds,--strip-debug -ffreestanding -nostdlib -o icebreaker_fw.elf start.s firmware.c icebreaker_fw.hex: icebreaker_fw.elf riscv32-unknown-elf-objcopy -O verilog icebreaker_fw.elf icebreaker_fw.hex |