From bfd8db0098413474514eab4dfebeb0803ad94fc4 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 30 Aug 2020 12:17:33 +0200 Subject: Dimming works --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4cf97a7..b56e124 100644 --- a/Makefile +++ b/Makefile @@ -33,8 +33,7 @@ LDFLAGS = -nostdlib #LDFLAGS += -specs=rdimon.specs -DSEMIHOSTING LDFLAGS += -Wl,-Map=main.map #LDFLAGS += -Wl,--gc-sections -LIBS = -#LIBS = -lgcc +LIBS = -lm -lgcc #LIBS += -lrdimon CFLAGS += -DSTM32F103xB -DHSE_VALUE=8000000 -DLSE_VALUE=32768 @@ -42,7 +41,7 @@ CFLAGS += -DCOMPILE_TIME=$(shell date +%s) -DTARGET_DATE=$(shell date -d 'Aug 17 LDFLAGS += -Tstm32_flash.ld CFLAGS += -I$(CMSIS_DEV_PATH)/Include -I$(CMSIS_PATH)/Include -I$(HAL_PATH)/Inc -Iconfig -Wno-unused -I../common -#LDFLAGS += -L$(CMSIS_PATH)/Lib/GCC -larm_cortexM3l_math +LIBS += -L$(CMSIS_PATH)/Lib/GCC -larm_cortexM3l_math ################################################### @@ -61,7 +60,7 @@ cmsis_exports.c: $(CMSIS_DEV_PATH)/Include/stm32f103xb.h $(CMSIS_PATH)/Include/c $(CC) -c $(CFLAGS) -o $@ $^ # $(CC) -E $(CFLAGS) -o $(@:.o=.pp) $^ -sources.tar.xz: main.c Makefile +sources.tar.xz: main.c color.c Makefile tar -caf $@ $^ # don't ask... @@ -71,7 +70,7 @@ sources.tar.xz.zip: sources.tar.xz sources.c: sources.tar.xz.zip xxd -i $< | head -n -1 | sed 's/=/__attribute__((section(".source_tarball"))) =/' > $@ -main.elf: main.c startup_stm32f103xb.s system_stm32f1xx.c $(HAL_PATH)/Src/stm32f1xx_ll_utils.c base.c cmsis_exports.c +main.elf: main.c color.c startup_stm32f103xb.s system_stm32f1xx.c $(HAL_PATH)/Src/stm32f1xx_ll_utils.c base.c cmsis_exports.c $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(OBJCOPY) -O ihex $@ $(@:.elf=.hex) $(OBJCOPY) -O binary $@ $(@:.elf=.bin) -- cgit