aboutsummaryrefslogtreecommitdiff
path: root/driver_fw/Makefile
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2019-03-05 23:18:42 +0900
committerjaseg <git@jaseg.net>2019-03-05 23:18:42 +0900
commit010d5587b776030690a2ab25902fe9eff52fcf5b (patch)
treef420ed88efddc9aeb9aaf667bcbc5ecc8681d872 /driver_fw/Makefile
parentebd4feee2cebf77225834f97cebeddd1e8d2ffd1 (diff)
download8seg-010d5587b776030690a2ab25902fe9eff52fcf5b.tar.gz
8seg-010d5587b776030690a2ab25902fe9eff52fcf5b.tar.bz2
8seg-010d5587b776030690a2ab25902fe9eff52fcf5b.zip
driver/fw: USART if working
Diffstat (limited to 'driver_fw/Makefile')
-rw-r--r--driver_fw/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/driver_fw/Makefile b/driver_fw/Makefile
index b38bcd3..749ec51 100644
--- a/driver_fw/Makefile
+++ b/driver_fw/Makefile
@@ -3,6 +3,8 @@ CMSIS_PATH ?= $(CUBE_PATH)/Drivers/CMSIS
CMSIS_DEV_PATH ?= $(CMSIS_PATH)/Device/ST/STM32F0xx
HAL_PATH ?= $(CUBE_PATH)/Drivers/STM32F0xx_HAL_Driver
+MAC_ADDR ?= 0xdeadbeef
+
CC := arm-none-eabi-gcc
LD := arm-none-eabi-ld
OBJCOPY := arm-none-eabi-objcopy
@@ -22,7 +24,7 @@ LIBS = -lgcc
# Technically we're using an STM32F030F4, but apart from the TSSOP20 package that one is largely identical to the
# STM32F030*6 and there is no separate device header provided for it, so we're faking a *6 device here. This is
# even documented in stm32f0xx.h. Thanks ST!
-CFLAGS += -DSTM32F030x6 -DHSE_VALUE=8000000
+CFLAGS += -DSTM32F030x6 -DHSE_VALUE=8000000 -DMAC_ADDR=$(MAC_ADDR)
LDFLAGS += -Tstm32_flash.ld
CFLAGS += -I$(CMSIS_DEV_PATH)/Include -I$(CMSIS_PATH)/Include -I$(HAL_PATH)/Inc -Iconfig -I../common
@@ -48,7 +50,7 @@ cmsis_exports.c: $(CMSIS_DEV_PATH)/Include/stm32f030x6.h $(CMSIS_PATH)/Include/c
%.dot: %.elf
r2 -a arm -qc 'aa;agC' $< 2>/dev/null >$@
-main.elf: main.o startup_stm32f030x6.o system_stm32f0xx.o $(HAL_PATH)/Src/stm32f0xx_ll_utils.o cmsis_exports.o ../common/8b10b.o
+main.elf: main.o startup_stm32f030x6.o system_stm32f0xx.o $(HAL_PATH)/Src/stm32f0xx_ll_utils.o cmsis_exports.o ../common/8b10b.o serial.o mac.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
$(OBJCOPY) -O ihex $@ $(@:.elf=.hex)
$(OBJCOPY) -O binary $@ $(@:.elf=.bin)