]> mj.ucw.cz Git - home-hw.git/commitdiff
Protab: Use USB boot loader in all examples
authorMartin Mares <mj@ucw.cz>
Mon, 17 Apr 2023 12:09:16 +0000 (14:09 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 17 Apr 2023 12:09:16 +0000 (14:09 +0200)
13 files changed:
protab/blink-usbboot/Makefile [deleted file]
protab/blink-usbboot/blink.c [deleted file]
protab/blink/Makefile
protab/blink2/Makefile
protab/blink3/Makefile
protab/timer1-clock/Makefile
protab/timer2-irq/Makefile
protab/timer3-oc/Makefile
protab/timer4-pwm/Makefile
protab/timer4-pwm/timer.c
protab/timer5-pwm/Makefile
protab/usart1/Makefile
protab/usart2/Makefile

diff --git a/protab/blink-usbboot/Makefile b/protab/blink-usbboot/Makefile
deleted file mode 100644 (file)
index 011261f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-ROOT=../..
-BINARY=blink
-OBJS=blink.o
-LIB_OBJS=
-WITH_BOOT_LOADER=1
-WITH_DFU_FLASH=1
-
-include $(ROOT)/mk/bluepill.mk
diff --git a/protab/blink-usbboot/blink.c b/protab/blink-usbboot/blink.c
deleted file mode 100644 (file)
index 7fe240a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
-
-int main(void)
-{
-       rcc_clock_setup_in_hse_8mhz_out_72mhz();
-       rcc_periph_clock_enable(RCC_GPIOC);
-
-       // PC13 = BluePill LED
-       gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO13);
-
-       for (;;) {
-               gpio_clear(GPIOC, GPIO13);
-
-               for (int i=0; i<10000000; i++)
-                       asm volatile ("");
-
-               gpio_set(GPIOC, GPIO13);
-
-               for (int i=0; i<10000000; i++)
-                       asm volatile ("");
-       }
-}
index 17a67e8d2fac22387a7350058e1917796d2233d5..011261f292c1a9ff99eca637a38d6ff33febf0a8 100644 (file)
@@ -2,5 +2,7 @@ ROOT=../..
 BINARY=blink
 OBJS=blink.o
 LIB_OBJS=
+WITH_BOOT_LOADER=1
+WITH_DFU_FLASH=1
 
 include $(ROOT)/mk/bluepill.mk
index 17a67e8d2fac22387a7350058e1917796d2233d5..011261f292c1a9ff99eca637a38d6ff33febf0a8 100644 (file)
@@ -2,5 +2,7 @@ ROOT=../..
 BINARY=blink
 OBJS=blink.o
 LIB_OBJS=
+WITH_BOOT_LOADER=1
+WITH_DFU_FLASH=1
 
 include $(ROOT)/mk/bluepill.mk
index 17a67e8d2fac22387a7350058e1917796d2233d5..011261f292c1a9ff99eca637a38d6ff33febf0a8 100644 (file)
@@ -2,5 +2,7 @@ ROOT=../..
 BINARY=blink
 OBJS=blink.o
 LIB_OBJS=
+WITH_BOOT_LOADER=1
+WITH_DFU_FLASH=1
 
 include $(ROOT)/mk/bluepill.mk
index 9f34630df9cbd610ac95f117e5b7482b586e0515..3e812c170017b16392bba06fb23aa789cced2eab 100644 (file)
@@ -2,5 +2,7 @@ ROOT=../..
 BINARY=timer
 OBJS=timer.o
 LIB_OBJS=
+WITH_BOOT_LOADER=1
+WITH_DFU_FLASH=1
 
 include $(ROOT)/mk/bluepill.mk
index 9f34630df9cbd610ac95f117e5b7482b586e0515..3e812c170017b16392bba06fb23aa789cced2eab 100644 (file)
@@ -2,5 +2,7 @@ ROOT=../..
 BINARY=timer
 OBJS=timer.o
 LIB_OBJS=
+WITH_BOOT_LOADER=1
+WITH_DFU_FLASH=1
 
 include $(ROOT)/mk/bluepill.mk
index 9f34630df9cbd610ac95f117e5b7482b586e0515..3e812c170017b16392bba06fb23aa789cced2eab 100644 (file)
@@ -2,5 +2,7 @@ ROOT=../..
 BINARY=timer
 OBJS=timer.o
 LIB_OBJS=
+WITH_BOOT_LOADER=1
+WITH_DFU_FLASH=1
 
 include $(ROOT)/mk/bluepill.mk
index 9f34630df9cbd610ac95f117e5b7482b586e0515..3e812c170017b16392bba06fb23aa789cced2eab 100644 (file)
@@ -2,5 +2,7 @@ ROOT=../..
 BINARY=timer
 OBJS=timer.o
 LIB_OBJS=
+WITH_BOOT_LOADER=1
+WITH_DFU_FLASH=1
 
 include $(ROOT)/mk/bluepill.mk
index 77f5b43edde7e2e2e57b4cf18cbdb8924a5d6209..4c07c09bdb365aef6c8b77c1880ffc85a6fb2f97 100644 (file)
@@ -23,7 +23,7 @@ int main(void)
        timer_update_on_overflow(TIM3);
 
        timer_set_oc_mode(TIM3, TIM_OC3, TIM_OCM_PWM1);
-       timer_set_oc_value(TIM3, TIM_OC3, 50);
+       timer_set_oc_value(TIM3, TIM_OC3, 150);
        timer_set_oc_polarity_high(TIM3, TIM_OC3);
        timer_enable_oc_output(TIM3, TIM_OC3);
 
index 9f34630df9cbd610ac95f117e5b7482b586e0515..3e812c170017b16392bba06fb23aa789cced2eab 100644 (file)
@@ -2,5 +2,7 @@ ROOT=../..
 BINARY=timer
 OBJS=timer.o
 LIB_OBJS=
+WITH_BOOT_LOADER=1
+WITH_DFU_FLASH=1
 
 include $(ROOT)/mk/bluepill.mk
index 117ad11d7873f23623099272757029b5df3f35e7..096288feee811ac6fccc3bffbf2f62c7205dd309 100644 (file)
@@ -2,5 +2,7 @@ ROOT=../..
 BINARY=usart
 OBJS=usart.o
 LIB_OBJS=
+WITH_BOOT_LOADER=1
+WITH_DFU_FLASH=1
 
 include $(ROOT)/mk/bluepill.mk
index 117ad11d7873f23623099272757029b5df3f35e7..096288feee811ac6fccc3bffbf2f62c7205dd309 100644 (file)
@@ -2,5 +2,7 @@ ROOT=../..
 BINARY=usart
 OBJS=usart.o
 LIB_OBJS=
+WITH_BOOT_LOADER=1
+WITH_DFU_FLASH=1
 
 include $(ROOT)/mk/bluepill.mk