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:
parent
95793aa6ce
commit
8f251e8a9d
8
Makefile
8
Makefile
@ -50,12 +50,12 @@ examples: lib
|
|||||||
install: build
|
install: build
|
||||||
@printf " INSTALL headers\n"
|
@printf " INSTALL headers\n"
|
||||||
$(Q)$(INSTALL) -d $(INCDIR)/libopencm3
|
$(Q)$(INSTALL) -d $(INCDIR)/libopencm3
|
||||||
$(Q)$(INSTALL) -d $(LIBDIR)/libopencm3
|
$(Q)$(INSTALL) -d $(LIBDIR)
|
||||||
$(Q)cp -r include/* $(INCDIR)/libopencm3
|
$(Q)cp -r include/libopencm3/* $(INCDIR)/libopencm3
|
||||||
@printf " INSTALL libs\n"
|
@printf " INSTALL libs\n"
|
||||||
$(Q)$(INSTALL) -m 0644 lib/*/*.a $(LIBDIR)/libopencm3
|
$(Q)$(INSTALL) -m 0644 lib/*/*.a $(LIBDIR)
|
||||||
@printf " INSTALL ldscripts\n"
|
@printf " INSTALL ldscripts\n"
|
||||||
$(Q)$(INSTALL) -m 0644 lib/*/*.ld $(LIBDIR)/libopencm3
|
$(Q)$(INSTALL) -m 0644 lib/*/*.ld $(LIBDIR)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(Q)$(MAKE) -C examples/stm32 clean
|
$(Q)$(MAKE) -C examples/stm32 clean
|
||||||
|
@ -30,8 +30,7 @@ TOOLCHAIN_DIR = ../../../..
|
|||||||
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
|
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
|
||||||
-mcpu=cortex-m3 -mthumb
|
-mcpu=cortex-m3 -mthumb
|
||||||
LDSCRIPT = $(BINARY).ld
|
LDSCRIPT = $(BINARY).ld
|
||||||
LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/libopencm3 \
|
LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/lpc13xx \
|
||||||
-L$(TOOLCHAIN_DIR)/lib/lpc13xx \
|
|
||||||
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections
|
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections
|
||||||
OBJS += $(BINARY).o
|
OBJS += $(BINARY).o
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// #include <lpc13xx/rcc.h>
|
// #include <libopencm3/lpc13xx/rcc.h>
|
||||||
#include <lpc13xx/gpio.h>
|
#include <libopencm3/lpc13xx/gpio.h>
|
||||||
|
|
||||||
void gpio_setup(void)
|
void gpio_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE lpc13xx.ld
|
INCLUDE libopencm3_lpc13xx.ld
|
||||||
|
|
||||||
|
@ -28,11 +28,9 @@ OBJDUMP = $(PREFIX)-objdump
|
|||||||
# TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX)
|
# TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX)
|
||||||
TOOLCHAIN_DIR = ../../../..
|
TOOLCHAIN_DIR = ../../../..
|
||||||
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
|
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
|
||||||
-I$(TOOLCHAIN_DIR)/include/libopencm3 -fno-common \
|
-fno-common -mcpu=cortex-m3 -mthumb
|
||||||
-mcpu=cortex-m3 -mthumb
|
|
||||||
LDSCRIPT = $(BINARY).ld
|
LDSCRIPT = $(BINARY).ld
|
||||||
LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/libopencm3 \
|
LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32 \
|
||||||
-L$(TOOLCHAIN_DIR)/lib/stm32 \
|
|
||||||
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections
|
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections
|
||||||
OBJS += $(BINARY).o
|
OBJS += $(BINARY).o
|
||||||
|
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/scb.h>
|
#include <libopencm3/stm32/scb.h>
|
||||||
#include <usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
|
|
||||||
#define APP_ADDRESS 0x08002000
|
#define APP_ADDRESS 0x08002000
|
||||||
|
|
||||||
|
@ -25,5 +25,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE stm32.ld
|
INCLUDE libopencm3_stm32.ld
|
||||||
|
|
||||||
|
@ -18,18 +18,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
#include <usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <usb/hid.h>
|
#include <libopencm3/usb/hid.h>
|
||||||
|
|
||||||
/* Define this to include the DFU APP interface. */
|
/* Define this to include the DFU APP interface. */
|
||||||
#define INCLUDE_DFU_INTERFACE
|
#define INCLUDE_DFU_INTERFACE
|
||||||
|
|
||||||
#ifdef INCLUDE_DFU_INTERFACE
|
#ifdef INCLUDE_DFU_INTERFACE
|
||||||
#include <stm32/scb.h>
|
#include <libopencm3/stm32/scb.h>
|
||||||
#include <usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const struct usb_device_descriptor dev = {
|
const struct usb_device_descriptor dev = {
|
||||||
|
@ -28,5 +28,5 @@ MEMORY
|
|||||||
|
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
|
|
||||||
void clock_setup(void)
|
void clock_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/timer.h>
|
#include <libopencm3/stm32/timer.h>
|
||||||
|
|
||||||
// #define COMPARE
|
// #define COMPARE
|
||||||
// #define MOVING_FADE
|
// #define MOVING_FADE
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
#include <stm32/can.h>
|
#include <libopencm3/stm32/can.h>
|
||||||
|
|
||||||
struct can_tx_msg {
|
struct can_tx_msg {
|
||||||
u32 std_id;
|
u32 std_id;
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
|
|
||||||
/* Set STM32 to 72 MHz. */
|
/* Set STM32 to 72 MHz. */
|
||||||
void clock_setup(void)
|
void clock_setup(void)
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
|
|
||||||
u32 temp32;
|
u32 temp32;
|
||||||
|
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
|
|
||||||
void clock_setup(void)
|
void clock_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
|
|
||||||
void clock_setup(void)
|
void clock_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <stm32/adc.h>
|
#include <libopencm3/stm32/adc.h>
|
||||||
|
|
||||||
void usart_setup(void)
|
void usart_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <stm32/dma.h>
|
#include <libopencm3/stm32/dma.h>
|
||||||
|
|
||||||
void usart_setup(void)
|
void usart_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE stm32.ld
|
INCLUDE libopencm3_stm32.ld
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
#ifndef DOGM128_H
|
#ifndef DOGM128_H
|
||||||
#define DOGM128_H
|
#define DOGM128_H
|
||||||
|
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/spi.h>
|
#include <libopencm3/stm32/spi.h>
|
||||||
|
|
||||||
/* PB10 GPIO - ~RESET
|
/* PB10 GPIO - ~RESET
|
||||||
* PB12 SPI2_NSS - ~CS1
|
* PB12 SPI2_NSS - ~CS1
|
||||||
|
@ -17,13 +17,13 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <stm32/timer.h>
|
#include <libopencm3/stm32/timer.h>
|
||||||
#include <stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <stm32/spi.h>
|
#include <libopencm3/stm32/spi.h>
|
||||||
#include "./dogm128.h"
|
#include "./dogm128.h"
|
||||||
|
|
||||||
void gpio_setup(void)
|
void gpio_setup(void)
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <stm32/i2c.h>
|
#include <libopencm3/stm32/i2c.h>
|
||||||
#include "stts75.h"
|
#include "stts75.h"
|
||||||
|
|
||||||
void usart_setup(void)
|
void usart_setup(void)
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/i2c.h>
|
#include <libopencm3/stm32/i2c.h>
|
||||||
#include "stts75.h"
|
#include "stts75.h"
|
||||||
|
|
||||||
void stts75_write_config(u32 i2c, u8 sensor)
|
void stts75_write_config(u32 i2c, u8 sensor)
|
||||||
|
@ -17,12 +17,12 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <stm32/rtc.h>
|
#include <libopencm3/stm32/rtc.h>
|
||||||
#include <stm32/pwr.h>
|
#include <libopencm3/stm32/pwr.h>
|
||||||
#include <stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
|
|
||||||
void clock_setup(void)
|
void clock_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
|
|
||||||
u32 temp32;
|
u32 temp32;
|
||||||
|
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/timer.h>
|
#include <libopencm3/stm32/timer.h>
|
||||||
#include <stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
|
|
||||||
void gpio_setup(void)
|
void gpio_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE stm32.ld
|
INCLUDE libopencm3_stm32.ld
|
||||||
|
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <usb/cdc.h>
|
#include <libopencm3/usb/cdc.h>
|
||||||
|
|
||||||
static const struct usb_device_descriptor dev = {
|
static const struct usb_device_descriptor dev = {
|
||||||
.bLength = USB_DT_DEVICE_SIZE,
|
.bLength = USB_DT_DEVICE_SIZE,
|
||||||
|
@ -25,5 +25,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE stm32.ld
|
INCLUDE libopencm3_stm32.ld
|
||||||
|
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/scb.h>
|
#include <libopencm3/stm32/scb.h>
|
||||||
#include <usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
|
|
||||||
#define APP_ADDRESS 0x08002000
|
#define APP_ADDRESS 0x08002000
|
||||||
|
|
||||||
|
@ -25,5 +25,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE stm32.ld
|
INCLUDE libopencm3_stm32.ld
|
||||||
|
|
||||||
|
@ -18,18 +18,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
#include <usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <usb/hid.h>
|
#include <libopencm3/usb/hid.h>
|
||||||
|
|
||||||
/* Define this to include the DFU APP interface. */
|
/* Define this to include the DFU APP interface. */
|
||||||
#define INCLUDE_DFU_INTERFACE
|
#define INCLUDE_DFU_INTERFACE
|
||||||
|
|
||||||
#ifdef INCLUDE_DFU_INTERFACE
|
#ifdef INCLUDE_DFU_INTERFACE
|
||||||
#include <stm32/scb.h>
|
#include <libopencm3/stm32/scb.h>
|
||||||
#include <usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const struct usb_device_descriptor dev = {
|
const struct usb_device_descriptor dev = {
|
||||||
|
@ -25,5 +25,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
|
|
||||||
/* Set STM32 to 72 MHz. */
|
/* Set STM32 to 72 MHz. */
|
||||||
void clock_setup(void)
|
void clock_setup(void)
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
|
|
||||||
void gpio_setup(void)
|
void gpio_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/spi.h>
|
#include <libopencm3/stm32/spi.h>
|
||||||
|
|
||||||
void clock_setup(void)
|
void clock_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
|
|
||||||
void clock_setup(void)
|
void clock_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE stm32.ld
|
INCLUDE libopencm3_stm32.ld
|
||||||
|
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <usb/cdc.h>
|
#include <libopencm3/usb/cdc.h>
|
||||||
|
|
||||||
static const struct usb_device_descriptor dev = {
|
static const struct usb_device_descriptor dev = {
|
||||||
.bLength = USB_DT_DEVICE_SIZE,
|
.bLength = USB_DT_DEVICE_SIZE,
|
||||||
|
@ -28,5 +28,5 @@ MEMORY
|
|||||||
|
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE stm32.ld
|
INCLUDE libopencm3_stm32.ld
|
||||||
|
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/scb.h>
|
#include <libopencm3/stm32/scb.h>
|
||||||
#include <usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
|
|
||||||
#define APP_ADDRESS 0x08002000
|
#define APP_ADDRESS 0x08002000
|
||||||
|
|
||||||
|
@ -25,5 +25,5 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE stm32.ld
|
INCLUDE libopencm3_stm32.ld
|
||||||
|
|
||||||
|
@ -18,18 +18,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
#include <usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <usb/hid.h>
|
#include <libopencm3/usb/hid.h>
|
||||||
|
|
||||||
/* Define this to include the DFU APP interface. */
|
/* Define this to include the DFU APP interface. */
|
||||||
#define INCLUDE_DFU_INTERFACE
|
#define INCLUDE_DFU_INTERFACE
|
||||||
|
|
||||||
#ifdef INCLUDE_DFU_INTERFACE
|
#ifdef INCLUDE_DFU_INTERFACE
|
||||||
#include <stm32/scb.h>
|
#include <libopencm3/stm32/scb.h>
|
||||||
#include <usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const struct usb_device_descriptor dev = {
|
const struct usb_device_descriptor dev = {
|
||||||
|
@ -28,5 +28,5 @@ MEMORY
|
|||||||
|
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE stm32.ld
|
INCLUDE libopencm3_stm32.ld
|
||||||
|
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <stm32/flash.h>
|
#include <libopencm3/stm32/flash.h>
|
||||||
#include <stm32/scb.h>
|
#include <libopencm3/stm32/scb.h>
|
||||||
#include <usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
|
|
||||||
#define APP_ADDRESS 0x08002000
|
#define APP_ADDRESS 0x08002000
|
||||||
|
|
||||||
|
@ -28,5 +28,5 @@ MEMORY
|
|||||||
|
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE stm32.ld
|
INCLUDE libopencm3_stm32.ld
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LPC13XX_GPIO_H
|
#ifndef LPC13XX_GPIO_H
|
||||||
#define LPC13XX_GPIO_H
|
#define LPC13XX_GPIO_H
|
||||||
|
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
#include <lpc13xx/memorymap.h>
|
#include <libopencm3/lpc13xx/memorymap.h>
|
||||||
|
|
||||||
/* --- Convenience macros -------------------------------------------------- */
|
/* --- Convenience macros -------------------------------------------------- */
|
||||||
|
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef LPC13XX_MEMORYMAP_H
|
#ifndef LPC13XX_MEMORYMAP_H
|
||||||
#define LPC13XX_MEMORYMAP_H
|
#define LPC13XX_MEMORYMAP_H
|
||||||
|
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- LPC13XX specific peripheral definitions ----------------------------- */
|
/* --- LPC13XX specific peripheral definitions ----------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_ADC_H
|
#ifndef LIBOPENCM3_ADC_H
|
||||||
#define LIBOPENCM3_ADC_H
|
#define LIBOPENCM3_ADC_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- Convenience macros -------------------------------------------------- */
|
/* --- Convenience macros -------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_BKP_H
|
#ifndef LIBOPENCM3_BKP_H
|
||||||
#define LIBOPENCM3_BKP_H
|
#define LIBOPENCM3_BKP_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- BKP registers ------------------------------------------------------- */
|
/* --- BKP registers ------------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_CAN_H
|
#ifndef LIBOPENCM3_CAN_H
|
||||||
#define LIBOPENCM3_CAN_H
|
#define LIBOPENCM3_CAN_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- Convenience macros -------------------------------------------------- */
|
/* --- Convenience macros -------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_CRC_H
|
#ifndef LIBOPENCM3_CRC_H
|
||||||
#define LIBOPENCM3_CRC_H
|
#define LIBOPENCM3_CRC_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- CRC registers ------------------------------------------------------- */
|
/* --- CRC registers ------------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_DMA_H
|
#ifndef LIBOPENCM3_DMA_H
|
||||||
#define LIBOPENCM3_DMA_H
|
#define LIBOPENCM3_DMA_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- Convenience macros -------------------------------------------------- */
|
/* --- Convenience macros -------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_ETHERNET_H
|
#ifndef LIBOPENCM3_ETHERNET_H
|
||||||
#define LIBOPENCM3_ETHERNET_H
|
#define LIBOPENCM3_ETHERNET_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* Ethernet MAC registers */
|
/* Ethernet MAC registers */
|
||||||
#define ETH_MACCR MMIO32(ETHERNET_BASE + 0x00)
|
#define ETH_MACCR MMIO32(ETHERNET_BASE + 0x00)
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_EXTI_H
|
#ifndef LIBOPENCM3_EXTI_H
|
||||||
#define LIBOPENCM3_EXTI_H
|
#define LIBOPENCM3_EXTI_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- EXTI registers ------------------------------------------------------ */
|
/* --- EXTI registers ------------------------------------------------------ */
|
||||||
|
|
@ -28,8 +28,8 @@
|
|||||||
#ifndef LIBOPENCM3_FLASH_H
|
#ifndef LIBOPENCM3_FLASH_H
|
||||||
#define LIBOPENCM3_FLASH_H
|
#define LIBOPENCM3_FLASH_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- FLASH registers ----------------------------------------------------- */
|
/* --- FLASH registers ----------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_FSMC_H
|
#ifndef LIBOPENCM3_FSMC_H
|
||||||
#define LIBOPENCM3_FSMC_H
|
#define LIBOPENCM3_FSMC_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- Convenience macros -------------------------------------------------- */
|
/* --- Convenience macros -------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_GPIO_H
|
#ifndef LIBOPENCM3_GPIO_H
|
||||||
#define LIBOPENCM3_GPIO_H
|
#define LIBOPENCM3_GPIO_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- Convenience macros -------------------------------------------------- */
|
/* --- Convenience macros -------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_I2C_H
|
#ifndef LIBOPENCM3_I2C_H
|
||||||
#define LIBOPENCM3_I2C_H
|
#define LIBOPENCM3_I2C_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- Convenience macros -------------------------------------------------- */
|
/* --- Convenience macros -------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_IWDG_H
|
#ifndef LIBOPENCM3_IWDG_H
|
||||||
#define LIBOPENCM3_IWDG_H
|
#define LIBOPENCM3_IWDG_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- IWDG registers ------------------------------------------------------ */
|
/* --- IWDG registers ------------------------------------------------------ */
|
||||||
|
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef LIBOPENCM3_MEMORYMAP_H
|
#ifndef LIBOPENCM3_MEMORYMAP_H
|
||||||
#define LIBOPENCM3_MEMORYMAP_H
|
#define LIBOPENCM3_MEMORYMAP_H
|
||||||
|
|
||||||
#include <cm3/memorymap.h>
|
#include <libopencm3/cm3/memorymap.h>
|
||||||
|
|
||||||
/* --- STM32 specific peripheral definitions ------------------------------- */
|
/* --- STM32 specific peripheral definitions ------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_NVIC_H
|
#ifndef LIBOPENCM3_NVIC_H
|
||||||
#define LIBOPENCM3_NVIC_H
|
#define LIBOPENCM3_NVIC_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- NVIC Registers ------------------------------------------------------ */
|
/* --- NVIC Registers ------------------------------------------------------ */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_PWR_H
|
#ifndef LIBOPENCM3_PWR_H
|
||||||
#define LIBOPENCM3_PWR_H
|
#define LIBOPENCM3_PWR_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- PWR registers ------------------------------------------------------- */
|
/* --- PWR registers ------------------------------------------------------- */
|
||||||
|
|
@ -21,8 +21,8 @@
|
|||||||
#ifndef LIBOPENCM3_RCC_H
|
#ifndef LIBOPENCM3_RCC_H
|
||||||
#define LIBOPENCM3_RCC_H
|
#define LIBOPENCM3_RCC_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* Note: Regs/bits marked (**) only exist in "connectivity line" STM32s. */
|
/* Note: Regs/bits marked (**) only exist in "connectivity line" STM32s. */
|
||||||
/* Note: Regs/bits marked (XX) do NOT exist in "connectivity line" STM32s. */
|
/* Note: Regs/bits marked (XX) do NOT exist in "connectivity line" STM32s. */
|
@ -20,9 +20,9 @@
|
|||||||
#ifndef LIBOPENCM3_RTC_H
|
#ifndef LIBOPENCM3_RTC_H
|
||||||
#define LIBOPENCM3_RTC_H
|
#define LIBOPENCM3_RTC_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
#include <stm32/pwr.h>
|
#include <libopencm3/stm32/pwr.h>
|
||||||
|
|
||||||
/* --- RTC registers ------------------------------------------------------- */
|
/* --- RTC registers ------------------------------------------------------- */
|
||||||
|
|
@ -21,8 +21,8 @@
|
|||||||
#ifndef LIBOPENCM3_SCB_H
|
#ifndef LIBOPENCM3_SCB_H
|
||||||
#define LIBOPENCM3_SCB_H
|
#define LIBOPENCM3_SCB_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- SCB: Registers ------------------------------------------------------ */
|
/* --- SCB: Registers ------------------------------------------------------ */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_SPI_H
|
#ifndef LIBOPENCM3_SPI_H
|
||||||
#define LIBOPENCM3_SPI_H
|
#define LIBOPENCM3_SPI_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* Registers can be accessed as 16bit or 32bit values. */
|
/* Registers can be accessed as 16bit or 32bit values. */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_SYSTICK_H
|
#ifndef LIBOPENCM3_SYSTICK_H
|
||||||
#define LIBOPENCM3_SYSTICK_H
|
#define LIBOPENCM3_SYSTICK_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- SYSTICK registers --------------------------------------------------- */
|
/* --- SYSTICK registers --------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_TIMER_H
|
#ifndef LIBOPENCM3_TIMER_H
|
||||||
#define LIBOPENCM3_TIMER_H
|
#define LIBOPENCM3_TIMER_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- Convenience macros -------------------------------------------------- */
|
/* --- Convenience macros -------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_USART_H
|
#ifndef LIBOPENCM3_USART_H
|
||||||
#define LIBOPENCM3_USART_H
|
#define LIBOPENCM3_USART_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- Convenience macros -------------------------------------------------- */
|
/* --- Convenience macros -------------------------------------------------- */
|
||||||
|
|
@ -20,9 +20,9 @@
|
|||||||
#ifndef LIBOPENCM3_USB_H
|
#ifndef LIBOPENCM3_USB_H
|
||||||
#define LIBOPENCM3_USB_H
|
#define LIBOPENCM3_USB_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
#include <stm32/tools.h>
|
#include <libopencm3/stm32/tools.h>
|
||||||
|
|
||||||
/* --- USB base addresses -------------------------------------------------- */
|
/* --- USB base addresses -------------------------------------------------- */
|
||||||
|
|
@ -20,8 +20,8 @@
|
|||||||
#ifndef LIBOPENCM3_WWDG_H
|
#ifndef LIBOPENCM3_WWDG_H
|
||||||
#define LIBOPENCM3_WWDG_H
|
#define LIBOPENCM3_WWDG_H
|
||||||
|
|
||||||
#include <stm32/memorymap.h>
|
#include <libopencm3/stm32/memorymap.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/* --- WWDG registers ------------------------------------------------------ */
|
/* --- WWDG registers ------------------------------------------------------ */
|
||||||
|
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef __USBD_H
|
#ifndef __USBD_H
|
||||||
#define __USBD_H
|
#define __USBD_H
|
||||||
|
|
||||||
#include <usb/usbstd.h>
|
#include <libopencm3/usb/usbstd.h>
|
||||||
|
|
||||||
/* Static buffer for control transactions:
|
/* Static buffer for control transactions:
|
||||||
* This is defined as weak in the library, applicaiton
|
* This is defined as weak in the library, applicaiton
|
@ -21,7 +21,7 @@
|
|||||||
#define __USBSTD_H
|
#define __USBSTD_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file contains structure definitions for the USB control structures
|
* This file contains structure definitions for the USB control structures
|
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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)
|
void gpio_set(u32 gpioport, u16 gpios)
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
* reg16 = adc_read(ADC1, ADC_CH_0);
|
* reg16 = adc_read(ADC1, ADC_CH_0);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/adc.h>
|
#include <libopencm3/stm32/adc.h>
|
||||||
|
|
||||||
void rcc_set_adc_clk(u32 prescaler)
|
void rcc_set_adc_clk(u32 prescaler)
|
||||||
{
|
{
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stm32/can.h>
|
#include <libopencm3/stm32/can.h>
|
||||||
#include <stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
|
|
||||||
void can_reset(u32 canport)
|
void can_reset(u32 canport)
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user