Merge branch 'master' of git.shimatta.de:mhu/stm32f746zg-template

This commit is contained in:
2022-08-01 23:51:32 +02:00
9 changed files with 44 additions and 9 deletions

View File

@@ -11,7 +11,7 @@ OBJDIR := obj
TARGET = project
LIBRARYPATH = -Lstartup -Ldsp
LIBRARIES = -larm_cortexM7lfsp_math
LIBRARIES = -larm_cortexM7lfsp_math -lm
DEFINES = -DSTM32F746xx -DSTM32F7XX -DARM_MATH_CM7
mapfile = memmap
@@ -45,10 +45,11 @@ DEPENDENCY_FILES = $(CFILES:%.c=$(OBJDIR)/%.c.d) $(ASFILES:%.S=$(OBJDIR)/%.S.d)
default: $(TARGET).elf
%.bin: %.elf
$(OBJCOPY) -O binary $^ $@
@echo [BIN] $@
@$(OBJCOPY) -O binary $^ $@
%.hex: %.elf
$(OBJCOPY) -O ihex $^ $@
@echo [HEX] $@
@$(OBJCOPY) -O ihex $^ $@
#Linking
$(TARGET).elf: $(OBJ) $(ASOBJ)
@@ -66,7 +67,9 @@ $(ASOBJ):
@mkdir -p $(@D)
@$(CC) $(CFLAGS) -MMD -MT $@ $(INCLUDEPATH) $(DEFINES) -o $@ -c $(@:$(OBJDIR)/%.S.o=%.S)
.PHONY: clean mrproper objcopy disassemble
.PHONY: clean mrproper objcopy disassemble binary
binary: $(TARGET).bin $(TARGET).hex
disassemble: $(TARGET).elf
$(OBJDUMP) -D -s $< > $(TARGET).lss