From c4281a68c894ddfb8cb22f23c06b4c8038f8b7cf Mon Sep 17 00:00:00 2001
From: cnlohr <lohr85@gmail.com>
Date: Thu, 27 Apr 2023 11:45:36 -0400
Subject: [PATCH] Switch Makefiles to default to flash.

---
 examples/GPIO/Makefile               | 3 ++-
 examples/GPIO_analogRead/Makefile    | 3 ++-
 examples/MCOtest/Makefile            | 3 ++-
 examples/adc_dma_opamp/Makefile      | 3 ++-
 examples/adc_polled/Makefile         | 3 ++-
 examples/blink/Makefile              | 3 ++-
 examples/bootload/Makefile           | 3 ++-
 examples/debugprintfdemo/Makefile    | 3 ++-
 examples/external_crystal/Makefile   | 3 ++-
 examples/i2c_oled/Makefile           | 3 ++-
 examples/optionbytes/Makefile        | 3 ++-
 examples/run_from_ram/Makefile       | 3 ++-
 examples/sandbox/Makefile            | 3 ++-
 examples/self_modify_code/Makefile   | 3 ++-
 examples/spi_dac/Makefile            | 3 ++-
 examples/systick_irq/Makefile        | 3 ++-
 examples/systick_irq_millis/Makefile | 3 ++-
 examples/tim1_pwm/Makefile           | 3 ++-
 examples/uartdemo/Makefile           | 3 ++-
 examples/ws2812bdemo/Makefile        | 3 ++-
 20 files changed, 40 insertions(+), 20 deletions(-)

diff --git a/examples/GPIO/Makefile b/examples/GPIO/Makefile
index c7ee56a..399d16e 100644
--- a/examples/GPIO/Makefile
+++ b/examples/GPIO/Makefile
@@ -1,3 +1,5 @@
+all : flash
+
 TARGET:=GPIO
 
 CFLAGS+=-DTINYVECTOR
@@ -5,7 +7,6 @@ ADDITIONAL_C_FILES+=wiring.c
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/GPIO_analogRead/Makefile b/examples/GPIO_analogRead/Makefile
index ff995e6..e47191e 100644
--- a/examples/GPIO_analogRead/Makefile
+++ b/examples/GPIO_analogRead/Makefile
@@ -1,3 +1,5 @@
+all : flash
+
 TARGET:=GPIO_analogRead
 
 CFLAGS+=-DTINYVECTOR
