Fix stm32f1 filenames and path
This commit is contained in:
parent
878c094871
commit
8ceeb99902
|
@ -25,12 +25,12 @@ LD = $(PREFIX)-gcc
|
||||||
OBJCOPY = $(PREFIX)-objcopy
|
OBJCOPY = $(PREFIX)-objcopy
|
||||||
OBJDUMP = $(PREFIX)-objdump
|
OBJDUMP = $(PREFIX)-objdump
|
||||||
# Uncomment this line if you want to use the installed (not local) library.
|
# Uncomment this line if you want to use the installed (not local) library.
|
||||||
TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
|
#TOOLCHAIN_DIR := $(shell 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 \
|
||||||
-fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD
|
-fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F1
|
||||||
LDSCRIPT = $(BINARY).ld
|
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 \
|
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
|
||||||
-mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float
|
-mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float
|
||||||
OBJS += $(BINARY).o
|
OBJS += $(BINARY).o
|
||||||
|
@ -75,13 +75,13 @@ flash: $(BINARY).flash
|
||||||
@#printf " OBJDUMP $(*).list\n"
|
@#printf " OBJDUMP $(*).list\n"
|
||||||
$(Q)$(OBJDUMP) -S $(*).elf > $(*).list
|
$(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"
|
@#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"
|
@#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
|
%.o: %.c Makefile
|
||||||
@#printf " CC $(subst $(shell pwd)/,,$(@))\n"
|
@#printf " CC $(subst $(shell pwd)/,,$(@))\n"
|
||||||
|
|
|
@ -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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/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 libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/scb.h>
|
#include <libopencm3/stm32/f1/scb.h>
|
||||||
#include <libopencm3/usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <libopencm3/usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
|
|
||||||
|
|
|
@ -25,5 +25,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
#include <libopencm3/stm32/otg_fs.h>
|
#include <libopencm3/stm32/otg_fs.h>
|
||||||
#include <libopencm3/usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
#define INCLUDE_DFU_INTERFACE
|
#define INCLUDE_DFU_INTERFACE
|
||||||
|
|
||||||
#ifdef INCLUDE_DFU_INTERFACE
|
#ifdef INCLUDE_DFU_INTERFACE
|
||||||
#include <libopencm3/stm32/scb.h>
|
#include <libopencm3/stm32/f1/scb.h>
|
||||||
#include <libopencm3/usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/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 libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/timer.h>
|
#include <libopencm3/stm32/timer.h>
|
||||||
|
|
||||||
// #define COMPARE
|
// #define COMPARE
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <libopencm3/stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
#include <libopencm3/stm32/can.h>
|
#include <libopencm3/stm32/can.h>
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/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 libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/timer.h>
|
#include <libopencm3/stm32/timer.h>
|
||||||
|
|
||||||
// #define COMPARE
|
// #define COMPARE
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <libopencm3/stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
|
|
||||||
void clock_setup(void)
|
void clock_setup(void)
|
||||||
|
@ -47,7 +47,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_RE_TX);
|
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_RE_TX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART1, 230400);
|
usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
|
||||||
usart_set_databits(USART1, 8);
|
usart_set_databits(USART1, 8);
|
||||||
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
||||||
usart_set_mode(USART1, USART_MODE_TX);
|
usart_set_mode(USART1, USART_MODE_TX);
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RE_RX);
|
GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RE_RX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART1, 230400);
|
usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
|
||||||
usart_set_databits(USART1, 8);
|
usart_set_databits(USART1, 8);
|
||||||
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
||||||
usart_set_parity(USART1, USART_PARITY_NONE);
|
usart_set_parity(USART1, USART_PARITY_NONE);
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
|
#include <libopencm3/stm32/f1/adc.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/stm32/adc.h>
|
|
||||||
|
|
||||||
void usart_setup(void)
|
void usart_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART1, 115200);
|
usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
|
||||||
usart_set_databits(USART1, 8);
|
usart_set_databits(USART1, 8);
|
||||||
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
||||||
usart_set_mode(USART1, USART_MODE_TX_RX);
|
usart_set_mode(USART1, USART_MODE_TX_RX);
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
|
#include <libopencm3/stm32/f1/dma.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/stm32/dma.h>
|
|
||||||
|
|
||||||
void usart_setup(void)
|
void usart_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART1, 115200);
|
usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
|
||||||
usart_set_databits(USART1, 8);
|
usart_set_databits(USART1, 8);
|
||||||
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
||||||
usart_set_mode(USART1, USART_MODE_TX_RX);
|
usart_set_mode(USART1, USART_MODE_TX_RX);
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define DOGM128_H
|
#define DOGM128_H
|
||||||
|
|
||||||
#include <libopencm3/cm3/common.h>
|
#include <libopencm3/cm3/common.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/spi.h>
|
#include <libopencm3/stm32/spi.h>
|
||||||
|
|
||||||
/* PB10 GPIO - ~RESET
|
/* PB10 GPIO - ~RESET
|
||||||
|
|
|
@ -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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/stm32/timer.h>
|
#include <libopencm3/stm32/timer.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/stm32/i2c.h>
|
#include <libopencm3/stm32/i2c.h>
|
||||||
#include "stts75.h"
|
#include "stts75.h"
|
||||||
|
@ -35,7 +35,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART1, 115200);
|
usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
|
||||||
usart_set_databits(USART1, 8);
|
usart_set_databits(USART1, 8);
|
||||||
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
||||||
usart_set_mode(USART1, USART_MODE_TX_RX);
|
usart_set_mode(USART1, USART_MODE_TX_RX);
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
|
#include <libopencm3/stm32/f1/rtc.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/stm32/rtc.h>
|
|
||||||
#include <libopencm3/stm32/pwr.h>
|
#include <libopencm3/stm32/pwr.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART1, 38400);
|
usart_set_baudrate(USART1, 38400, rcc_ppre2_frequency);
|
||||||
usart_set_databits(USART1, 8);
|
usart_set_databits(USART1, 8);
|
||||||
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
||||||
usart_set_mode(USART1, USART_MODE_TX);
|
usart_set_mode(USART1, USART_MODE_TX);
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <libopencm3/stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/timer.h>
|
#include <libopencm3/stm32/timer.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <libopencm3/usb/cdc.h>
|
#include <libopencm3/usb/cdc.h>
|
||||||
|
|
||||||
|
|
|
@ -25,5 +25,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/scb.h>
|
#include <libopencm3/stm32/f1/scb.h>
|
||||||
#include <libopencm3/usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <libopencm3/usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
|
|
||||||
|
|
|
@ -25,5 +25,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
#include <libopencm3/usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <libopencm3/usb/hid.h>
|
#include <libopencm3/usb/hid.h>
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
#define INCLUDE_DFU_INTERFACE
|
#define INCLUDE_DFU_INTERFACE
|
||||||
|
|
||||||
#ifdef INCLUDE_DFU_INTERFACE
|
#ifdef INCLUDE_DFU_INTERFACE
|
||||||
#include <libopencm3/stm32/scb.h>
|
#include <libopencm3/stm32/f1/scb.h>
|
||||||
#include <libopencm3/usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -25,5 +25,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
|
|
||||||
u16 exti_line_state;
|
u16 exti_line_state;
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
|
|
||||||
/* Set STM32 to 24 MHz. */
|
/* Set STM32 to 24 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 libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/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 libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
|
#include <libopencm3/stm32/f1/rtc.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/stm32/rtc.h>
|
|
||||||
#include <libopencm3/stm32/pwr.h>
|
#include <libopencm3/stm32/pwr.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/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 libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,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 <libopencm3/stm32/f1/rcc.h>
|
||||||
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
|
||||||
#include <libopencm3/stm32/gpio.h>
|
|
||||||
#include <libopencm3/stm32/exti.h>
|
#include <libopencm3/stm32/exti.h>
|
||||||
|
|
||||||
u16 exti_line_state;
|
u16 exti_line_state;
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,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 <libopencm3/stm32/f1/rcc.h>
|
||||||
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
|
||||||
#include <libopencm3/stm32/gpio.h>
|
|
||||||
#include <libopencm3/stm32/exti.h>
|
#include <libopencm3/stm32/exti.h>
|
||||||
|
|
||||||
u16 exti_line_state;
|
u16 exti_line_state;
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,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 <libopencm3/stm32/f1/rcc.h>
|
||||||
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
|
||||||
#include <libopencm3/stm32/gpio.h>
|
|
||||||
#include <libopencm3/stm32/exti.h>
|
#include <libopencm3/stm32/exti.h>
|
||||||
|
|
||||||
#define FALLING 0
|
#define FALLING 0
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/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 libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
|
|
||||||
#define SPI_BANK GPIOB
|
#define SPI_BANK GPIOB
|
||||||
#define SCLK_PIN GPIO13
|
#define SCLK_PIN GPIO13
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/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 libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
|
||||||
#include <libopencm3/stm32/timer.h>
|
#include <libopencm3/stm32/timer.h>
|
||||||
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <libopencm3/stm32/exti.h>
|
#include <libopencm3/stm32/exti.h>
|
||||||
|
|
||||||
#define FALLING 0
|
#define FALLING 0
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/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 libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
|
||||||
#include <libopencm3/stm32/timer.h>
|
#include <libopencm3/stm32/timer.h>
|
||||||
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <libopencm3/stm32/exti.h>
|
#include <libopencm3/stm32/exti.h>
|
||||||
|
|
||||||
u16 frequency_sequence[18] = {
|
u16 frequency_sequence[18] = {
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
|
|
||||||
#include <libopencm3/stm32/dbgmcu.h>
|
#include <libopencm3/stm32/dbgmcu.h>
|
||||||
#include <libopencm3/cm3/scs.h>
|
#include <libopencm3/cm3/scs.h>
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
|
|
||||||
void clock_setup(void)
|
void clock_setup(void)
|
||||||
|
@ -40,7 +40,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART1, 38400);
|
usart_set_baudrate(USART1, 38400, rcc_ppre2_frequency);
|
||||||
usart_set_databits(USART1, 8);
|
usart_set_databits(USART1, 8);
|
||||||
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
||||||
usart_set_mode(USART1, USART_MODE_TX);
|
usart_set_mode(USART1, USART_MODE_TX);
|
||||||
|
@ -55,7 +55,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART2_TX);
|
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART2_TX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART2, 38400);
|
usart_set_baudrate(USART2, 38400, rcc_ppre1_frequency);
|
||||||
usart_set_databits(USART2, 8);
|
usart_set_databits(USART2, 8);
|
||||||
usart_set_stopbits(USART2, USART_STOPBITS_1);
|
usart_set_stopbits(USART2, USART_STOPBITS_1);
|
||||||
usart_set_mode(USART2, USART_MODE_TX);
|
usart_set_mode(USART2, USART_MODE_TX);
|
||||||
|
@ -70,7 +70,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART3_TX);
|
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART3_TX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART3, 38400);
|
usart_set_baudrate(USART3, 38400, rcc_ppre1_frequency);
|
||||||
usart_set_databits(USART3, 8);
|
usart_set_databits(USART3, 8);
|
||||||
usart_set_stopbits(USART3, USART_STOPBITS_1);
|
usart_set_stopbits(USART3, USART_STOPBITS_1);
|
||||||
usart_set_mode(USART3, USART_MODE_TX);
|
usart_set_mode(USART3, USART_MODE_TX);
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RX);
|
GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART1, 230400);
|
usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
|
||||||
usart_set_databits(USART1, 8);
|
usart_set_databits(USART1, 8);
|
||||||
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
||||||
usart_set_parity(USART1, USART_PARITY_NONE);
|
usart_set_parity(USART1, USART_PARITY_NONE);
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
#include <libopencm3/stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
|
@ -145,7 +145,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RX);
|
GPIO_CNF_INPUT_FLOAT, GPIO_USART1_RX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART1, 230400);
|
usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
|
||||||
usart_set_databits(USART1, 8);
|
usart_set_databits(USART1, 8);
|
||||||
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
||||||
usart_set_parity(USART1, USART_PARITY_NONE);
|
usart_set_parity(USART1, USART_PARITY_NONE);
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/stm32/nvic.h>
|
#include <libopencm3/stm32/nvic.h>
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ void usart_setup(void)
|
||||||
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
|
||||||
|
|
||||||
/* Setup UART parameters. */
|
/* Setup UART parameters. */
|
||||||
usart_set_baudrate(USART1, 230400);
|
usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
|
||||||
usart_set_databits(USART1, 8);
|
usart_set_databits(USART1, 8);
|
||||||
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
usart_set_stopbits(USART1, USART_STOPBITS_1);
|
||||||
usart_set_parity(USART1, USART_PARITY_NONE);
|
usart_set_parity(USART1, USART_PARITY_NONE);
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <libopencm3/usb/cdc.h>
|
#include <libopencm3/usb/cdc.h>
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/scb.h>
|
#include <libopencm3/stm32/f1/scb.h>
|
||||||
#include <libopencm3/usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <libopencm3/usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
|
|
||||||
|
|
|
@ -25,5 +25,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/systick.h>
|
#include <libopencm3/stm32/systick.h>
|
||||||
#include <libopencm3/usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <libopencm3/usb/hid.h>
|
#include <libopencm3/usb/hid.h>
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
#define INCLUDE_DFU_INTERFACE
|
#define INCLUDE_DFU_INTERFACE
|
||||||
|
|
||||||
#ifdef INCLUDE_DFU_INTERFACE
|
#ifdef INCLUDE_DFU_INTERFACE
|
||||||
#include <libopencm3/stm32/scb.h>
|
#include <libopencm3/stm32/f1/scb.h>
|
||||||
#include <libopencm3/usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
#include <libopencm3/stm32/flash.h>
|
#include <libopencm3/stm32/f1/flash.h>
|
||||||
#include <libopencm3/stm32/scb.h>
|
#include <libopencm3/stm32/f1/scb.h>
|
||||||
#include <libopencm3/usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <libopencm3/usb/dfu.h>
|
#include <libopencm3/usb/dfu.h>
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/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 libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.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 <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/f1/rcc.h>
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/f1/gpio.h>
|
||||||
|
|
||||||
#include <libopencm3/usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32.ld
|
INCLUDE libopencm3_stm32f2.ld
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue