aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-07-21 20:29:14 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-07-21 22:40:56 -0400
commit893acdb56bddbe8c24b51050187325f71e439798 (patch)
tree705cd4b3422c83967a8e0b4533aee21b32ea3b3d /src
parent17bd595b155304e9f1defa480f5eb7d8c060d9d6 (diff)
downloadkutter-893acdb56bddbe8c24b51050187325f71e439798.tar.gz
kutter-893acdb56bddbe8c24b51050187325f71e439798.tar.xz
kutter-893acdb56bddbe8c24b51050187325f71e439798.zip
lib: Update stm32f1 code to version 1.8.0
Update the stm32f1 code to the latest from ST. Merge the lib/cmsis-stm32f1/ and lib/hal-stm32f1/ into a single lib/stm32f1/ directory. Document all the differences from the pristine upstream code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r--src/stm32f1/Makefile11
-rw-r--r--src/stm32f1/stm32f1.ld6
2 files changed, 6 insertions, 11 deletions
diff --git a/src/stm32f1/Makefile b/src/stm32f1/Makefile
index 3d92b6df..2b00b5f0 100644
--- a/src/stm32f1/Makefile
+++ b/src/stm32f1/Makefile
@@ -4,21 +4,20 @@
CROSS_PREFIX=arm-none-eabi-
dirs-y += src/stm32f1 src/generic
-dirs-y += lib/cmsis-stm32f1/source
-dirs-y += lib/hal-stm32f1/source
+dirs-y += lib/stm32f1 lib/stm32f1/gcc lib/stm32f1/hal/source
CFLAGS += -mthumb -mcpu=cortex-m3
CFLAGS += -Ilib/cmsis-core
-CFLAGS += -Ilib/cmsis-stm32f1/include -Ilib/hal-stm32f1/include
+CFLAGS += -Ilib/stm32f1/include -Ilib/stm32f1/hal/include
CFLAGS += -DSTM32F103xB
# Add source files
src-y += stm32f1/main.c stm32f1/gpio.c
src-$(CONFIG_HAVE_GPIO_ADC) += stm32f1/adc.c
src-$(CONFIG_HAVE_GPIO_SPI) += stm32f1/spi.c
-src-y += $(addprefix ../, $(wildcard lib/hal-stm32f1/source/stm32f1xx_ll_*.c))
+src-y += $(addprefix ../, $(wildcard lib/stm32f1/hal/source/stm32f1xx_ll_*.c))
src-y += generic/crc16_ccitt.c generic/armcm_irq.c generic/armcm_timer.c
-src-y += ../lib/cmsis-stm32f1/source/system_stm32f1xx.c
+src-y += ../lib/stm32f1/system_stm32f1xx.c
src-$(CONFIG_USBSERIAL) += stm32f1/usbserial.c generic/usb_cdc.c
src-$(CONFIG_SERIAL) += stm32f1/serial.c generic/serial_irq.c
@@ -27,7 +26,7 @@ $(OUT)%.o: %.s $(OUT)autoconf.h $(OUT)board-link
@echo " Assembling $@"
$(Q)$(AS) $< -o $@
-asmsrc-y = ../lib/cmsis-stm32f1/source/startup_stm32f103xb.s
+asmsrc-y = ../lib/stm32f1/gcc/startup_stm32f103xb.s
OBJS_klipper.elf += $(patsubst %.s, $(OUT)src/%.o,$(asmsrc-y))
# Build the linker script
diff --git a/src/stm32f1/stm32f1.ld b/src/stm32f1/stm32f1.ld
index e13d7c46..f8735437 100644
--- a/src/stm32f1/stm32f1.ld
+++ b/src/stm32f1/stm32f1.ld
@@ -1,8 +1,4 @@
-/* Cortex-M linker script
-
- This file is taken from lib/cmsis-stm32f1/source/stm32f1.ld . It
- has been modified to support a bootloader offset.
-*/
+/* Cortex-M linker script */
ENTRY(Reset_Handler)