@@ -5,7 +7,6 @@ ADDITIONAL_C_FILES+=wiring.c
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/MCOtest/Makefile b/examples/MCOtest/Makefile
index 2cdcdbf..20c15bf 100644
--- a/examples/MCOtest/Makefile
+++ b/examples/MCOtest/Makefile
@@ -1,10 +1,11 @@
+all : flash
+
 TARGET:=MCOtest
 
 CFLAGS+=-DTINYVECTOR -DSTDOUT_UART
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/adc_dma_opamp/Makefile b/examples/adc_dma_opamp/Makefile
index acbb935..c8fd9d8 100644
--- a/examples/adc_dma_opamp/Makefile
+++ b/examples/adc_dma_opamp/Makefile
@@ -1,8 +1,9 @@
+all : flash
+
 TARGET:=adc_dma_opamp
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/adc_polled/Makefile b/examples/adc_polled/Makefile
index 0a4ea74..b284c6d 100644
--- a/examples/adc_polled/Makefile
+++ b/examples/adc_polled/Makefile
@@ -1,8 +1,9 @@
+all : flash
+
 TARGET:=adc_polled
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/blink/Makefile b/examples/blink/Makefile
index 63f7ff0..a256345 100644
--- a/examples/blink/Makefile
+++ b/examples/blink/Makefile
@@ -1,8 +1,9 @@
+all : flash
+
 TARGET:=blink
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/bootload/Makefile b/examples/bootload/Makefile
index 47ff5e0..dc85199 100644
--- a/examples/bootload/Makefile
+++ b/examples/bootload/Makefile
@@ -1,8 +1,9 @@
+all : flash
+
 TARGET:=bootload
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/debugprintfdemo/Makefile b/examples/debugprintfdemo/Makefile
index 0e3fda6..ce4ca1c 100644
--- a/examples/debugprintfdemo/Makefile
+++ b/examples/debugprintfdemo/Makefile
@@ -1,8 +1,9 @@
+all : flash
+
 TARGET:=debugprintfdemo
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/external_crystal/Makefile b/examples/external_crystal/Makefile
index a4a4b8d..8c6cf75 100644
--- a/examples/external_crystal/Makefile
+++ b/examples/external_crystal/Makefile
@@ -1,8 +1,9 @@
+all : flash
+
 TARGET:=external_crystal
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/i2c_oled/Makefile b/examples/i2c_oled/Makefile
index 2da3d04..e0d78d5 100644
--- a/examples/i2c_oled/Makefile
+++ b/examples/i2c_oled/Makefile
@@ -1,8 +1,9 @@
+all : flash
+
 TARGET:=i2c_oled
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/optionbytes/Makefile b/examples/optionbytes/Makefile
index fca3e40..5e49195 100644
--- a/examples/optionbytes/Makefile
+++ b/examples/optionbytes/Makefile
@@ -1,10 +1,11 @@
+all : flash
+
 TARGET:=optionbytes
 
 CFLAGS+=-DTINYVECTOR
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/run_from_ram/Makefile b/examples/run_from_ram/Makefile
index 55db45e..4743de5 100644
--- a/examples/run_from_ram/Makefile
+++ b/examples/run_from_ram/Makefile
@@ -1,10 +1,11 @@
+all : flash
+
 TARGET:=run_from_ram
 
 CFLAGS+=-DTINYVECTOR
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/sandbox/Makefile b/examples/sandbox/Makefile
index 1388833..b3f8b71 100644
--- a/examples/sandbox/Makefile
+++ b/examples/sandbox/Makefile
@@ -1,8 +1,9 @@
+all : flash
+
 TARGET:=sandbox
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/self_modify_code/Makefile b/examples/self_modify_code/Makefile
index 80c711c..fb872cf 100644
--- a/examples/self_modify_code/Makefile
+++ b/examples/self_modify_code/Makefile
@@ -1,8 +1,9 @@
+all : flash
+
 TARGET:=self_modify_code
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/spi_dac/Makefile b/examples/spi_dac/Makefile
index 109146e..18ab741 100644
--- a/examples/spi_dac/Makefile
+++ b/examples/spi_dac/Makefile
@@ -1,8 +1,9 @@
+all : flash
+
 TARGET:=spi_dac
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/systick_irq/Makefile b/examples/systick_irq/Makefile
index c9c13de..afac4cd 100644
--- a/examples/systick_irq/Makefile
+++ b/examples/systick_irq/Makefile
@@ -1,8 +1,9 @@
+all : flash
+
 TARGET:=systick_irq
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/systick_irq_millis/Makefile b/examples/systick_irq_millis/Makefile
index e2050f9..641fc4c 100644
--- a/examples/systick_irq_millis/Makefile
+++ b/examples/systick_irq_millis/Makefile
@@ -1,10 +1,11 @@
+all : flash
+
 TARGET:=systick_irq_millis
 
 CFLAGS+=-DSTDOUT_UART
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/tim1_pwm/Makefile b/examples/tim1_pwm/Makefile
index eb2260d..8ece937 100644
--- a/examples/tim1_pwm/Makefile
+++ b/examples/tim1_pwm/Makefile
@@ -1,10 +1,11 @@
+all : flash
+
 TARGET:=tim1_pwm
 
 CFLAGS+=-DSTDOUT_UART
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/uartdemo/Makefile b/examples/uartdemo/Makefile
index d77dc21..0d5fb5d 100644
--- a/examples/uartdemo/Makefile
+++ b/examples/uartdemo/Makefile
@@ -1,10 +1,11 @@
+all : flash
+
 TARGET:=uartdemo
 
 CFLAGS+=-DSTDOUT_UART
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
 
diff --git a/examples/ws2812bdemo/Makefile b/examples/ws2812bdemo/Makefile
index 3c82328..46bcf17 100644
--- a/examples/ws2812bdemo/Makefile
+++ b/examples/ws2812bdemo/Makefile
@@ -1,7 +1,8 @@
+all : flash
+
 TARGET:= ws2812bdemo
 
 include ../../ch32v003fun/ch32v003fun.mk
 
-all : flash
 flash : cv_flash
 clean : cv_clean
-- 
GitLab