From 8ceeb99902786041184800248eca4d7f3741d9bf Mon Sep 17 00:00:00 2001 From: Stephen Caudle Date: Wed, 12 Oct 2011 23:58:27 -0400 Subject: [PATCH] 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 +- .../stm32f1/other/adc_temperature_sensor/adc.c | 10 +++++----- .../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 +- .../other/i2c_stts75_sensor/i2c_stts75_sensor.c | 8 ++++---- .../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 ++-- .../stm32f1/stm32-discovery/button/button.ld | 2 +- .../stm32-discovery/fancyblink/fancyblink.c | 4 ++-- .../stm32-discovery/fancyblink/fancyblink.ld | 2 +- .../stm32-discovery/miniblink/miniblink.c | 4 ++-- .../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 +- .../stm32f1/stm32-h103/exti_both/exti_both.c | 4 ++-- .../stm32f1/stm32-h103/exti_both/exti_both.ld | 2 +- .../exti_rising_falling/exti_rising_falling.c | 4 ++-- .../exti_rising_falling/exti_rising_falling.ld | 2 +- .../stm32f1/stm32-h103/fancyblink/fancyblink.c | 4 ++-- .../stm32f1/stm32-h103/fancyblink/fancyblink.ld | 2 +- .../stm32f1/stm32-h103/led_stripe/led_stripe.c | 4 ++-- .../stm32f1/stm32-h103/led_stripe/led_stripe.ld | 2 +- .../stm32f1/stm32-h103/miniblink/miniblink.c | 4 ++-- .../stm32f1/stm32-h103/miniblink/miniblink.ld | 2 +- .../stm32f1/stm32-h103/pwm_6step/pwm_6step.c | 6 +++--- .../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 +- .../stm32f1/stm32-h103/usart_irq/usart_irq.c | 6 +++--- .../stm32f1/stm32-h103/usart_irq/usart_irq.ld | 2 +- .../usart_irq_printf/usart_irq_printf.c | 6 +++--- .../usart_irq_printf/usart_irq_printf.ld | 2 +- .../stm32-h103/usart_printf/usart_printf.c | 6 +++--- .../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 +- .../stm32f1/stm32-h107/fancyblink/fancyblink.c | 4 ++-- .../stm32f1/stm32-h107/fancyblink/fancyblink.ld | 2 +- .../stm32f1/stm32-h107/usb_simple/usb_simple.c | 4 ++-- .../stm32f1/stm32-h107/usb_simple/usb_simple.ld | 2 +- .../stm32f2/jobygps/usart_printf/usart_printf.ld | 2 +- 95 files changed, 184 insertions(+), 184 deletions(-) diff --git a/examples/stm32f1/Makefile.include b/examples/stm32f1/Makefile.include index 221ebaea..82e6d2a4 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 5987bdf2..6d5fbe3a 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 7ea2b92c..3409b98d 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 7ffbc745..9d184f16 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 54e5dac7..6a01797d 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 f42454bf..cd9d97dc 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 928c898a..d0df9e64 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 e9a35646..54ef47c3 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 7ea2b92c..3409b98d 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 393928f3..55052312 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 7ea2b92c..3409b98d 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 6c63c484..00a05dca 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 c0765211..4f609a88 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 09ae89de..db479b22 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 78997732..edb52c5a 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 146bb568..faa9aa07 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 7ea2b92c..3409b98d 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 3d75c4aa..263230f8 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 da4f2b37..a3195d22 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 ea5ec0e6..b2efe71d 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 78997732..edb52c5a 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 82320c1a..20ff0a14 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 78997732..edb52c5a 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 6c0e828e..a87909cd 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 c0765211..4f609a88 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 e43fe0df..03894120 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 c0765211..4f609a88 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 ed514abf..de432255 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 b12a36d8..508971ed 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 c0765211..4f609a88 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 f70c80d5..d8f24040 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 c0765211..4f609a88 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 c447534a..28ae24ca 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 7ea2b92c..3409b98d 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 c05aff74..173ff2af 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 c0765211..4f609a88 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 aa2cdb67..422df885 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 c0765211..4f609a88 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 fdc92e24..d26b898e 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 1c20282d..3cd63164 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 7ffbc745..9d184f16 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 54e5dac7..6a01797d 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 8f08aac9..7c0186e9 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 1c20282d..3cd63164 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 b84f0746..87ce5cc9 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 b03f90f7..157204a7 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 d40fb7b3..38a4c4b5 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 b03f90f7..157204a7 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 a05f9576..973fab5d 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 b03f90f7..157204a7 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 c99920f8..fa8a9664 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 b03f90f7..157204a7 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 05d03124..942805b5 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 b03f90f7..157204a7 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 63f32744..2f3378c5 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 7ea2b92c..3409b98d 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 edfc676d..7c6f9c7a 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 7ea2b92c..3409b98d 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 af1268d6..b3c47ee9 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 7ea2b92c..3409b98d 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 eeb3f348..1b2ad863 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 7ea2b92c..3409b98d 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 9cf9d4f1..15768662 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 7ea2b92c..3409b98d 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 6f8bc2cd..b003f9a2 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 7ea2b92c..3409b98d 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 bda8ff79..9f9390ac 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 7ea2b92c..3409b98d 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 5a36bb8b..89b8a686 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 25806f8d..e2fb5b63 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 ea64c860..48cae129 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 7ea2b92c..3409b98d 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 ac461bb4..88814479 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 7ea2b92c..3409b98d 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 9692d612..a221acb5 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 7ea2b92c..3409b98d 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 9b957dcc..a2d8eef5 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 78997732..edb52c5a 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 42a74729..deee527f 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 78997732..edb52c5a 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 26fcee60..1eb067f9 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 78997732..edb52c5a 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 4b906408..f9e25273 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 928c898a..d0df9e64 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 7ffbc745..9d184f16 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 54e5dac7..6a01797d 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 a21fce60..a815573a 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 928c898a..d0df9e64 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 7ffbc745..9d184f16 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 928c898a..d0df9e64 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 c73d3d40..4d458291 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 6c9c7660..d35c1417 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 85f67df7..c30803c3 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 6c9c7660..d35c1417 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 78997732..e80bdbda 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