Dimming works
This commit is contained in:
parent
e51d35f6d6
commit
bfd8db0098
4 changed files with 158 additions and 27 deletions
9
Makefile
9
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue