Skip to content
Snippets Groups Projects
Commit c23ba249 authored by cw2's avatar cw2
Browse files

Added script to build all examples

Initially Windows-only.
parent 70584eb0
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,12 @@ LDFLAGS+=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L$(CH32V003FUN)/../ ...@@ -18,6 +18,12 @@ LDFLAGS+=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L$(CH32V003FUN)/../
SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c 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) $(TARGET).elf : $(SYSTEM_C) $(TARGET).c $(ADDITIONAL_C_FILES)
$(PREFIX)-gcc -o $@ $^ $(CFLAGS) $(LDFLAGS) $(PREFIX)-gcc -o $@ $^ $(CFLAGS) $(LDFLAGS)
...@@ -47,5 +53,6 @@ cv_flash : $(TARGET).bin ...@@ -47,5 +53,6 @@ cv_flash : $(TARGET).bin
$(MINICHLINK)/minichlink -w $< flash -b $(MINICHLINK)/minichlink -w $< flash -b
cv_clean : 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