Some more file/path restructuring.
All #includes now explicitly use the "<libopencm3/stm32/rcc.h>" format. If you want to get rid of the "libopencm3" prefix in your local project you can add a respective -I entry in your Makefile (not recommended though). All .ld files and .a libs are installed in $(TOOLCHAIN_DIR)/lib directly (as before), but are now renamed to avoid potential conflicts now or in the future. Examples: libopencm3_lpc13xx.a libopencm3_lpc13xx.ld libopencm3_stm32.a libopencm3_stm32.ld
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -28,5 +28,5 @@ MEMORY
|
||||
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -25,5 +25,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -25,5 +25,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -27,5 +27,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -28,5 +28,5 @@ MEMORY
|
||||
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@ MEMORY
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -28,5 +28,5 @@ MEMORY
|
||||
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -28,5 +28,5 @@ MEMORY
|
||||
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32.ld
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
|
||||
|
||||
Reference in New Issue
Block a user