platforms/f3: moved the linker script and fixed the build system

We need build the right libopencm3 library which is not done by default, so this adds an extra build step for it
This commit is contained in:
dragonmux 2022-06-08 04:58:42 -04:00 committed by Piotr Esden-Tempski
parent ef5cfd829f
commit 1a316c5a2f
2 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,7 @@ CFLAGS += -Istm32/include -mcpu=cortex-m4 -mthumb \
-DDFU_SERIAL_LENGTH=13 -Iplatforms/stm32
LDFLAGS = --specs=nano.specs -lopencm3_stm32f3 \
-Wl,-T,platforms/f3-if/stm32f303xc.ld -nostartfiles -lc -lnosys \
-Wl,-T,platforms/stm32/stm32f303xc.ld -nostartfiles -lc -lnosys \
-Wl,-Map=mapfile -mthumb -mcpu=cortex-m4 -Wl,-gc-sections \
-mfloat-abi=hard -mfpu=fpv4-sp-d16 \
-L../libopencm3/lib
@ -24,6 +24,12 @@ SRC += cdcacm.c \
timing_stm32.c \
all: blackmagic.bin
blackmagic.elf: libopencm3_stm32f3
libopencm3_stm32f3:
$(Q)$(MAKE) $(MFLAGS) -C ../libopencm3 lib/stm32/f3
host_clean:
-$(Q)$(RM) blackmagic.bin
.PHONY: libopencm3_stm32f3