add initial stm32 project
This commit is contained in:
parent
60cf251dcb
commit
8247927af7
7 changed files with 100 additions and 3 deletions
3
peripherals/cc48x6/firmware/.gitignore
vendored
Normal file
3
peripherals/cc48x6/firmware/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
build/
|
||||
compile_commands.json
|
||||
.idea/
|
|
@ -96,6 +96,8 @@ SZ = $(PREFIX)size
|
|||
endif
|
||||
HEX = $(CP) -O ihex
|
||||
BIN = $(CP) -O binary -S
|
||||
|
||||
VERSIONCMD = ../../../firmware/build_version_object.sh
|
||||
|
||||
#######################################
|
||||
# CFLAGS
|
||||
|
@ -179,8 +181,13 @@ $(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
|
|||
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
|
||||
$(AS) -c $(CFLAGS) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
|
||||
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile $(VERSIONCMD)
|
||||
$(V)mkdir -p $(dir $@)
|
||||
$(V)$(eval VERSION_OBJECT = $(shell mktemp /tmp/fiatlux_version_object.XXXXXX.o))
|
||||
$(V)$(VERSIONCMD) $(notdir $@) $(VERSION_OBJECT) $(CC) $(CPPFLAGS) $(CXXFLAGS)
|
||||
@echo link $@
|
||||
$(V)$(CC) $(OBJECTS) $(VERSION_OBJECT) $(LDFLAGS) -o $@
|
||||
$(V)rm $(VERSION_OBJECT)
|
||||
$(SZ) $@
|
||||
|
||||
$(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
|
||||
|
@ -203,4 +210,4 @@ clean:
|
|||
#######################################
|
||||
-include $(wildcard $(BUILD_DIR)/*.d)
|
||||
|
||||
# *** EOF ***
|
||||
# *** EOF ***
|
Loading…
Add table
Add a link
Reference in a new issue