From c8bf60cada3d77d5db122b636f37530263a9046a Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Wed, 12 Feb 2025 15:37:45 +0100 Subject: [PATCH] Now fetching libgcc.a from upstream properly --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 72efea9..97dc6fd 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ REV := master -BASE := https://raw.githubusercontent.com/cnlohr/ch32v003fun/$(REV)/ch32fun +BASE := https://raw.githubusercontent.com/cnlohr/ch32v003fun/$(REV) CURL_FLAGS := -O -\# --fail --location --tlsv1.3 --proto =https --max-time 300 TARGET = blink @@ -38,7 +38,7 @@ EXTFLAGS := -march=rv32ec \ default: $(TARGET).bin -$(TARGET).elf: $(SRC) | ch32v003.ld ch32fun.h ch32v003hw.h +$(TARGET).elf: $(SRC) libgcc.a | ch32v003.ld ch32fun.h ch32v003hw.h @echo CC $@ @$(CC) $(CFLAGS) $(LDFLAGS) $(EXTFLAGS) -o $@ $^ @@ -52,7 +52,11 @@ ch32v003.ld: ch32fun.ld # Rule to use curl to fetch all files beginning with ch32 ch32%: @echo "Fetching $@" - @curl $(CURL_FLAGS) $(BASE)/$@ + @curl $(CURL_FLAGS) $(BASE)/ch32fun/$@ + +libgcc.a: + @echo "Fetching $@" + @curl $(CURL_FLAGS) $(BASE)/misc/$@ %.bin : %.elf $(OBJCOPY) -O binary $< $@ @@ -71,7 +75,7 @@ flash2: $(TARGET).bin clean: rm -f ch32*.[ch] - rm -f *.{ld,hex,bin,map,lst,elf} + rm -f *.{ld,hex,bin,map,lst,elf,a} .PHONY: clean flash deps default