Fix stm32f1 filenames and path

This commit is contained in:
Stephen Caudle 2011-10-12 23:58:27 -04:00
parent 878c094871
commit 8ceeb99902
95 changed files with 184 additions and 184 deletions

View File

@ -25,12 +25,12 @@ LD = $(PREFIX)-gcc
OBJCOPY = $(PREFIX)-objcopy
OBJDUMP = $(PREFIX)-objdump
# Uncomment this line if you want to use the installed (not local) library.
TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
#TOOLCHAIN_DIR = ../../../..
#TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
TOOLCHAIN_DIR = ../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
-fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD
-fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F1
LDSCRIPT = $(BINARY).ld
LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32 \
LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32f1 \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
-mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float
OBJS += $(BINARY).o
@ -75,13 +75,13 @@ flash: $(BINARY).flash
@#printf " OBJDUMP $(*).list\n"
$(Q)$(OBJDUMP) -S $(*).elf > $(*).list
foo.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/libopencm3_stm32.a
foo.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/stm32f1/libopencm3_stm32f1.a
@#printf " LD $(subst $(shell pwd)/,,$(@))\n"
$(Q)$(LD) -o foo.elf $(OBJS) -lopencm3_stm32 $(LDFLAGS)
$(Q)$(LD) -o foo.elf $(OBJS) -lopencm3_stm32f1 $(LDFLAGS)
%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/libopencm3_stm32.a
%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/stm32f1/libopencm3_stm32f1.a
@#printf " LD $(subst $(shell pwd)/,,$(@))\n"
$(Q)$(LD) -o $(*).elf $(OBJS) -lopencm3_stm32 $(LDFLAGS)
$(Q)$(LD) -o $(*).elf $(OBJS) -lopencm3_stm32f1 $(LDFLAGS)
%.o: %.c Makefile
@#printf " CC $(subst $(shell pwd)/,,$(@))\n"

View File

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,10 +18,10 @@
*/
#include <string.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/scb.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/dfu.h>

View File

@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -19,8 +19,8 @@
*/
#include <stdlib.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/systick.h>
#include <libopencm3/stm32/otg_fs.h>
#include <libopencm3/usb/usbd.h>
@ -30,7 +30,7 @@
#define INCLUDE_DFU_INTERFACE
#ifdef INCLUDE_DFU_INTERFACE
#include <libopencm3/stm32/scb.h>
#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/dfu.h>
#endif

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
void clock_setup(void)
{

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/timer.h>
// #define COMPARE

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/systick.h>
#include <libopencm3/stm32/can.h>

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/timer.h>
// #define COMPARE

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/systick.h>

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
void clock_setup(void)
@ -47,7 +47,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_RE_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 230400);
usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX);

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/nvic.h>
@ -52,7 +52,7 @@ void usart_setup(void)
GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RE_RX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 230400);
usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_parity(USART1, USART_PARITY_NONE);

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,11 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/f1/adc.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/adc.h>
void usart_setup(void)
{
@ -34,7 +34,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 115200);
usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX_RX);

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,11 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/f1/dma.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/dma.h>
void usart_setup(void)
{
@ -34,7 +34,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 115200);
usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX_RX);

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -21,7 +21,7 @@
#define DOGM128_H
#include <libopencm3/cm3/common.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/spi.h>
/* PB10 GPIO - ~RESET

View File

@ -17,9 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/nvic.h>

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,9 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/i2c.h>
#include "stts75.h"
@ -35,7 +35,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 115200);
usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX_RX);

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,10 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/f1/rtc.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/rtc.h>
#include <libopencm3/stm32/pwr.h>
#include <libopencm3/stm32/nvic.h>
@ -43,7 +43,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 38400);
usart_set_baudrate(USART1, 38400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX);

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,9 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/systick.h>

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,9 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/nvic.h>

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,8 +18,8 @@
*/
#include <stdlib.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/cdc.h>

View File

@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,10 +18,10 @@
*/
#include <string.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/scb.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/dfu.h>

View File

@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,8 +18,8 @@
*/
#include <stdlib.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/systick.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/hid.h>
@ -28,7 +28,7 @@
#define INCLUDE_DFU_INTERFACE
#ifdef INCLUDE_DFU_INTERFACE
#include <libopencm3/stm32/scb.h>
#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/dfu.h>
#endif

View File

@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
u16 exti_line_state;

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
/* Set STM32 to 24 MHz. */
void clock_setup(void)

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
void gpio_setup(void)
{

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,10 +18,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/f1/rtc.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/rtc.h>
#include <libopencm3/stm32/pwr.h>
#include <libopencm3/stm32/nvic.h>

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
void clock_setup(void)

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/exti.h>
u16 exti_line_state;

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/exti.h>
u16 exti_line_state;

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/exti.h>
#define FALLING 0

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -26,8 +26,8 @@
#include <stdlib.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#define SPI_BANK GPIOB
#define SCLK_PIN GPIO13

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
void gpio_setup(void)
{

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,10 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/exti.h>
#define FALLING 0

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/spi.h>
void clock_setup(void)

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,10 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/exti.h>
u16 frequency_sequence[18] = {

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/dbgmcu.h>
#include <libopencm3/cm3/scs.h>

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
void clock_setup(void)
@ -40,7 +40,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 38400);
usart_set_baudrate(USART1, 38400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX);
@ -55,7 +55,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART2_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART2, 38400);
usart_set_baudrate(USART2, 38400, rcc_ppre1_frequency);
usart_set_databits(USART2, 8);
usart_set_stopbits(USART2, USART_STOPBITS_1);
usart_set_mode(USART2, USART_MODE_TX);
@ -70,7 +70,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART3_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART3, 38400);
usart_set_baudrate(USART3, 38400, rcc_ppre1_frequency);
usart_set_databits(USART3, 8);
usart_set_stopbits(USART3, USART_STOPBITS_1);
usart_set_mode(USART3, USART_MODE_TX);

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/nvic.h>
@ -49,7 +49,7 @@ void usart_setup(void)
GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 230400);
usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_parity(USART1, USART_PARITY_NONE);

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/nvic.h>
#include <libopencm3/stm32/systick.h>
@ -145,7 +145,7 @@ void usart_setup(void)
GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 230400);
usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_parity(USART1, USART_PARITY_NONE);

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/nvic.h>
@ -46,7 +46,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 230400);
usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_parity(USART1, USART_PARITY_NONE);

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,8 +18,8 @@
*/
#include <stdlib.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/cdc.h>

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,10 +18,10 @@
*/
#include <string.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/scb.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/dfu.h>

View File

@ -25,5 +25,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,8 +18,8 @@
*/
#include <stdlib.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/systick.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/hid.h>
@ -28,7 +28,7 @@
#define INCLUDE_DFU_INTERFACE
#ifdef INCLUDE_DFU_INTERFACE
#include <libopencm3/stm32/scb.h>
#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/dfu.h>
#endif

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,10 +18,10 @@
*/
#include <string.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/scb.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/scb.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/dfu.h>

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
/* Set STM32 to 72 MHz. */
void clock_setup(void)

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/usb/usbd.h>

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f1.ld

View File

@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
INCLUDE libopencm3_stm32.ld
INCLUDE libopencm3_stm32f2.ld