Skip to content

Commit 92b2d0b

Browse files
Bjdooks/fix fpga bootrom makefile (#2969)
The prints after the command invocation makes it easier to work out what went wrong if you get errors in the command, which end up being done silently. For testing, it is useful to be able to control where the CC and OBJCOPY commands are coming from. --------- Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
1 parent 86ad99f commit 92b2d0b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

corev_apu/fpga/src/bootrom/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ UART_BITRATE ?= 115200
1717
HAS_ETHERNET ?= 1
1818
endif
1919

20-
CC = $(RISCV)/bin/${CROSSCOMPILE}gcc
21-
OBJCOPY = $(RISCV)/bin/$(CROSSCOMPILE)objcopy
20+
CC ?= $(RISCV)/bin/${CROSSCOMPILE}gcc
21+
OBJCOPY ?= $(RISCV)/bin/$(CROSSCOMPILE)objcopy
2222
SED = sed
2323
PLATFORM_DEFINES = -DCLOCK_FREQUENCY=$(CLOCK_FREQUENCY) -DUART_BITRATE=$(UART_BITRATE) -D$(PLATFORM)
2424

@@ -65,12 +65,12 @@ $(MAIN): $(DTB) $(OBJS_C) $(OBJS_S) linker.lds
6565
$(OBJCOPY) -O binary $< $@
6666

6767
%.o: %.c
68-
@$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
6968
@echo "CC <= $<"
69+
@$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
7070

7171
%.o: %.S
72-
@$(CC) $(CFLAGS) $(CCASFLAGS) $(INCLUDES) -c $< -o $@
7372
@echo "CC <= $<"
73+
@$(CC) $(CFLAGS) $(CCASFLAGS) $(INCLUDES) -c $< -o $@
7474

7575
%.dts: %.dts.in
7676
$(SED) -e "s/DRAM_SIZE_64/$(DRAM_SIZE_64)/g" \
@@ -85,8 +85,8 @@ $(MAIN): $(DTB) $(OBJS_C) $(OBJS_S) linker.lds
8585
dtc -I dts $< -O dtb -o $@
8686

8787
%.sv: %.img
88-
./gen_rom.py $<
8988
@echo "PYTHON >= $(MAIN_SV)"
89+
./gen_rom.py $<
9090

9191
clean:
9292
$(RM) $(OBJS_C) $(OBJS_S) $(MAIN) $(MAIN_BIN) $(MAIN_IMG) *.dtb *.dts *.sv

0 commit comments

Comments
 (0)