aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorUwe Hermann2011-10-29 22:19:12 +0200
committerUwe Hermann2011-10-29 22:19:12 +0200
commit788f3870c430b6e4ce7ae55bfa263cd66c1c7b37 (patch)
treeb8d95301a35b074bc78211c3329c47d7ddfb719a /examples
parent17d80aa5a4a3f32d28d94bcaedc45eca45ed5441 (diff)
parentfd2524beb0b0ace785c1aceb05b971d2aa902fde (diff)
Merge remote-tracking branch 'fnoble/stm32f2'
Diffstat (limited to 'examples')
-rw-r--r--examples/lm3s/Makefile.include2
-rw-r--r--examples/lpc13xx/Makefile.include2
-rw-r--r--examples/stm32f1/Makefile.include (renamed from examples/stm32/Makefile.include)23
-rw-r--r--examples/stm32f1/lisa-m/fancyblink/Makefile (renamed from examples/stm32/lisa-m/fancyblink/Makefile)0
-rw-r--r--examples/stm32f1/lisa-m/fancyblink/fancyblink.c (renamed from examples/stm32/lisa-m/fancyblink/fancyblink.c)4
-rw-r--r--examples/stm32f1/lisa-m/fancyblink/fancyblink.ld (renamed from examples/stm32/stm32-h103/fancyblink/fancyblink.ld)2
-rw-r--r--examples/stm32f1/lisa-m/usb_dfu/Makefile (renamed from examples/stm32/lisa-m/usb_dfu/Makefile)0
-rw-r--r--examples/stm32f1/lisa-m/usb_dfu/README (renamed from examples/stm32/lisa-m/usb_dfu/README)0
-rw-r--r--examples/stm32f1/lisa-m/usb_dfu/usbdfu.c (renamed from examples/stm32/other/usb_dfu/usbdfu.c)8
-rw-r--r--examples/stm32f1/lisa-m/usb_dfu/usbdfu.ld (renamed from examples/stm32/lisa-m/usb_dfu/usbdfu.ld)2
-rw-r--r--examples/stm32f1/lisa-m/usb_hid/Makefile (renamed from examples/stm32/lisa-m/usb_hid/Makefile)0
-rw-r--r--examples/stm32f1/lisa-m/usb_hid/README (renamed from examples/stm32/lisa-m/usb_hid/README)0
-rw-r--r--examples/stm32f1/lisa-m/usb_hid/usbhid.c (renamed from examples/stm32/lisa-m/usb_hid/usbhid.c)6
-rw-r--r--examples/stm32f1/lisa-m/usb_hid/usbhid.ld (renamed from examples/stm32/stm32-h103/usb_hid/usbhid.ld)2
-rw-r--r--examples/stm32f1/mb525/fancyblink/Makefile (renamed from examples/stm32/mb525/fancyblink/Makefile)0
-rw-r--r--examples/stm32f1/mb525/fancyblink/README (renamed from examples/stm32/mb525/fancyblink/README)0
-rw-r--r--examples/stm32f1/mb525/fancyblink/fancyblink.c (renamed from examples/stm32/mb525/fancyblink/fancyblink.c)4
-rw-r--r--examples/stm32f1/mb525/fancyblink/fancyblink.ld (renamed from examples/stm32/mb525/fancyblink/fancyblink.ld)2
-rw-r--r--examples/stm32f1/mb525/pwmleds/Makefile (renamed from examples/stm32/mb525/pwmleds/Makefile)0
-rw-r--r--examples/stm32f1/mb525/pwmleds/README (renamed from examples/stm32/mb525/pwmleds/README)0
-rw-r--r--examples/stm32f1/mb525/pwmleds/pwmleds.c (renamed from examples/stm32/mb525/pwmleds/pwmleds.c)4
-rw-r--r--examples/stm32f1/mb525/pwmleds/pwmleds.ld (renamed from examples/stm32/mb525/pwmleds/pwmleds.ld)2
-rw-r--r--examples/stm32f1/obldc/can/Makefile (renamed from examples/stm32/obldc/can/Makefile)0
-rw-r--r--examples/stm32f1/obldc/can/can.c (renamed from examples/stm32/obldc/can/can.c)6
-rw-r--r--examples/stm32f1/obldc/can/can.ld (renamed from examples/stm32/obldc/can/can.ld)2
-rw-r--r--examples/stm32f1/obldc/led/Makefile (renamed from examples/stm32/obldc/led/Makefile)0
-rw-r--r--examples/stm32f1/obldc/led/led.c (renamed from examples/stm32/obldc/led/led.c)4
-rw-r--r--examples/stm32f1/obldc/led/led.ld (renamed from examples/stm32/obldc/led/led.ld)2
-rw-r--r--examples/stm32f1/obldc/pwmleds/Makefile (renamed from examples/stm32/obldc/pwmleds/Makefile)0
-rw-r--r--examples/stm32f1/obldc/pwmleds/pwmleds.c (renamed from examples/stm32/obldc/pwmleds/pwmleds.c)4
-rw-r--r--examples/stm32f1/obldc/pwmleds/pwmleds.ld (renamed from examples/stm32/obldc/pwmleds/pwmleds.ld)2
-rw-r--r--examples/stm32f1/obldc/systick/Makefile (renamed from examples/stm32/obldc/systick/Makefile)0
-rw-r--r--examples/stm32f1/obldc/systick/systick.c (renamed from examples/stm32/obldc/systick/systick.c)6
-rw-r--r--examples/stm32f1/obldc/systick/systick.ld (renamed from examples/stm32/obldc/systick/systick.ld)2
-rw-r--r--examples/stm32f1/obldc/usart/Makefile (renamed from examples/stm32/obldc/usart/Makefile)0
-rw-r--r--examples/stm32f1/obldc/usart/usart.c (renamed from examples/stm32/obldc/usart/usart.c)6
-rw-r--r--examples/stm32f1/obldc/usart/usart.ld (renamed from examples/stm32/obldc/usart/usart.ld)2
-rw-r--r--examples/stm32f1/obldc/usart_irq/Makefile (renamed from examples/stm32/obldc/usart_irq/Makefile)0
-rw-r--r--examples/stm32f1/obldc/usart_irq/usart_irq.c (renamed from examples/stm32/obldc/usart_irq/usart_irq.c)6
-rw-r--r--examples/stm32f1/obldc/usart_irq/usart_irq.ld (renamed from examples/stm32/obldc/usart_irq/usart_irq.ld)2
-rw-r--r--examples/stm32f1/other/adc_temperature_sensor/Makefile (renamed from examples/stm32/other/adc_temperature_sensor/Makefile)0
-rw-r--r--examples/stm32f1/other/adc_temperature_sensor/README (renamed from examples/stm32/other/adc_temperature_sensor/README)0
-rw-r--r--examples/stm32f1/other/adc_temperature_sensor/adc.c (renamed from examples/stm32/other/adc_temperature_sensor/adc.c)10
-rw-r--r--examples/stm32f1/other/adc_temperature_sensor/adc.ld (renamed from examples/stm32/other/adc_temperature_sensor/adc.ld)2
-rw-r--r--examples/stm32f1/other/dma_mem2mem/Makefile (renamed from examples/stm32/other/dma_mem2mem/Makefile)0
-rw-r--r--examples/stm32f1/other/dma_mem2mem/README (renamed from examples/stm32/other/dma_mem2mem/README)0
-rw-r--r--examples/stm32f1/other/dma_mem2mem/dma.c (renamed from examples/stm32/other/dma_mem2mem/dma.c)10
-rw-r--r--examples/stm32f1/other/dma_mem2mem/dma.ld (renamed from examples/stm32/other/dma_mem2mem/dma.ld)2
-rw-r--r--examples/stm32f1/other/dogm128/Makefile (renamed from examples/stm32/other/dogm128/Makefile)0
-rw-r--r--examples/stm32f1/other/dogm128/README (renamed from examples/stm32/other/dogm128/README)0
-rw-r--r--examples/stm32f1/other/dogm128/dogm128.c (renamed from examples/stm32/other/dogm128/dogm128.c)0
-rw-r--r--examples/stm32f1/other/dogm128/dogm128.h (renamed from examples/stm32/other/dogm128/dogm128.h)2
-rw-r--r--examples/stm32f1/other/dogm128/main.c (renamed from examples/stm32/other/dogm128/main.c)6
-rw-r--r--examples/stm32f1/other/dogm128/main.ld (renamed from examples/stm32/other/dogm128/main.ld)2
-rw-r--r--examples/stm32f1/other/i2c_stts75_sensor/Makefile (renamed from examples/stm32/other/i2c_stts75_sensor/Makefile)0
-rw-r--r--examples/stm32f1/other/i2c_stts75_sensor/README (renamed from examples/stm32/other/i2c_stts75_sensor/README)0
-rw-r--r--examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c (renamed from examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.c)8
-rw-r--r--examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.ld (renamed from examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.ld)2
-rw-r--r--examples/stm32f1/other/i2c_stts75_sensor/stts75.c (renamed from examples/stm32/other/i2c_stts75_sensor/stts75.c)0
-rw-r--r--examples/stm32f1/other/i2c_stts75_sensor/stts75.h (renamed from examples/stm32/other/i2c_stts75_sensor/stts75.h)0
-rw-r--r--examples/stm32f1/other/rtc/Makefile (renamed from examples/stm32/other/rtc/Makefile)0
-rw-r--r--examples/stm32f1/other/rtc/README (renamed from examples/stm32/other/rtc/README)0
-rw-r--r--examples/stm32f1/other/rtc/rtc.c (renamed from examples/stm32/other/rtc/rtc.c)8
-rw-r--r--examples/stm32f1/other/rtc/rtc.ld (renamed from examples/stm32/other/rtc/rtc.ld)2
-rw-r--r--examples/stm32f1/other/systick/Makefile (renamed from examples/stm32/other/systick/Makefile)0
-rw-r--r--examples/stm32f1/other/systick/README (renamed from examples/stm32/other/systick/README)0
-rw-r--r--examples/stm32f1/other/systick/systick.c (renamed from examples/stm32/other/systick/systick.c)6
-rw-r--r--examples/stm32f1/other/systick/systick.ld (renamed from examples/stm32/other/systick/systick.ld)2
-rw-r--r--examples/stm32f1/other/timer_interrupt/Makefile (renamed from examples/stm32/other/timer_interrupt/Makefile)0
-rw-r--r--examples/stm32f1/other/timer_interrupt/README (renamed from examples/stm32/other/timer_interrupt/README)0
-rw-r--r--examples/stm32f1/other/timer_interrupt/timer.c (renamed from examples/stm32/other/timer_interrupt/timer.c)6
-rw-r--r--examples/stm32f1/other/timer_interrupt/timer.ld (renamed from examples/stm32/other/timer_interrupt/timer.ld)2
-rw-r--r--examples/stm32f1/other/usb_cdcacm/Makefile (renamed from examples/stm32/other/usb_cdcacm/Makefile)0
-rw-r--r--examples/stm32f1/other/usb_cdcacm/README (renamed from examples/stm32/other/usb_cdcacm/README)0
-rw-r--r--examples/stm32f1/other/usb_cdcacm/cdcacm.c (renamed from examples/stm32/other/usb_cdcacm/cdcacm.c)4
-rw-r--r--examples/stm32f1/other/usb_cdcacm/cdcacm.ld (renamed from examples/stm32/other/usb_cdcacm/cdcacm.ld)2
-rw-r--r--examples/stm32f1/other/usb_dfu/Makefile (renamed from examples/stm32/other/usb_dfu/Makefile)0
-rw-r--r--examples/stm32f1/other/usb_dfu/README (renamed from examples/stm32/other/usb_dfu/README)0
-rw-r--r--examples/stm32f1/other/usb_dfu/usbdfu.c (renamed from examples/stm32/lisa-m/usb_dfu/usbdfu.c)8
-rw-r--r--examples/stm32f1/other/usb_dfu/usbdfu.ld (renamed from examples/stm32/stm32-h103/usb_dfu/usbdfu.ld)2
-rw-r--r--examples/stm32f1/other/usb_hid/Makefile (renamed from examples/stm32/other/usb_hid/Makefile)0
-rw-r--r--examples/stm32f1/other/usb_hid/README (renamed from examples/stm32/other/usb_hid/README)0
-rw-r--r--examples/stm32f1/other/usb_hid/usbhid.c (renamed from examples/stm32/other/usb_hid/usbhid.c)6
-rw-r--r--examples/stm32f1/other/usb_hid/usbhid.ld (renamed from examples/stm32/other/usb_hid/usbhid.ld)2
-rw-r--r--examples/stm32f1/stm32-discovery/button/Makefile (renamed from examples/stm32/stm32-discovery/button/Makefile)0
-rw-r--r--examples/stm32f1/stm32-discovery/button/README (renamed from examples/stm32/stm32-discovery/button/README)0
-rw-r--r--examples/stm32f1/stm32-discovery/button/button.c (renamed from examples/stm32/stm32-discovery/button/button.c)4
-rw-r--r--examples/stm32f1/stm32-discovery/button/button.ld (renamed from examples/stm32/stm32-discovery/button/button.ld)2
-rw-r--r--examples/stm32f1/stm32-discovery/fancyblink/Makefile (renamed from examples/stm32/stm32-discovery/fancyblink/Makefile)0
-rw-r--r--examples/stm32f1/stm32-discovery/fancyblink/README (renamed from examples/stm32/stm32-discovery/fancyblink/README)0
-rw-r--r--examples/stm32f1/stm32-discovery/fancyblink/fancyblink.c (renamed from examples/stm32/stm32-discovery/fancyblink/fancyblink.c)4
-rw-r--r--examples/stm32f1/stm32-discovery/fancyblink/fancyblink.ld (renamed from examples/stm32/stm32-discovery/fancyblink/fancyblink.ld)2
-rw-r--r--examples/stm32f1/stm32-discovery/miniblink/Makefile (renamed from examples/stm32/stm32-discovery/miniblink/Makefile)0
-rw-r--r--examples/stm32f1/stm32-discovery/miniblink/README (renamed from examples/stm32/stm32-discovery/miniblink/README)0
-rw-r--r--examples/stm32f1/stm32-discovery/miniblink/miniblink.c (renamed from examples/stm32/stm32-discovery/miniblink/miniblink.c)4
-rw-r--r--examples/stm32f1/stm32-discovery/miniblink/miniblink.ld (renamed from examples/stm32/stm32-discovery/miniblink/miniblink.ld)2
-rw-r--r--examples/stm32f1/stm32-discovery/rtc/Makefile (renamed from examples/stm32/stm32-discovery/rtc/Makefile)0
-rw-r--r--examples/stm32f1/stm32-discovery/rtc/README (renamed from examples/stm32/stm32-discovery/rtc/README)0
-rw-r--r--examples/stm32f1/stm32-discovery/rtc/rtc.c (renamed from examples/stm32/stm32-discovery/rtc/rtc.c)6
-rw-r--r--examples/stm32f1/stm32-discovery/rtc/rtc.ld (renamed from examples/stm32/stm32-discovery/rtc/rtc.ld)2
-rw-r--r--examples/stm32f1/stm32-discovery/usart/Makefile (renamed from examples/stm32/stm32-discovery/usart/Makefile)0
-rw-r--r--examples/stm32f1/stm32-discovery/usart/README (renamed from examples/stm32/stm32-discovery/usart/README)0
-rw-r--r--examples/stm32f1/stm32-discovery/usart/usart.c (renamed from examples/stm32/stm32-discovery/usart/usart.c)4
-rw-r--r--examples/stm32f1/stm32-discovery/usart/usart.ld (renamed from examples/stm32/stm32-discovery/usart/usart.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/button/Makefile (renamed from examples/stm32/stm32-h103/button/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/button/button.c (renamed from examples/stm32/stm32-h103/button/button.c)4
-rw-r--r--examples/stm32f1/stm32-h103/button/button.ld (renamed from examples/stm32/stm32-h103/button/button.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/exti_both/Makefile (renamed from examples/stm32/stm32-h103/exti_both/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/exti_both/exti_both.c (renamed from examples/stm32/stm32-h103/exti_both/exti_both.c)4
-rw-r--r--examples/stm32f1/stm32-h103/exti_both/exti_both.ld (renamed from examples/stm32/stm32-h103/exti_both/exti_both.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/exti_rising_falling/Makefile (renamed from examples/stm32/stm32-h103/exti_rising_falling/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.c (renamed from examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.c)4
-rw-r--r--examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld (renamed from examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/fancyblink/Makefile (renamed from examples/stm32/stm32-h103/fancyblink/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/fancyblink/README (renamed from examples/stm32/stm32-h103/fancyblink/README)0
-rw-r--r--examples/stm32f1/stm32-h103/fancyblink/fancyblink.c (renamed from examples/stm32/stm32-h103/fancyblink/fancyblink.c)4
-rw-r--r--examples/stm32f1/stm32-h103/fancyblink/fancyblink.ld (renamed from examples/stm32/lisa-m/fancyblink/fancyblink.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/led_stripe/Makefile (renamed from examples/stm32/stm32-h103/led_stripe/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/led_stripe/led_stripe.c (renamed from examples/stm32/stm32-h103/led_stripe/led_stripe.c)4
-rw-r--r--examples/stm32f1/stm32-h103/led_stripe/led_stripe.ld (renamed from examples/stm32/stm32-h103/led_stripe/led_stripe.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/miniblink/Makefile (renamed from examples/stm32/stm32-h103/miniblink/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/miniblink/README (renamed from examples/stm32/stm32-h103/miniblink/README)0
-rw-r--r--examples/stm32f1/stm32-h103/miniblink/miniblink.c (renamed from examples/stm32/stm32-h103/miniblink/miniblink.c)4
-rw-r--r--examples/stm32f1/stm32-h103/miniblink/miniblink.ld (renamed from examples/stm32/stm32-h103/miniblink/miniblink.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/pwm_6step/Makefile (renamed from examples/stm32/stm32-h103/pwm_6step/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.c (renamed from examples/stm32/stm32-h103/pwm_6step/pwm_6step.c)6
-rw-r--r--examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.ld (renamed from examples/stm32/stm32-h103/pwm_6step/pwm_6step.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/spi/Makefile (renamed from examples/stm32/stm32-h103/spi/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/spi/README (renamed from examples/stm32/stm32-h103/spi/README)0
-rw-r--r--examples/stm32f1/stm32-h103/spi/spi.c (renamed from examples/stm32/stm32-h103/spi/spi.c)2
-rw-r--r--examples/stm32f1/stm32-h103/spi/spi.ld (renamed from examples/stm32/stm32-h103/spi/spi.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/timer/Makefile (renamed from examples/stm32/stm32-h103/timer/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/timer/timer.c (renamed from examples/stm32/stm32-h103/timer/timer.c)6
-rw-r--r--examples/stm32f1/stm32-h103/timer/timer.ld (renamed from examples/stm32/stm32-h103/timer/timer.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/traceswo/Makefile (renamed from examples/stm32/stm32-h103/traceswo/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/traceswo/README (renamed from examples/stm32/stm32-h103/traceswo/README)0
-rw-r--r--examples/stm32f1/stm32-h103/traceswo/traceswo.c (renamed from examples/stm32/stm32-h103/traceswo/traceswo.c)4
-rw-r--r--examples/stm32f1/stm32-h103/traceswo/traceswo.ld (renamed from examples/stm32/stm32-h103/traceswo/traceswo.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/usart/Makefile (renamed from examples/stm32/stm32-h103/usart/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/usart/README (renamed from examples/stm32/stm32-h103/usart/README)0
-rw-r--r--examples/stm32f1/stm32-h103/usart/usart.c (renamed from examples/stm32/stm32-h103/usart/usart.c)10
-rw-r--r--examples/stm32f1/stm32-h103/usart/usart.ld (renamed from examples/stm32/stm32-h103/usart/usart.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/usart_irq/Makefile (renamed from examples/stm32/stm32-h103/usart_irq/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/usart_irq/usart_irq.c (renamed from examples/stm32/stm32-h103/usart_irq/usart_irq.c)6
-rw-r--r--examples/stm32f1/stm32-h103/usart_irq/usart_irq.ld (renamed from examples/stm32/stm32-h103/usart_irq/usart_irq.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/usart_irq_printf/Makefile (renamed from examples/stm32/stm32-h103/usart_irq_printf/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/usart_irq_printf/usart_irq_printf.c (renamed from examples/stm32/stm32-h103/usart_irq_printf/usart_irq_printf.c)6
-rw-r--r--examples/stm32f1/stm32-h103/usart_irq_printf/usart_irq_printf.ld (renamed from examples/stm32/stm32-h103/usart_irq_printf/usart_irq_printf.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/usart_printf/Makefile (renamed from examples/stm32/stm32-h103/usart_printf/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/usart_printf/usart_printf.c (renamed from examples/stm32/stm32-h103/usart_printf/usart_printf.c)6
-rw-r--r--examples/stm32f1/stm32-h103/usart_printf/usart_printf.ld (renamed from examples/stm32/stm32-h103/usart_printf/usart_printf.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/usb_cdcacm/Makefile (renamed from examples/stm32/stm32-h103/usb_cdcacm/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/usb_cdcacm/README (renamed from examples/stm32/stm32-h103/usb_cdcacm/README)0
-rw-r--r--examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.c (renamed from examples/stm32/stm32-h103/usb_cdcacm/cdcacm.c)4
-rw-r--r--examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.ld (renamed from examples/stm32/stm32-h103/usb_cdcacm/cdcacm.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/usb_dfu/Makefile (renamed from examples/stm32/stm32-h103/usb_dfu/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/usb_dfu/README (renamed from examples/stm32/stm32-h103/usb_dfu/README)0
-rw-r--r--examples/stm32f1/stm32-h103/usb_dfu/usbdfu.c (renamed from examples/stm32/stm32-h103/usb_dfu/usbdfu.c)8
-rw-r--r--examples/stm32f1/stm32-h103/usb_dfu/usbdfu.ld (renamed from examples/stm32/other/usb_dfu/usbdfu.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/usb_hid/Makefile (renamed from examples/stm32/stm32-h103/usb_hid/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/usb_hid/README (renamed from examples/stm32/stm32-h103/usb_hid/README)0
-rw-r--r--examples/stm32f1/stm32-h103/usb_hid/usbhid.c (renamed from examples/stm32/stm32-h103/usb_hid/usbhid.c)6
-rw-r--r--examples/stm32f1/stm32-h103/usb_hid/usbhid.ld (renamed from examples/stm32/lisa-m/usb_hid/usbhid.ld)2
-rw-r--r--examples/stm32f1/stm32-h103/usb_iap/Makefile (renamed from examples/stm32/stm32-h103/usb_iap/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h103/usb_iap/README (renamed from examples/stm32/stm32-h103/usb_iap/README)0
-rw-r--r--examples/stm32f1/stm32-h103/usb_iap/usbiap.c (renamed from examples/stm32/stm32-h103/usb_iap/usbiap.c)8
-rw-r--r--examples/stm32f1/stm32-h103/usb_iap/usbiap.ld (renamed from examples/stm32/stm32-h103/usb_iap/usbiap.ld)2
-rw-r--r--examples/stm32f1/stm32-h107/fancyblink/Makefile (renamed from examples/stm32/stm32-h107/fancyblink/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h107/fancyblink/README (renamed from examples/stm32/stm32-h107/fancyblink/README)0
-rw-r--r--examples/stm32f1/stm32-h107/fancyblink/fancyblink.c (renamed from examples/stm32/stm32-h107/fancyblink/fancyblink.c)4
-rw-r--r--examples/stm32f1/stm32-h107/fancyblink/fancyblink.ld (renamed from examples/stm32/stm32-h107/fancyblink/fancyblink.ld)2
-rw-r--r--examples/stm32f1/stm32-h107/usb_simple/Makefile (renamed from examples/stm32/stm32-h107/usb_simple/Makefile)0
-rw-r--r--examples/stm32f1/stm32-h107/usb_simple/README (renamed from examples/stm32/stm32-h107/usb_simple/README)0
-rw-r--r--examples/stm32f1/stm32-h107/usb_simple/usb_simple.c (renamed from examples/stm32/stm32-h107/usb_simple/usb_simple.c)4
-rw-r--r--examples/stm32f1/stm32-h107/usb_simple/usb_simple.ld (renamed from examples/stm32/stm32-h107/usb_simple/usb_simple.ld)2
-rw-r--r--examples/stm32f2/Makefile.include125
-rw-r--r--examples/stm32f2/jobygps/jobygps.cfg3
-rw-r--r--examples/stm32f2/jobygps/miniblink/Makefile23
-rw-r--r--examples/stm32f2/jobygps/miniblink/README6
-rw-r--r--examples/stm32f2/jobygps/miniblink/miniblink.c77
-rw-r--r--examples/stm32f2/jobygps/miniblink/miniblink.ld31
-rw-r--r--examples/stm32f2/jobygps/spi_test/Makefile23
-rw-r--r--examples/stm32f2/jobygps/spi_test/spi_test.c113
-rw-r--r--examples/stm32f2/jobygps/spi_test/spi_test.ld31
-rw-r--r--examples/stm32f2/jobygps/usart_printf/Makefile23
-rw-r--r--examples/stm32f2/jobygps/usart_printf/usart_printf.c109
-rw-r--r--examples/stm32f2/jobygps/usart_printf/usart_printf.ld31
187 files changed, 777 insertions, 195 deletions
diff --git a/examples/lm3s/Makefile.include b/examples/lm3s/Makefile.include
index 2424832..0eafe7d 100644
--- a/examples/lm3s/Makefile.include
+++ b/examples/lm3s/Makefile.include
@@ -25,7 +25,7 @@ LD = $(PREFIX)-gcc
OBJCOPY = $(PREFIX)-objcopy
OBJDUMP = $(PREFIX)-objdump
# Uncomment this line if you want to use the installed (not local) library.
-# TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX)
+# TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
TOOLCHAIN_DIR = ../../../..
CFLAGS += -O0 -g3 -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
-mcpu=cortex-m3 -mthumb -MD
diff --git a/examples/lpc13xx/Makefile.include b/examples/lpc13xx/Makefile.include
index fe2c3ba..948d6c4 100644
--- a/examples/lpc13xx/Makefile.include
+++ b/examples/lpc13xx/Makefile.include
@@ -25,7 +25,7 @@ LD = $(PREFIX)-gcc
OBJCOPY = $(PREFIX)-objcopy
OBJDUMP = $(PREFIX)-objdump
# Uncomment this line if you want to use the installed (not local) library.
-# TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX)
+# TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
TOOLCHAIN_DIR = ../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
-mcpu=cortex-m3 -mthumb -MD
diff --git a/examples/stm32/Makefile.include b/examples/stm32f1/Makefile.include
index a4512e9..2edd255 100644
--- a/examples/stm32/Makefile.include
+++ b/examples/stm32f1/Makefile.include
@@ -24,14 +24,13 @@ CC = $(PREFIX)-gcc
LD = $(PREFIX)-gcc
OBJCOPY = $(PREFIX)-objcopy
OBJDUMP = $(PREFIX)-objdump
-GDB = $(PREFIX)-gdb
# Uncomment this line if you want to use the installed (not local) library.
-# TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX)
+#TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
TOOLCHAIN_DIR = ../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
- -fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD
+ -fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F1
LDSCRIPT = $(BINARY).ld
-LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32 \
+LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32f1 \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
-mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float
OBJS += $(BINARY).o
@@ -39,9 +38,6 @@ OBJS += $(BINARY).o
OOCD ?= openocd
OOCD_INTERFACE ?= flossjtag
OOCD_BOARD ?= olimex_stm32_h103
-# Black magic probe specific variables
-# Set the BMP_PORT to a serial port and then BMP is used for flashing
-BMP_PORT ?=
# Be silent per default, but 'make V=1' will show all compiler calls.
ifneq ($(V),1)
@@ -79,9 +75,9 @@ flash: $(BINARY).flash
@#printf " OBJDUMP $(*).list\n"
$(Q)$(OBJDUMP) -S $(*).elf > $(*).list
-%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/stm32/libopencm3_stm32.a
+%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/stm32f1/libopencm3_stm32f1.a
@#printf " LD $(subst $(shell pwd)/,,$(@))\n"
- $(Q)$(LD) -o $(*).elf $(OBJS) -lopencm3_stm32 $(LDFLAGS)
+ $(Q)$(LD) -o $(*).elf $(OBJS) -lopencm3_stm32f1 $(LDFLAGS)
%.o: %.c Makefile
@#printf " CC $(subst $(shell pwd)/,,$(@))\n"
@@ -96,7 +92,6 @@ clean:
$(Q)rm -f *.srec
$(Q)rm -f *.list
-ifeq ($(BMP_PORT),)
ifeq ($(OOCD_SERIAL),)
%.flash: %.hex
@printf " FLASH $<\n"
@@ -121,14 +116,6 @@ else
-c "reset" \
-c "shutdown" $(NULL)
endif
-else
-%.flash: %.elf
- @echo " GDB $(*).elf (flash)"
- $(Q)$(GDB) --batch \
- -ex 'target extended-remote $(BMP_PORT)' \
- -x $(TOOLCHAIN_DIR)/scripts/black_magic_probe_flash.scr \
- $(*).elf
-endif
.PHONY: images clean
diff --git a/examples/stm32/lisa-m/fancyblink/Makefile b/examples/stm32f1/lisa-m/fancyblink/Makefile
index 1baec4d..1baec4d 100644
--- a/examples/stm32/lisa-m/fancyblink/Makefile
+++ b/examples/stm32f1/lisa-m/fancyblink/Makefile
diff --git a/examples/stm32/lisa-m/fancyblink/fancyblink.c b/examples/stm32f1/lisa-m/fancyblink/fancyblink.c
index 5987bdf..6d5fbe3 100644
--- a/examples/stm32/lisa-m/fancyblink/fancyblink.c
+++ b/examples/stm32f1/lisa-m/fancyblink/fancyblink.c
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)
diff --git a/examples/stm32/stm32-h103/fancyblink/fancyblink.ld b/examples/stm32f1/lisa-m/fancyblink/fancyblink.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/stm32-h103/fancyblink/fancyblink.ld
+++ b/examples/stm32f1/lisa-m/fancyblink/fancyblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/lisa-m/usb_dfu/Makefile b/examples/stm32f1/lisa-m/usb_dfu/Makefile
index 48e2d6b..48e2d6b 100644
--- a/examples/stm32/lisa-m/usb_dfu/Makefile
+++ b/examples/stm32f1/lisa-m/usb_dfu/Makefile
diff --git a/examples/stm32/lisa-m/usb_dfu/README b/examples/stm32f1/lisa-m/usb_dfu/README
index 9c0169a..9c0169a 100644
--- a/examples/stm32/lisa-m/usb_dfu/README
+++ b/examples/stm32f1/lisa-m/usb_dfu/README
diff --git a/examples/stm32/other/usb_dfu/usbdfu.c b/examples/stm32f1/lisa-m/usb_dfu/usbdfu.c
index 7ffbc74..9d184f1 100644
--- a/examples/stm32/other/usb_dfu/usbdfu.c
+++ b/examples/stm32f1/lisa-m/usb_dfu/usbdfu.c
@@ -18,10 +18,10 @@
*/
#include <string.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/scb.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/dfu.h>
diff --git a/examples/stm32/lisa-m/usb_dfu/usbdfu.ld b/examples/stm32f1/lisa-m/usb_dfu/usbdfu.ld
index 54e5dac..6a01797 100644
--- a/examples/stm32/lisa-m/usb_dfu/usbdfu.ld
+++ b/examples/stm32f1/lisa-m/usb_dfu/usbdfu.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/lisa-m/usb_hid/Makefile b/examples/stm32f1/lisa-m/usb_hid/Makefile
index d831e9e..d831e9e 100644
--- a/examples/stm32/lisa-m/usb_hid/Makefile
+++ b/examples/stm32f1/lisa-m/usb_hid/Makefile
diff --git a/examples/stm32/lisa-m/usb_hid/README b/examples/stm32f1/lisa-m/usb_hid/README
index 48a9b39..48a9b39 100644
--- a/examples/stm32/lisa-m/usb_hid/README
+++ b/examples/stm32f1/lisa-m/usb_hid/README
diff --git a/examples/stm32/lisa-m/usb_hid/usbhid.c b/examples/stm32f1/lisa-m/usb_hid/usbhid.c
index f42454b..cd9d97d 100644
--- a/examples/stm32/lisa-m/usb_hid/usbhid.c
+++ b/examples/stm32f1/lisa-m/usb_hid/usbhid.c
@@ -19,8 +19,8 @@
*/
#include <stdlib.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/systick.h>
#include <libopencm3/stm32/otg_fs.h>
#include <libopencm3/usb/usbd.h>
@@ -30,7 +30,7 @@
#define INCLUDE_DFU_INTERFACE
#ifdef INCLUDE_DFU_INTERFACE
-#include <libopencm3/stm32/scb.h>
+#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/dfu.h>
#endif
diff --git a/examples/stm32/stm32-h103/usb_hid/usbhid.ld b/examples/stm32f1/lisa-m/usb_hid/usbhid.ld
index 928c898..d0df9e6 100644
--- a/examples/stm32/stm32-h103/usb_hid/usbhid.ld
+++ b/examples/stm32f1/lisa-m/usb_hid/usbhid.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/mb525/fancyblink/Makefile b/examples/stm32f1/mb525/fancyblink/Makefile
index 1baec4d..1baec4d 100644
--- a/examples/stm32/mb525/fancyblink/Makefile
+++ b/examples/stm32f1/mb525/fancyblink/Makefile
diff --git a/examples/stm32/mb525/fancyblink/README b/examples/stm32f1/mb525/fancyblink/README
index 226cb21..226cb21 100644
--- a/examples/stm32/mb525/fancyblink/README
+++ b/examples/stm32f1/mb525/fancyblink/README
diff --git a/examples/stm32/mb525/fancyblink/fancyblink.c b/examples/stm32f1/mb525/fancyblink/fancyblink.c
index e9a3564..54ef47c 100644
--- a/examples/stm32/mb525/fancyblink/fancyblink.c
+++ b/examples/stm32f1/mb525/fancyblink/fancyblink.c
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
void clock_setup(void)
{
diff --git a/examples/stm32/mb525/fancyblink/fancyblink.ld b/examples/stm32f1/mb525/fancyblink/fancyblink.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/mb525/fancyblink/fancyblink.ld
+++ b/examples/stm32f1/mb525/fancyblink/fancyblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/mb525/pwmleds/Makefile b/examples/stm32f1/mb525/pwmleds/Makefile
index 8ae74d6..8ae74d6 100644
--- a/examples/stm32/mb525/pwmleds/Makefile
+++ b/examples/stm32f1/mb525/pwmleds/Makefile
diff --git a/examples/stm32/mb525/pwmleds/README b/examples/stm32f1/mb525/pwmleds/README
index b2a6d95..b2a6d95 100644
--- a/examples/stm32/mb525/pwmleds/README
+++ b/examples/stm32f1/mb525/pwmleds/README
diff --git a/examples/stm32/mb525/pwmleds/pwmleds.c b/examples/stm32f1/mb525/pwmleds/pwmleds.c
index 393928f..5505231 100644
--- a/examples/stm32/mb525/pwmleds/pwmleds.c
+++ b/examples/stm32f1/mb525/pwmleds/pwmleds.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/timer.h>
// #define COMPARE
diff --git a/examples/stm32/mb525/pwmleds/pwmleds.ld b/examples/stm32f1/mb525/pwmleds/pwmleds.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/mb525/pwmleds/pwmleds.ld
+++ b/examples/stm32f1/mb525/pwmleds/pwmleds.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/can/Makefile b/examples/stm32f1/obldc/can/Makefile
index 20a4b90..20a4b90 100644
--- a/examples/stm32/obldc/can/Makefile
+++ b/examples/stm32f1/obldc/can/Makefile
diff --git a/examples/stm32/obldc/can/can.c b/examples/stm32f1/obldc/can/can.c
index 6c63c48..00a05dc 100644
--- a/examples/stm32/obldc/can/can.c
+++ b/examples/stm32f1/obldc/can/can.c
@@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/systick.h>
#include <libopencm3/stm32/can.h>
diff --git a/examples/stm32/obldc/can/can.ld b/examples/stm32f1/obldc/can/can.ld
index c076521..4f609a8 100644
--- a/examples/stm32/obldc/can/can.ld
+++ b/examples/stm32f1/obldc/can/can.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/led/Makefile b/examples/stm32f1/obldc/led/Makefile
index 8e1618a..8e1618a 100644
--- a/examples/stm32/obldc/led/Makefile
+++ b/examples/stm32f1/obldc/led/Makefile
diff --git a/examples/stm32/obldc/led/led.c b/examples/stm32f1/obldc/led/led.c
index 09ae89d..db479b2 100644
--- a/examples/stm32/obldc/led/led.c
+++ b/examples/stm32f1/obldc/led/led.c
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)
diff --git a/examples/stm32/obldc/led/led.ld b/examples/stm32f1/obldc/led/led.ld
index 7899773..edb52c5 100644
--- a/examples/stm32/obldc/led/led.ld
+++ b/examples/stm32f1/obldc/led/led.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/pwmleds/Makefile b/examples/stm32f1/obldc/pwmleds/Makefile
index 8ae74d6..8ae74d6 100644
--- a/examples/stm32/obldc/pwmleds/Makefile
+++ b/examples/stm32f1/obldc/pwmleds/Makefile
diff --git a/examples/stm32/obldc/pwmleds/pwmleds.c b/examples/stm32f1/obldc/pwmleds/pwmleds.c
index 146bb56..faa9aa0 100644
--- a/examples/stm32/obldc/pwmleds/pwmleds.c
+++ b/examples/stm32f1/obldc/pwmleds/pwmleds.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/timer.h>
// #define COMPARE
diff --git a/examples/stm32/obldc/pwmleds/pwmleds.ld b/examples/stm32f1/obldc/pwmleds/pwmleds.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/obldc/pwmleds/pwmleds.ld
+++ b/examples/stm32f1/obldc/pwmleds/pwmleds.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/systick/Makefile b/examples/stm32f1/obldc/systick/Makefile
index 91b5cb5..91b5cb5 100644
--- a/examples/stm32/obldc/systick/Makefile
+++ b/examples/stm32f1/obldc/systick/Makefile
diff --git a/examples/stm32/obldc/systick/systick.c b/examples/stm32f1/obldc/systick/systick.c
index 3d75c4a..263230f 100644
--- a/examples/stm32/obldc/systick/systick.c
+++ b/examples/stm32f1/obldc/systick/systick.c
@@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/systick.h>
diff --git a/examples/stm32/obldc/systick/systick.ld b/examples/stm32f1/obldc/systick/systick.ld
index da4f2b3..a3195d2 100644
--- a/examples/stm32/obldc/systick/systick.ld
+++ b/examples/stm32f1/obldc/systick/systick.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/usart/Makefile b/examples/stm32f1/obldc/usart/Makefile
index 2c1e1b1..2c1e1b1 100644
--- a/examples/stm32/obldc/usart/Makefile
+++ b/examples/stm32f1/obldc/usart/Makefile
diff --git a/examples/stm32/obldc/usart/usart.c b/examples/stm32f1/obldc/usart/usart.c
index ea5ec0e..b2efe71 100644
--- a/examples/stm32/obldc/usart/usart.c
+++ b/examples/stm32f1/obldc/usart/usart.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
void clock_setup(void)
@@ -47,7 +47,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_RE_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 230400);
+ usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX);
diff --git a/examples/stm32/obldc/usart/usart.ld b/examples/stm32f1/obldc/usart/usart.ld
index 7899773..edb52c5 100644
--- a/examples/stm32/obldc/usart/usart.ld
+++ b/examples/stm32f1/obldc/usart/usart.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/obldc/usart_irq/Makefile b/examples/stm32f1/obldc/usart_irq/Makefile
index 2ab46a0..2ab46a0 100644
--- a/examples/stm32/obldc/usart_irq/Makefile
+++ b/examples/stm32f1/obldc/usart_irq/Makefile
diff --git a/examples/stm32/obldc/usart_irq/usart_irq.c b/examples/stm32f1/obldc/usart_irq/usart_irq.c
index 82320c1..20ff0a1 100644
--- a/examples/stm32/obldc/usart_irq/usart_irq.c
+++ b/examples/stm32f1/obldc/usart_irq/usart_irq.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/nvic.h>
@@ -52,7 +52,7 @@ void usart_setup(void)
GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RE_RX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 230400);
+ usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_parity(USART1, USART_PARITY_NONE);
diff --git a/examples/stm32/obldc/usart_irq/usart_irq.ld b/examples/stm32f1/obldc/usart_irq/usart_irq.ld
index 7899773..edb52c5 100644
--- a/examples/stm32/obldc/usart_irq/usart_irq.ld
+++ b/examples/stm32f1/obldc/usart_irq/usart_irq.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/adc_temperature_sensor/Makefile b/examples/stm32f1/other/adc_temperature_sensor/Makefile
index f3f65c4..f3f65c4 100644
--- a/examples/stm32/other/adc_temperature_sensor/Makefile
+++ b/examples/stm32f1/other/adc_temperature_sensor/Makefile
diff --git a/examples/stm32/other/adc_temperature_sensor/README b/examples/stm32f1/other/adc_temperature_sensor/README
index aa00ef0..aa00ef0 100644
--- a/examples/stm32/other/adc_temperature_sensor/README
+++ b/examples/stm32f1/other/adc_temperature_sensor/README
diff --git a/examples/stm32/other/adc_temperature_sensor/adc.c b/examples/stm32f1/other/adc_temperature_sensor/adc.c
index 6c0e828..a87909c 100644
--- a/examples/stm32/other/adc_temperature_sensor/adc.c
+++ b/examples/stm32f1/other/adc_temperature_sensor/adc.c
@@ -17,11 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/gpio.h>
+#include <libopencm3/stm32/f1/adc.h>
#include <libopencm3/stm32/usart.h>
-#include <libopencm3/stm32/adc.h>
void usart_setup(void)
{
@@ -34,7 +34,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 115200);
+ usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX_RX);
diff --git a/examples/stm32/other/adc_temperature_sensor/adc.ld b/examples/stm32f1/other/adc_temperature_sensor/adc.ld
index c076521..4f609a8 100644
--- a/examples/stm32/other/adc_temperature_sensor/adc.ld
+++ b/examples/stm32f1/other/adc_temperature_sensor/adc.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/dma_mem2mem/Makefile b/examples/stm32f1/other/dma_mem2mem/Makefile
index c43650d..c43650d 100644
--- a/examples/stm32/other/dma_mem2mem/Makefile
+++ b/examples/stm32f1/other/dma_mem2mem/Makefile
diff --git a/examples/stm32/other/dma_mem2mem/README b/examples/stm32f1/other/dma_mem2mem/README
index 2e61e5a..2e61e5a 100644
--- a/examples/stm32/other/dma_mem2mem/README
+++ b/examples/stm32f1/other/dma_mem2mem/README
diff --git a/examples/stm32/other/dma_mem2mem/dma.c b/examples/stm32f1/other/dma_mem2mem/dma.c
index e43fe0d..0389412 100644
--- a/examples/stm32/other/dma_mem2mem/dma.c
+++ b/examples/stm32f1/other/dma_mem2mem/dma.c
@@ -17,11 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/gpio.h>
+#include <libopencm3/stm32/f1/dma.h>
#include <libopencm3/stm32/usart.h>
-#include <libopencm3/stm32/dma.h>
void usart_setup(void)
{
@@ -34,7 +34,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 115200);
+ usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX_RX);
diff --git a/examples/stm32/other/dma_mem2mem/dma.ld b/examples/stm32f1/other/dma_mem2mem/dma.ld
index c076521..4f609a8 100644
--- a/examples/stm32/other/dma_mem2mem/dma.ld
+++ b/examples/stm32f1/other/dma_mem2mem/dma.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/dogm128/Makefile b/examples/stm32f1/other/dogm128/Makefile
index 97a012e..97a012e 100644
--- a/examples/stm32/other/dogm128/Makefile
+++ b/examples/stm32f1/other/dogm128/Makefile
diff --git a/examples/stm32/other/dogm128/README b/examples/stm32f1/other/dogm128/README
index dbf82a0..dbf82a0 100644
--- a/examples/stm32/other/dogm128/README
+++ b/examples/stm32f1/other/dogm128/README
diff --git a/examples/stm32/other/dogm128/dogm128.c b/examples/stm32f1/other/dogm128/dogm128.c
index c78a275..c78a275 100644
--- a/examples/stm32/other/dogm128/dogm128.c
+++ b/examples/stm32f1/other/dogm128/dogm128.c
diff --git a/examples/stm32/other/dogm128/dogm128.h b/examples/stm32f1/other/dogm128/dogm128.h
index ed514ab..de43225 100644
--- a/examples/stm32/other/dogm128/dogm128.h
+++ b/examples/stm32f1/other/dogm128/dogm128.h
@@ -21,7 +21,7 @@
#define DOGM128_H
#include <libopencm3/cm3/common.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/spi.h>
/* PB10 GPIO - ~RESET
diff --git a/examples/stm32/other/dogm128/main.c b/examples/stm32f1/other/dogm128/main.c
index b12a36d..508971e 100644
--- a/examples/stm32/other/dogm128/main.c
+++ b/examples/stm32f1/other/dogm128/main.c
@@ -17,9 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/nvic.h>
diff --git a/examples/stm32/other/dogm128/main.ld b/examples/stm32f1/other/dogm128/main.ld
index c076521..4f609a8 100644
--- a/examples/stm32/other/dogm128/main.ld
+++ b/examples/stm32f1/other/dogm128/main.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/i2c_stts75_sensor/Makefile b/examples/stm32f1/other/i2c_stts75_sensor/Makefile
index d0f6ddf..d0f6ddf 100644
--- a/examples/stm32/other/i2c_stts75_sensor/Makefile
+++ b/examples/stm32f1/other/i2c_stts75_sensor/Makefile
diff --git a/examples/stm32/other/i2c_stts75_sensor/README b/examples/stm32f1/other/i2c_stts75_sensor/README
index 91e3ff6..91e3ff6 100644
--- a/examples/stm32/other/i2c_stts75_sensor/README
+++ b/examples/stm32f1/other/i2c_stts75_sensor/README
diff --git a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.c b/examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c
index f70c80d..d8f2404 100644
--- a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.c
+++ b/examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c
@@ -17,9 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/i2c.h>
#include "stts75.h"
@@ -35,7 +35,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 115200);
+ usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX_RX);
diff --git a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.ld b/examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.ld
index c076521..4f609a8 100644
--- a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.ld
+++ b/examples/stm32f1/other/i2c_stts75_sensor/i2c_stts75_sensor.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/i2c_stts75_sensor/stts75.c b/examples/stm32f1/other/i2c_stts75_sensor/stts75.c
index f28019c..f28019c 100644
--- a/examples/stm32/other/i2c_stts75_sensor/stts75.c
+++ b/examples/stm32f1/other/i2c_stts75_sensor/stts75.c
diff --git a/examples/stm32/other/i2c_stts75_sensor/stts75.h b/examples/stm32f1/other/i2c_stts75_sensor/stts75.h
index 57f6190..57f6190 100644
--- a/examples/stm32/other/i2c_stts75_sensor/stts75.h
+++ b/examples/stm32f1/other/i2c_stts75_sensor/stts75.h
diff --git a/examples/stm32/other/rtc/Makefile b/examples/stm32f1/other/rtc/Makefile
index 1efa7ac..1efa7ac 100644
--- a/examples/stm32/other/rtc/Makefile
+++ b/examples/stm32f1/other/rtc/Makefile
diff --git a/examples/stm32/other/rtc/README b/examples/stm32f1/other/rtc/README
index f1e3975..f1e3975 100644
--- a/examples/stm32/other/rtc/README
+++ b/examples/stm32f1/other/rtc/README
diff --git a/examples/stm32/other/rtc/rtc.c b/examples/stm32f1/other/rtc/rtc.c
index c447534..28ae24c 100644
--- a/examples/stm32/other/rtc/rtc.c
+++ b/examples/stm32f1/other/rtc/rtc.c
@@ -17,10 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
+#include <libopencm3/stm32/f1/rtc.h>
#include <libopencm3/stm32/usart.h>
-#include <libopencm3/stm32/rtc.h>
#include <libopencm3/stm32/pwr.h>
#include <libopencm3/stm32/nvic.h>
@@ -43,7 +43,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 38400);
+ usart_set_baudrate(USART1, 38400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX);
diff --git a/examples/stm32/other/rtc/rtc.ld b/examples/stm32f1/other/rtc/rtc.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/other/rtc/rtc.ld
+++ b/examples/stm32f1/other/rtc/rtc.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/systick/Makefile b/examples/stm32f1/other/systick/Makefile
index 91b5cb5..91b5cb5 100644
--- a/examples/stm32/other/systick/Makefile
+++ b/examples/stm32f1/other/systick/Makefile
diff --git a/examples/stm32/other/systick/README b/examples/stm32f1/other/systick/README
index affb4b8..affb4b8 100644
--- a/examples/stm32/other/systick/README
+++ b/examples/stm32f1/other/systick/README
diff --git a/examples/stm32/other/systick/systick.c b/examples/stm32f1/other/systick/systick.c
index c05aff7..173ff2a 100644
--- a/examples/stm32/other/systick/systick.c
+++ b/examples/stm32f1/other/systick/systick.c
@@ -17,9 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/systick.h>
diff --git a/examples/stm32/other/systick/systick.ld b/examples/stm32f1/other/systick/systick.ld
index c076521..4f609a8 100644
--- a/examples/stm32/other/systick/systick.ld
+++ b/examples/stm32f1/other/systick/systick.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/timer_interrupt/Makefile b/examples/stm32f1/other/timer_interrupt/Makefile
index 86aced4..86aced4 100644
--- a/examples/stm32/other/timer_interrupt/Makefile
+++ b/examples/stm32f1/other/timer_interrupt/Makefile
diff --git a/examples/stm32/other/timer_interrupt/README b/examples/stm32f1/other/timer_interrupt/README
index e6a22c4..e6a22c4 100644
--- a/examples/stm32/other/timer_interrupt/README
+++ b/examples/stm32f1/other/timer_interrupt/README
diff --git a/examples/stm32/other/timer_interrupt/timer.c b/examples/stm32f1/other/timer_interrupt/timer.c
index aa2cdb6..422df88 100644
--- a/examples/stm32/other/timer_interrupt/timer.c
+++ b/examples/stm32f1/other/timer_interrupt/timer.c
@@ -17,9 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/nvic.h>
diff --git a/examples/stm32/other/timer_interrupt/timer.ld b/examples/stm32f1/other/timer_interrupt/timer.ld
index c076521..4f609a8 100644
--- a/examples/stm32/other/timer_interrupt/timer.ld
+++ b/examples/stm32f1/other/timer_interrupt/timer.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/usb_cdcacm/Makefile b/examples/stm32f1/other/usb_cdcacm/Makefile
index 38179e3..38179e3 100644
--- a/examples/stm32/other/usb_cdcacm/Makefile
+++ b/examples/stm32f1/other/usb_cdcacm/Makefile
diff --git a/examples/stm32/other/usb_cdcacm/README b/examples/stm32f1/other/usb_cdcacm/README
index 2f1ee4b..2f1ee4b 100644
--- a/examples/stm32/other/usb_cdcacm/README
+++ b/examples/stm32f1/other/usb_cdcacm/README
diff --git a/examples/stm32/other/usb_cdcacm/cdcacm.c b/examples/stm32f1/other/usb_cdcacm/cdcacm.c
index fdc92e2..d26b898 100644
--- a/examples/stm32/other/usb_cdcacm/cdcacm.c
+++ b/examples/stm32f1/other/usb_cdcacm/cdcacm.c
@@ -18,8 +18,8 @@
*/
#include <stdlib.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/cdc.h>
diff --git a/examples/stm32/other/usb_cdcacm/cdcacm.ld b/examples/stm32f1/other/usb_cdcacm/cdcacm.ld
index 1c20282..3cd6316 100644
--- a/examples/stm32/other/usb_cdcacm/cdcacm.ld
+++ b/examples/stm32f1/other/usb_cdcacm/cdcacm.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/usb_dfu/Makefile b/examples/stm32f1/other/usb_dfu/Makefile
index 48e2d6b..48e2d6b 100644
--- a/examples/stm32/other/usb_dfu/Makefile
+++ b/examples/stm32f1/other/usb_dfu/Makefile
diff --git a/examples/stm32/other/usb_dfu/README b/examples/stm32f1/other/usb_dfu/README
index 9c0169a..9c0169a 100644
--- a/examples/stm32/other/usb_dfu/README
+++ b/examples/stm32f1/other/usb_dfu/README
diff --git a/examples/stm32/lisa-m/usb_dfu/usbdfu.c b/examples/stm32f1/other/usb_dfu/usbdfu.c
index 0b7bf86..02d919f 100644
--- a/examples/stm32/lisa-m/usb_dfu/usbdfu.c
+++ b/examples/stm32f1/other/usb_dfu/usbdfu.c
@@ -18,10 +18,10 @@
*/
#include <string.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/scb.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/dfu.h>
diff --git a/examples/stm32/stm32-h103/usb_dfu/usbdfu.ld b/examples/stm32f1/other/usb_dfu/usbdfu.ld
index 54e5dac..6a01797 100644
--- a/examples/stm32/stm32-h103/usb_dfu/usbdfu.ld
+++ b/examples/stm32f1/other/usb_dfu/usbdfu.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/other/usb_hid/Makefile b/examples/stm32f1/other/usb_hid/Makefile
index d831e9e..d831e9e 100644
--- a/examples/stm32/other/usb_hid/Makefile
+++ b/examples/stm32f1/other/usb_hid/Makefile
diff --git a/examples/stm32/other/usb_hid/README b/examples/stm32f1/other/usb_hid/README
index 92645c9..92645c9 100644
--- a/examples/stm32/other/usb_hid/README
+++ b/examples/stm32f1/other/usb_hid/README
diff --git a/examples/stm32/other/usb_hid/usbhid.c b/examples/stm32f1/other/usb_hid/usbhid.c
index 8f08aac..7c0186e 100644
--- a/examples/stm32/other/usb_hid/usbhid.c
+++ b/examples/stm32f1/other/usb_hid/usbhid.c
@@ -18,8 +18,8 @@
*/
#include <stdlib.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/systick.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/hid.h>
@@ -28,7 +28,7 @@
#define INCLUDE_DFU_INTERFACE
#ifdef INCLUDE_DFU_INTERFACE
-#include <libopencm3/stm32/scb.h>
+#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/dfu.h>
#endif
diff --git a/examples/stm32/other/usb_hid/usbhid.ld b/examples/stm32f1/other/usb_hid/usbhid.ld
index 1c20282..3cd6316 100644
--- a/examples/stm32/other/usb_hid/usbhid.ld
+++ b/examples/stm32f1/other/usb_hid/usbhid.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-discovery/button/Makefile b/examples/stm32f1/stm32-discovery/button/Makefile
index 96731c2..96731c2 100644
--- a/examples/stm32/stm32-discovery/button/Makefile
+++ b/examples/stm32f1/stm32-discovery/button/Makefile
diff --git a/examples/stm32/stm32-discovery/button/README b/examples/stm32f1/stm32-discovery/button/README
index 38bc1ea..38bc1ea 100644
--- a/examples/stm32/stm32-discovery/button/README
+++ b/examples/stm32f1/stm32-discovery/button/README
diff --git a/examples/stm32/stm32-discovery/button/button.c b/examples/stm32f1/stm32-discovery/button/button.c
index b84f074..87ce5cc 100644
--- a/examples/stm32/stm32-discovery/button/button.c
+++ b/examples/stm32f1/stm32-discovery/button/button.c
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
u16 exti_line_state;
diff --git a/examples/stm32/stm32-discovery/button/button.ld b/examples/stm32f1/stm32-discovery/button/button.ld
index b03f90f..157204a 100644
--- a/examples/stm32/stm32-discovery/button/button.ld
+++ b/examples/stm32f1/stm32-discovery/button/button.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-discovery/fancyblink/Makefile b/examples/stm32f1/stm32-discovery/fancyblink/Makefile
index 1baec4d..1baec4d 100644
--- a/examples/stm32/stm32-discovery/fancyblink/Makefile
+++ b/examples/stm32f1/stm32-discovery/fancyblink/Makefile
diff --git a/examples/stm32/stm32-discovery/fancyblink/README b/examples/stm32f1/stm32-discovery/fancyblink/README
index b5d794c..b5d794c 100644
--- a/examples/stm32/stm32-discovery/fancyblink/README
+++ b/examples/stm32f1/stm32-discovery/fancyblink/README
diff --git a/examples/stm32/stm32-discovery/fancyblink/fancyblink.c b/examples/stm32f1/stm32-discovery/fancyblink/fancyblink.c
index d40fb7b..38a4c4b 100644
--- a/examples/stm32/stm32-discovery/fancyblink/fancyblink.c
+++ b/examples/stm32f1/stm32-discovery/fancyblink/fancyblink.c
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
/* Set STM32 to 24 MHz. */
void clock_setup(void)
diff --git a/examples/stm32/stm32-discovery/fancyblink/fancyblink.ld b/examples/stm32f1/stm32-discovery/fancyblink/fancyblink.ld
index b03f90f..157204a 100644
--- a/examples/stm32/stm32-discovery/fancyblink/fancyblink.ld
+++ b/examples/stm32f1/stm32-discovery/fancyblink/fancyblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-discovery/miniblink/Makefile b/examples/stm32f1/stm32-discovery/miniblink/Makefile
index 24a478b..24a478b 100644
--- a/examples/stm32/stm32-discovery/miniblink/Makefile
+++ b/examples/stm32f1/stm32-discovery/miniblink/Makefile
diff --git a/examples/stm32/stm32-discovery/miniblink/README b/examples/stm32f1/stm32-discovery/miniblink/README
index cffce60..cffce60 100644
--- a/examples/stm32/stm32-discovery/miniblink/README
+++ b/examples/stm32f1/stm32-discovery/miniblink/README
diff --git a/examples/stm32/stm32-discovery/miniblink/miniblink.c b/examples/stm32f1/stm32-discovery/miniblink/miniblink.c
index a05f957..973fab5 100644
--- a/examples/stm32/stm32-discovery/miniblink/miniblink.c
+++ b/examples/stm32f1/stm32-discovery/miniblink/miniblink.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
void gpio_setup(void)
{
diff --git a/examples/stm32/stm32-discovery/miniblink/miniblink.ld b/examples/stm32f1/stm32-discovery/miniblink/miniblink.ld
index b03f90f..157204a 100644
--- a/examples/stm32/stm32-discovery/miniblink/miniblink.ld
+++ b/examples/stm32f1/stm32-discovery/miniblink/miniblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-discovery/rtc/Makefile b/examples/stm32f1/stm32-discovery/rtc/Makefile
index 1efa7ac..1efa7ac 100644
--- a/examples/stm32/stm32-discovery/rtc/Makefile
+++ b/examples/stm32f1/stm32-discovery/rtc/Makefile
diff --git a/examples/stm32/stm32-discovery/rtc/README b/examples/stm32f1/stm32-discovery/rtc/README
index d4509e4..d4509e4 100644
--- a/examples/stm32/stm32-discovery/rtc/README
+++ b/examples/stm32f1/stm32-discovery/rtc/README
diff --git a/examples/stm32/stm32-discovery/rtc/rtc.c b/examples/stm32f1/stm32-discovery/rtc/rtc.c
index c99920f..fa8a966 100644
--- a/examples/stm32/stm32-discovery/rtc/rtc.c
+++ b/examples/stm32f1/stm32-discovery/rtc/rtc.c
@@ -18,10 +18,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
+#include <libopencm3/stm32/f1/rtc.h>
#include <libopencm3/stm32/usart.h>
-#include <libopencm3/stm32/rtc.h>
#include <libopencm3/stm32/pwr.h>
#include <libopencm3/stm32/nvic.h>
diff --git a/examples/stm32/stm32-discovery/rtc/rtc.ld b/examples/stm32f1/stm32-discovery/rtc/rtc.ld
index b03f90f..157204a 100644
--- a/examples/stm32/stm32-discovery/rtc/rtc.ld
+++ b/examples/stm32f1/stm32-discovery/rtc/rtc.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-discovery/usart/Makefile b/examples/stm32f1/stm32-discovery/usart/Makefile
index 2c1e1b1..2c1e1b1 100644
--- a/examples/stm32/stm32-discovery/usart/Makefile
+++ b/examples/stm32f1/stm32-discovery/usart/Makefile
diff --git a/examples/stm32/stm32-discovery/usart/README b/examples/stm32f1/stm32-discovery/usart/README
index 6d09139..6d09139 100644
--- a/examples/stm32/stm32-discovery/usart/README
+++ b/examples/stm32f1/stm32-discovery/usart/README
diff --git a/examples/stm32/stm32-discovery/usart/usart.c b/examples/stm32f1/stm32-discovery/usart/usart.c
index 05d0312..942805b 100644
--- a/examples/stm32/stm32-discovery/usart/usart.c
+++ b/examples/stm32f1/stm32-discovery/usart/usart.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
void clock_setup(void)
diff --git a/examples/stm32/stm32-discovery/usart/usart.ld b/examples/stm32f1/stm32-discovery/usart/usart.ld
index b03f90f..157204a 100644
--- a/examples/stm32/stm32-discovery/usart/usart.ld
+++ b/examples/stm32f1/stm32-discovery/usart/usart.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/button/Makefile b/examples/stm32f1/stm32-h103/button/Makefile
index 96731c2..96731c2 100644
--- a/examples/stm32/stm32-h103/button/Makefile
+++ b/examples/stm32f1/stm32-h103/button/Makefile
diff --git a/examples/stm32/stm32-h103/button/button.c b/examples/stm32f1/stm32-h103/button/button.c
index 63f3274..2f3378c 100644
--- a/examples/stm32/stm32-h103/button/button.c
+++ b/examples/stm32f1/stm32-h103/button/button.c
@@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/exti.h>
u16 exti_line_state;
diff --git a/examples/stm32/stm32-h103/button/button.ld b/examples/stm32f1/stm32-h103/button/button.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/stm32-h103/button/button.ld
+++ b/examples/stm32f1/stm32-h103/button/button.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/exti_both/Makefile b/examples/stm32f1/stm32-h103/exti_both/Makefile
index 39e305b..39e305b 100644
--- a/examples/stm32/stm32-h103/exti_both/Makefile
+++ b/examples/stm32f1/stm32-h103/exti_both/Makefile
diff --git a/examples/stm32/stm32-h103/exti_both/exti_both.c b/examples/stm32f1/stm32-h103/exti_both/exti_both.c
index edfc676..7c6f9c7 100644
--- a/examples/stm32/stm32-h103/exti_both/exti_both.c
+++ b/examples/stm32f1/stm32-h103/exti_both/exti_both.c
@@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/exti.h>
u16 exti_line_state;
diff --git a/examples/stm32/stm32-h103/exti_both/exti_both.ld b/examples/stm32f1/stm32-h103/exti_both/exti_both.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/stm32-h103/exti_both/exti_both.ld
+++ b/examples/stm32f1/stm32-h103/exti_both/exti_both.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/exti_rising_falling/Makefile b/examples/stm32f1/stm32-h103/exti_rising_falling/Makefile
index fc603a6..fc603a6 100644
--- a/examples/stm32/stm32-h103/exti_rising_falling/Makefile
+++ b/examples/stm32f1/stm32-h103/exti_rising_falling/Makefile
diff --git a/examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.c b/examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.c
index af1268d..b3c47ee 100644
--- a/examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.c
+++ b/examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.c
@@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/exti.h>
#define FALLING 0
diff --git a/examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.ld b/examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/stm32-h103/exti_rising_falling/exti_rising_falling.ld
+++ b/examples/stm32f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/fancyblink/Makefile b/examples/stm32f1/stm32-h103/fancyblink/Makefile
index 1baec4d..1baec4d 100644
--- a/examples/stm32/stm32-h103/fancyblink/Makefile
+++ b/examples/stm32f1/stm32-h103/fancyblink/Makefile
diff --git a/examples/stm32/stm32-h103/fancyblink/README b/examples/stm32f1/stm32-h103/fancyblink/README
index bdb6ec8..bdb6ec8 100644
--- a/examples/stm32/stm32-h103/fancyblink/README
+++ b/examples/stm32f1/stm32-h103/fancyblink/README
diff --git a/examples/stm32/stm32-h103/fancyblink/fancyblink.c b/examples/stm32f1/stm32-h103/fancyblink/fancyblink.c
index eeb3f34..1b2ad86 100644
--- a/examples/stm32/stm32-h103/fancyblink/fancyblink.c
+++ b/examples/stm32f1/stm32-h103/fancyblink/fancyblink.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)
diff --git a/examples/stm32/lisa-m/fancyblink/fancyblink.ld b/examples/stm32f1/stm32-h103/fancyblink/fancyblink.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/lisa-m/fancyblink/fancyblink.ld
+++ b/examples/stm32f1/stm32-h103/fancyblink/fancyblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/led_stripe/Makefile b/examples/stm32f1/stm32-h103/led_stripe/Makefile
index 60fd1ef..60fd1ef 100644
--- a/examples/stm32/stm32-h103/led_stripe/Makefile
+++ b/examples/stm32f1/stm32-h103/led_stripe/Makefile
diff --git a/examples/stm32/stm32-h103/led_stripe/led_stripe.c b/examples/stm32f1/stm32-h103/led_stripe/led_stripe.c
index 9cf9d4f..1576866 100644
--- a/examples/stm32/stm32-h103/led_stripe/led_stripe.c
+++ b/examples/stm32f1/stm32-h103/led_stripe/led_stripe.c
@@ -26,8 +26,8 @@
#include <stdlib.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#define SPI_BANK GPIOB
#define SCLK_PIN GPIO13
diff --git a/examples/stm32/stm32-h103/led_stripe/led_stripe.ld b/examples/stm32f1/stm32-h103/led_stripe/led_stripe.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/stm32-h103/led_stripe/led_stripe.ld
+++ b/examples/stm32f1/stm32-h103/led_stripe/led_stripe.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/miniblink/Makefile b/examples/stm32f1/stm32-h103/miniblink/Makefile
index 24a478b..24a478b 100644
--- a/examples/stm32/stm32-h103/miniblink/Makefile
+++ b/examples/stm32f1/stm32-h103/miniblink/Makefile
diff --git a/examples/stm32/stm32-h103/miniblink/README b/examples/stm32f1/stm32-h103/miniblink/README
index 0e046f2..0e046f2 100644
--- a/examples/stm32/stm32-h103/miniblink/README
+++ b/examples/stm32f1/stm32-h103/miniblink/README
diff --git a/examples/stm32/stm32-h103/miniblink/miniblink.c b/examples/stm32f1/stm32-h103/miniblink/miniblink.c
index 6f8bc2c..b003f9a 100644
--- a/examples/stm32/stm32-h103/miniblink/miniblink.c
+++ b/examples/stm32f1/stm32-h103/miniblink/miniblink.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
void gpio_setup(void)
{
diff --git a/examples/stm32/stm32-h103/miniblink/miniblink.ld b/examples/stm32f1/stm32-h103/miniblink/miniblink.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/stm32-h103/miniblink/miniblink.ld
+++ b/examples/stm32f1/stm32-h103/miniblink/miniblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/pwm_6step/Makefile b/examples/stm32f1/stm32-h103/pwm_6step/Makefile
index 2360082..2360082 100644
--- a/examples/stm32/stm32-h103/pwm_6step/Makefile
+++ b/examples/stm32f1/stm32-h103/pwm_6step/Makefile
diff --git a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c b/examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.c
index bda8ff7..9f9390a 100644
--- a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
+++ b/examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.c
@@ -17,10 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/nvic.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/timer.h>
+#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/exti.h>
#define FALLING 0
diff --git a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.ld b/examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.ld
+++ b/examples/stm32f1/stm32-h103/pwm_6step/pwm_6step.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/spi/Makefile b/examples/stm32f1/stm32-h103/spi/Makefile
index 7d3cb72..7d3cb72 100644
--- a/examples/stm32/stm32-h103/spi/Makefile
+++ b/examples/stm32f1/stm32-h103/spi/Makefile
diff --git a/examples/stm32/stm32-h103/spi/README b/examples/stm32f1/stm32-h103/spi/README
index d4714c2..d4714c2 100644
--- a/examples/stm32/stm32-h103/spi/README
+++ b/examples/stm32f1/stm32-h103/spi/README
diff --git a/examples/stm32/stm32-h103/spi/spi.c b/examples/stm32f1/stm32-h103/spi/spi.c
index 5a36bb8..89b8a68 100644
--- a/examples/stm32/stm32-h103/spi/spi.c
+++ b/examples/stm32f1/stm32-h103/spi/spi.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/spi.h>
void clock_setup(void)
diff --git a/examples/stm32/stm32-h103/spi/spi.ld b/examples/stm32f1/stm32-h103/spi/spi.ld
index 25806f8..e2fb5b6 100644
--- a/examples/stm32/stm32-h103/spi/spi.ld
+++ b/examples/stm32f1/stm32-h103/spi/spi.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/timer/Makefile b/examples/stm32f1/stm32-h103/timer/Makefile
index 86aced4..86aced4 100644
--- a/examples/stm32/stm32-h103/timer/Makefile
+++ b/examples/stm32f1/stm32-h103/timer/Makefile
diff --git a/examples/stm32/stm32-h103/timer/timer.c b/examples/stm32f1/stm32-h103/timer/timer.c
index ea64c86..48cae12 100644
--- a/examples/stm32/stm32-h103/timer/timer.c
+++ b/examples/stm32f1/stm32-h103/timer/timer.c
@@ -17,10 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/nvic.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/timer.h>
+#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/exti.h>
u16 frequency_sequence[18] = {
diff --git a/examples/stm32/stm32-h103/timer/timer.ld b/examples/stm32f1/stm32-h103/timer/timer.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/stm32-h103/timer/timer.ld
+++ b/examples/stm32f1/stm32-h103/timer/timer.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/traceswo/Makefile b/examples/stm32f1/stm32-h103/traceswo/Makefile
index 37510d5..37510d5 100644
--- a/examples/stm32/stm32-h103/traceswo/Makefile
+++ b/examples/stm32f1/stm32-h103/traceswo/Makefile
diff --git a/examples/stm32/stm32-h103/traceswo/README b/examples/stm32f1/stm32-h103/traceswo/README
index 34b5227..34b5227 100644
--- a/examples/stm32/stm32-h103/traceswo/README
+++ b/examples/stm32f1/stm32-h103/traceswo/README
diff --git a/examples/stm32/stm32-h103/traceswo/traceswo.c b/examples/stm32f1/stm32-h103/traceswo/traceswo.c
index ac461bb..8881447 100644
--- a/examples/stm32/stm32-h103/traceswo/traceswo.c
+++ b/examples/stm32f1/stm32-h103/traceswo/traceswo.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/dbgmcu.h>
#include <libopencm3/cm3/scs.h>
diff --git a/examples/stm32/stm32-h103/traceswo/traceswo.ld b/examples/stm32f1/stm32-h103/traceswo/traceswo.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/stm32-h103/traceswo/traceswo.ld
+++ b/examples/stm32f1/stm32-h103/traceswo/traceswo.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/usart/Makefile b/examples/stm32f1/stm32-h103/usart/Makefile
index 2c1e1b1..2c1e1b1 100644
--- a/examples/stm32/stm32-h103/usart/Makefile
+++ b/examples/stm32f1/stm32-h103/usart/Makefile
diff --git a/examples/stm32/stm32-h103/usart/README b/examples/stm32f1/stm32-h103/usart/README
index ecd7269..ecd7269 100644
--- a/examples/stm32/stm32-h103/usart/README
+++ b/examples/stm32f1/stm32-h103/usart/README
diff --git a/examples/stm32/stm32-h103/usart/usart.c b/examples/stm32f1/stm32-h103/usart/usart.c
index 9692d61..a221acb 100644
--- a/examples/stm32/stm32-h103/usart/usart.c
+++ b/examples/stm32f1/stm32-h103/usart/usart.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
void clock_setup(void)
@@ -40,7 +40,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 38400);
+ usart_set_baudrate(USART1, 38400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX);
@@ -55,7 +55,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART2_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART2, 38400);
+ usart_set_baudrate(USART2, 38400, rcc_ppre1_frequency);
usart_set_databits(USART2, 8);
usart_set_stopbits(USART2, USART_STOPBITS_1);
usart_set_mode(USART2, USART_MODE_TX);
@@ -70,7 +70,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART3_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART3, 38400);
+ usart_set_baudrate(USART3, 38400, rcc_ppre1_frequency);
usart_set_databits(USART3, 8);
usart_set_stopbits(USART3, USART_STOPBITS_1);
usart_set_mode(USART3, USART_MODE_TX);
diff --git a/examples/stm32/stm32-h103/usart/usart.ld b/examples/stm32f1/stm32-h103/usart/usart.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32/stm32-h103/usart/usart.ld
+++ b/examples/stm32f1/stm32-h103/usart/usart.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld
diff --git a/examples/stm32/stm32-h103/usart_irq/Makefile b/examples/stm32f1/stm32-h103/usart_irq/Makefile
index 6ee93bd..6ee93bd 100644
--- a/examples/stm32/stm32-h103/usart_irq/Makefile
+++ b/examples/stm32f1/stm32-h103/usart_irq/Makefile
diff --git a/examples/stm32/stm32-h103/usart_irq/usart_irq.c b/examples/stm32f1/stm32-h103/usart_irq/usart_irq.c
index 9b957dc..a2d8eef 100644
--- a/examples/stm32/stm32-h103/usart_irq/usart_irq.c
+++ b/examples/stm32f1/stm32-h103/usart_irq/usart_irq.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/nvic.h>
@@ -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/stm32/stm32-h103/usart_irq/usart_irq.ld b/examples/stm32f1/stm32-h103/usart_irq/usart_irq.ld
index 7899773..edb52c5 100644
--- a/examples/stm32/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/stm32/stm32-h103/usart_irq_printf/Makefile b/examples/stm32f1/stm32-h103/usart_irq_printf/Makefile
index 2917a7d..2917a7d 100644
--- a/examples/stm32/stm32-h103/usart_irq_printf/Makefile
+++ b/examples/stm32f1/stm32-h103/usart_irq_printf/Makefile
diff --git a/examples/stm32/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/stm32/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 <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/systick.h>
@@ -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/stm32/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/stm32/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/stm32/stm32-h103/usart_printf/Makefile b/examples/stm32f1/stm32-h103/usart_printf/Makefile
index fb26208..fb26208 100644
--- a/examples/stm32/stm32-h103/usart_printf/Makefile
+++ b/examples/stm32f1/stm32-h103/usart_printf/Makefile
diff --git a/examples/stm32/stm32-h103/usart_printf/usart_printf.c b/examples/stm32f1/stm32-h103/usart_printf/usart_printf.c
index 26fcee6..1eb067f 100644
--- a/examples/stm32/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 <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/nvic.h>
@@ -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/stm32/stm32-h103/usart_printf/usart_printf.ld b/examples/stm32f1/stm32-h103/usart_printf/usart_printf.ld
index 7899773..edb52c5 100644
--- a/examples/stm32/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/stm32/stm32-h103/usb_cdcacm/Makefile b/examples/stm32f1/stm32-h103/usb_cdcacm/Makefile
index 38179e3..38179e3 100644
--- a/examples/stm32/stm32-h103/usb_cdcacm/Makefile
+++ b/examples/stm32f1/stm32-h103/usb_cdcacm/Makefile
diff --git a/examples/stm32/stm32-h103/usb_cdcacm/README b/examples/stm32f1/stm32-h103/usb_cdcacm/README
index 2f1ee4b..2f1ee4b 100644
--- a/examples/stm32/stm32-h103/usb_cdcacm/README
+++ b/examples/stm32f1/stm32-h103/usb_cdcacm/README
diff --git a/examples/stm32/stm32-h103/usb_cdcacm/cdcacm.c b/examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.c
index 4b90640..f9e2527 100644
--- a/examples/stm32/stm32-h103/usb_cdcacm/cdcacm.c
+++ b/examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.c
@@ -18,8 +18,8 @@
*/
#include <stdlib.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/cdc.h>
diff --git a/examples/stm32/stm32-h103/usb_cdcacm/cdcacm.ld b/examples/stm32f1/stm32-h103/usb_cdcacm/cdcacm.ld
index 928c898..d0df9e6 100644
--- a/examples/stm32/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/stm32/stm32-h103/usb_dfu/Makefile b/examples/stm32f1/stm32-h103/usb_dfu/Makefile
index 48e2d6b..48e2d6b 100644
--- a/examples/stm32/stm32-h103/usb_dfu/Makefile
+++ b/examples/stm32f1/stm32-h103/usb_dfu/Makefile
diff --git a/examples/stm32/stm32-h103/usb_dfu/README b/examples/stm32f1/stm32-h103/usb_dfu/README
index 9c0169a..9c0169a 100644
--- a/examples/stm32/stm32-h103/usb_dfu/README
+++ b/examples/stm32f1/stm32-h103/usb_dfu/README
diff --git a/examples/stm32/stm32-h103/usb_dfu/usbdfu.c b/examples/stm32f1/stm32-h103/usb_dfu/usbdfu.c
index 7ffbc74..9d184f1 100644
--- a/examples/stm32/stm32-h103/usb_dfu/usbdfu.c
+++ b/examples/stm32f1/stm32-h103/usb_dfu/usbdfu.c
@@ -18,10 +18,10 @@
*/
#include <string.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/scb.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/dfu.h>
diff --git a/examples/stm32/other/usb_dfu/usbdfu.ld b/examples/stm32f1/stm32-h103/usb_dfu/usbdfu.ld
index 54e5dac..6a01797 100644
--- a/examples/stm32/other/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/stm32/stm32-h103/usb_hid/Makefile b/examples/stm32f1/stm32-h103/usb_hid/Makefile
index d831e9e..d831e9e 100644
--- a/examples/stm32/stm32-h103/usb_hid/Makefile
+++ b/examples/stm32f1/stm32-h103/usb_hid/Makefile
diff --git a/examples/stm32/stm32-h103/usb_hid/README b/examples/stm32f1/stm32-h103/usb_hid/README
index 48a9b39..48a9b39 100644
--- a/examples/stm32/stm32-h103/usb_hid/README
+++ b/examples/stm32f1/stm32-h103/usb_hid/README
diff --git a/examples/stm32/stm32-h103/usb_hid/usbhid.c b/examples/stm32f1/stm32-h103/usb_hid/usbhid.c
index a21fce6..a815573 100644
--- a/examples/stm32/stm32-h103/usb_hid/usbhid.c
+++ b/examples/stm32f1/stm32-h103/usb_hid/usbhid.c
@@ -18,8 +18,8 @@
*/
#include <stdlib.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/systick.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/hid.h>
@@ -28,7 +28,7 @@
#define INCLUDE_DFU_INTERFACE
#ifdef INCLUDE_DFU_INTERFACE
-#include <libopencm3/stm32/scb.h>
+#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/dfu.h>
#endif
diff --git a/examples/stm32/lisa-m/usb_hid/usbhid.ld b/examples/stm32f1/stm32-h103/usb_hid/usbhid.ld
index 928c898..d0df9e6 100644
--- a/examples/stm32/lisa-m/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/stm32/stm32-h103/usb_iap/Makefile b/examples/stm32f1/stm32-h103/usb_iap/Makefile
index bed9908..bed9908 100644
--- a/examples/stm32/stm32-h103/usb_iap/Makefile
+++ b/examples/stm32f1/stm32-h103/usb_iap/Makefile
diff --git a/examples/stm32/stm32-h103/usb_iap/README b/examples/stm32f1/stm32-h103/usb_iap/README
index 2966684..2966684 100644
--- a/examples/stm32/stm32-h103/usb_iap/README
+++ b/examples/stm32f1/stm32-h103/usb_iap/README
diff --git a/examples/stm32/stm32-h103/usb_iap/usbiap.c b/examples/stm32f1/stm32-h103/usb_iap/usbiap.c
index 7ffbc74..9d184f1 100644
--- a/examples/stm32/stm32-h103/usb_iap/usbiap.c
+++ b/examples/stm32f1/stm32-h103/usb_iap/usbiap.c
@@ -18,10 +18,10 @@
*/
#include <string.h>
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
-#include <libopencm3/stm32/flash.h>
-#include <libopencm3/stm32/scb.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
+#include <libopencm3/stm32/f1/flash.h>
+#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/dfu.h>
diff --git a/examples/stm32/stm32-h103/usb_iap/usbiap.ld b/examples/stm32f1/stm32-h103/usb_iap/usbiap.ld
index 928c898..d0df9e6 100644
--- a/examples/stm32/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/stm32/stm32-h107/fancyblink/Makefile b/examples/stm32f1/stm32-h107/fancyblink/Makefile
index 1baec4d..1baec4d 100644
--- a/examples/stm32/stm32-h107/fancyblink/Makefile
+++ b/examples/stm32f1/stm32-h107/fancyblink/Makefile
diff --git a/examples/stm32/stm32-h107/fancyblink/README b/examples/stm32f1/stm32-h107/fancyblink/README
index 6f1ac39..6f1ac39 100644
--- a/examples/stm32/stm32-h107/fancyblink/README
+++ b/examples/stm32f1/stm32-h107/fancyblink/README
diff --git a/examples/stm32/stm32-h107/fancyblink/fancyblink.c b/examples/stm32f1/stm32-h107/fancyblink/fancyblink.c
index c73d3d4..4d45829 100644
--- a/examples/stm32/stm32-h107/fancyblink/fancyblink.c
+++ b/examples/stm32f1/stm32-h107/fancyblink/fancyblink.c
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)
diff --git a/examples/stm32/stm32-h107/fancyblink/fancyblink.ld b/examples/stm32f1/stm32-h107/fancyblink/fancyblink.ld
index 6c9c766..d35c141 100644
--- a/examples/stm32/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/stm32/stm32-h107/usb_simple/Makefile b/examples/stm32f1/stm32-h107/usb_simple/Makefile
index 2d954e2..2d954e2 100644
--- a/examples/stm32/stm32-h107/usb_simple/Makefile
+++ b/examples/stm32f1/stm32-h107/usb_simple/Makefile
diff --git a/examples/stm32/stm32-h107/usb_simple/README b/examples/stm32f1/stm32-h107/usb_simple/README
index 93d4f03..93d4f03 100644
--- a/examples/stm32/stm32-h107/usb_simple/README
+++ b/examples/stm32f1/stm32-h107/usb_simple/README
diff --git a/examples/stm32/stm32-h107/usb_simple/usb_simple.c b/examples/stm32f1/stm32-h107/usb_simple/usb_simple.c
index 85f67df..c30803c 100644
--- a/examples/stm32/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 <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/usb/usbd.h>
diff --git a/examples/stm32/stm32-h107/usb_simple/usb_simple.ld b/examples/stm32f1/stm32-h107/usb_simple/usb_simple.ld
index 6c9c766..d35c141 100644
--- a/examples/stm32/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/Makefile.include b/examples/stm32f2/Makefile.include
new file mode 100644
index 0000000..3539cdd
--- /dev/null
+++ b/examples/stm32f2/Makefile.include
@@ -0,0 +1,125 @@
+##
+## This file is part of the libopencm3 project.
+##
+## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+## Copyright (C) 2010 Piotr Esden-Tempski <piotr@esden.net>
+## Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+PREFIX ?= arm-none-eabi
+# PREFIX ?= arm-elf
+CC = $(PREFIX)-gcc
+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 = ../../../..
+CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
+ -fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F2
+LDSCRIPT = $(BINARY).ld
+LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib \
+ -L$(TOOLCHAIN_DIR)/lib/stm32f2 \
+ -T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
+ -mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float
+OBJS += $(BINARY).o
+
+OOCD ?= openocd
+OOCD_INTERFACE ?= flossjtag
+OOCD_BOARD ?= olimex_stm32_h103
+
+# Be silent per default, but 'make V=1' will show all compiler calls.
+ifneq ($(V),1)
+Q := @
+NULL := 2>/dev/null
+else
+LDFLAGS += -Wl,--print-gc-sections
+endif
+
+.SUFFIXES: .elf .bin .hex .srec .list .images
+.SECONDEXPANSION:
+.SECONDARY:
+
+all: images
+
+images: $(BINARY).images
+flash: $(BINARY).flash
+
+%.images: %.bin %.hex %.srec %.list
+ @#echo "*** $* images generated ***"
+
+%.bin: %.elf
+ @#printf " OBJCOPY $(*).bin\n"
+ $(Q)$(OBJCOPY) -Obinary $(*).elf $(*).bin
+
+%.hex: %.elf
+ @#printf " OBJCOPY $(*).hex\n"
+ $(Q)$(OBJCOPY) -Oihex $(*).elf $(*).hex
+
+%.srec: %.elf
+ @#printf " OBJCOPY $(*).srec\n"
+ $(Q)$(OBJCOPY) -Osrec $(*).elf $(*).srec
+
+%.list: %.elf
+ @#printf " OBJDUMP $(*).list\n"
+ $(Q)$(OBJDUMP) -S $(*).elf > $(*).list
+
+%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/stm32f2/libopencm3_stm32f2.a
+ @#printf " LD $(subst $(shell pwd)/,,$(@))\n"
+ $(Q)$(LD) -o $(*).elf $(OBJS) -lopencm3_stm32f2 $(LDFLAGS)
+
+%.o: %.c Makefile
+ @#printf " CC $(subst $(shell pwd)/,,$(@))\n"
+ $(Q)$(CC) $(CFLAGS) -o $@ -c $<
+
+clean:
+ $(Q)rm -f *.o
+ $(Q)rm -f *.d
+ $(Q)rm -f *.elf
+ $(Q)rm -f *.bin
+ $(Q)rm -f *.hex
+ $(Q)rm -f *.srec
+ $(Q)rm -f *.list
+
+ifeq ($(OOCD_SERIAL),)
+%.flash: %.hex
+ @printf " FLASH $<\n"
+ @# IMPORTANT: Don't use "resume", only "reset" will work correctly!
+ $(Q)$(OOCD) -f interface/$(OOCD_INTERFACE).cfg \
+ -f board/$(OOCD_BOARD).cfg \
+ -c "init" -c "reset init" \
+ -c "stm32x mass_erase 0" \
+ -c "flash write_image $(*).hex" \
+ -c "reset" \
+ -c "shutdown" $(NULL)
+else
+%.flash: %.hex
+ @printf " FLASH $<\n"
+ @# IMPORTANT: Don't use "resume", only "reset" will work correctly!
+ $(Q)$(OOCD) -f interface/$(OOCD_INTERFACE).cfg \
+ -f board/$(OOCD_BOARD).cfg \
+ -c "ft2232_serial $(OOCD_SERIAL)" \
+ -c "init" -c "reset init" \
+ -c "stm32x mass_erase 0" \
+ -c "flash write_image $(*).hex" \
+ -c "reset" \
+ -c "shutdown" $(NULL)
+endif
+
+.PHONY: images clean
+
+-include $(OBJS:.o=.d)
+
diff --git a/examples/stm32f2/jobygps/jobygps.cfg b/examples/stm32f2/jobygps/jobygps.cfg
new file mode 100644
index 0000000..7ca449e
--- /dev/null
+++ b/examples/stm32f2/jobygps/jobygps.cfg
@@ -0,0 +1,3 @@
+reset_config srst_only srst_push_pull
+source [find target/stm32f2x.cfg]
+
diff --git a/examples/stm32f2/jobygps/miniblink/Makefile b/examples/stm32f2/jobygps/miniblink/Makefile
new file mode 100644
index 0000000..24a478b
--- /dev/null
+++ b/examples/stm32f2/jobygps/miniblink/Makefile
@@ -0,0 +1,23 @@
+##
+## This file is part of the libopencm3 project.
+##
+## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+BINARY = miniblink
+
+include ../../Makefile.include
+
diff --git a/examples/stm32f2/jobygps/miniblink/README b/examples/stm32f2/jobygps/miniblink/README
new file mode 100644
index 0000000..0130112
--- /dev/null
+++ b/examples/stm32f2/jobygps/miniblink/README
@@ -0,0 +1,6 @@
+------------------------------------------------------------------------------
+README
+------------------------------------------------------------------------------
+
+This is the smallest-possible example program using libopencm3.
+
diff --git a/examples/stm32f2/jobygps/miniblink/miniblink.c b/examples/stm32f2/jobygps/miniblink/miniblink.c
new file mode 100644
index 0000000..2927df5
--- /dev/null
+++ b/examples/stm32f2/jobygps/miniblink/miniblink.c
@@ -0,0 +1,77 @@
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+//#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/f2/gpio.h>
+
+void gpio_setup(void)
+{
+ /* Enable GPIOC clock. */
+ /* Manually: */
+ // RCC_APB2ENR |= RCC_APB2ENR_IOPCEN;
+ /* Using API functions: */
+ //rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPCEN);
+
+ /* Set GPIO12 (in GPIO port C) to 'output push-pull'. */
+ /* Manually: */
+ // GPIOC_CRH = (GPIO_CNF_OUTPUT_PUSHPULL << (((12 - 8) * 4) + 2));
+ // GPIOC_CRH |= (GPIO_MODE_OUTPUT_2_MHZ << ((12 - 8) * 4));
+ /* Using API functions: */
+ MMIO32(RCC_BASE+0x30) |= (1<<2);
+ gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO3|GPIO4);
+}
+
+int main(void)
+{
+ int i;
+
+ gpio_setup();
+
+ /* Blink the LED (PC12) on the board. */
+ while (1) {
+ /* Manually: */
+ // GPIOC_BSRR = GPIO12; /* LED off */
+ // for (i = 0; i < 800000; i++) /* Wait a bit. */
+ // __asm__("nop");
+ // GPIOC_BRR = GPIO12; /* LED on */
+ // for (i = 0; i < 800000; i++) /* Wait a bit. */
+ // __asm__("nop");
+
+ /* Using API functions gpio_set()/gpio_clear(): */
+ // gpio_set(GPIOC, GPIO12); /* LED off */
+ // for (i = 0; i < 800000; i++) /* Wait a bit. */
+ // __asm__("nop");
+ // gpio_clear(GPIOC, GPIO12); /* LED on */
+ // for (i = 0; i < 800000; i++) /* Wait a bit. */
+ // __asm__("nop");
+
+ /* Using API function gpio_toggle(): */
+ //gpio_toggle(GPIOC, GPIO3); /* LED on/off */
+ gpio_set(GPIOC, GPIO3);
+ gpio_clear(GPIOC, GPIO4);
+ for (i = 0; i < 800000; i++) /* Wait a bit. */
+ __asm__("nop");
+ gpio_clear(GPIOC, GPIO3);
+ gpio_set(GPIOC, GPIO4);
+ for (i = 0; i < 800000; i++) /* Wait a bit. */
+ __asm__("nop");
+ }
+
+ return 0;
+}
diff --git a/examples/stm32f2/jobygps/miniblink/miniblink.ld b/examples/stm32f2/jobygps/miniblink/miniblink.ld
new file mode 100644
index 0000000..cfe9ab7
--- /dev/null
+++ b/examples/stm32f2/jobygps/miniblink/miniblink.ld
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
+
+/* Define memory regions. */
+MEMORY
+{
+ rom (rx) : ORIGIN = 0x08000000, LENGTH = 256K
+ ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
+}
+
+/* Include the common ld script. */
+INCLUDE libopencm3_stm32f2.ld
+
diff --git a/examples/stm32f2/jobygps/spi_test/Makefile b/examples/stm32f2/jobygps/spi_test/Makefile
new file mode 100644
index 0000000..de4c338
--- /dev/null
+++ b/examples/stm32f2/jobygps/spi_test/Makefile
@@ -0,0 +1,23 @@
+##
+## This file is part of the libopencm3 project.
+##
+## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+BINARY = spi_test
+
+include ../../Makefile.include
+
diff --git a/examples/stm32f2/jobygps/spi_test/spi_test.c b/examples/stm32f2/jobygps/spi_test/spi_test.c
new file mode 100644
index 0000000..b45789c
--- /dev/null
+++ b/examples/stm32f2/jobygps/spi_test/spi_test.c
@@ -0,0 +1,113 @@
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
+ * Copyright (C) 2011 Henry Hallam <henry@pericynthion.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <libopencm3/stm32/spi.h>
+#include <libopencm3/stm32/usart.h>
+#include <libopencm3/stm32/nvic.h>
+#include <libopencm3/stm32/f2/gpio.h>
+#include <libopencm3/stm32/f2/rcc.h>
+
+#include <stdio.h>
+#include <errno.h>
+
+void clock_setup(void)
+{
+ RCC_APB1ENR |= RCC_APB1ENR_SPI2EN;
+ RCC_APB2ENR |= RCC_APB2ENR_USART1EN;
+ RCC_AHB1ENR |= RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN;
+
+}
+
+void spi_setup(void)
+{
+ gpio_mode_setup(GPIOB, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO13 | GPIO14 | GPIO15);
+ gpio_set_af(GPIOB, GPIO_AF5, GPIO13 | GPIO14 | GPIO15);
+
+ /* Setup SPI parameters. */
+ spi_init_master(SPI2, SPI_CR1_BAUDRATE_FPCLK_DIV_256, SPI_CR1_CPOL, \
+ SPI_CR1_CPHA, SPI_CR1_DFF_8BIT, SPI_CR1_MSBFIRST);
+ spi_enable_ss_output(SPI2); /* Required, see 25.3.1 section about NSS */
+
+ /* Finally enable the SPI. */
+ spi_enable(SPI2);
+}
+
+void usart_setup(void)
+{
+ gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO9);
+ gpio_set_af(GPIOA, GPIO_AF7, GPIO9|GPIO10);
+
+ /* Setup UART parameters. */
+ usart_set_baudrate(USART1, 9600, 16000000);
+ usart_set_databits(USART1, 8);
+ usart_set_stopbits(USART1, USART_STOPBITS_1);
+ usart_set_parity(USART1, USART_PARITY_NONE);
+ usart_set_flow_control(USART1, USART_FLOWCONTROL_NONE);
+ usart_set_mode(USART1, USART_MODE_TX);
+
+ /* Finally enable the USART. */
+ usart_enable(USART1);
+}
+
+void gpio_setup(void)
+{
+ gpio_set(GPIOC, GPIO3);
+
+ /* Setup GPIO3 (in GPIO port C) for led use. */
+ gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT,
+ GPIO_MODE_OUTPUT, GPIO3);
+}
+
+int _write (int file, char *ptr, int len)
+{
+ int i;
+
+ if (file == 1) {
+ for (i = 0; i < len; i++){
+ usart_send_blocking(USART1, ptr[i]);
+ }
+ return i;
+ }
+ errno = EIO;
+ return -1;
+}
+
+int main(void)
+{
+ int counter = 0;
+ volatile u16 dummy;
+
+ clock_setup();
+ gpio_setup();
+ usart_setup();
+ spi_setup();
+
+ while (1)
+ {
+ counter++;
+ printf("Hello, world! %i\r\n", counter);
+ dummy = spi_read(SPI2); /* Stops RX buff overflow, but probably not needed */
+ spi_send(SPI2,(u8)counter);
+ gpio_toggle(GPIOC, GPIO3);
+ }
+
+ while(1);
+ return 0;
+}
diff --git a/examples/stm32f2/jobygps/spi_test/spi_test.ld b/examples/stm32f2/jobygps/spi_test/spi_test.ld
new file mode 100644
index 0000000..cfe9ab7
--- /dev/null
+++ b/examples/stm32f2/jobygps/spi_test/spi_test.ld
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
+
+/* Define memory regions. */
+MEMORY
+{
+ rom (rx) : ORIGIN = 0x08000000, LENGTH = 256K
+ ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
+}
+
+/* Include the common ld script. */
+INCLUDE libopencm3_stm32f2.ld
+
diff --git a/examples/stm32f2/jobygps/usart_printf/Makefile b/examples/stm32f2/jobygps/usart_printf/Makefile
new file mode 100644
index 0000000..fb26208
--- /dev/null
+++ b/examples/stm32f2/jobygps/usart_printf/Makefile
@@ -0,0 +1,23 @@
+##
+## This file is part of the libopencm3 project.
+##
+## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+BINARY = usart_printf
+
+include ../../Makefile.include
+
diff --git a/examples/stm32f2/jobygps/usart_printf/usart_printf.c b/examples/stm32f2/jobygps/usart_printf/usart_printf.c
new file mode 100644
index 0000000..f5a4cf5
--- /dev/null
+++ b/examples/stm32f2/jobygps/usart_printf/usart_printf.c
@@ -0,0 +1,109 @@
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>,
+ * 2011 Piotr Esden-Tempski <piotr@esden.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <libopencm3/stm32/f2/gpio.h>
+#include <libopencm3/stm32/usart.h>
+#include <libopencm3/stm32/nvic.h>
+#include <libopencm3/stm32/f2/rcc.h>
+
+#include <stdio.h>
+#include <errno.h>
+
+void clock_setup(void)
+{
+ //rcc_clock_setup_in_hse_8mhz_out_72mhz();
+
+ /* Enable GPIOA clock (for LED GPIOs). */
+ //rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPCEN);
+
+ /* Enable clocks for GPIO port A (for GPIO_USART1_TX) and USART1. */
+ //rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPAEN |
+// RCC_APB2ENR_AFIOEN |
+// RCC_APB2ENR_USART1EN);
+ RCC_APB2ENR |= RCC_APB2ENR_USART1EN;
+ RCC_AHB1ENR |= RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIOAEN;
+}
+
+void usart_setup(void)
+{
+ gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO9);
+ gpio_set_af(GPIOA, GPIO_AF7, GPIO9|GPIO10);
+
+ /* Setup UART parameters. */
+ usart_set_baudrate(USART1, 9600, 16000000);
+ usart_set_databits(USART1, 8);
+ usart_set_stopbits(USART1, USART_STOPBITS_1);
+ usart_set_parity(USART1, USART_PARITY_NONE);
+ usart_set_flow_control(USART1, USART_FLOWCONTROL_NONE);
+ usart_set_mode(USART1, USART_MODE_TX);
+
+ /* Finally enable the USART. */
+ usart_enable(USART1);
+}
+
+void gpio_setup(void)
+{
+ gpio_set(GPIOC, GPIO3);
+
+ /* Setup GPIO6 and 7 (in GPIO port A) for led use. */
+ gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT,
+ GPIO_MODE_OUTPUT, GPIO3);
+}
+
+int _write (int file, char *ptr, int len)
+{
+ int i;
+
+ if (file == 1) {
+ for (i = 0; i < len; i++){
+ usart_send_blocking(USART1, ptr[i]);
+ }
+
+ return i;
+ }
+
+ errno = EIO;
+ return -1;
+}
+
+int main(void)
+{
+ int counter = 0;
+ float fcounter = 0.0;
+ double dcounter = 0.0;
+
+ clock_setup();
+ gpio_setup();
+ usart_setup();
+
+ /*
+ * Write Hello World an integer, float and double all over
+ * again while incrementing the numbers.
+ */
+ while (1) {
+ gpio_toggle(GPIOC, GPIO3);
+ printf("Hello World! %i %f %f\r\n", counter, fcounter, dcounter);
+ counter++;
+ fcounter+=0.01;
+ dcounter+=0.01;
+ }
+
+ return 0;
+}
diff --git a/examples/stm32f2/jobygps/usart_printf/usart_printf.ld b/examples/stm32f2/jobygps/usart_printf/usart_printf.ld
new file mode 100644
index 0000000..e80bdbd
--- /dev/null
+++ b/examples/stm32f2/jobygps/usart_printf/usart_printf.ld
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Linker script for Open-BLDC (STM32F103CBT6, 128K flash, 20K RAM). */
+
+/* Define memory regions. */
+MEMORY
+{
+ rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
+ ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
+}
+
+/* Include the common ld script. */
+INCLUDE libopencm3_stm32f2.ld
+