Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thirdpin/libopencm3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--examples/lpc13xx/Makefile.include3
-rw-r--r--examples/lpc13xx/lpc-p1343/miniblink/miniblink.c4
-rw-r--r--examples/lpc13xx/lpc-p1343/miniblink/miniblink.ld2
-rw-r--r--examples/stm32/Makefile.include6
-rw-r--r--examples/stm32/lisa-m/usb_dfu/usbdfu.c12
-rw-r--r--examples/stm32/lisa-m/usb_dfu/usbdfu.ld2
-rw-r--r--examples/stm32/lisa-m/usb_hid/usbhid.c14
-rw-r--r--examples/stm32/lisa-m/usb_hid/usbhid.ld2
-rw-r--r--examples/stm32/mb525/fancyblink/fancyblink.c4
-rw-r--r--examples/stm32/mb525/fancyblink/fancyblink.ld2
-rw-r--r--examples/stm32/mb525/pwmleds/pwmleds.c6
-rw-r--r--examples/stm32/mb525/pwmleds/pwmleds.ld2
-rw-r--r--examples/stm32/obldc/can/can.c12
-rw-r--r--examples/stm32/obldc/can/can.ld2
-rw-r--r--examples/stm32/obldc/led/led.c4
-rw-r--r--examples/stm32/obldc/led/led.ld2
-rw-r--r--examples/stm32/obldc/systick/systick.c10
-rw-r--r--examples/stm32/obldc/systick/systick.ld2
-rw-r--r--examples/stm32/obldc/usart/usart.c6
-rw-r--r--examples/stm32/obldc/usart/usart.ld2
-rw-r--r--examples/stm32/obldc/usart_irq/usart_irq.c8
-rw-r--r--examples/stm32/obldc/usart_irq/usart_irq.ld2
-rw-r--r--examples/stm32/other/adc_temperature_sensor/adc.c10
-rw-r--r--examples/stm32/other/adc_temperature_sensor/adc.ld2
-rw-r--r--examples/stm32/other/dma_mem2mem/dma.c10
-rw-r--r--examples/stm32/other/dma_mem2mem/dma.ld2
-rw-r--r--examples/stm32/other/dogm128/dogm128.h6
-rw-r--r--examples/stm32/other/dogm128/main.c14
-rw-r--r--examples/stm32/other/dogm128/main.ld2
-rw-r--r--examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.c10
-rw-r--r--examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.ld2
-rw-r--r--examples/stm32/other/i2c_stts75_sensor/stts75.c2
-rw-r--r--examples/stm32/other/rtc/rtc.c12
-rw-r--r--examples/stm32/other/rtc/rtc.ld2
-rw-r--r--examples/stm32/other/systick/systick.c10
-rw-r--r--examples/stm32/other/systick/systick.ld2
-rw-r--r--examples/stm32/other/timer_interrupt/timer.c10
-rw-r--r--examples/stm32/other/timer_interrupt/timer.ld2
-rw-r--r--examples/stm32/other/usb_cdcacm/cdcacm.c8
-rw-r--r--examples/stm32/other/usb_cdcacm/cdcacm.ld2
-rw-r--r--examples/stm32/other/usb_dfu/usbdfu.c12
-rw-r--r--examples/stm32/other/usb_dfu/usbdfu.ld2
-rw-r--r--examples/stm32/other/usb_hid/usbhid.c14
-rw-r--r--examples/stm32/other/usb_hid/usbhid.ld2
-rw-r--r--examples/stm32/stm32-h103/fancyblink/fancyblink.c4
-rw-r--r--examples/stm32/stm32-h103/fancyblink/fancyblink.ld2
-rw-r--r--examples/stm32/stm32-h103/miniblink/miniblink.c4
-rw-r--r--examples/stm32/stm32-h103/miniblink/miniblink.ld2
-rw-r--r--examples/stm32/stm32-h103/spi/spi.c4
-rw-r--r--examples/stm32/stm32-h103/spi/spi.ld2
-rw-r--r--examples/stm32/stm32-h103/usart/usart.c6
-rw-r--r--examples/stm32/stm32-h103/usart/usart.ld2
-rw-r--r--examples/stm32/stm32-h103/usb_cdcacm/cdcacm.c8
-rw-r--r--examples/stm32/stm32-h103/usb_cdcacm/cdcacm.ld2
-rw-r--r--examples/stm32/stm32-h103/usb_dfu/usbdfu.c12
-rw-r--r--examples/stm32/stm32-h103/usb_dfu/usbdfu.ld2
-rw-r--r--examples/stm32/stm32-h103/usb_hid/usbhid.c14
-rw-r--r--examples/stm32/stm32-h103/usb_hid/usbhid.ld2
-rw-r--r--examples/stm32/stm32-h103/usb_iap/usbiap.c12
-rw-r--r--examples/stm32/stm32-h103/usb_iap/usbiap.ld2
-rw-r--r--include/libopencm3/cm3/common.h (renamed from include/cm3/common.h)0
-rw-r--r--include/libopencm3/cm3/memorymap.h (renamed from include/cm3/memorymap.h)0
-rw-r--r--include/libopencm3/lpc13xx/gpio.h (renamed from include/lpc13xx/gpio.h)4
-rw-r--r--include/libopencm3/lpc13xx/memorymap.h (renamed from include/lpc13xx/memorymap.h)2
-rw-r--r--include/libopencm3/stm32/adc.h (renamed from include/stm32/adc.h)4
-rw-r--r--include/libopencm3/stm32/bkp.h (renamed from include/stm32/bkp.h)4
-rw-r--r--include/libopencm3/stm32/can.h (renamed from include/stm32/can.h)4
-rw-r--r--include/libopencm3/stm32/crc.h (renamed from include/stm32/crc.h)4
-rw-r--r--include/libopencm3/stm32/dma.h (renamed from include/stm32/dma.h)4
-rw-r--r--include/libopencm3/stm32/ethernet.h (renamed from include/stm32/ethernet.h)4
-rw-r--r--include/libopencm3/stm32/exti.h (renamed from include/stm32/exti.h)4
-rw-r--r--include/libopencm3/stm32/flash.h (renamed from include/stm32/flash.h)4
-rw-r--r--include/libopencm3/stm32/fsmc.h (renamed from include/stm32/fsmc.h)4
-rw-r--r--include/libopencm3/stm32/gpio.h (renamed from include/stm32/gpio.h)4
-rw-r--r--include/libopencm3/stm32/i2c.h (renamed from include/stm32/i2c.h)4
-rw-r--r--include/libopencm3/stm32/iwdg.h (renamed from include/stm32/iwdg.h)4
-rw-r--r--include/libopencm3/stm32/memorymap.h (renamed from include/stm32/memorymap.h)2
-rw-r--r--include/libopencm3/stm32/nvic.h (renamed from include/stm32/nvic.h)4
-rw-r--r--include/libopencm3/stm32/pwr.h (renamed from include/stm32/pwr.h)4
-rw-r--r--include/libopencm3/stm32/rcc.h (renamed from include/stm32/rcc.h)4
-rw-r--r--include/libopencm3/stm32/rtc.h (renamed from include/stm32/rtc.h)6
-rw-r--r--include/libopencm3/stm32/scb.h (renamed from include/stm32/scb.h)4
-rw-r--r--include/libopencm3/stm32/spi.h (renamed from include/stm32/spi.h)4
-rw-r--r--include/libopencm3/stm32/systick.h (renamed from include/stm32/systick.h)4
-rw-r--r--include/libopencm3/stm32/timer.h (renamed from include/stm32/timer.h)4
-rw-r--r--include/libopencm3/stm32/tools.h (renamed from include/stm32/tools.h)0
-rw-r--r--include/libopencm3/stm32/usart.h (renamed from include/stm32/usart.h)4
-rw-r--r--include/libopencm3/stm32/usb.h (renamed from include/stm32/usb.h)6
-rw-r--r--include/libopencm3/stm32/usb_desc.h (renamed from include/stm32/usb_desc.h)0
-rw-r--r--include/libopencm3/stm32/wwdg.h (renamed from include/stm32/wwdg.h)4
-rw-r--r--include/libopencm3/usb/cdc.h (renamed from include/usb/cdc.h)0
-rw-r--r--include/libopencm3/usb/dfu.h (renamed from include/usb/dfu.h)0
-rw-r--r--include/libopencm3/usb/hid.h (renamed from include/usb/hid.h)0
-rw-r--r--include/libopencm3/usb/usbd.h (renamed from include/usb/usbd.h)2
-rw-r--r--include/libopencm3/usb/usbstd.h (renamed from include/usb/usbstd.h)2
-rw-r--r--lib/lpc13xx/gpio.c2
-rw-r--r--lib/lpc13xx/libopencm3_lpc13xx.ld (renamed from lib/lpc13xx/lpc13xx.ld)0
-rw-r--r--lib/stm32/adc.c2
-rw-r--r--lib/stm32/can.c4
-rw-r--r--lib/stm32/dma.c2
-rw-r--r--lib/stm32/ethernet.c2
-rw-r--r--lib/stm32/exti.c4
-rw-r--r--lib/stm32/flash.c2
-rw-r--r--lib/stm32/gpio.c2
-rw-r--r--lib/stm32/i2c.c2
-rw-r--r--lib/stm32/libopencm3_stm32.ld (renamed from lib/stm32/stm32.ld)0
-rw-r--r--lib/stm32/nvic.c2
-rw-r--r--lib/stm32/rcc.c4
-rw-r--r--lib/stm32/rtc.c6
-rw-r--r--lib/stm32/scb.c2
-rw-r--r--lib/stm32/spi.c2
-rw-r--r--lib/stm32/systick.c2
-rw-r--r--lib/stm32/timer.c2
-rw-r--r--lib/stm32/usart.c2
-rw-r--r--lib/usb/usb.c2
-rw-r--r--lib/usb/usb_control.c2
-rw-r--r--lib/usb/usb_f103.c8
-rw-r--r--lib/usb/usb_standard.c2
119 files changed, 249 insertions, 252 deletions
diff --git a/Makefile b/Makefile
index 401f3a09..9b7fc556 100644
--- a/Makefile
+++ b/Makefile
@@ -50,12 +50,12 @@ examples: lib
install: build
@printf " INSTALL headers\n"
$(Q)$(INSTALL) -d $(INCDIR)/libopencm3
- $(Q)$(INSTALL) -d $(LIBDIR)/libopencm3
- $(Q)cp -r include/* $(INCDIR)/libopencm3
+ $(Q)$(INSTALL) -d $(LIBDIR)
+ $(Q)cp -r include/libopencm3/* $(INCDIR)/libopencm3
@printf " INSTALL libs\n"
- $(Q)$(INSTALL) -m 0644 lib/*/*.a $(LIBDIR)/libopencm3
+ $(Q)$(INSTALL) -m 0644 lib/*/*.a $(LIBDIR)
@printf " INSTALL ldscripts\n"
- $(Q)$(INSTALL) -m 0644 lib/*/*.ld $(LIBDIR)/libopencm3
+ $(Q)$(INSTALL) -m 0644 lib/*/*.ld $(LIBDIR)
clean:
$(Q)$(MAKE) -C examples/stm32 clean
diff --git a/examples/lpc13xx/Makefile.include b/examples/lpc13xx/Makefile.include
index 58d2925d..6e80fd56 100644
--- a/examples/lpc13xx/Makefile.include
+++ b/examples/lpc13xx/Makefile.include
@@ -30,8 +30,7 @@ TOOLCHAIN_DIR = ../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
-mcpu=cortex-m3 -mthumb
LDSCRIPT = $(BINARY).ld
-LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/libopencm3 \
- -L$(TOOLCHAIN_DIR)/lib/lpc13xx \
+LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/lpc13xx \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections
OBJS += $(BINARY).o
diff --git a/examples/lpc13xx/lpc-p1343/miniblink/miniblink.c b/examples/lpc13xx/lpc-p1343/miniblink/miniblink.c
index 530da21b..505b604e 100644
--- a/examples/lpc13xx/lpc-p1343/miniblink/miniblink.c
+++ b/examples/lpc13xx/lpc-p1343/miniblink/miniblink.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// #include <lpc13xx/rcc.h>
-#include <lpc13xx/gpio.h>
+// #include <libopencm3/lpc13xx/rcc.h>
+#include <libopencm3/lpc13xx/gpio.h>
void gpio_setup(void)
{
diff --git a/examples/lpc13xx/lpc-p1343/miniblink/miniblink.ld b/examples/lpc13xx/lpc-p1343/miniblink/miniblink.ld
index d0fdd36d..0bffae1f 100644
--- a/examples/lpc13xx/lpc-p1343/miniblink/miniblink.ld
+++ b/examples/lpc13xx/lpc-p1343/miniblink/miniblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE lpc13xx.ld
+INCLUDE libopencm3_lpc13xx.ld
diff --git a/examples/stm32/Makefile.include b/examples/stm32/Makefile.include
index 6594fb91..af6d02f0 100644
--- a/examples/stm32/Makefile.include
+++ b/examples/stm32/Makefile.include
@@ -28,11 +28,9 @@ OBJDUMP = $(PREFIX)-objdump
# TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX)
TOOLCHAIN_DIR = ../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
- -I$(TOOLCHAIN_DIR)/include/libopencm3 -fno-common \
- -mcpu=cortex-m3 -mthumb
+ -fno-common -mcpu=cortex-m3 -mthumb
LDSCRIPT = $(BINARY).ld
-LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/libopencm3 \
- -L$(TOOLCHAIN_DIR)/lib/stm32 \
+LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32 \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections
OBJS += $(BINARY).o
diff --git a/examples/stm32/lisa-m/usb_dfu/usbdfu.c b/examples/stm32/lisa-m/usb_dfu/usbdfu.c
index 23206289..2ae83746 100644
--- a/examples/stm32/lisa-m/usb_dfu/usbdfu.c
+++ b/examples/stm32/lisa-m/usb_dfu/usbdfu.c
@@ -18,12 +18,12 @@
*/
#include <string.h>
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/flash.h>
-#include <stm32/scb.h>
-#include <usb/usbd.h>
-#include <usb/dfu.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/scb.h>
+#include <libopencm3/usb/usbd.h>
+#include <libopencm3/usb/dfu.h>
#define APP_ADDRESS 0x08002000
diff --git a/examples/stm32/lisa-m/usb_dfu/usbdfu.ld b/examples/stm32/lisa-m/usb_dfu/usbdfu.ld
index 1d24b184..08414769 100644
--- a/examples/stm32/lisa-m/usb_dfu/usbdfu.ld
+++ b/examples/stm32/lisa-m/usb_dfu/usbdfu.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/lisa-m/usb_hid/usbhid.c b/examples/stm32/lisa-m/usb_hid/usbhid.c
index aadfeaf1..ffd21ac8 100644
--- a/examples/stm32/lisa-m/usb_hid/usbhid.c
+++ b/examples/stm32/lisa-m/usb_hid/usbhid.c
@@ -18,18 +18,18 @@
*/
#include <stdlib.h>
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/systick.h>
-#include <usb/usbd.h>
-#include <usb/hid.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/systick.h>
+#include <libopencm3/usb/usbd.h>
+#include <libopencm3/usb/hid.h>
/* Define this to include the DFU APP interface. */
#define INCLUDE_DFU_INTERFACE
#ifdef INCLUDE_DFU_INTERFACE
-#include <stm32/scb.h>
-#include <usb/dfu.h>
+#include <libopencm3/stm32/scb.h>
+#include <libopencm3/usb/dfu.h>
#endif
const struct usb_device_descriptor dev = {
diff --git a/examples/stm32/lisa-m/usb_hid/usbhid.ld b/examples/stm32/lisa-m/usb_hid/usbhid.ld
index f70ddeea..b3483ac1 100644
--- a/examples/stm32/lisa-m/usb_hid/usbhid.ld
+++ b/examples/stm32/lisa-m/usb_hid/usbhid.ld
@@ -28,5 +28,5 @@ MEMORY
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/mb525/fancyblink/fancyblink.c b/examples/stm32/mb525/fancyblink/fancyblink.c
index 53bf7855..65e1728c 100644
--- a/examples/stm32/mb525/fancyblink/fancyblink.c
+++ b/examples/stm32/mb525/fancyblink/fancyblink.c
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
void clock_setup(void)
{
diff --git a/examples/stm32/mb525/fancyblink/fancyblink.ld b/examples/stm32/mb525/fancyblink/fancyblink.ld
index abe9cea7..7ea2b92c 100644
--- a/examples/stm32/mb525/fancyblink/fancyblink.ld
+++ b/examples/stm32/mb525/fancyblink/fancyblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/mb525/pwmleds/pwmleds.c b/examples/stm32/mb525/pwmleds/pwmleds.c
index dc987607..db7c9ca6 100644
--- a/examples/stm32/mb525/pwmleds/pwmleds.c
+++ b/examples/stm32/mb525/pwmleds/pwmleds.c
@@ -17,9 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/timer.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/timer.h>
// #define COMPARE
// #define MOVING_FADE
diff --git a/examples/stm32/mb525/pwmleds/pwmleds.ld b/examples/stm32/mb525/pwmleds/pwmleds.ld
index abe9cea7..7ea2b92c 100644
--- a/examples/stm32/mb525/pwmleds/pwmleds.ld
+++ b/examples/stm32/mb525/pwmleds/pwmleds.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/obldc/can/can.c b/examples/stm32/obldc/can/can.c
index ba53b2dc..6c63c484 100644
--- a/examples/stm32/obldc/can/can.c
+++ b/examples/stm32/obldc/can/can.c
@@ -18,12 +18,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/flash.h>
-#include <stm32/gpio.h>
-#include <stm32/nvic.h>
-#include <stm32/systick.h>
-#include <stm32/can.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/nvic.h>
+#include <libopencm3/stm32/systick.h>
+#include <libopencm3/stm32/can.h>
struct can_tx_msg {
u32 std_id;
diff --git a/examples/stm32/obldc/can/can.ld b/examples/stm32/obldc/can/can.ld
index 3303f26c..c0765211 100644
--- a/examples/stm32/obldc/can/can.ld
+++ b/examples/stm32/obldc/can/can.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/obldc/led/led.c b/examples/stm32/obldc/led/led.c
index 9295d027..aad055b6 100644
--- a/examples/stm32/obldc/led/led.c
+++ b/examples/stm32/obldc/led/led.c
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)
diff --git a/examples/stm32/obldc/led/led.ld b/examples/stm32/obldc/led/led.ld
index 4ca199e9..78997732 100644
--- a/examples/stm32/obldc/led/led.ld
+++ b/examples/stm32/obldc/led/led.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/obldc/systick/systick.c b/examples/stm32/obldc/systick/systick.c
index 17d35d1e..3d75c4aa 100644
--- a/examples/stm32/obldc/systick/systick.c
+++ b/examples/stm32/obldc/systick/systick.c
@@ -18,11 +18,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/flash.h>
-#include <stm32/gpio.h>
-#include <stm32/nvic.h>
-#include <stm32/systick.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/nvic.h>
+#include <libopencm3/stm32/systick.h>
u32 temp32;
diff --git a/examples/stm32/obldc/systick/systick.ld b/examples/stm32/obldc/systick/systick.ld
index e0057d93..da4f2b37 100644
--- a/examples/stm32/obldc/systick/systick.ld
+++ b/examples/stm32/obldc/systick/systick.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/obldc/usart/usart.c b/examples/stm32/obldc/usart/usart.c
index 0f55c26b..1605a06b 100644
--- a/examples/stm32/obldc/usart/usart.c
+++ b/examples/stm32/obldc/usart/usart.c
@@ -17,9 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/usart.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/usart.h>
void clock_setup(void)
{
diff --git a/examples/stm32/obldc/usart/usart.ld b/examples/stm32/obldc/usart/usart.ld
index 4ca199e9..78997732 100644
--- a/examples/stm32/obldc/usart/usart.ld
+++ b/examples/stm32/obldc/usart/usart.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/obldc/usart_irq/usart_irq.c b/examples/stm32/obldc/usart_irq/usart_irq.c
index 0a8464f7..ca8d3903 100644
--- a/examples/stm32/obldc/usart_irq/usart_irq.c
+++ b/examples/stm32/obldc/usart_irq/usart_irq.c
@@ -17,10 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/usart.h>
-#include <stm32/nvic.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/usart.h>
+#include <libopencm3/stm32/nvic.h>
void clock_setup(void)
{
diff --git a/examples/stm32/obldc/usart_irq/usart_irq.ld b/examples/stm32/obldc/usart_irq/usart_irq.ld
index 4ca199e9..78997732 100644
--- a/examples/stm32/obldc/usart_irq/usart_irq.ld
+++ b/examples/stm32/obldc/usart_irq/usart_irq.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/other/adc_temperature_sensor/adc.c b/examples/stm32/other/adc_temperature_sensor/adc.c
index 8f597676..5170bbb8 100644
--- a/examples/stm32/other/adc_temperature_sensor/adc.c
+++ b/examples/stm32/other/adc_temperature_sensor/adc.c
@@ -17,11 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/flash.h>
-#include <stm32/gpio.h>
-#include <stm32/usart.h>
-#include <stm32/adc.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/usart.h>
+#include <libopencm3/stm32/adc.h>
void usart_setup(void)
{
diff --git a/examples/stm32/other/adc_temperature_sensor/adc.ld b/examples/stm32/other/adc_temperature_sensor/adc.ld
index 3303f26c..c0765211 100644
--- a/examples/stm32/other/adc_temperature_sensor/adc.ld
+++ b/examples/stm32/other/adc_temperature_sensor/adc.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/other/dma_mem2mem/dma.c b/examples/stm32/other/dma_mem2mem/dma.c
index 37b0a3fa..e43fe0df 100644
--- a/examples/stm32/other/dma_mem2mem/dma.c
+++ b/examples/stm32/other/dma_mem2mem/dma.c
@@ -17,11 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/flash.h>
-#include <stm32/gpio.h>
-#include <stm32/usart.h>
-#include <stm32/dma.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/usart.h>
+#include <libopencm3/stm32/dma.h>
void usart_setup(void)
{
diff --git a/examples/stm32/other/dma_mem2mem/dma.ld b/examples/stm32/other/dma_mem2mem/dma.ld
index 3303f26c..c0765211 100644
--- a/examples/stm32/other/dma_mem2mem/dma.ld
+++ b/examples/stm32/other/dma_mem2mem/dma.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/other/dogm128/dogm128.h b/examples/stm32/other/dogm128/dogm128.h
index f40f4c88..ed514abf 100644
--- a/examples/stm32/other/dogm128/dogm128.h
+++ b/examples/stm32/other/dogm128/dogm128.h
@@ -20,9 +20,9 @@
#ifndef DOGM128_H
#define DOGM128_H
-#include <cm3/common.h>
-#include <stm32/gpio.h>
-#include <stm32/spi.h>
+#include <libopencm3/cm3/common.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/spi.h>
/* PB10 GPIO - ~RESET
* PB12 SPI2_NSS - ~CS1
diff --git a/examples/stm32/other/dogm128/main.c b/examples/stm32/other/dogm128/main.c
index 8d3c2414..b12a36d8 100644
--- a/examples/stm32/other/dogm128/main.c
+++ b/examples/stm32/other/dogm128/main.c
@@ -17,13 +17,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/flash.h>
-#include <stm32/gpio.h>
-#include <stm32/usart.h>
-#include <stm32/timer.h>
-#include <stm32/nvic.h>
-#include <stm32/spi.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/usart.h>
+#include <libopencm3/stm32/timer.h>
+#include <libopencm3/stm32/nvic.h>
+#include <libopencm3/stm32/spi.h>
#include "./dogm128.h"
void gpio_setup(void)
diff --git a/examples/stm32/other/dogm128/main.ld b/examples/stm32/other/dogm128/main.ld
index 3303f26c..c0765211 100644
--- a/examples/stm32/other/dogm128/main.ld
+++ b/examples/stm32/other/dogm128/main.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.c b/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.c
index a1ba378b..f70c80d5 100644
--- a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.c
+++ b/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.c
@@ -17,11 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/flash.h>
-#include <stm32/gpio.h>
-#include <stm32/usart.h>
-#include <stm32/i2c.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/usart.h>
+#include <libopencm3/stm32/i2c.h>
#include "stts75.h"
void usart_setup(void)
diff --git a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.ld b/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.ld
index 3303f26c..c0765211 100644
--- a/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.ld
+++ b/examples/stm32/other/i2c_stts75_sensor/i2c_stts75_sensor.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/other/i2c_stts75_sensor/stts75.c b/examples/stm32/other/i2c_stts75_sensor/stts75.c
index ec51932f..f28019c5 100644
--- a/examples/stm32/other/i2c_stts75_sensor/stts75.c
+++ b/examples/stm32/other/i2c_stts75_sensor/stts75.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/i2c.h>
+#include <libopencm3/stm32/i2c.h>
#include "stts75.h"
void stts75_write_config(u32 i2c, u8 sensor)
diff --git a/examples/stm32/other/rtc/rtc.c b/examples/stm32/other/rtc/rtc.c
index f762dbee..c447534a 100644
--- a/examples/stm32/other/rtc/rtc.c
+++ b/examples/stm32/other/rtc/rtc.c
@@ -17,12 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/usart.h>
-#include <stm32/rtc.h>
-#include <stm32/pwr.h>
-#include <stm32/nvic.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/usart.h>
+#include <libopencm3/stm32/rtc.h>
+#include <libopencm3/stm32/pwr.h>
+#include <libopencm3/stm32/nvic.h>
void clock_setup(void)
{
diff --git a/examples/stm32/other/rtc/rtc.ld b/examples/stm32/other/rtc/rtc.ld
index abe9cea7..7ea2b92c 100644
--- a/examples/stm32/other/rtc/rtc.ld
+++ b/examples/stm32/other/rtc/rtc.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/other/systick/systick.c b/examples/stm32/other/systick/systick.c
index 44c6b7cb..c05aff74 100644
--- a/examples/stm32/other/systick/systick.c
+++ b/examples/stm32/other/systick/systick.c
@@ -17,11 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/flash.h>
-#include <stm32/gpio.h>
-#include <stm32/nvic.h>
-#include <stm32/systick.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/nvic.h>
+#include <libopencm3/stm32/systick.h>
u32 temp32;
diff --git a/examples/stm32/other/systick/systick.ld b/examples/stm32/other/systick/systick.ld
index 3303f26c..c0765211 100644
--- a/examples/stm32/other/systick/systick.ld
+++ b/examples/stm32/other/systick/systick.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/other/timer_interrupt/timer.c b/examples/stm32/other/timer_interrupt/timer.c
index 8a6eac68..aa2cdb67 100644
--- a/examples/stm32/other/timer_interrupt/timer.c
+++ b/examples/stm32/other/timer_interrupt/timer.c
@@ -17,11 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/flash.h>
-#include <stm32/gpio.h>
-#include <stm32/timer.h>
-#include <stm32/nvic.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/timer.h>
+#include <libopencm3/stm32/nvic.h>
void gpio_setup(void)
{
diff --git a/examples/stm32/other/timer_interrupt/timer.ld b/examples/stm32/other/timer_interrupt/timer.ld
index 3303f26c..c0765211 100644
--- a/examples/stm32/other/timer_interrupt/timer.ld
+++ b/examples/stm32/other/timer_interrupt/timer.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/other/usb_cdcacm/cdcacm.c b/examples/stm32/other/usb_cdcacm/cdcacm.c
index b8857884..7748c71b 100644
--- a/examples/stm32/other/usb_cdcacm/cdcacm.c
+++ b/examples/stm32/other/usb_cdcacm/cdcacm.c
@@ -18,10 +18,10 @@
*/
#include <stdlib.h>
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <usb/usbd.h>
-#include <usb/cdc.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/usb/usbd.h>
+#include <libopencm3/usb/cdc.h>
static const struct usb_device_descriptor dev = {
.bLength = USB_DT_DEVICE_SIZE,
diff --git a/examples/stm32/other/usb_cdcacm/cdcacm.ld b/examples/stm32/other/usb_cdcacm/cdcacm.ld
index 0b2918ea..49303940 100644
--- a/examples/stm32/other/usb_cdcacm/cdcacm.ld
+++ b/examples/stm32/other/usb_cdcacm/cdcacm.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/other/usb_dfu/usbdfu.c b/examples/stm32/other/usb_dfu/usbdfu.c
index 167f3168..7933377a 100644
--- a/examples/stm32/other/usb_dfu/usbdfu.c
+++ b/examples/stm32/other/usb_dfu/usbdfu.c
@@ -18,12 +18,12 @@
*/
#include <string.h>
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/flash.h>
-#include <stm32/scb.h>
-#include <usb/usbd.h>
-#include <usb/dfu.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/scb.h>
+#include <libopencm3/usb/usbd.h>
+#include <libopencm3/usb/dfu.h>
#define APP_ADDRESS 0x08002000
diff --git a/examples/stm32/other/usb_dfu/usbdfu.ld b/examples/stm32/other/usb_dfu/usbdfu.ld
index 1d24b184..08414769 100644
--- a/examples/stm32/other/usb_dfu/usbdfu.ld
+++ b/examples/stm32/other/usb_dfu/usbdfu.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/other/usb_hid/usbhid.c b/examples/stm32/other/usb_hid/usbhid.c
index 1cd27d0e..87ae10d8 100644
--- a/examples/stm32/other/usb_hid/usbhid.c
+++ b/examples/stm32/other/usb_hid/usbhid.c
@@ -18,18 +18,18 @@
*/
#include <stdlib.h>
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/systick.h>
-#include <usb/usbd.h>
-#include <usb/hid.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/systick.h>
+#include <libopencm3/usb/usbd.h>
+#include <libopencm3/usb/hid.h>
/* Define this to include the DFU APP interface. */
#define INCLUDE_DFU_INTERFACE
#ifdef INCLUDE_DFU_INTERFACE
-#include <stm32/scb.h>
-#include <usb/dfu.h>
+#include <libopencm3/stm32/scb.h>
+#include <libopencm3/usb/dfu.h>
#endif
const struct usb_device_descriptor dev = {
diff --git a/examples/stm32/other/usb_hid/usbhid.ld b/examples/stm32/other/usb_hid/usbhid.ld
index 0b2918ea..49303940 100644
--- a/examples/stm32/other/usb_hid/usbhid.ld
+++ b/examples/stm32/other/usb_hid/usbhid.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/stm32-h103/fancyblink/fancyblink.c b/examples/stm32/stm32-h103/fancyblink/fancyblink.c
index 4291b7e4..876fb2df 100644
--- a/examples/stm32/stm32-h103/fancyblink/fancyblink.c
+++ b/examples/stm32/stm32-h103/fancyblink/fancyblink.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)
diff --git a/examples/stm32/stm32-h103/fancyblink/fancyblink.ld b/examples/stm32/stm32-h103/fancyblink/fancyblink.ld
index abe9cea7..7ea2b92c 100644
--- a/examples/stm32/stm32-h103/fancyblink/fancyblink.ld
+++ b/examples/stm32/stm32-h103/fancyblink/fancyblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/stm32-h103/miniblink/miniblink.c b/examples/stm32/stm32-h103/miniblink/miniblink.c
index 6582b177..4bc781b4 100644
--- a/examples/stm32/stm32-h103/miniblink/miniblink.c
+++ b/examples/stm32/stm32-h103/miniblink/miniblink.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
void gpio_setup(void)
{
diff --git a/examples/stm32/stm32-h103/miniblink/miniblink.ld b/examples/stm32/stm32-h103/miniblink/miniblink.ld
index abe9cea7..7ea2b92c 100644
--- a/examples/stm32/stm32-h103/miniblink/miniblink.ld
+++ b/examples/stm32/stm32-h103/miniblink/miniblink.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/stm32-h103/spi/spi.c b/examples/stm32/stm32-h103/spi/spi.c
index 749b7562..5a36bb8b 100644
--- a/examples/stm32/stm32-h103/spi/spi.c
+++ b/examples/stm32/stm32-h103/spi/spi.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/spi.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/spi.h>
void clock_setup(void)
{
diff --git a/examples/stm32/stm32-h103/spi/spi.ld b/examples/stm32/stm32-h103/spi/spi.ld
index b06cbed5..25806f8d 100644
--- a/examples/stm32/stm32-h103/spi/spi.ld
+++ b/examples/stm32/stm32-h103/spi/spi.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/stm32-h103/usart/usart.c b/examples/stm32/stm32-h103/usart/usart.c
index b356fdbd..c3d24cab 100644
--- a/examples/stm32/stm32-h103/usart/usart.c
+++ b/examples/stm32/stm32-h103/usart/usart.c
@@ -17,9 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/usart.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/usart.h>
void clock_setup(void)
{
diff --git a/examples/stm32/stm32-h103/usart/usart.ld b/examples/stm32/stm32-h103/usart/usart.ld
index abe9cea7..7ea2b92c 100644
--- a/examples/stm32/stm32-h103/usart/usart.ld
+++ b/examples/stm32/stm32-h103/usart/usart.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/stm32-h103/usb_cdcacm/cdcacm.c b/examples/stm32/stm32-h103/usb_cdcacm/cdcacm.c
index 7b12186d..fa545a76 100644
--- a/examples/stm32/stm32-h103/usb_cdcacm/cdcacm.c
+++ b/examples/stm32/stm32-h103/usb_cdcacm/cdcacm.c
@@ -18,10 +18,10 @@
*/
#include <stdlib.h>
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <usb/usbd.h>
-#include <usb/cdc.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/usb/usbd.h>
+#include <libopencm3/usb/cdc.h>
static const struct usb_device_descriptor dev = {
.bLength = USB_DT_DEVICE_SIZE,
diff --git a/examples/stm32/stm32-h103/usb_cdcacm/cdcacm.ld b/examples/stm32/stm32-h103/usb_cdcacm/cdcacm.ld
index f70ddeea..b3483ac1 100644
--- a/examples/stm32/stm32-h103/usb_cdcacm/cdcacm.ld
+++ b/examples/stm32/stm32-h103/usb_cdcacm/cdcacm.ld
@@ -28,5 +28,5 @@ MEMORY
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/stm32-h103/usb_dfu/usbdfu.c b/examples/stm32/stm32-h103/usb_dfu/usbdfu.c
index 23206289..2ae83746 100644
--- a/examples/stm32/stm32-h103/usb_dfu/usbdfu.c
+++ b/examples/stm32/stm32-h103/usb_dfu/usbdfu.c
@@ -18,12 +18,12 @@
*/
#include <string.h>
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/flash.h>
-#include <stm32/scb.h>
-#include <usb/usbd.h>
-#include <usb/dfu.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/scb.h>
+#include <libopencm3/usb/usbd.h>
+#include <libopencm3/usb/dfu.h>
#define APP_ADDRESS 0x08002000
diff --git a/examples/stm32/stm32-h103/usb_dfu/usbdfu.ld b/examples/stm32/stm32-h103/usb_dfu/usbdfu.ld
index 1d24b184..08414769 100644
--- a/examples/stm32/stm32-h103/usb_dfu/usbdfu.ld
+++ b/examples/stm32/stm32-h103/usb_dfu/usbdfu.ld
@@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/stm32-h103/usb_hid/usbhid.c b/examples/stm32/stm32-h103/usb_hid/usbhid.c
index 7c6068f6..d11e16b8 100644
--- a/examples/stm32/stm32-h103/usb_hid/usbhid.c
+++ b/examples/stm32/stm32-h103/usb_hid/usbhid.c
@@ -18,18 +18,18 @@
*/
#include <stdlib.h>
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/systick.h>
-#include <usb/usbd.h>
-#include <usb/hid.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/systick.h>
+#include <libopencm3/usb/usbd.h>
+#include <libopencm3/usb/hid.h>
/* Define this to include the DFU APP interface. */
#define INCLUDE_DFU_INTERFACE
#ifdef INCLUDE_DFU_INTERFACE
-#include <stm32/scb.h>
-#include <usb/dfu.h>
+#include <libopencm3/stm32/scb.h>
+#include <libopencm3/usb/dfu.h>
#endif
const struct usb_device_descriptor dev = {
diff --git a/examples/stm32/stm32-h103/usb_hid/usbhid.ld b/examples/stm32/stm32-h103/usb_hid/usbhid.ld
index f70ddeea..b3483ac1 100644
--- a/examples/stm32/stm32-h103/usb_hid/usbhid.ld
+++ b/examples/stm32/stm32-h103/usb_hid/usbhid.ld
@@ -28,5 +28,5 @@ MEMORY
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/examples/stm32/stm32-h103/usb_iap/usbiap.c b/examples/stm32/stm32-h103/usb_iap/usbiap.c
index 23206289..2ae83746 100644
--- a/examples/stm32/stm32-h103/usb_iap/usbiap.c
+++ b/examples/stm32/stm32-h103/usb_iap/usbiap.c
@@ -18,12 +18,12 @@
*/
#include <string.h>
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/flash.h>
-#include <stm32/scb.h>
-#include <usb/usbd.h>
-#include <usb/dfu.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/flash.h>
+#include <libopencm3/stm32/scb.h>
+#include <libopencm3/usb/usbd.h>
+#include <libopencm3/usb/dfu.h>
#define APP_ADDRESS 0x08002000
diff --git a/examples/stm32/stm32-h103/usb_iap/usbiap.ld b/examples/stm32/stm32-h103/usb_iap/usbiap.ld
index f70ddeea..b3483ac1 100644
--- a/examples/stm32/stm32-h103/usb_iap/usbiap.ld
+++ b/examples/stm32/stm32-h103/usb_iap/usbiap.ld
@@ -28,5 +28,5 @@ MEMORY
/* Include the common ld script. */
-INCLUDE stm32.ld
+INCLUDE libopencm3_stm32.ld
diff --git a/include/cm3/common.h b/include/libopencm3/cm3/common.h
index a6cfb22e..a6cfb22e 100644
--- a/include/cm3/common.h
+++ b/include/libopencm3/cm3/common.h
diff --git a/include/cm3/memorymap.h b/include/libopencm3/cm3/memorymap.h
index 6f8b49d6..6f8b49d6 100644
--- a/include/cm3/memorymap.h
+++ b/include/libopencm3/cm3/memorymap.h
diff --git a/include/lpc13xx/gpio.h b/include/libopencm3/lpc13xx/gpio.h
index 9dca1bd2..21f8294f 100644
--- a/include/lpc13xx/gpio.h
+++ b/include/libopencm3/lpc13xx/gpio.h
@@ -20,8 +20,8 @@
#ifndef LPC13XX_GPIO_H
#define LPC13XX_GPIO_H
-#include <cm3/common.h>
-#include <lpc13xx/memorymap.h>
+#include <libopencm3/cm3/common.h>
+#include <libopencm3/lpc13xx/memorymap.h>
/* --- Convenience macros -------------------------------------------------- */
diff --git a/include/lpc13xx/memorymap.h b/include/libopencm3/lpc13xx/memorymap.h
index d4e1390c..19778821 100644
--- a/include/lpc13xx/memorymap.h
+++ b/include/libopencm3/lpc13xx/memorymap.h
@@ -20,7 +20,7 @@
#ifndef LPC13XX_MEMORYMAP_H
#define LPC13XX_MEMORYMAP_H
-#include <cm3/common.h>
+#include <libopencm3/cm3/common.h>
/* --- LPC13XX specific peripheral definitions ----------------------------- */
diff --git a/include/stm32/adc.h b/include/libopencm3/stm32/adc.h
index c3a34cf1..6e35d59f 100644
--- a/include/stm32/adc.h
+++ b/include/libopencm3/stm32/adc.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_ADC_H
#define LIBOPENCM3_ADC_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- Convenience macros -------------------------------------------------- */
diff --git a/include/stm32/bkp.h b/include/libopencm3/stm32/bkp.h
index d782141e..d700f9bc 100644
--- a/include/stm32/bkp.h
+++ b/include/libopencm3/stm32/bkp.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_BKP_H
#define LIBOPENCM3_BKP_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- BKP registers ------------------------------------------------------- */
diff --git a/include/stm32/can.h b/include/libopencm3/stm32/can.h
index e48f336a..1aa95a17 100644
--- a/include/stm32/can.h
+++ b/include/libopencm3/stm32/can.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_CAN_H
#define LIBOPENCM3_CAN_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- Convenience macros -------------------------------------------------- */
diff --git a/include/stm32/crc.h b/include/libopencm3/stm32/crc.h
index 46644a1a..5ad866e6 100644
--- a/include/stm32/crc.h
+++ b/include/libopencm3/stm32/crc.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_CRC_H
#define LIBOPENCM3_CRC_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- CRC registers ------------------------------------------------------- */
diff --git a/include/stm32/dma.h b/include/libopencm3/stm32/dma.h
index d82dc650..7d0a8564 100644
--- a/include/stm32/dma.h
+++ b/include/libopencm3/stm32/dma.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_DMA_H
#define LIBOPENCM3_DMA_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- Convenience macros -------------------------------------------------- */
diff --git a/include/stm32/ethernet.h b/include/libopencm3/stm32/ethernet.h
index f331278e..3d7f1eea 100644
--- a/include/stm32/ethernet.h
+++ b/include/libopencm3/stm32/ethernet.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_ETHERNET_H
#define LIBOPENCM3_ETHERNET_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* Ethernet MAC registers */
#define ETH_MACCR MMIO32(ETHERNET_BASE + 0x00)
diff --git a/include/stm32/exti.h b/include/libopencm3/stm32/exti.h
index a0e3eb26..19ab5472 100644
--- a/include/stm32/exti.h
+++ b/include/libopencm3/stm32/exti.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_EXTI_H
#define LIBOPENCM3_EXTI_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- EXTI registers ------------------------------------------------------ */
diff --git a/include/stm32/flash.h b/include/libopencm3/stm32/flash.h
index 31ae1ee6..f9b2aa97 100644
--- a/include/stm32/flash.h
+++ b/include/libopencm3/stm32/flash.h
@@ -28,8 +28,8 @@
#ifndef LIBOPENCM3_FLASH_H
#define LIBOPENCM3_FLASH_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- FLASH registers ----------------------------------------------------- */
diff --git a/include/stm32/fsmc.h b/include/libopencm3/stm32/fsmc.h
index 545de97d..1d318e31 100644
--- a/include/stm32/fsmc.h
+++ b/include/libopencm3/stm32/fsmc.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_FSMC_H
#define LIBOPENCM3_FSMC_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- Convenience macros -------------------------------------------------- */
diff --git a/include/stm32/gpio.h b/include/libopencm3/stm32/gpio.h
index 0febee00..f1463a38 100644
--- a/include/stm32/gpio.h
+++ b/include/libopencm3/stm32/gpio.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_GPIO_H
#define LIBOPENCM3_GPIO_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- Convenience macros -------------------------------------------------- */
diff --git a/include/stm32/i2c.h b/include/libopencm3/stm32/i2c.h
index e02eb904..1b837b87 100644
--- a/include/stm32/i2c.h
+++ b/include/libopencm3/stm32/i2c.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_I2C_H
#define LIBOPENCM3_I2C_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- Convenience macros -------------------------------------------------- */
diff --git a/include/stm32/iwdg.h b/include/libopencm3/stm32/iwdg.h
index 1162c349..bf2784ab 100644
--- a/include/stm32/iwdg.h
+++ b/include/libopencm3/stm32/iwdg.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_IWDG_H
#define LIBOPENCM3_IWDG_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- IWDG registers ------------------------------------------------------ */
diff --git a/include/stm32/memorymap.h b/include/libopencm3/stm32/memorymap.h
index db3677b8..52fe6d47 100644
--- a/include/stm32/memorymap.h
+++ b/include/libopencm3/stm32/memorymap.h
@@ -20,7 +20,7 @@
#ifndef LIBOPENCM3_MEMORYMAP_H
#define LIBOPENCM3_MEMORYMAP_H
-#include <cm3/memorymap.h>
+#include <libopencm3/cm3/memorymap.h>
/* --- STM32 specific peripheral definitions ------------------------------- */
diff --git a/include/stm32/nvic.h b/include/libopencm3/stm32/nvic.h
index 23dab7d2..ce8132fd 100644
--- a/include/stm32/nvic.h
+++ b/include/libopencm3/stm32/nvic.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_NVIC_H
#define LIBOPENCM3_NVIC_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- NVIC Registers ------------------------------------------------------ */
diff --git a/include/stm32/pwr.h b/include/libopencm3/stm32/pwr.h
index 9be68eff..e5b98042 100644
--- a/include/stm32/pwr.h
+++ b/include/libopencm3/stm32/pwr.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_PWR_H
#define LIBOPENCM3_PWR_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- PWR registers ------------------------------------------------------- */
diff --git a/include/stm32/rcc.h b/include/libopencm3/stm32/rcc.h
index 81cd50d0..7215f2b8 100644
--- a/include/stm32/rcc.h
+++ b/include/libopencm3/stm32/rcc.h
@@ -21,8 +21,8 @@
#ifndef LIBOPENCM3_RCC_H
#define LIBOPENCM3_RCC_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* Note: Regs/bits marked (**) only exist in "connectivity line" STM32s. */
/* Note: Regs/bits marked (XX) do NOT exist in "connectivity line" STM32s. */
diff --git a/include/stm32/rtc.h b/include/libopencm3/stm32/rtc.h
index dad9f95b..b71525e7 100644
--- a/include/stm32/rtc.h
+++ b/include/libopencm3/stm32/rtc.h
@@ -20,9 +20,9 @@
#ifndef LIBOPENCM3_RTC_H
#define LIBOPENCM3_RTC_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
-#include <stm32/pwr.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
+#include <libopencm3/stm32/pwr.h>
/* --- RTC registers ------------------------------------------------------- */
diff --git a/include/stm32/scb.h b/include/libopencm3/stm32/scb.h
index 42f5588f..9594cf18 100644
--- a/include/stm32/scb.h
+++ b/include/libopencm3/stm32/scb.h
@@ -21,8 +21,8 @@
#ifndef LIBOPENCM3_SCB_H
#define LIBOPENCM3_SCB_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- SCB: Registers ------------------------------------------------------ */
diff --git a/include/stm32/spi.h b/include/libopencm3/stm32/spi.h
index 8efccc8f..726310a1 100644
--- a/include/stm32/spi.h
+++ b/include/libopencm3/stm32/spi.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_SPI_H
#define LIBOPENCM3_SPI_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* Registers can be accessed as 16bit or 32bit values. */
diff --git a/include/stm32/systick.h b/include/libopencm3/stm32/systick.h
index 094db693..7c2c9a30 100644
--- a/include/stm32/systick.h
+++ b/include/libopencm3/stm32/systick.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_SYSTICK_H
#define LIBOPENCM3_SYSTICK_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- SYSTICK registers --------------------------------------------------- */
diff --git a/include/stm32/timer.h b/include/libopencm3/stm32/timer.h
index ed5a693a..dabf7329 100644
--- a/include/stm32/timer.h
+++ b/include/libopencm3/stm32/timer.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_TIMER_H
#define LIBOPENCM3_TIMER_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- Convenience macros -------------------------------------------------- */
diff --git a/include/stm32/tools.h b/include/libopencm3/stm32/tools.h
index ac7f0bf7..ac7f0bf7 100644
--- a/include/stm32/tools.h
+++ b/include/libopencm3/stm32/tools.h
diff --git a/include/stm32/usart.h b/include/libopencm3/stm32/usart.h
index e1c3b0de..df6bc089 100644
--- a/include/stm32/usart.h
+++ b/include/libopencm3/stm32/usart.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_USART_H
#define LIBOPENCM3_USART_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- Convenience macros -------------------------------------------------- */
diff --git a/include/stm32/usb.h b/include/libopencm3/stm32/usb.h
index cf7a2617..e35075dd 100644
--- a/include/stm32/usb.h
+++ b/include/libopencm3/stm32/usb.h
@@ -20,9 +20,9 @@
#ifndef LIBOPENCM3_USB_H
#define LIBOPENCM3_USB_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
-#include <stm32/tools.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
+#include <libopencm3/stm32/tools.h>
/* --- USB base addresses -------------------------------------------------- */
diff --git a/include/stm32/usb_desc.h b/include/libopencm3/stm32/usb_desc.h
index da99bb02..da99bb02 100644
--- a/include/stm32/usb_desc.h
+++ b/include/libopencm3/stm32/usb_desc.h
diff --git a/include/stm32/wwdg.h b/include/libopencm3/stm32/wwdg.h
index 81daf8b0..552d02ed 100644
--- a/include/stm32/wwdg.h
+++ b/include/libopencm3/stm32/wwdg.h
@@ -20,8 +20,8 @@
#ifndef LIBOPENCM3_WWDG_H
#define LIBOPENCM3_WWDG_H
-#include <stm32/memorymap.h>
-#include <cm3/common.h>
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/cm3/common.h>
/* --- WWDG registers ------------------------------------------------------ */
diff --git a/include/usb/cdc.h b/include/libopencm3/usb/cdc.h
index 2bdc18bc..2bdc18bc 100644
--- a/include/usb/cdc.h
+++ b/include/libopencm3/usb/cdc.h
diff --git a/include/usb/dfu.h b/include/libopencm3/usb/dfu.h
index 0f4c090c..0f4c090c 100644
--- a/include/usb/dfu.h
+++ b/include/libopencm3/usb/dfu.h
diff --git a/include/usb/hid.h b/include/libopencm3/usb/hid.h
index e1d98350..e1d98350 100644
--- a/include/usb/hid.h
+++ b/include/libopencm3/usb/hid.h
diff --git a/include/usb/usbd.h b/include/libopencm3/usb/usbd.h
index d861c175..95e65095 100644
--- a/include/usb/usbd.h
+++ b/include/libopencm3/usb/usbd.h
@@ -20,7 +20,7 @@
#ifndef __USBD_H
#define __USBD_H
-#include <usb/usbstd.h>
+#include <libopencm3/usb/usbstd.h>
/* Static buffer for control transactions:
* This is defined as weak in the library, applicaiton
diff --git a/include/usb/usbstd.h b/include/libopencm3/usb/usbstd.h
index f018289e..ee65b701 100644
--- a/include/usb/usbstd.h
+++ b/include/libopencm3/usb/usbstd.h
@@ -21,7 +21,7 @@
#define __USBSTD_H
#include <stdint.h>
-#include <cm3/common.h>
+#include <libopencm3/cm3/common.h>
/*
* This file contains structure definitions for the USB control structures
diff --git a/lib/lpc13xx/gpio.c b/lib/lpc13xx/gpio.c
index 5fe4ea7b..9eb057ea 100644
--- a/lib/lpc13xx/gpio.c
+++ b/lib/lpc13xx/gpio.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <lpc13xx/gpio.h>
+#include <libopencm3/lpc13xx/gpio.h>
void gpio_set(u32 gpioport, u16 gpios)
{
diff --git a/lib/lpc13xx/lpc13xx.ld b/lib/lpc13xx/libopencm3_lpc13xx.ld
index c709a8ce..c709a8ce 100644
--- a/lib/lpc13xx/lpc13xx.ld
+++ b/lib/lpc13xx/libopencm3_lpc13xx.ld
diff --git a/lib/stm32/adc.c b/lib/stm32/adc.c
index fa32b259..058837c3 100644
--- a/lib/stm32/adc.c
+++ b/lib/stm32/adc.c
@@ -31,7 +31,7 @@
* reg16 = adc_read(ADC1, ADC_CH_0);
*/
-#include <stm32/adc.h>
+#include <libopencm3/stm32/adc.h>
void rcc_set_adc_clk(u32 prescaler)
{
diff --git a/lib/stm32/can.c b/lib/stm32/can.c
index 73f102fc..32661339 100644
--- a/lib/stm32/can.c
+++ b/lib/stm32/can.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/can.h>
-#include <stm32/rcc.h>
+#include <libopencm3/stm32/can.h>
+#include <libopencm3/stm32/rcc.h>
void can_reset(u32 canport)
{
diff --git a/lib/stm32/dma.c b/lib/stm32/dma.c
index 84a10c7a..8feb2c95 100644
--- a/lib/stm32/dma.c
+++ b/lib/stm32/dma.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/dma.h>
+#include <libopencm3/stm32/dma.h>
void dma_enable_mem2mem_mode(u32 dma, u8 channel)
{
diff --git a/lib/stm32/ethernet.c b/lib/stm32/ethernet.c
index 980b9419..4a4d080a 100644
--- a/lib/stm32/ethernet.c
+++ b/lib/stm32/ethernet.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/ethernet.h>
+#include <libopencm3/stm32/ethernet.h>
void eth_smi_write(u8 phy, u8 reg, u16 data)
{
diff --git a/lib/stm32/exti.c b/lib/stm32/exti.c
index 4961eab3..cdc23474 100644
--- a/lib/stm32/exti.c
+++ b/lib/stm32/exti.c
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/exti.h>
-#include <stm32/gpio.h>
+#include <libopencm3/stm32/exti.h>
+#include <libopencm3/stm32/gpio.h>
void exti_set_trigger(u32 extis, exti_trigger_type trig)
{
diff --git a/lib/stm32/flash.c b/lib/stm32/flash.c
index b623fc71..98f77776 100644
--- a/lib/stm32/flash.c
+++ b/lib/stm32/flash.c
@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/flash.h>
+#include <libopencm3/stm32/flash.h>
void flash_prefetch_buffer_enable(void)
{
diff --git a/lib/stm32/gpio.c b/lib/stm32/gpio.c
index 4811b548..333fcaf3 100644
--- a/lib/stm32/gpio.c
+++ b/lib/stm32/gpio.c
@@ -34,7 +34,7 @@
* - GPIO remapping support
*/
-#include <stm32/gpio.h>
+#include <libopencm3/stm32/gpio.h>
void gpio_set_mode(u32 gpioport, u8 mode, u8 cnf, u16 gpios)
{
diff --git a/lib/stm32/i2c.c b/lib/stm32/i2c.c
index e16b8249..e1a3b840 100644
--- a/lib/stm32/i2c.c
+++ b/lib/stm32/i2c.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/i2c.h>
+#include <libopencm3/stm32/i2c.h>
void i2c_peripheral_enable(u32 i2c)
{
diff --git a/lib/stm32/stm32.ld b/lib/stm32/libopencm3_stm32.ld
index b0e202e9..b0e202e9 100644
--- a/lib/stm32/stm32.ld
+++ b/lib/stm32/libopencm3_stm32.ld
diff --git a/lib/stm32/nvic.c b/lib/stm32/nvic.c
index c9dcf3c6..cf77cc38 100644
--- a/lib/stm32/nvic.c
+++ b/lib/stm32/nvic.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/nvic.h>
+#include <libopencm3/stm32/nvic.h>
void nvic_enable_irq(u8 irqn)
{
diff --git a/lib/stm32/rcc.c b/lib/stm32/rcc.c
index eddc667b..997163ac 100644
--- a/lib/stm32/rcc.c
+++ b/lib/stm32/rcc.c
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/flash.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/flash.h>
void rcc_osc_ready_int_clear(osc_t osc)
{
diff --git a/lib/stm32/rtc.c b/lib/stm32/rtc.c
index 13965597..44956418 100644
--- a/lib/stm32/rtc.c
+++ b/lib/stm32/rtc.c
@@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/rcc.h>
-#include <stm32/rtc.h>
-#include <stm32/pwr.h>
+#include <libopencm3/stm32/rcc.h>
+#include <libopencm3/stm32/rtc.h>
+#include <libopencm3/stm32/pwr.h>
void rtc_awake_from_off(osc_t clock_source)
{
diff --git a/lib/stm32/scb.c b/lib/stm32/scb.c
index cd95bcaa..dfee6c37 100644
--- a/lib/stm32/scb.c
+++ b/lib/stm32/scb.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/scb.h>
+#include <libopencm3/stm32/scb.h>
void scb_reset_core(void)
{
diff --git a/lib/stm32/spi.c b/lib/stm32/spi.c
index 918617a3..733a1bc4 100644
--- a/lib/stm32/spi.c
+++ b/lib/stm32/spi.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/spi.h>
+#include <libopencm3/stm32/spi.h>
/*
* SPI and I2S code.
diff --git a/lib/stm32/systick.c b/lib/stm32/systick.c
index 998c0ede..882601da 100644
--- a/lib/stm32/systick.c
+++ b/lib/stm32/systick.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/systick.h>
+#include <libopencm3/stm32/systick.h>
void systick_set_reload(u32 value)
{
diff --git a/lib/stm32/timer.c b/lib/stm32/timer.c
index be90d06b..ae51f1ea 100644
--- a/lib/stm32/timer.c
+++ b/lib/stm32/timer.c
@@ -25,7 +25,7 @@
* TIM_CR1_CMS_CENTRE_3, TIM_CR1_DIR_UP);
*/
-#include <stm32/timer.h>
+#include <libopencm3/stm32/timer.h>
void timer_set_mode(u32 timer_peripheral, u8 clock_div, u8 alignment,
u8 direction)
diff --git a/lib/stm32/usart.c b/lib/stm32/usart.c
index a16e45ae..f6447765 100644
--- a/lib/stm32/usart.c
+++ b/lib/stm32/usart.c
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stm32/usart.h>
+#include <libopencm3/stm32/usart.h>
void usart_set_baudrate(u32 usart, u32 baud)
{
diff --git a/lib/usb/usb.c b/lib/usb/usb.c
index 1e8ad44e..c88de55c 100644
--- a/lib/usb/usb.c
+++ b/lib/usb/usb.c
@@ -18,7 +18,7 @@
*/
#include <string.h>
-#include <usb/usbd.h>
+#include <libopencm3/usb/usbd.h>
#include "usb_private.h"
struct _usbd_device _usbd_device;
diff --git a/lib/usb/usb_control.c b/lib/usb/usb_control.c
index ff467321..cd3fe0fa 100644
--- a/lib/usb/usb_control.c
+++ b/lib/usb/usb_control.c
@@ -18,7 +18,7 @@
*/
#include <stdlib.h>
-#include <usb/usbd.h>
+#include <libopencm3/usb/usbd.h>
#include "usb_private.h"
static struct usb_control_state {
diff --git a/lib/usb/usb_f103.c b/lib/usb/usb_f103.c
index dab046d0..1f82def1 100644
--- a/lib/usb/usb_f103.c
+++ b/lib/usb/usb_f103.c
@@ -17,10 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <cm3/common.h>
-#include <stm32/tools.h>
-#include <stm32/usb.h>
-#include <usb/usbd.h>
+#include <libopencm3/cm3/common.h>
+#include <libopencm3/stm32/tools.h>
+#include <libopencm3/stm32/usb.h>
+#include <libopencm3/usb/usbd.h>
#include "usb_private.h"
/** Initialize the USB device controller hardware of the STM32. */
diff --git a/lib/usb/usb_standard.c b/lib/usb/usb_standard.c
index 81616e57..efaea271 100644
--- a/lib/usb/usb_standard.c
+++ b/lib/usb/usb_standard.c
@@ -18,7 +18,7 @@
*/
#include <string.h>
-#include <usb/usbd.h>
+#include <libopencm3/usb/usbd.h>
#include "usb_private.h"
void usbd_register_set_config_callback(void (*callback)(u16 wValue))