gateware/common: Unify a bit with other repo
This just pulls in some small update in various files shared
by several repository. It's mostly comment and formatting, nothing
functionnal really.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Icb7bea1cf7243e9ace819cd567eb006fcc71c808
diff --git a/gateware/common/fw/Makefile b/gateware/common/fw/Makefile
index 3fef9a5..52889ee 100644
--- a/gateware/common/fw/Makefile
+++ b/gateware/common/fw/Makefile
@@ -1,12 +1,14 @@
-CROSS = riscv-none-embed-
+CROSS ?= riscv-none-embed-
CC := $(CROSS)gcc
OBJCOPY := $(CROSS)objcopy
-CFLAGS=-Wall -Os -march=rv32i -mabi=ilp32 -ffreestanding -flto -nostartfiles -fomit-frame-pointer -Wl,--gc-section
+CFLAGS=-Wall -Os -march=rv32i -mabi=ilp32 -ffreestanding -flto -nostartfiles -fomit-frame-pointer -Wl,--gc-section --specs=nano.specs
+
all: boot.hex
+
boot.elf: lnk-boot.lds boot.S
$(CC) $(CFLAGS) -Wl,-Bstatic,-T,lnk-boot.lds,--strip-debug -DAPP_FLASH_ADDR=0x000a0000 -o $@ boot.S
@@ -14,7 +16,7 @@
$(OBJCOPY) -O binary $< $@
%.hex: %.bin
- ./bin2hex.py $< $@
+ hexdump boot.bin -ve '1/4 "%08x\n"' $< > $@
clean:
rm -f *.bin *.hex *.elf *.o