Updated to build with new libopenstm32 with f1/f2 split.
This commit is contained in:
parent
bd779aa618
commit
d85a399559
|
@ -1,9 +1,9 @@
|
|||
CROSS_COMPILE ?= arm-cortexm3-eabi-
|
||||
CROSS_COMPILE ?= arm-none-eabi-
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
|
||||
CFLAGS += -Istm32/include -mcpu=cortex-m3 -mthumb -msoft-float
|
||||
LDFLAGS_BOOT = -lopencm3_stm32 -Wl,--defsym,_stack=0x20005000 \
|
||||
CFLAGS += -Istm32/include -mcpu=cortex-m3 -mthumb -msoft-float -DSTM32F1
|
||||
LDFLAGS_BOOT = -lopencm3_stm32f1 -Wl,--defsym,_stack=0x20005000 \
|
||||
-Wl,-T,stm32/blackmagic.ld -nostartfiles -lc -lnosys -Wl,-Map=mapfile \
|
||||
-mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float
|
||||
LDFLAGS = $(LDFLAGS_BOOT) -Wl,-Ttext=0x8002000
|
||||
|
|
|
@ -25,5 +25,5 @@ MEMORY
|
|||
}
|
||||
|
||||
/* Include the common ld script from libopenstm32. */
|
||||
INCLUDE libopencm3_stm32.ld
|
||||
INCLUDE libopencm3_stm32f1.ld
|
||||
|
||||
|
|
|
@ -26,11 +26,12 @@
|
|||
* The device's unique id is used as the USB serial number string.
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/f1/rcc.h>
|
||||
#include <libopencm3/stm32/nvic.h>
|
||||
#include <libopencm3/stm32/gpio.h>
|
||||
#include <libopencm3/stm32/f1/gpio.h>
|
||||
#include <libopencm3/usb/usbd.h>
|
||||
#include <libopencm3/usb/cdc.h>
|
||||
#include <libopencm3/stm32/scb.h>
|
||||
#include <libopencm3/stm32/f1/scb.h>
|
||||
#include <libopencm3/usb/dfu.h>
|
||||
#include <libopencm3/stm32/usart.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -359,7 +360,8 @@ static int cdcacm_control_request(struct usb_setup_data *req, uint8_t **buf,
|
|||
return 0;
|
||||
|
||||
struct usb_cdc_line_coding *coding = (void*)*buf;
|
||||
usart_set_baudrate(USART1, coding->dwDTERate);
|
||||
usart_set_baudrate(USART1, coding->dwDTERate,
|
||||
rcc_ppre2_frequency);
|
||||
usart_set_databits(USART1, coding->bDataBits);
|
||||
switch(coding->bCharFormat) {
|
||||
case 0:
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/* This file implements the low-level JTAG TAP interface. */
|
||||
|
||||
#include <libopencm3/stm32/gpio.h>
|
||||
#include <libopencm3/stm32/f1/gpio.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "general.h"
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
* implementation.
|
||||
*/
|
||||
|
||||
#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/scb.h>
|
||||
#include <libopencm3/stm32/f1/scb.h>
|
||||
#include <libopencm3/stm32/nvic.h>
|
||||
#include <libopencm3/stm32/usart.h>
|
||||
|
||||
|
@ -201,7 +201,7 @@ void uart_init(void)
|
|||
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO9);
|
||||
|
||||
/* 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_RX);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef __PLATFORM_H
|
||||
#define __PLATFORM_H
|
||||
|
||||
#include <libopencm3/stm32/gpio.h>
|
||||
#include <libopencm3/stm32/f1/gpio.h>
|
||||
|
||||
#include <setjmp.h>
|
||||
#include <alloca.h>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/* This file implements the low-level SW-DP interface. */
|
||||
|
||||
#include <libopencm3/stm32/gpio.h>
|
||||
#include <libopencm3/stm32/f1/gpio.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "general.h"
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
|
||||
#include <string.h>
|
||||
#include <libopencm3/stm32/systick.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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue