From 8ceeb99902786041184800248eca4d7f3741d9bf Mon Sep 17 00:00:00 2001 From: Stephen Caudle Date: Wed, 12 Oct 2011 23:58:27 -0400 Subject: Fix stm32f1 filenames and path --- examples/stm32f1/Makefile.include | 16 ++++++++-------- examples/stm32f1/lisa-m/fancyblink/fancyblink.c | 4 ++-- examples/stm32f1/lisa-m/fancyblink/fancyblink.ld | 2 +- examples/stm32f1/lisa-m/usb_dfu/usbdfu.c | 8 ++++---- examples/stm32f1/lisa-m/usb_dfu/usbdfu.ld | 2 +- examples/stm32f1/lisa-m/usb_hid/usbhid.c | 6 +++--- examples/stm32f1/lisa-m/usb_hid/usbhid.ld | 2 +- examples/stm32f1/mb525/fancyblink/fancyblink.c | 4 ++-- examples/stm32f1/mb525/fancyblink/fancyblink.ld | 2 +- examples/stm32f1/mb525/pwmleds/pwmleds.c | 4 ++-- examples/stm32f1/mb525/pwmleds/pwmleds.ld | 2 +- examples/stm32f1/obldc/can/can.c | 6 +++--- examples/stm32f1/obldc/can/can.ld | 2 +- examples/stm32f1/obldc/led/led.c | 4 ++-- examples/stm32f1/obldc/led/led.ld | 2 +- examples/stm32f1/obldc/pwmleds/pwmleds.c | 4 ++-- examples/stm32f1/obldc/pwmleds/pwmleds.ld | 2 +- examples/stm32f1/obldc/systick/systick.c | 6 +++--- examples/stm32f1/obldc/systick/systick.ld | 2 +- examples/stm32f1/obldc/usart/usart.c | 6 +++--- examples/stm32f1/obldc/usart/usart.ld | 2 +- examples/stm32f1/obldc/usart_irq/usart_irq.c | 6 +++--- examples/stm32f1/obldc/usart_irq/usart_irq.ld | 2 +- examples/stm32f1/other/adc_temperature_sensor/adc.c | 10 +++++----- examples/stm32f1/other/adc_temperature_sensor/adc.ld | 2 +- examples/stm32f1/other/dma_mem2mem/dma.c | 10 +++++----- examples/stm32f1/other/dma_mem2mem/dma.ld | 2 +- examples/stm32f1/other/dogm128/dogm128.h | 2 +- examples/stm32f1/other/dogm128/main.c | 6 +++--- examples/stm32f1/other/dogm128/main.ld | 2 +- .../stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c | 8 ++++---- .../stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.ld | 2 +- examples/stm32f1/other/rtc/rtc.c | 8 ++++---- examples/stm32f1/other/rtc/rtc.ld | 2 +- examples/stm32f1/other/systick/systick.c | 6 +++--- examples/stm32f1/other/systick/systick.ld | 2 +- examples/stm32f1/other/timer_interrupt/timer.c | 6 +++--- examples/stm32f1/other/timer_interrupt/timer.ld | 2 +- examples/stm32f1/other/usb_cdcacm/cdcacm.c | 4 ++-- examples/stm32f1/other/usb_cdcacm/cdcacm.ld | 2 +- examples/stm32f1/other/usb_dfu/usbdfu.c | 8 ++++---- examples/stm32f1/other/usb_dfu/usbdfu.ld | 2 +- examples/stm32f1/other/usb_hid/usbhid.c | 6 +++--- examples/stm32f1/other/usb_hid/usbhid.ld | 2 +- examples/stm32f1/stm32-discovery/button/button.c | 4 ++-- examples/stm32f1/stm32-discovery/button/button.ld | 2 +- examples/stm32f1/stm32-discovery/fancyblink/fancyblink.c | 4 ++-- .../stm32f1/stm32-discovery/fancyblink/fancyblink.ld | 2 +- examples/stm32f1/stm32-discovery/miniblink/miniblink.c | 4 ++-- examples/stm32f1/stm32-discovery/miniblink/miniblink.ld | 2 +- examples/stm32f1/stm32-discovery/rtc/rtc.c | 6 +++--- examples/stm32f1/stm32-discovery/rtc/rtc.ld | 2 +- examples/stm32f1/stm32-discovery/usart/usart.c | 4 ++-- examples/stm32f1/stm32-discovery/usart/usart.ld | 2 +- examples/stm32f1/stm32-h103/button/button.c | 4 ++-- examples/stm32f1/stm32-h103/button/button.ld | 2 +- examples/stm32f1/stm32-h103/exti_both/exti_both.c | 4 ++-- examples/stm32f1/stm32-h103/exti_both/exti_both.ld | 2 +- .../stm32-h103/exti_rising_falling/exti_rising_falling.c | 4 ++-- .../exti_rising_falling/exti_rising_falling.ld | 2 +- examples/stm32f1/stm32-h103/fancyblink/fancyblink.c | 4 ++-- examples/stm32f1/stm32-h103/fancyblink/fancyblink.ld | 2 +- examples/stm32f1/stm32-h103/led_stripe/led_stripe.c | 4 ++-- examples/stm32f1/stm32-h103/led_stripe/led_stripe.ld | 2 +- examples/stm32f1/stm32-h103/miniblink/miniblink.c | 4 ++-- examples/stm32f1/stm32-h103/miniblink/miniblink.ld | 2 +- examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.c | 6 +++--- examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.ld | 2 +- examples/stm32f1/stm32-h103/spi/spi.c | 2 +- examples/stm32f1/stm32-h103/spi/spi.ld | 2 +- examples/stm32f1/stm32-h103/timer/timer.c | 6 +++--- examples/stm32f1/stm32-h103/timer/timer.ld | 2 +- examples/stm32f1/stm32-h103/traceswo/traceswo.c | 4 ++-- examples/stm32f1/stm32-h103/traceswo/traceswo.ld | 2 +- examples/stm32f1/stm32-h103/usart/usart.c | 10 +++++----- examples/stm32f1/stm32-h103/usart/usart.ld | 2 +- examples/stm32f1/stm32-h103/usart_irq/usart_irq.c | 6 +++--- examples/stm32f1/stm32-h103/usart_irq/usart_irq.ld | 2 +- .../stm32-h103/usart_irq_printf/usart_irq_printf.c | 6 +++--- .../stm32-h103/usart_irq_printf/usart_irq_printf.ld | 2 +- examples/stm32f1/stm32-h103/usart_printf/usart_printf.c | 6 +++--- examples/stm32f1/stm32-h103/usart_printf/usart_printf.ld | 2 +- examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.c | 4 ++-- examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.ld | 2 +- examples/stm32f1/stm32-h103/usb_dfu/usbdfu.c | 8 ++++---- examples/stm32f1/stm32-h103/usb_dfu/usbdfu.ld | 2 +- examples/stm32f1/stm32-h103/usb_hid/usbhid.c | 6 +++--- examples/stm32f1/stm32-h103/usb_hid/usbhid.ld | 2 +- examples/stm32f1/stm32-h103/usb_iap/usbiap.c | 8 ++++---- examples/stm32f1/stm32-h103/usb_iap/usbiap.ld | 2 +- examples/stm32f1/stm32-h107/fancyblink/fancyblink.c | 4 ++-- examples/stm32f1/stm32-h107/fancyblink/fancyblink.ld | 2 +- examples/stm32f1/stm32-h107/usb_simple/usb_simple.c | 4 ++-- examples/stm32f1/stm32-h107/usb_simple/usb_simple.ld | 2 +- examples/stm32f2/jobygps/usart_printf/usart_printf.ld | 2 +- 95 files changed, 184 insertions(+), 184 deletions(-) (limited to 'examples') diff --git a/examples/stm32f1/Makefile.include b/examples/stm32f1/Makefile.include index 221ebae..82e6d2a 100644 --- a/examples/stm32f1/Makefile.include +++ b/examples/stm32f1/Makefile.include @@ -25,12 +25,12 @@ LD = $(PREFIX)-gcc OBJCOPY = $(PREFIX)-objcopy OBJDUMP = $(PREFIX)-objdump # Uncomment this line if you want to use the installed (not local) library. -TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX) -#TOOLCHAIN_DIR = ../../../.. +#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 @@ -75,13 +75,13 @@ flash: $(BINARY).flash @#printf " OBJDUMP $(*).list\n" $(Q)$(OBJDUMP) -S $(*).elf > $(*).list -foo.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/libopencm3_stm32.a +foo.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/stm32f1/libopencm3_stm32f1.a @#printf " LD $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(LD) -o foo.elf $(OBJS) -lopencm3_stm32 $(LDFLAGS) + $(Q)$(LD) -o foo.elf $(OBJS) -lopencm3_stm32f1 $(LDFLAGS) -%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/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" diff --git a/examples/stm32f1/lisa-m/fancyblink/fancyblink.c b/examples/stm32f1/lisa-m/fancyblink/fancyblink.c index 5987bdf..6d5fbe3 100644 --- a/examples/stm32f1/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/stm32f1/lisa-m/fancyblink/fancyblink.ld b/examples/stm32f1/lisa-m/fancyblink/fancyblink.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/lisa-m/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/stm32f1/lisa-m/usb_dfu/usbdfu.c b/examples/stm32f1/lisa-m/usb_dfu/usbdfu.c index 7ffbc74..9d184f1 100644 --- a/examples/stm32f1/lisa-m/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/stm32f1/lisa-m/usb_dfu/usbdfu.ld b/examples/stm32f1/lisa-m/usb_dfu/usbdfu.ld index 54e5dac..6a01797 100644 --- a/examples/stm32f1/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/stm32f1/lisa-m/usb_hid/usbhid.c b/examples/stm32f1/lisa-m/usb_hid/usbhid.c index f42454b..cd9d97d 100644 --- a/examples/stm32f1/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/stm32f1/lisa-m/usb_hid/usbhid.ld b/examples/stm32f1/lisa-m/usb_hid/usbhid.ld index 928c898..d0df9e6 100644 --- a/examples/stm32f1/lisa-m/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/stm32f1/mb525/fancyblink/fancyblink.c b/examples/stm32f1/mb525/fancyblink/fancyblink.c index e9a3564..54ef47c 100644 --- a/examples/stm32f1/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/stm32f1/mb525/fancyblink/fancyblink.ld b/examples/stm32f1/mb525/fancyblink/fancyblink.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/mb525/pwmleds/pwmleds.c b/examples/stm32f1/mb525/pwmleds/pwmleds.c index 393928f..5505231 100644 --- a/examples/stm32f1/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/stm32f1/mb525/pwmleds/pwmleds.ld b/examples/stm32f1/mb525/pwmleds/pwmleds.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/obldc/can/can.c b/examples/stm32f1/obldc/can/can.c index 6c63c48..00a05dc 100644 --- a/examples/stm32f1/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/stm32f1/obldc/can/can.ld b/examples/stm32f1/obldc/can/can.ld index c076521..4f609a8 100644 --- a/examples/stm32f1/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/stm32f1/obldc/led/led.c b/examples/stm32f1/obldc/led/led.c index 09ae89d..db479b2 100644 --- a/examples/stm32f1/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/stm32f1/obldc/led/led.ld b/examples/stm32f1/obldc/led/led.ld index 7899773..edb52c5 100644 --- a/examples/stm32f1/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/stm32f1/obldc/pwmleds/pwmleds.c b/examples/stm32f1/obldc/pwmleds/pwmleds.c index 146bb56..faa9aa0 100644 --- a/examples/stm32f1/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/stm32f1/obldc/pwmleds/pwmleds.ld b/examples/stm32f1/obldc/pwmleds/pwmleds.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/obldc/systick/systick.c b/examples/stm32f1/obldc/systick/systick.c index 3d75c4a..263230f 100644 --- a/examples/stm32f1/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/stm32f1/obldc/systick/systick.ld b/examples/stm32f1/obldc/systick/systick.ld index da4f2b3..a3195d2 100644 --- a/examples/stm32f1/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/stm32f1/obldc/usart/usart.c b/examples/stm32f1/obldc/usart/usart.c index ea5ec0e..b2efe71 100644 --- a/examples/stm32f1/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/stm32f1/obldc/usart/usart.ld b/examples/stm32f1/obldc/usart/usart.ld index 7899773..edb52c5 100644 --- a/examples/stm32f1/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/stm32f1/obldc/usart_irq/usart_irq.c b/examples/stm32f1/obldc/usart_irq/usart_irq.c index 82320c1..20ff0a1 100644 --- a/examples/stm32f1/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/stm32f1/obldc/usart_irq/usart_irq.ld b/examples/stm32f1/obldc/usart_irq/usart_irq.ld index 7899773..edb52c5 100644 --- a/examples/stm32f1/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/stm32f1/other/adc_temperature_sensor/adc.c b/examples/stm32f1/other/adc_temperature_sensor/adc.c index 6c0e828..a87909c 100644 --- a/examples/stm32f1/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/stm32f1/other/adc_temperature_sensor/adc.ld b/examples/stm32f1/other/adc_temperature_sensor/adc.ld index c076521..4f609a8 100644 --- a/examples/stm32f1/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/stm32f1/other/dma_mem2mem/dma.c b/examples/stm32f1/other/dma_mem2mem/dma.c index e43fe0d..0389412 100644 --- a/examples/stm32f1/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/stm32f1/other/dma_mem2mem/dma.ld b/examples/stm32f1/other/dma_mem2mem/dma.ld index c076521..4f609a8 100644 --- a/examples/stm32f1/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/stm32f1/other/dogm128/dogm128.h b/examples/stm32f1/other/dogm128/dogm128.h index ed514ab..de43225 100644 --- a/examples/stm32f1/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/stm32f1/other/dogm128/main.c b/examples/stm32f1/other/dogm128/main.c index b12a36d..508971e 100644 --- a/examples/stm32f1/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/stm32f1/other/dogm128/main.ld b/examples/stm32f1/other/dogm128/main.ld index c076521..4f609a8 100644 --- a/examples/stm32f1/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/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c b/examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c index f70c80d..d8f2404 100644 --- a/examples/stm32f1/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/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.ld b/examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.ld index c076521..4f609a8 100644 --- a/examples/stm32f1/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/stm32f1/other/rtc/rtc.c b/examples/stm32f1/other/rtc/rtc.c index c447534..28ae24c 100644 --- a/examples/stm32f1/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/stm32f1/other/rtc/rtc.ld b/examples/stm32f1/other/rtc/rtc.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/other/systick/systick.c b/examples/stm32f1/other/systick/systick.c index c05aff7..173ff2a 100644 --- a/examples/stm32f1/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/stm32f1/other/systick/systick.ld b/examples/stm32f1/other/systick/systick.ld index c076521..4f609a8 100644 --- a/examples/stm32f1/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/stm32f1/other/timer_interrupt/timer.c b/examples/stm32f1/other/timer_interrupt/timer.c index aa2cdb6..422df88 100644 --- a/examples/stm32f1/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/stm32f1/other/timer_interrupt/timer.ld b/examples/stm32f1/other/timer_interrupt/timer.ld index c076521..4f609a8 100644 --- a/examples/stm32f1/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/stm32f1/other/usb_cdcacm/cdcacm.c b/examples/stm32f1/other/usb_cdcacm/cdcacm.c index fdc92e2..d26b898 100644 --- a/examples/stm32f1/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/stm32f1/other/usb_cdcacm/cdcacm.ld b/examples/stm32f1/other/usb_cdcacm/cdcacm.ld index 1c20282..3cd6316 100644 --- a/examples/stm32f1/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/stm32f1/other/usb_dfu/usbdfu.c b/examples/stm32f1/other/usb_dfu/usbdfu.c index 7ffbc74..9d184f1 100644 --- a/examples/stm32f1/other/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/stm32f1/other/usb_dfu/usbdfu.ld b/examples/stm32f1/other/usb_dfu/usbdfu.ld index 54e5dac..6a01797 100644 --- a/examples/stm32f1/other/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/stm32f1/other/usb_hid/usbhid.c b/examples/stm32f1/other/usb_hid/usbhid.c index 8f08aac..7c0186e 100644 --- a/examples/stm32f1/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/stm32f1/other/usb_hid/usbhid.ld b/examples/stm32f1/other/usb_hid/usbhid.ld index 1c20282..3cd6316 100644 --- a/examples/stm32f1/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/stm32f1/stm32-discovery/button/button.c b/examples/stm32f1/stm32-discovery/button/button.c index b84f074..87ce5cc 100644 --- a/examples/stm32f1/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/stm32f1/stm32-discovery/button/button.ld b/examples/stm32f1/stm32-discovery/button/button.ld index b03f90f..157204a 100644 --- a/examples/stm32f1/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/stm32f1/stm32-discovery/fancyblink/fancyblink.c b/examples/stm32f1/stm32-discovery/fancyblink/fancyblink.c index d40fb7b..38a4c4b 100644 --- a/examples/stm32f1/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/stm32f1/stm32-discovery/fancyblink/fancyblink.ld b/examples/stm32f1/stm32-discovery/fancyblink/fancyblink.ld index b03f90f..157204a 100644 --- a/examples/stm32f1/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/stm32f1/stm32-discovery/miniblink/miniblink.c b/examples/stm32f1/stm32-discovery/miniblink/miniblink.c index a05f957..973fab5 100644 --- a/examples/stm32f1/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/stm32f1/stm32-discovery/miniblink/miniblink.ld b/examples/stm32f1/stm32-discovery/miniblink/miniblink.ld index b03f90f..157204a 100644 --- a/examples/stm32f1/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/stm32f1/stm32-discovery/rtc/rtc.c b/examples/stm32f1/stm32-discovery/rtc/rtc.c index c99920f..fa8a966 100644 --- a/examples/stm32f1/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/stm32f1/stm32-discovery/rtc/rtc.ld b/examples/stm32f1/stm32-discovery/rtc/rtc.ld index b03f90f..157204a 100644 --- a/examples/stm32f1/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/stm32f1/stm32-discovery/usart/usart.c b/examples/stm32f1/stm32-discovery/usart/usart.c index 05d0312..942805b 100644 --- a/examples/stm32f1/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/stm32f1/stm32-discovery/usart/usart.ld b/examples/stm32f1/stm32-discovery/usart/usart.ld index b03f90f..157204a 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/button/button.c b/examples/stm32f1/stm32-h103/button/button.c index 63f3274..2f3378c 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/button/button.ld b/examples/stm32f1/stm32-h103/button/button.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/exti_both/exti_both.c b/examples/stm32f1/stm32-h103/exti_both/exti_both.c index edfc676..7c6f9c7 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/exti_both/exti_both.ld b/examples/stm32f1/stm32-h103/exti_both/exti_both.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.c b/examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.c index af1268d..b3c47ee 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld b/examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/fancyblink/fancyblink.c b/examples/stm32f1/stm32-h103/fancyblink/fancyblink.c index eeb3f34..1b2ad86 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/fancyblink/fancyblink.ld b/examples/stm32f1/stm32-h103/fancyblink/fancyblink.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/stm32-h103/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/stm32f1/stm32-h103/led_stripe/led_stripe.c b/examples/stm32f1/stm32-h103/led_stripe/led_stripe.c index 9cf9d4f..1576866 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/led_stripe/led_stripe.ld b/examples/stm32f1/stm32-h103/led_stripe/led_stripe.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/miniblink/miniblink.c b/examples/stm32f1/stm32-h103/miniblink/miniblink.c index 6f8bc2c..b003f9a 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/miniblink/miniblink.ld b/examples/stm32f1/stm32-h103/miniblink/miniblink.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/pwm_6step/pwm_6step.c b/examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.c index bda8ff7..9f9390a 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/pwm_6step/pwm_6step.ld b/examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/spi/spi.c b/examples/stm32f1/stm32-h103/spi/spi.c index 5a36bb8..89b8a68 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/spi/spi.ld b/examples/stm32f1/stm32-h103/spi/spi.ld index 25806f8..e2fb5b6 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/timer/timer.c b/examples/stm32f1/stm32-h103/timer/timer.c index ea64c86..48cae12 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/timer/timer.ld b/examples/stm32f1/stm32-h103/timer/timer.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/traceswo/traceswo.c b/examples/stm32f1/stm32-h103/traceswo/traceswo.c index ac461bb..8881447 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/traceswo/traceswo.ld b/examples/stm32f1/stm32-h103/traceswo/traceswo.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/usart/usart.c b/examples/stm32f1/stm32-h103/usart/usart.c index 9692d61..a221acb 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/usart/usart.ld b/examples/stm32f1/stm32-h103/usart/usart.ld index 7ea2b92..3409b98 100644 --- a/examples/stm32f1/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/stm32f1/stm32-h103/usart_irq/usart_irq.c b/examples/stm32f1/stm32-h103/usart_irq/usart_irq.c index 9b957dc..a2d8eef 100644 --- a/examples/stm32f1/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 +#include #include #include @@ -49,7 +49,7 @@ void usart_setup(void) GPIO_CNF_INPUT_FLOAT, GPIO_USART1_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/stm32f1/stm32-h103/usart_irq/usart_irq.ld b/examples/stm32f1/stm32-h103/usart_irq/usart_irq.ld index 7899773..edb52c5 100644 --- a/examples/stm32f1/stm32-h103/usart_irq/usart_irq.ld +++ b/examples/stm32f1/stm32-h103/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/stm32f1/stm32-h103/usart_irq_printf/usart_irq_printf.c b/examples/stm32f1/stm32-h103/usart_irq_printf/usart_irq_printf.c index 42a7472..deee527 100644 --- a/examples/stm32f1/stm32-h103/usart_irq_printf/usart_irq_printf.c +++ b/examples/stm32f1/stm32-h103/usart_irq_printf/usart_irq_printf.c @@ -18,8 +18,8 @@ * along with this program. If not, see . */ -#include -#include +#include +#include #include #include #include @@ -145,7 +145,7 @@ void usart_setup(void) GPIO_CNF_INPUT_FLOAT, GPIO_USART1_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/stm32f1/stm32-h103/usart_irq_printf/usart_irq_printf.ld b/examples/stm32f1/stm32-h103/usart_irq_printf/usart_irq_printf.ld index 7899773..edb52c5 100644 --- a/examples/stm32f1/stm32-h103/usart_irq_printf/usart_irq_printf.ld +++ b/examples/stm32f1/stm32-h103/usart_irq_printf/usart_irq_printf.ld @@ -27,5 +27,5 @@ MEMORY } /* Include the common ld script. */ -INCLUDE libopencm3_stm32.ld +INCLUDE libopencm3_stm32f1.ld diff --git a/examples/stm32f1/stm32-h103/usart_printf/usart_printf.c b/examples/stm32f1/stm32-h103/usart_printf/usart_printf.c index 26fcee6..1eb067f 100644 --- a/examples/stm32f1/stm32-h103/usart_printf/usart_printf.c +++ b/examples/stm32f1/stm32-h103/usart_printf/usart_printf.c @@ -18,8 +18,8 @@ * along with this program. If not, see . */ -#include -#include +#include +#include #include #include @@ -46,7 +46,7 @@ void usart_setup(void) GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_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_parity(USART1, USART_PARITY_NONE); diff --git a/examples/stm32f1/stm32-h103/usart_printf/usart_printf.ld b/examples/stm32f1/stm32-h103/usart_printf/usart_printf.ld index 7899773..edb52c5 100644 --- a/examples/stm32f1/stm32-h103/usart_printf/usart_printf.ld +++ b/examples/stm32f1/stm32-h103/usart_printf/usart_printf.ld @@ -27,5 +27,5 @@ MEMORY } /* Include the common ld script. */ -INCLUDE libopencm3_stm32.ld +INCLUDE libopencm3_stm32f1.ld diff --git a/examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.c b/examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.c index 4b90640..f9e2527 100644 --- a/examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.c +++ b/examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.c @@ -18,8 +18,8 @@ */ #include -#include -#include +#include +#include #include #include diff --git a/examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.ld b/examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.ld index 928c898..d0df9e6 100644 --- a/examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.ld +++ b/examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.ld @@ -27,5 +27,5 @@ MEMORY } /* Include the common ld script. */ -INCLUDE libopencm3_stm32.ld +INCLUDE libopencm3_stm32f1.ld diff --git a/examples/stm32f1/stm32-h103/usb_dfu/usbdfu.c b/examples/stm32f1/stm32-h103/usb_dfu/usbdfu.c index 7ffbc74..9d184f1 100644 --- a/examples/stm32f1/stm32-h103/usb_dfu/usbdfu.c +++ b/examples/stm32f1/stm32-h103/usb_dfu/usbdfu.c @@ -18,10 +18,10 @@ */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/examples/stm32f1/stm32-h103/usb_dfu/usbdfu.ld b/examples/stm32f1/stm32-h103/usb_dfu/usbdfu.ld index 54e5dac..6a01797 100644 --- a/examples/stm32f1/stm32-h103/usb_dfu/usbdfu.ld +++ b/examples/stm32f1/stm32-h103/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/stm32f1/stm32-h103/usb_hid/usbhid.c b/examples/stm32f1/stm32-h103/usb_hid/usbhid.c index a21fce6..a815573 100644 --- a/examples/stm32f1/stm32-h103/usb_hid/usbhid.c +++ b/examples/stm32f1/stm32-h103/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/stm32f1/stm32-h103/usb_hid/usbhid.ld b/examples/stm32f1/stm32-h103/usb_hid/usbhid.ld index 928c898..d0df9e6 100644 --- a/examples/stm32f1/stm32-h103/usb_hid/usbhid.ld +++ b/examples/stm32f1/stm32-h103/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/stm32f1/stm32-h103/usb_iap/usbiap.c b/examples/stm32f1/stm32-h103/usb_iap/usbiap.c index 7ffbc74..9d184f1 100644 --- a/examples/stm32f1/stm32-h103/usb_iap/usbiap.c +++ b/examples/stm32f1/stm32-h103/usb_iap/usbiap.c @@ -18,10 +18,10 @@ */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/examples/stm32f1/stm32-h103/usb_iap/usbiap.ld b/examples/stm32f1/stm32-h103/usb_iap/usbiap.ld index 928c898..d0df9e6 100644 --- a/examples/stm32f1/stm32-h103/usb_iap/usbiap.ld +++ b/examples/stm32f1/stm32-h103/usb_iap/usbiap.ld @@ -27,5 +27,5 @@ MEMORY } /* Include the common ld script. */ -INCLUDE libopencm3_stm32.ld +INCLUDE libopencm3_stm32f1.ld diff --git a/examples/stm32f1/stm32-h107/fancyblink/fancyblink.c b/examples/stm32f1/stm32-h107/fancyblink/fancyblink.c index c73d3d4..4d45829 100644 --- a/examples/stm32f1/stm32-h107/fancyblink/fancyblink.c +++ b/examples/stm32f1/stm32-h107/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/stm32f1/stm32-h107/fancyblink/fancyblink.ld b/examples/stm32f1/stm32-h107/fancyblink/fancyblink.ld index 6c9c766..d35c141 100644 --- a/examples/stm32f1/stm32-h107/fancyblink/fancyblink.ld +++ b/examples/stm32f1/stm32-h107/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/stm32f1/stm32-h107/usb_simple/usb_simple.c b/examples/stm32f1/stm32-h107/usb_simple/usb_simple.c index 85f67df..c30803c 100644 --- a/examples/stm32f1/stm32-h107/usb_simple/usb_simple.c +++ b/examples/stm32f1/stm32-h107/usb_simple/usb_simple.c @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#include -#include +#include +#include #include diff --git a/examples/stm32f1/stm32-h107/usb_simple/usb_simple.ld b/examples/stm32f1/stm32-h107/usb_simple/usb_simple.ld index 6c9c766..d35c141 100644 --- a/examples/stm32f1/stm32-h107/usb_simple/usb_simple.ld +++ b/examples/stm32f1/stm32-h107/usb_simple/usb_simple.ld @@ -27,5 +27,5 @@ MEMORY } /* Include the common ld script. */ -INCLUDE libopencm3_stm32.ld +INCLUDE libopencm3_stm32f1.ld diff --git a/examples/stm32f2/jobygps/usart_printf/usart_printf.ld b/examples/stm32f2/jobygps/usart_printf/usart_printf.ld index 7899773..e80bdbd 100644 --- a/examples/stm32f2/jobygps/usart_printf/usart_printf.ld +++ b/examples/stm32f2/jobygps/usart_printf/usart_printf.ld @@ -27,5 +27,5 @@ MEMORY } /* Include the common ld script. */ -INCLUDE libopencm3_stm32.ld +INCLUDE libopencm3_stm32f2.ld -- cgit v1.2.3