diff --git a/Makefile b/Makefile
index c7391f07..139d295e 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ LIBDIR = $(DESTDIR)/$(PREFIX)/lib
SHAREDIR = $(DESTDIR)/$(PREFIX)/share/libopencm3/scripts
INSTALL = install
-TARGETS = stm32 lpc13xx lm3s
+TARGETS = stm32f1 stm32f2 lpc13xx lm3s
# Be silent per default, but 'make V=1' will show all compiler calls.
ifneq ($(V),1)
diff --git a/examples/lm3s/Makefile.include b/examples/lm3s/Makefile.include
index 24248325..0eafe7d3 100644
--- a/examples/lm3s/Makefile.include
+++ b/examples/lm3s/Makefile.include
@@ -25,7 +25,7 @@ LD = $(PREFIX)-gcc
OBJCOPY = $(PREFIX)-objcopy
OBJDUMP = $(PREFIX)-objdump
# Uncomment this line if you want to use the installed (not local) library.
-# TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX)
+# TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
TOOLCHAIN_DIR = ../../../..
CFLAGS += -O0 -g3 -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
-mcpu=cortex-m3 -mthumb -MD
diff --git a/examples/lpc13xx/Makefile.include b/examples/lpc13xx/Makefile.include
index fe2c3ba0..948d6c45 100644
--- a/examples/lpc13xx/Makefile.include
+++ b/examples/lpc13xx/Makefile.include
@@ -25,7 +25,7 @@ LD = $(PREFIX)-gcc
OBJCOPY = $(PREFIX)-objcopy
OBJDUMP = $(PREFIX)-objdump
# Uncomment this line if you want to use the installed (not local) library.
-# TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX)
+# TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
TOOLCHAIN_DIR = ../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
-mcpu=cortex-m3 -mthumb -MD
diff --git a/examples/stm32/Makefile.include b/examples/stm32f1/Makefile.include
similarity index 83%
rename from examples/stm32/Makefile.include
rename to examples/stm32f1/Makefile.include
index a4512e9a..2edd2552 100644
--- a/examples/stm32/Makefile.include
+++ b/examples/stm32f1/Makefile.include
@@ -24,14 +24,13 @@ CC = $(PREFIX)-gcc
LD = $(PREFIX)-gcc
OBJCOPY = $(PREFIX)-objcopy
OBJDUMP = $(PREFIX)-objdump
-GDB = $(PREFIX)-gdb
# Uncomment this line if you want to use the installed (not local) library.
-# TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX)
+#TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
TOOLCHAIN_DIR = ../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
- -fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD
+ -fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F1
LDSCRIPT = $(BINARY).ld
-LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32 \
+LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32f1 \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
-mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float
OBJS += $(BINARY).o
@@ -39,9 +38,6 @@ OBJS += $(BINARY).o
OOCD ?= openocd
OOCD_INTERFACE ?= flossjtag
OOCD_BOARD ?= olimex_stm32_h103
-# Black magic probe specific variables
-# Set the BMP_PORT to a serial port and then BMP is used for flashing
-BMP_PORT ?=
# Be silent per default, but 'make V=1' will show all compiler calls.
ifneq ($(V),1)
@@ -79,9 +75,9 @@ flash: $(BINARY).flash
@#printf " OBJDUMP $(*).list\n"
$(Q)$(OBJDUMP) -S $(*).elf > $(*).list
-%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/stm32/libopencm3_stm32.a
+%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/stm32f1/libopencm3_stm32f1.a
@#printf " LD $(subst $(shell pwd)/,,$(@))\n"
- $(Q)$(LD) -o $(*).elf $(OBJS) -lopencm3_stm32 $(LDFLAGS)
+ $(Q)$(LD) -o $(*).elf $(OBJS) -lopencm3_stm32f1 $(LDFLAGS)
%.o: %.c Makefile
@#printf " CC $(subst $(shell pwd)/,,$(@))\n"
@@ -96,7 +92,6 @@ clean:
$(Q)rm -f *.srec
$(Q)rm -f *.list
-ifeq ($(BMP_PORT),)
ifeq ($(OOCD_SERIAL),)
%.flash: %.hex
@printf " FLASH $<\n"
@@ -121,14 +116,6 @@ else
-c "reset" \
-c "shutdown" $(NULL)
endif
-else
-%.flash: %.elf
- @echo " GDB $(*).elf (flash)"
- $(Q)$(GDB) --batch \
- -ex 'target extended-remote $(BMP_PORT)' \
- -x $(TOOLCHAIN_DIR)/scripts/black_magic_probe_flash.scr \
- $(*).elf
-endif
.PHONY: images clean
diff --git a/examples/stm32/lisa-m/fancyblink/Makefile b/examples/stm32f1/lisa-m/fancyblink/Makefile
similarity index 100%
rename from examples/stm32/lisa-m/fancyblink/Makefile
rename to examples/stm32f1/lisa-m/fancyblink/Makefile
diff --git a/examples/stm32/lisa-m/fancyblink/fancyblink.c b/examples/stm32f1/lisa-m/fancyblink/fancyblink.c
similarity index 96%
rename from examples/stm32/lisa-m/fancyblink/fancyblink.c
rename to examples/stm32f1/lisa-m/fancyblink/fancyblink.c
index 5987bdf2..6d5fbe3a 100644
--- a/examples/stm32/lisa-m/fancyblink/fancyblink.c
+++ b/examples/stm32f1/lisa-m/fancyblink/fancyblink.c
@@ -18,8 +18,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
/* Set STM32 to 72 MHz. */
void clock_setup(void)
diff --git a/examples/stm32/stm32-h103/fancyblink/fancyblink.ld b/examples/stm32f1/lisa-m/fancyblink/fancyblink.ld
similarity index 97%
rename from examples/stm32/stm32-h103/fancyblink/fancyblink.ld
rename to examples/stm32f1/lisa-m/fancyblink/fancyblink.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/stm32-h103/fancyblink/fancyblink.ld
+++ b/examples/stm32f1/lisa-m/fancyblink/fancyblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/lisa-m/usb_dfu/Makefile b/examples/stm32f1/lisa-m/usb_dfu/Makefile
similarity index 100%
rename from examples/stm32/lisa-m/usb_dfu/Makefile
rename to examples/stm32f1/lisa-m/usb_dfu/Makefile
diff --git a/examples/stm32/lisa-m/usb_dfu/README b/examples/stm32f1/lisa-m/usb_dfu/README
similarity index 100%
rename from examples/stm32/lisa-m/usb_dfu/README
rename to examples/stm32f1/lisa-m/usb_dfu/README
diff --git a/examples/stm32/stm32-h103/usb_dfu/usbdfu.c b/examples/stm32f1/lisa-m/usb_dfu/usbdfu.c
similarity index 97%
rename from examples/stm32/stm32-h103/usb_dfu/usbdfu.c
rename to examples/stm32f1/lisa-m/usb_dfu/usbdfu.c
index 7ffbc745..9d184f16 100644
--- a/examples/stm32/stm32-h103/usb_dfu/usbdfu.c
+++ b/examples/stm32f1/lisa-m/usb_dfu/usbdfu.c
@@ -18,10 +18,10 @@
*/
#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#include
#include
diff --git a/examples/stm32/lisa-m/usb_dfu/usbdfu.ld b/examples/stm32f1/lisa-m/usb_dfu/usbdfu.ld
similarity index 96%
rename from examples/stm32/lisa-m/usb_dfu/usbdfu.ld
rename to examples/stm32f1/lisa-m/usb_dfu/usbdfu.ld
index 54e5dac7..6a01797d 100644
--- a/examples/stm32/lisa-m/usb_dfu/usbdfu.ld
+++ b/examples/stm32f1/lisa-m/usb_dfu/usbdfu.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/lisa-m/usb_hid/Makefile b/examples/stm32f1/lisa-m/usb_hid/Makefile
similarity index 100%
rename from examples/stm32/lisa-m/usb_hid/Makefile
rename to examples/stm32f1/lisa-m/usb_hid/Makefile
diff --git a/examples/stm32/lisa-m/usb_hid/README b/examples/stm32f1/lisa-m/usb_hid/README
similarity index 100%
rename from examples/stm32/lisa-m/usb_hid/README
rename to examples/stm32f1/lisa-m/usb_hid/README
diff --git a/examples/stm32/lisa-m/usb_hid/usbhid.c b/examples/stm32f1/lisa-m/usb_hid/usbhid.c
similarity index 98%
rename from examples/stm32/lisa-m/usb_hid/usbhid.c
rename to examples/stm32f1/lisa-m/usb_hid/usbhid.c
index f42454bf..cd9d97dc 100644
--- a/examples/stm32/lisa-m/usb_hid/usbhid.c
+++ b/examples/stm32f1/lisa-m/usb_hid/usbhid.c
@@ -19,8 +19,8 @@
*/
#include
-#include
-#include
+#include
+#include
#include
#include
#include
@@ -30,7 +30,7 @@
#define INCLUDE_DFU_INTERFACE
#ifdef INCLUDE_DFU_INTERFACE
-#include
+#include
#include
#endif
diff --git a/examples/stm32/stm32-h103/usb_hid/usbhid.ld b/examples/stm32f1/lisa-m/usb_hid/usbhid.ld
similarity index 97%
rename from examples/stm32/stm32-h103/usb_hid/usbhid.ld
rename to examples/stm32f1/lisa-m/usb_hid/usbhid.ld
index 928c898a..d0df9e64 100644
--- a/examples/stm32/stm32-h103/usb_hid/usbhid.ld
+++ b/examples/stm32f1/lisa-m/usb_hid/usbhid.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/mb525/fancyblink/Makefile b/examples/stm32f1/mb525/fancyblink/Makefile
similarity index 100%
rename from examples/stm32/mb525/fancyblink/Makefile
rename to examples/stm32f1/mb525/fancyblink/Makefile
diff --git a/examples/stm32/mb525/fancyblink/README b/examples/stm32f1/mb525/fancyblink/README
similarity index 100%
rename from examples/stm32/mb525/fancyblink/README
rename to examples/stm32f1/mb525/fancyblink/README
diff --git a/examples/stm32/mb525/fancyblink/fancyblink.c b/examples/stm32f1/mb525/fancyblink/fancyblink.c
similarity index 96%
rename from examples/stm32/mb525/fancyblink/fancyblink.c
rename to examples/stm32f1/mb525/fancyblink/fancyblink.c
index e9a35646..54ef47c3 100644
--- a/examples/stm32/mb525/fancyblink/fancyblink.c
+++ b/examples/stm32f1/mb525/fancyblink/fancyblink.c
@@ -18,8 +18,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
void clock_setup(void)
{
diff --git a/examples/stm32/mb525/fancyblink/fancyblink.ld b/examples/stm32f1/mb525/fancyblink/fancyblink.ld
similarity index 97%
rename from examples/stm32/mb525/fancyblink/fancyblink.ld
rename to examples/stm32f1/mb525/fancyblink/fancyblink.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/mb525/fancyblink/fancyblink.ld
+++ b/examples/stm32f1/mb525/fancyblink/fancyblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/mb525/pwmleds/Makefile b/examples/stm32f1/mb525/pwmleds/Makefile
similarity index 100%
rename from examples/stm32/mb525/pwmleds/Makefile
rename to examples/stm32f1/mb525/pwmleds/Makefile
diff --git a/examples/stm32/mb525/pwmleds/README b/examples/stm32f1/mb525/pwmleds/README
similarity index 100%
rename from examples/stm32/mb525/pwmleds/README
rename to examples/stm32f1/mb525/pwmleds/README
diff --git a/examples/stm32/mb525/pwmleds/pwmleds.c b/examples/stm32f1/mb525/pwmleds/pwmleds.c
similarity index 99%
rename from examples/stm32/mb525/pwmleds/pwmleds.c
rename to examples/stm32f1/mb525/pwmleds/pwmleds.c
index 393928f3..55052312 100644
--- a/examples/stm32/mb525/pwmleds/pwmleds.c
+++ b/examples/stm32f1/mb525/pwmleds/pwmleds.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
#include
// #define COMPARE
diff --git a/examples/stm32/mb525/pwmleds/pwmleds.ld b/examples/stm32f1/mb525/pwmleds/pwmleds.ld
similarity index 97%
rename from examples/stm32/mb525/pwmleds/pwmleds.ld
rename to examples/stm32f1/mb525/pwmleds/pwmleds.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/mb525/pwmleds/pwmleds.ld
+++ b/examples/stm32f1/mb525/pwmleds/pwmleds.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/can/Makefile b/examples/stm32f1/obldc/can/Makefile
similarity index 100%
rename from examples/stm32/obldc/can/Makefile
rename to examples/stm32f1/obldc/can/Makefile
diff --git a/examples/stm32/obldc/can/can.c b/examples/stm32f1/obldc/can/can.c
similarity index 97%
rename from examples/stm32/obldc/can/can.c
rename to examples/stm32f1/obldc/can/can.c
index 6c63c484..00a05dca 100644
--- a/examples/stm32/obldc/can/can.c
+++ b/examples/stm32f1/obldc/can/can.c
@@ -18,9 +18,9 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include
+#include
+#include
+#include
#include
#include
#include
diff --git a/examples/stm32/obldc/can/can.ld b/examples/stm32f1/obldc/can/can.ld
similarity index 97%
rename from examples/stm32/obldc/can/can.ld
rename to examples/stm32f1/obldc/can/can.ld
index c0765211..4f609a88 100644
--- a/examples/stm32/obldc/can/can.ld
+++ b/examples/stm32f1/obldc/can/can.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/led/Makefile b/examples/stm32f1/obldc/led/Makefile
similarity index 100%
rename from examples/stm32/obldc/led/Makefile
rename to examples/stm32f1/obldc/led/Makefile
diff --git a/examples/stm32/obldc/led/led.c b/examples/stm32f1/obldc/led/led.c
similarity index 96%
rename from examples/stm32/obldc/led/led.c
rename to examples/stm32f1/obldc/led/led.c
index 09ae89de..db479b22 100644
--- a/examples/stm32/obldc/led/led.c
+++ b/examples/stm32f1/obldc/led/led.c
@@ -18,8 +18,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
/* Set STM32 to 72 MHz. */
void clock_setup(void)
diff --git a/examples/stm32/obldc/led/led.ld b/examples/stm32f1/obldc/led/led.ld
similarity index 97%
rename from examples/stm32/obldc/led/led.ld
rename to examples/stm32f1/obldc/led/led.ld
index 78997732..edb52c5a 100644
--- a/examples/stm32/obldc/led/led.ld
+++ b/examples/stm32f1/obldc/led/led.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/pwmleds/Makefile b/examples/stm32f1/obldc/pwmleds/Makefile
similarity index 100%
rename from examples/stm32/obldc/pwmleds/Makefile
rename to examples/stm32f1/obldc/pwmleds/Makefile
diff --git a/examples/stm32/obldc/pwmleds/pwmleds.c b/examples/stm32f1/obldc/pwmleds/pwmleds.c
similarity index 99%
rename from examples/stm32/obldc/pwmleds/pwmleds.c
rename to examples/stm32f1/obldc/pwmleds/pwmleds.c
index 146bb568..faa9aa07 100644
--- a/examples/stm32/obldc/pwmleds/pwmleds.c
+++ b/examples/stm32f1/obldc/pwmleds/pwmleds.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
#include
// #define COMPARE
diff --git a/examples/stm32/obldc/pwmleds/pwmleds.ld b/examples/stm32f1/obldc/pwmleds/pwmleds.ld
similarity index 97%
rename from examples/stm32/obldc/pwmleds/pwmleds.ld
rename to examples/stm32f1/obldc/pwmleds/pwmleds.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/obldc/pwmleds/pwmleds.ld
+++ b/examples/stm32f1/obldc/pwmleds/pwmleds.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/systick/Makefile b/examples/stm32f1/obldc/systick/Makefile
similarity index 100%
rename from examples/stm32/obldc/systick/Makefile
rename to examples/stm32f1/obldc/systick/Makefile
diff --git a/examples/stm32/obldc/systick/systick.c b/examples/stm32f1/obldc/systick/systick.c
similarity index 95%
rename from examples/stm32/obldc/systick/systick.c
rename to examples/stm32f1/obldc/systick/systick.c
index 3d75c4aa..263230f8 100644
--- a/examples/stm32/obldc/systick/systick.c
+++ b/examples/stm32f1/obldc/systick/systick.c
@@ -18,9 +18,9 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include
+#include
+#include
+#include
#include
#include
diff --git a/examples/stm32/obldc/systick/systick.ld b/examples/stm32f1/obldc/systick/systick.ld
similarity index 97%
rename from examples/stm32/obldc/systick/systick.ld
rename to examples/stm32f1/obldc/systick/systick.ld
index da4f2b37..a3195d22 100644
--- a/examples/stm32/obldc/systick/systick.ld
+++ b/examples/stm32f1/obldc/systick/systick.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/usart/Makefile b/examples/stm32f1/obldc/usart/Makefile
similarity index 100%
rename from examples/stm32/obldc/usart/Makefile
rename to examples/stm32f1/obldc/usart/Makefile
diff --git a/examples/stm32/obldc/usart/usart.c b/examples/stm32f1/obldc/usart/usart.c
similarity index 95%
rename from examples/stm32/obldc/usart/usart.c
rename to examples/stm32f1/obldc/usart/usart.c
index ea5ec0e6..b2efe71d 100644
--- a/examples/stm32/obldc/usart/usart.c
+++ b/examples/stm32f1/obldc/usart/usart.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
#include
void clock_setup(void)
@@ -47,7 +47,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_RE_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 230400);
+ usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX);
diff --git a/examples/stm32/obldc/usart/usart.ld b/examples/stm32f1/obldc/usart/usart.ld
similarity index 97%
rename from examples/stm32/obldc/usart/usart.ld
rename to examples/stm32f1/obldc/usart/usart.ld
index 78997732..edb52c5a 100644
--- a/examples/stm32/obldc/usart/usart.ld
+++ b/examples/stm32f1/obldc/usart/usart.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/usart_irq/Makefile b/examples/stm32f1/obldc/usart_irq/Makefile
similarity index 100%
rename from examples/stm32/obldc/usart_irq/Makefile
rename to examples/stm32f1/obldc/usart_irq/Makefile
diff --git a/examples/stm32/obldc/usart_irq/usart_irq.c b/examples/stm32f1/obldc/usart_irq/usart_irq.c
similarity index 96%
rename from examples/stm32/obldc/usart_irq/usart_irq.c
rename to examples/stm32f1/obldc/usart_irq/usart_irq.c
index 82320c1a..20ff0a14 100644
--- a/examples/stm32/obldc/usart_irq/usart_irq.c
+++ b/examples/stm32f1/obldc/usart_irq/usart_irq.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
#include
#include
@@ -52,7 +52,7 @@ void usart_setup(void)
GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RE_RX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 230400);
+ usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_parity(USART1, USART_PARITY_NONE);
diff --git a/examples/stm32/obldc/usart_irq/usart_irq.ld b/examples/stm32f1/obldc/usart_irq/usart_irq.ld
similarity index 97%
rename from examples/stm32/obldc/usart_irq/usart_irq.ld
rename to examples/stm32f1/obldc/usart_irq/usart_irq.ld
index 78997732..edb52c5a 100644
--- a/examples/stm32/obldc/usart_irq/usart_irq.ld
+++ b/examples/stm32f1/obldc/usart_irq/usart_irq.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/adc_temperature_sensor/Makefile b/examples/stm32f1/other/adc_temperature_sensor/Makefile
similarity index 100%
rename from examples/stm32/other/adc_temperature_sensor/Makefile
rename to examples/stm32f1/other/adc_temperature_sensor/Makefile
diff --git a/examples/stm32/other/adc_temperature_sensor/README b/examples/stm32f1/other/adc_temperature_sensor/README
similarity index 100%
rename from examples/stm32/other/adc_temperature_sensor/README
rename to examples/stm32f1/other/adc_temperature_sensor/README
diff --git a/examples/stm32/other/adc_temperature_sensor/adc.c b/examples/stm32f1/other/adc_temperature_sensor/adc.c
similarity index 95%
rename from examples/stm32/other/adc_temperature_sensor/adc.c
rename to examples/stm32f1/other/adc_temperature_sensor/adc.c
index 6c0e828e..a87909cd 100644
--- a/examples/stm32/other/adc_temperature_sensor/adc.c
+++ b/examples/stm32f1/other/adc_temperature_sensor/adc.c
@@ -17,11 +17,11 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#include
-#include
void usart_setup(void)
{
@@ -34,7 +34,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 115200);
+ usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX_RX);
diff --git a/examples/stm32/other/adc_temperature_sensor/adc.ld b/examples/stm32f1/other/adc_temperature_sensor/adc.ld
similarity index 97%
rename from examples/stm32/other/adc_temperature_sensor/adc.ld
rename to examples/stm32f1/other/adc_temperature_sensor/adc.ld
index c0765211..4f609a88 100644
--- a/examples/stm32/other/adc_temperature_sensor/adc.ld
+++ b/examples/stm32f1/other/adc_temperature_sensor/adc.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/dma_mem2mem/Makefile b/examples/stm32f1/other/dma_mem2mem/Makefile
similarity index 100%
rename from examples/stm32/other/dma_mem2mem/Makefile
rename to examples/stm32f1/other/dma_mem2mem/Makefile
diff --git a/examples/stm32/other/dma_mem2mem/README b/examples/stm32f1/other/dma_mem2mem/README
similarity index 100%
rename from examples/stm32/other/dma_mem2mem/README
rename to examples/stm32f1/other/dma_mem2mem/README
diff --git a/examples/stm32/other/dma_mem2mem/dma.c b/examples/stm32f1/other/dma_mem2mem/dma.c
similarity index 94%
rename from examples/stm32/other/dma_mem2mem/dma.c
rename to examples/stm32f1/other/dma_mem2mem/dma.c
index e43fe0df..03894120 100644
--- a/examples/stm32/other/dma_mem2mem/dma.c
+++ b/examples/stm32f1/other/dma_mem2mem/dma.c
@@ -17,11 +17,11 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#include
-#include
void usart_setup(void)
{
@@ -34,7 +34,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 115200);
+ usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX_RX);
diff --git a/examples/stm32/other/dma_mem2mem/dma.ld b/examples/stm32f1/other/dma_mem2mem/dma.ld
similarity index 97%
rename from examples/stm32/other/dma_mem2mem/dma.ld
rename to examples/stm32f1/other/dma_mem2mem/dma.ld
index c0765211..4f609a88 100644
--- a/examples/stm32/other/dma_mem2mem/dma.ld
+++ b/examples/stm32f1/other/dma_mem2mem/dma.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/dogm128/Makefile b/examples/stm32f1/other/dogm128/Makefile
similarity index 100%
rename from examples/stm32/other/dogm128/Makefile
rename to examples/stm32f1/other/dogm128/Makefile
diff --git a/examples/stm32/other/dogm128/README b/examples/stm32f1/other/dogm128/README
similarity index 100%
rename from examples/stm32/other/dogm128/README
rename to examples/stm32f1/other/dogm128/README
diff --git a/examples/stm32/other/dogm128/dogm128.c b/examples/stm32f1/other/dogm128/dogm128.c
similarity index 100%
rename from examples/stm32/other/dogm128/dogm128.c
rename to examples/stm32f1/other/dogm128/dogm128.c
diff --git a/examples/stm32/other/dogm128/dogm128.h b/examples/stm32f1/other/dogm128/dogm128.h
similarity index 98%
rename from examples/stm32/other/dogm128/dogm128.h
rename to examples/stm32f1/other/dogm128/dogm128.h
index ed514abf..de432255 100644
--- a/examples/stm32/other/dogm128/dogm128.h
+++ b/examples/stm32f1/other/dogm128/dogm128.h
@@ -21,7 +21,7 @@
#define DOGM128_H
#include
-#include
+#include
#include
/* PB10 GPIO - ~RESET
diff --git a/examples/stm32/other/dogm128/main.c b/examples/stm32f1/other/dogm128/main.c
similarity index 97%
rename from examples/stm32/other/dogm128/main.c
rename to examples/stm32f1/other/dogm128/main.c
index b12a36d8..508971ed 100644
--- a/examples/stm32/other/dogm128/main.c
+++ b/examples/stm32f1/other/dogm128/main.c
@@ -17,9 +17,9 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include
+#include
+#include
+#include
#include
#include
#include
diff --git a/examples/stm32/other/dogm128/main.ld b/examples/stm32f1/other/dogm128/main.ld
similarity index 97%
rename from examples/stm32/other/dogm128/main.ld
rename to examples/stm32f1/other/dogm128/main.ld
index c0765211..4f609a88 100644
--- a/examples/stm32/other/dogm128/main.ld
+++ b/examples/stm32f1/other/dogm128/main.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/i2c_stts75_sensor/Makefile b/examples/stm32f1/other/i2c_stts75_sensor/Makefile
similarity index 100%
rename from examples/stm32/other/i2c_stts75_sensor/Makefile
rename to examples/stm32f1/other/i2c_stts75_sensor/Makefile
diff --git a/examples/stm32/other/i2c_stts75_sensor/README b/examples/stm32f1/other/i2c_stts75_sensor/README
similarity index 100%
rename from examples/stm32/other/i2c_stts75_sensor/README
rename to examples/stm32f1/other/i2c_stts75_sensor/README
diff --git a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.c b/examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c
similarity index 96%
rename from examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.c
rename to examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c
index f70c80d5..d8f24040 100644
--- a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.c
+++ b/examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c
@@ -17,9 +17,9 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include
+#include
+#include
+#include
#include
#include
#include "stts75.h"
@@ -35,7 +35,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 115200);
+ usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX_RX);
diff --git a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.ld b/examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.ld
similarity index 97%
rename from examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.ld
rename to examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.ld
index c0765211..4f609a88 100644
--- a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.ld
+++ b/examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/i2c_stts75_sensor/stts75.c b/examples/stm32f1/other/i2c_stts75_sensor/stts75.c
similarity index 100%
rename from examples/stm32/other/i2c_stts75_sensor/stts75.c
rename to examples/stm32f1/other/i2c_stts75_sensor/stts75.c
diff --git a/examples/stm32/other/i2c_stts75_sensor/stts75.h b/examples/stm32f1/other/i2c_stts75_sensor/stts75.h
similarity index 100%
rename from examples/stm32/other/i2c_stts75_sensor/stts75.h
rename to examples/stm32f1/other/i2c_stts75_sensor/stts75.h
diff --git a/examples/stm32/other/rtc/Makefile b/examples/stm32f1/other/rtc/Makefile
similarity index 100%
rename from examples/stm32/other/rtc/Makefile
rename to examples/stm32f1/other/rtc/Makefile
diff --git a/examples/stm32/other/rtc/README b/examples/stm32f1/other/rtc/README
similarity index 100%
rename from examples/stm32/other/rtc/README
rename to examples/stm32f1/other/rtc/README
diff --git a/examples/stm32/other/rtc/rtc.c b/examples/stm32f1/other/rtc/rtc.c
similarity index 94%
rename from examples/stm32/other/rtc/rtc.c
rename to examples/stm32f1/other/rtc/rtc.c
index c447534a..28ae24ca 100644
--- a/examples/stm32/other/rtc/rtc.c
+++ b/examples/stm32f1/other/rtc/rtc.c
@@ -17,10 +17,10 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
+#include
#include
-#include
#include
#include
@@ -43,7 +43,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 38400);
+ usart_set_baudrate(USART1, 38400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX);
diff --git a/examples/stm32/other/rtc/rtc.ld b/examples/stm32f1/other/rtc/rtc.ld
similarity index 97%
rename from examples/stm32/other/rtc/rtc.ld
rename to examples/stm32f1/other/rtc/rtc.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/other/rtc/rtc.ld
+++ b/examples/stm32f1/other/rtc/rtc.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/systick/Makefile b/examples/stm32f1/other/systick/Makefile
similarity index 100%
rename from examples/stm32/other/systick/Makefile
rename to examples/stm32f1/other/systick/Makefile
diff --git a/examples/stm32/other/systick/README b/examples/stm32f1/other/systick/README
similarity index 100%
rename from examples/stm32/other/systick/README
rename to examples/stm32f1/other/systick/README
diff --git a/examples/stm32/other/systick/systick.c b/examples/stm32f1/other/systick/systick.c
similarity index 94%
rename from examples/stm32/other/systick/systick.c
rename to examples/stm32f1/other/systick/systick.c
index c05aff74..173ff2af 100644
--- a/examples/stm32/other/systick/systick.c
+++ b/examples/stm32f1/other/systick/systick.c
@@ -17,9 +17,9 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include
+#include
+#include
+#include
#include
#include
diff --git a/examples/stm32/other/systick/systick.ld b/examples/stm32f1/other/systick/systick.ld
similarity index 97%
rename from examples/stm32/other/systick/systick.ld
rename to examples/stm32f1/other/systick/systick.ld
index c0765211..4f609a88 100644
--- a/examples/stm32/other/systick/systick.ld
+++ b/examples/stm32f1/other/systick/systick.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/timer_interrupt/Makefile b/examples/stm32f1/other/timer_interrupt/Makefile
similarity index 100%
rename from examples/stm32/other/timer_interrupt/Makefile
rename to examples/stm32f1/other/timer_interrupt/Makefile
diff --git a/examples/stm32/other/timer_interrupt/README b/examples/stm32f1/other/timer_interrupt/README
similarity index 100%
rename from examples/stm32/other/timer_interrupt/README
rename to examples/stm32f1/other/timer_interrupt/README
diff --git a/examples/stm32/other/timer_interrupt/timer.c b/examples/stm32f1/other/timer_interrupt/timer.c
similarity index 95%
rename from examples/stm32/other/timer_interrupt/timer.c
rename to examples/stm32f1/other/timer_interrupt/timer.c
index aa2cdb67..422df885 100644
--- a/examples/stm32/other/timer_interrupt/timer.c
+++ b/examples/stm32f1/other/timer_interrupt/timer.c
@@ -17,9 +17,9 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include
+#include
+#include
+#include
#include
#include
diff --git a/examples/stm32/other/timer_interrupt/timer.ld b/examples/stm32f1/other/timer_interrupt/timer.ld
similarity index 97%
rename from examples/stm32/other/timer_interrupt/timer.ld
rename to examples/stm32f1/other/timer_interrupt/timer.ld
index c0765211..4f609a88 100644
--- a/examples/stm32/other/timer_interrupt/timer.ld
+++ b/examples/stm32f1/other/timer_interrupt/timer.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/usb_cdcacm/Makefile b/examples/stm32f1/other/usb_cdcacm/Makefile
similarity index 100%
rename from examples/stm32/other/usb_cdcacm/Makefile
rename to examples/stm32f1/other/usb_cdcacm/Makefile
diff --git a/examples/stm32/other/usb_cdcacm/README b/examples/stm32f1/other/usb_cdcacm/README
similarity index 100%
rename from examples/stm32/other/usb_cdcacm/README
rename to examples/stm32f1/other/usb_cdcacm/README
diff --git a/examples/stm32/other/usb_cdcacm/cdcacm.c b/examples/stm32f1/other/usb_cdcacm/cdcacm.c
similarity index 98%
rename from examples/stm32/other/usb_cdcacm/cdcacm.c
rename to examples/stm32f1/other/usb_cdcacm/cdcacm.c
index fdc92e24..d26b898e 100644
--- a/examples/stm32/other/usb_cdcacm/cdcacm.c
+++ b/examples/stm32f1/other/usb_cdcacm/cdcacm.c
@@ -18,8 +18,8 @@
*/
#include
-#include
-#include
+#include
+#include
#include
#include
diff --git a/examples/stm32/other/usb_cdcacm/cdcacm.ld b/examples/stm32f1/other/usb_cdcacm/cdcacm.ld
similarity index 96%
rename from examples/stm32/other/usb_cdcacm/cdcacm.ld
rename to examples/stm32f1/other/usb_cdcacm/cdcacm.ld
index 1c20282d..3cd63164 100644
--- a/examples/stm32/other/usb_cdcacm/cdcacm.ld
+++ b/examples/stm32f1/other/usb_cdcacm/cdcacm.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/usb_dfu/Makefile b/examples/stm32f1/other/usb_dfu/Makefile
similarity index 100%
rename from examples/stm32/other/usb_dfu/Makefile
rename to examples/stm32f1/other/usb_dfu/Makefile
diff --git a/examples/stm32/other/usb_dfu/README b/examples/stm32f1/other/usb_dfu/README
similarity index 100%
rename from examples/stm32/other/usb_dfu/README
rename to examples/stm32f1/other/usb_dfu/README
diff --git a/examples/stm32/lisa-m/usb_dfu/usbdfu.c b/examples/stm32f1/other/usb_dfu/usbdfu.c
similarity index 97%
rename from examples/stm32/lisa-m/usb_dfu/usbdfu.c
rename to examples/stm32f1/other/usb_dfu/usbdfu.c
index 0b7bf866..02d919f6 100644
--- a/examples/stm32/lisa-m/usb_dfu/usbdfu.c
+++ b/examples/stm32f1/other/usb_dfu/usbdfu.c
@@ -18,10 +18,10 @@
*/
#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#include
#include
diff --git a/examples/stm32/stm32-h103/usb_dfu/usbdfu.ld b/examples/stm32f1/other/usb_dfu/usbdfu.ld
similarity index 96%
rename from examples/stm32/stm32-h103/usb_dfu/usbdfu.ld
rename to examples/stm32f1/other/usb_dfu/usbdfu.ld
index 54e5dac7..6a01797d 100644
--- a/examples/stm32/stm32-h103/usb_dfu/usbdfu.ld
+++ b/examples/stm32f1/other/usb_dfu/usbdfu.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/usb_hid/Makefile b/examples/stm32f1/other/usb_hid/Makefile
similarity index 100%
rename from examples/stm32/other/usb_hid/Makefile
rename to examples/stm32f1/other/usb_hid/Makefile
diff --git a/examples/stm32/other/usb_hid/README b/examples/stm32f1/other/usb_hid/README
similarity index 100%
rename from examples/stm32/other/usb_hid/README
rename to examples/stm32f1/other/usb_hid/README
diff --git a/examples/stm32/other/usb_hid/usbhid.c b/examples/stm32f1/other/usb_hid/usbhid.c
similarity index 98%
rename from examples/stm32/other/usb_hid/usbhid.c
rename to examples/stm32f1/other/usb_hid/usbhid.c
index 8f08aac9..7c0186e9 100644
--- a/examples/stm32/other/usb_hid/usbhid.c
+++ b/examples/stm32f1/other/usb_hid/usbhid.c
@@ -18,8 +18,8 @@
*/
#include
-#include
-#include
+#include
+#include
#include
#include
#include
@@ -28,7 +28,7 @@
#define INCLUDE_DFU_INTERFACE
#ifdef INCLUDE_DFU_INTERFACE
-#include
+#include
#include
#endif
diff --git a/examples/stm32/other/usb_hid/usbhid.ld b/examples/stm32f1/other/usb_hid/usbhid.ld
similarity index 96%
rename from examples/stm32/other/usb_hid/usbhid.ld
rename to examples/stm32f1/other/usb_hid/usbhid.ld
index 1c20282d..3cd63164 100644
--- a/examples/stm32/other/usb_hid/usbhid.ld
+++ b/examples/stm32f1/other/usb_hid/usbhid.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-discovery/button/Makefile b/examples/stm32f1/stm32-discovery/button/Makefile
similarity index 100%
rename from examples/stm32/stm32-discovery/button/Makefile
rename to examples/stm32f1/stm32-discovery/button/Makefile
diff --git a/examples/stm32/stm32-discovery/button/README b/examples/stm32f1/stm32-discovery/button/README
similarity index 100%
rename from examples/stm32/stm32-discovery/button/README
rename to examples/stm32f1/stm32-discovery/button/README
diff --git a/examples/stm32/stm32-discovery/button/button.c b/examples/stm32f1/stm32-discovery/button/button.c
similarity index 96%
rename from examples/stm32/stm32-discovery/button/button.c
rename to examples/stm32f1/stm32-discovery/button/button.c
index b84f0746..87ce5cc9 100644
--- a/examples/stm32/stm32-discovery/button/button.c
+++ b/examples/stm32f1/stm32-discovery/button/button.c
@@ -18,8 +18,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
u16 exti_line_state;
diff --git a/examples/stm32/stm32-discovery/button/button.ld b/examples/stm32f1/stm32-discovery/button/button.ld
similarity index 97%
rename from examples/stm32/stm32-discovery/button/button.ld
rename to examples/stm32f1/stm32-discovery/button/button.ld
index b03f90f7..157204a7 100644
--- a/examples/stm32/stm32-discovery/button/button.ld
+++ b/examples/stm32f1/stm32-discovery/button/button.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-discovery/fancyblink/Makefile b/examples/stm32f1/stm32-discovery/fancyblink/Makefile
similarity index 100%
rename from examples/stm32/stm32-discovery/fancyblink/Makefile
rename to examples/stm32f1/stm32-discovery/fancyblink/Makefile
diff --git a/examples/stm32/stm32-discovery/fancyblink/README b/examples/stm32f1/stm32-discovery/fancyblink/README
similarity index 100%
rename from examples/stm32/stm32-discovery/fancyblink/README
rename to examples/stm32f1/stm32-discovery/fancyblink/README
diff --git a/examples/stm32/stm32-discovery/fancyblink/fancyblink.c b/examples/stm32f1/stm32-discovery/fancyblink/fancyblink.c
similarity index 95%
rename from examples/stm32/stm32-discovery/fancyblink/fancyblink.c
rename to examples/stm32f1/stm32-discovery/fancyblink/fancyblink.c
index d40fb7b3..38a4c4b5 100644
--- a/examples/stm32/stm32-discovery/fancyblink/fancyblink.c
+++ b/examples/stm32f1/stm32-discovery/fancyblink/fancyblink.c
@@ -19,8 +19,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
/* Set STM32 to 24 MHz. */
void clock_setup(void)
diff --git a/examples/stm32/stm32-discovery/fancyblink/fancyblink.ld b/examples/stm32f1/stm32-discovery/fancyblink/fancyblink.ld
similarity index 97%
rename from examples/stm32/stm32-discovery/fancyblink/fancyblink.ld
rename to examples/stm32f1/stm32-discovery/fancyblink/fancyblink.ld
index b03f90f7..157204a7 100644
--- a/examples/stm32/stm32-discovery/fancyblink/fancyblink.ld
+++ b/examples/stm32f1/stm32-discovery/fancyblink/fancyblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-discovery/miniblink/Makefile b/examples/stm32f1/stm32-discovery/miniblink/Makefile
similarity index 100%
rename from examples/stm32/stm32-discovery/miniblink/Makefile
rename to examples/stm32f1/stm32-discovery/miniblink/Makefile
diff --git a/examples/stm32/stm32-discovery/miniblink/README b/examples/stm32f1/stm32-discovery/miniblink/README
similarity index 100%
rename from examples/stm32/stm32-discovery/miniblink/README
rename to examples/stm32f1/stm32-discovery/miniblink/README
diff --git a/examples/stm32/stm32-discovery/miniblink/miniblink.c b/examples/stm32f1/stm32-discovery/miniblink/miniblink.c
similarity index 96%
rename from examples/stm32/stm32-discovery/miniblink/miniblink.c
rename to examples/stm32f1/stm32-discovery/miniblink/miniblink.c
index a05f9576..973fab5d 100644
--- a/examples/stm32/stm32-discovery/miniblink/miniblink.c
+++ b/examples/stm32f1/stm32-discovery/miniblink/miniblink.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
void gpio_setup(void)
{
diff --git a/examples/stm32/stm32-discovery/miniblink/miniblink.ld b/examples/stm32f1/stm32-discovery/miniblink/miniblink.ld
similarity index 97%
rename from examples/stm32/stm32-discovery/miniblink/miniblink.ld
rename to examples/stm32f1/stm32-discovery/miniblink/miniblink.ld
index b03f90f7..157204a7 100644
--- a/examples/stm32/stm32-discovery/miniblink/miniblink.ld
+++ b/examples/stm32f1/stm32-discovery/miniblink/miniblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-discovery/rtc/Makefile b/examples/stm32f1/stm32-discovery/rtc/Makefile
similarity index 100%
rename from examples/stm32/stm32-discovery/rtc/Makefile
rename to examples/stm32f1/stm32-discovery/rtc/Makefile
diff --git a/examples/stm32/stm32-discovery/rtc/README b/examples/stm32f1/stm32-discovery/rtc/README
similarity index 100%
rename from examples/stm32/stm32-discovery/rtc/README
rename to examples/stm32f1/stm32-discovery/rtc/README
diff --git a/examples/stm32/stm32-discovery/rtc/rtc.c b/examples/stm32f1/stm32-discovery/rtc/rtc.c
similarity index 97%
rename from examples/stm32/stm32-discovery/rtc/rtc.c
rename to examples/stm32f1/stm32-discovery/rtc/rtc.c
index c99920f8..fa8a9664 100644
--- a/examples/stm32/stm32-discovery/rtc/rtc.c
+++ b/examples/stm32f1/stm32-discovery/rtc/rtc.c
@@ -18,10 +18,10 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
+#include
#include
-#include
#include
#include
diff --git a/examples/stm32/stm32-discovery/rtc/rtc.ld b/examples/stm32f1/stm32-discovery/rtc/rtc.ld
similarity index 97%
rename from examples/stm32/stm32-discovery/rtc/rtc.ld
rename to examples/stm32f1/stm32-discovery/rtc/rtc.ld
index b03f90f7..157204a7 100644
--- a/examples/stm32/stm32-discovery/rtc/rtc.ld
+++ b/examples/stm32f1/stm32-discovery/rtc/rtc.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-discovery/usart/Makefile b/examples/stm32f1/stm32-discovery/usart/Makefile
similarity index 100%
rename from examples/stm32/stm32-discovery/usart/Makefile
rename to examples/stm32f1/stm32-discovery/usart/Makefile
diff --git a/examples/stm32/stm32-discovery/usart/README b/examples/stm32f1/stm32-discovery/usart/README
similarity index 100%
rename from examples/stm32/stm32-discovery/usart/README
rename to examples/stm32f1/stm32-discovery/usart/README
diff --git a/examples/stm32/stm32-discovery/usart/usart.c b/examples/stm32f1/stm32-discovery/usart/usart.c
similarity index 97%
rename from examples/stm32/stm32-discovery/usart/usart.c
rename to examples/stm32f1/stm32-discovery/usart/usart.c
index 05d03124..942805b5 100644
--- a/examples/stm32/stm32-discovery/usart/usart.c
+++ b/examples/stm32f1/stm32-discovery/usart/usart.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
#include
void clock_setup(void)
diff --git a/examples/stm32/stm32-discovery/usart/usart.ld b/examples/stm32f1/stm32-discovery/usart/usart.ld
similarity index 97%
rename from examples/stm32/stm32-discovery/usart/usart.ld
rename to examples/stm32f1/stm32-discovery/usart/usart.ld
index b03f90f7..157204a7 100644
--- a/examples/stm32/stm32-discovery/usart/usart.ld
+++ b/examples/stm32f1/stm32-discovery/usart/usart.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/button/Makefile b/examples/stm32f1/stm32-h103/button/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/button/Makefile
rename to examples/stm32f1/stm32-h103/button/Makefile
diff --git a/examples/stm32/stm32-h103/button/button.c b/examples/stm32f1/stm32-h103/button/button.c
similarity index 96%
rename from examples/stm32/stm32-h103/button/button.c
rename to examples/stm32f1/stm32-h103/button/button.c
index 63f32744..2f3378c5 100644
--- a/examples/stm32/stm32-h103/button/button.c
+++ b/examples/stm32f1/stm32-h103/button/button.c
@@ -18,9 +18,9 @@
* along with this program. If not, see .
*/
+#include
+#include
#include
-#include
-#include
#include
u16 exti_line_state;
diff --git a/examples/stm32/stm32-h103/button/button.ld b/examples/stm32f1/stm32-h103/button/button.ld
similarity index 97%
rename from examples/stm32/stm32-h103/button/button.ld
rename to examples/stm32f1/stm32-h103/button/button.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/stm32-h103/button/button.ld
+++ b/examples/stm32f1/stm32-h103/button/button.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/exti_both/Makefile b/examples/stm32f1/stm32-h103/exti_both/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/exti_both/Makefile
rename to examples/stm32f1/stm32-h103/exti_both/Makefile
diff --git a/examples/stm32/stm32-h103/exti_both/exti_both.c b/examples/stm32f1/stm32-h103/exti_both/exti_both.c
similarity index 96%
rename from examples/stm32/stm32-h103/exti_both/exti_both.c
rename to examples/stm32f1/stm32-h103/exti_both/exti_both.c
index edfc676d..7c6f9c7a 100644
--- a/examples/stm32/stm32-h103/exti_both/exti_both.c
+++ b/examples/stm32f1/stm32-h103/exti_both/exti_both.c
@@ -18,9 +18,9 @@
* along with this program. If not, see .
*/
+#include
+#include
#include
-#include
-#include
#include
u16 exti_line_state;
diff --git a/examples/stm32/stm32-h103/exti_both/exti_both.ld b/examples/stm32f1/stm32-h103/exti_both/exti_both.ld
similarity index 97%
rename from examples/stm32/stm32-h103/exti_both/exti_both.ld
rename to examples/stm32f1/stm32-h103/exti_both/exti_both.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/stm32-h103/exti_both/exti_both.ld
+++ b/examples/stm32f1/stm32-h103/exti_both/exti_both.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/exti_rising_falling/Makefile b/examples/stm32f1/stm32-h103/exti_rising_falling/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/exti_rising_falling/Makefile
rename to examples/stm32f1/stm32-h103/exti_rising_falling/Makefile
diff --git a/examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.c b/examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.c
similarity index 96%
rename from examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.c
rename to examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.c
index af1268d6..b3c47ee9 100644
--- a/examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.c
+++ b/examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.c
@@ -18,9 +18,9 @@
* along with this program. If not, see .
*/
+#include
+#include
#include
-#include
-#include
#include
#define FALLING 0
diff --git a/examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.ld b/examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld
similarity index 97%
rename from examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.ld
rename to examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.ld
+++ b/examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/fancyblink/Makefile b/examples/stm32f1/stm32-h103/fancyblink/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/fancyblink/Makefile
rename to examples/stm32f1/stm32-h103/fancyblink/Makefile
diff --git a/examples/stm32/stm32-h103/fancyblink/README b/examples/stm32f1/stm32-h103/fancyblink/README
similarity index 100%
rename from examples/stm32/stm32-h103/fancyblink/README
rename to examples/stm32f1/stm32-h103/fancyblink/README
diff --git a/examples/stm32/stm32-h103/fancyblink/fancyblink.c b/examples/stm32f1/stm32-h103/fancyblink/fancyblink.c
similarity index 94%
rename from examples/stm32/stm32-h103/fancyblink/fancyblink.c
rename to examples/stm32f1/stm32-h103/fancyblink/fancyblink.c
index eeb3f348..1b2ad863 100644
--- a/examples/stm32/stm32-h103/fancyblink/fancyblink.c
+++ b/examples/stm32f1/stm32-h103/fancyblink/fancyblink.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
/* Set STM32 to 72 MHz. */
void clock_setup(void)
diff --git a/examples/stm32/lisa-m/fancyblink/fancyblink.ld b/examples/stm32f1/stm32-h103/fancyblink/fancyblink.ld
similarity index 97%
rename from examples/stm32/lisa-m/fancyblink/fancyblink.ld
rename to examples/stm32f1/stm32-h103/fancyblink/fancyblink.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/lisa-m/fancyblink/fancyblink.ld
+++ b/examples/stm32f1/stm32-h103/fancyblink/fancyblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/led_stripe/Makefile b/examples/stm32f1/stm32-h103/led_stripe/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/led_stripe/Makefile
rename to examples/stm32f1/stm32-h103/led_stripe/Makefile
diff --git a/examples/stm32/stm32-h103/led_stripe/led_stripe.c b/examples/stm32f1/stm32-h103/led_stripe/led_stripe.c
similarity index 98%
rename from examples/stm32/stm32-h103/led_stripe/led_stripe.c
rename to examples/stm32f1/stm32-h103/led_stripe/led_stripe.c
index 9cf9d4f1..15768662 100644
--- a/examples/stm32/stm32-h103/led_stripe/led_stripe.c
+++ b/examples/stm32f1/stm32-h103/led_stripe/led_stripe.c
@@ -26,8 +26,8 @@
#include
-#include
-#include
+#include
+#include
#define SPI_BANK GPIOB
#define SCLK_PIN GPIO13
diff --git a/examples/stm32/stm32-h103/led_stripe/led_stripe.ld b/examples/stm32f1/stm32-h103/led_stripe/led_stripe.ld
similarity index 97%
rename from examples/stm32/stm32-h103/led_stripe/led_stripe.ld
rename to examples/stm32f1/stm32-h103/led_stripe/led_stripe.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/stm32-h103/led_stripe/led_stripe.ld
+++ b/examples/stm32f1/stm32-h103/led_stripe/led_stripe.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/miniblink/Makefile b/examples/stm32f1/stm32-h103/miniblink/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/miniblink/Makefile
rename to examples/stm32f1/stm32-h103/miniblink/Makefile
diff --git a/examples/stm32/stm32-h103/miniblink/README b/examples/stm32f1/stm32-h103/miniblink/README
similarity index 100%
rename from examples/stm32/stm32-h103/miniblink/README
rename to examples/stm32f1/stm32-h103/miniblink/README
diff --git a/examples/stm32/stm32-h103/miniblink/miniblink.c b/examples/stm32f1/stm32-h103/miniblink/miniblink.c
similarity index 96%
rename from examples/stm32/stm32-h103/miniblink/miniblink.c
rename to examples/stm32f1/stm32-h103/miniblink/miniblink.c
index 6f8bc2cd..b003f9a2 100644
--- a/examples/stm32/stm32-h103/miniblink/miniblink.c
+++ b/examples/stm32f1/stm32-h103/miniblink/miniblink.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
void gpio_setup(void)
{
diff --git a/examples/stm32/stm32-h103/miniblink/miniblink.ld b/examples/stm32f1/stm32-h103/miniblink/miniblink.ld
similarity index 97%
rename from examples/stm32/stm32-h103/miniblink/miniblink.ld
rename to examples/stm32f1/stm32-h103/miniblink/miniblink.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/stm32-h103/miniblink/miniblink.ld
+++ b/examples/stm32f1/stm32-h103/miniblink/miniblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/pwm_6step/Makefile b/examples/stm32f1/stm32-h103/pwm_6step/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/pwm_6step/Makefile
rename to examples/stm32f1/stm32-h103/pwm_6step/Makefile
diff --git a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c b/examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.c
similarity index 99%
rename from examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
rename to examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.c
index bda8ff79..9f9390ac 100644
--- a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
+++ b/examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.c
@@ -17,10 +17,10 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include
+#include
+#include
#include
+#include
#include
#define FALLING 0
diff --git a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.ld b/examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.ld
similarity index 97%
rename from examples/stm32/stm32-h103/pwm_6step/pwm_6step.ld
rename to examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.ld
+++ b/examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/spi/Makefile b/examples/stm32f1/stm32-h103/spi/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/spi/Makefile
rename to examples/stm32f1/stm32-h103/spi/Makefile
diff --git a/examples/stm32/stm32-h103/spi/README b/examples/stm32f1/stm32-h103/spi/README
similarity index 100%
rename from examples/stm32/stm32-h103/spi/README
rename to examples/stm32f1/stm32-h103/spi/README
diff --git a/examples/stm32/stm32-h103/spi/spi.c b/examples/stm32f1/stm32-h103/spi/spi.c
similarity index 96%
rename from examples/stm32/stm32-h103/spi/spi.c
rename to examples/stm32f1/stm32-h103/spi/spi.c
index 5a36bb8b..89b8a686 100644
--- a/examples/stm32/stm32-h103/spi/spi.c
+++ b/examples/stm32f1/stm32-h103/spi/spi.c
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-#include
+#include
#include
void clock_setup(void)
diff --git a/examples/stm32/stm32-h103/spi/spi.ld b/examples/stm32f1/stm32-h103/spi/spi.ld
similarity index 97%
rename from examples/stm32/stm32-h103/spi/spi.ld
rename to examples/stm32f1/stm32-h103/spi/spi.ld
index 25806f8d..e2fb5b63 100644
--- a/examples/stm32/stm32-h103/spi/spi.ld
+++ b/examples/stm32f1/stm32-h103/spi/spi.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/timer/Makefile b/examples/stm32f1/stm32-h103/timer/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/timer/Makefile
rename to examples/stm32f1/stm32-h103/timer/Makefile
diff --git a/examples/stm32/stm32-h103/timer/timer.c b/examples/stm32f1/stm32-h103/timer/timer.c
similarity index 97%
rename from examples/stm32/stm32-h103/timer/timer.c
rename to examples/stm32f1/stm32-h103/timer/timer.c
index ea64c860..48cae129 100644
--- a/examples/stm32/stm32-h103/timer/timer.c
+++ b/examples/stm32f1/stm32-h103/timer/timer.c
@@ -17,10 +17,10 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include
+#include
+#include
#include
+#include
#include
u16 frequency_sequence[18] = {
diff --git a/examples/stm32/stm32-h103/timer/timer.ld b/examples/stm32f1/stm32-h103/timer/timer.ld
similarity index 97%
rename from examples/stm32/stm32-h103/timer/timer.ld
rename to examples/stm32f1/stm32-h103/timer/timer.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/stm32-h103/timer/timer.ld
+++ b/examples/stm32f1/stm32-h103/timer/timer.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/traceswo/Makefile b/examples/stm32f1/stm32-h103/traceswo/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/traceswo/Makefile
rename to examples/stm32f1/stm32-h103/traceswo/Makefile
diff --git a/examples/stm32/stm32-h103/traceswo/README b/examples/stm32f1/stm32-h103/traceswo/README
similarity index 100%
rename from examples/stm32/stm32-h103/traceswo/README
rename to examples/stm32f1/stm32-h103/traceswo/README
diff --git a/examples/stm32/stm32-h103/traceswo/traceswo.c b/examples/stm32f1/stm32-h103/traceswo/traceswo.c
similarity index 97%
rename from examples/stm32/stm32-h103/traceswo/traceswo.c
rename to examples/stm32f1/stm32-h103/traceswo/traceswo.c
index ac461bb4..88814479 100644
--- a/examples/stm32/stm32-h103/traceswo/traceswo.c
+++ b/examples/stm32f1/stm32-h103/traceswo/traceswo.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
#include
#include
diff --git a/examples/stm32/stm32-h103/traceswo/traceswo.ld b/examples/stm32f1/stm32-h103/traceswo/traceswo.ld
similarity index 97%
rename from examples/stm32/stm32-h103/traceswo/traceswo.ld
rename to examples/stm32f1/stm32-h103/traceswo/traceswo.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/stm32-h103/traceswo/traceswo.ld
+++ b/examples/stm32f1/stm32-h103/traceswo/traceswo.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/usart/Makefile b/examples/stm32f1/stm32-h103/usart/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/usart/Makefile
rename to examples/stm32f1/stm32-h103/usart/Makefile
diff --git a/examples/stm32/stm32-h103/usart/README b/examples/stm32f1/stm32-h103/usart/README
similarity index 100%
rename from examples/stm32/stm32-h103/usart/README
rename to examples/stm32f1/stm32-h103/usart/README
diff --git a/examples/stm32/stm32-h103/usart/usart.c b/examples/stm32f1/stm32-h103/usart/usart.c
similarity index 93%
rename from examples/stm32/stm32-h103/usart/usart.c
rename to examples/stm32f1/stm32-h103/usart/usart.c
index 9692d612..a221acb5 100644
--- a/examples/stm32/stm32-h103/usart/usart.c
+++ b/examples/stm32f1/stm32-h103/usart/usart.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include
+#include
#include
void clock_setup(void)
@@ -40,7 +40,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 38400);
+ usart_set_baudrate(USART1, 38400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX);
@@ -55,7 +55,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART2_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART2, 38400);
+ usart_set_baudrate(USART2, 38400, rcc_ppre1_frequency);
usart_set_databits(USART2, 8);
usart_set_stopbits(USART2, USART_STOPBITS_1);
usart_set_mode(USART2, USART_MODE_TX);
@@ -70,7 +70,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART3_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART3, 38400);
+ usart_set_baudrate(USART3, 38400, rcc_ppre1_frequency);
usart_set_databits(USART3, 8);
usart_set_stopbits(USART3, USART_STOPBITS_1);
usart_set_mode(USART3, USART_MODE_TX);
diff --git a/examples/stm32/stm32-h103/usart/usart.ld b/examples/stm32f1/stm32-h103/usart/usart.ld
similarity index 97%
rename from examples/stm32/stm32-h103/usart/usart.ld
rename to examples/stm32f1/stm32-h103/usart/usart.ld
index 7ea2b92c..3409b98d 100644
--- a/examples/stm32/stm32-h103/usart/usart.ld
+++ b/examples/stm32f1/stm32-h103/usart/usart.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/usart_irq/Makefile b/examples/stm32f1/stm32-h103/usart_irq/Makefile
similarity index 100%
rename from examples/stm32/stm32-h103/usart_irq/Makefile
rename to examples/stm32f1/stm32-h103/usart_irq/Makefile
diff --git a/examples/stm32/stm32-h103/usart_irq/usart_irq.c b/examples/stm32f1/stm32-h103/usart_irq/usart_irq.c
similarity index 96%
rename from examples/stm32/stm32-h103/usart_irq/usart_irq.c
rename to examples/stm32f1/stm32-h103/usart_irq/usart_irq.c
index 9b957dcc..a2d8eef5 100644
--- a/examples/stm32/stm32-h103/usart_irq/usart_irq.c
+++ b/examples/stm32f1/stm32-h103/usart_irq/usart_irq.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include