Skip to content
Snippets Groups Projects
Commit 8877437d authored by CNLohr's avatar CNLohr
Browse files

Merge branch 'master' of https://github.com/cnlohr/ch32v003fun

parents 8cd3436f 4e07e5ac
No related branches found
No related tags found
No related merge requests found
PREFIX:=riscv64-unknown-elf
PREFIX?=riscv64-unknown-elf
CH32V003FUN?=../../ch32v003fun
MINICHLINK?=../../minichlink
......@@ -18,6 +18,12 @@ LDFLAGS+=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L$(CH32V003FUN)/../
SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
ifeq ($(OS),Windows_NT)
RM = del /Q /F
else
RM = rm -f
endif
$(TARGET).elf : $(SYSTEM_C) $(TARGET).c $(ADDITIONAL_C_FILES)
$(PREFIX)-gcc -o $@ $^ $(CFLAGS) $(LDFLAGS)
......@@ -47,5 +53,6 @@ cv_flash : $(TARGET).bin
$(MINICHLINK)/minichlink -w $< flash -b
cv_clean :
rm -rf $(TARGET).elf $(TARGET).bin $(TARGET).hex $(TARGET).lst $(TARGET).map $(TARGET).hex
$(RM) $(TARGET).elf $(TARGET).bin $(TARGET).hex $(TARGET).lst $(TARGET).map $(TARGET).hex
build : $(TARGET).bin
@echo off
setlocal
set TARGET=%1
if [%1]==[] set TARGET=build
for /d %%i in (*) do make --directory=%%i %TARGET%
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment