mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Merge pull request #11689 from blckmn/hash_option
This commit is contained in:
commit
cc2da54d58
2 changed files with 13 additions and 9 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
||||||
run: make arm_sdk_install
|
run: make arm_sdk_install
|
||||||
|
|
||||||
- name: Execute Build
|
- name: Execute Build
|
||||||
run: make all RELEASE=${{ inputs.release_build && 'yes' || 'no' }}
|
run: make all
|
||||||
|
|
||||||
- name: Publish build artifacts
|
- name: Publish build artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|
20
Makefile
20
Makefile
|
@ -49,9 +49,6 @@ SERIAL_DEVICE ?= $(firstword $(wildcard /dev/ttyACM*) $(firstword $(wildcard /
|
||||||
# Flash size (KB). Some low-end chips actually have more flash than advertised, use this to override.
|
# Flash size (KB). Some low-end chips actually have more flash than advertised, use this to override.
|
||||||
FLASH_SIZE ?=
|
FLASH_SIZE ?=
|
||||||
|
|
||||||
# Release file naming (no revision to be present if this is 'yes')
|
|
||||||
RELEASE ?= no
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Things that need to be maintained as the source changes
|
# Things that need to be maintained as the source changes
|
||||||
#
|
#
|
||||||
|
@ -306,17 +303,14 @@ CPPCHECK = cppcheck $(CSOURCES) --enable=all --platform=unix64 \
|
||||||
$(addprefix -I,$(INCLUDE_DIRS)) \
|
$(addprefix -I,$(INCLUDE_DIRS)) \
|
||||||
-I/usr/include -I/usr/include/linux
|
-I/usr/include -I/usr/include/linux
|
||||||
|
|
||||||
ifeq ($(RELEASE),yes)
|
|
||||||
TARGET_BASENAME = $(BIN_DIR)/$(FORKNAME)_$(FC_VER)_$(TARGET)
|
TARGET_BASENAME = $(BIN_DIR)/$(FORKNAME)_$(FC_VER)_$(TARGET)
|
||||||
else
|
|
||||||
TARGET_BASENAME = $(BIN_DIR)/$(FORKNAME)_$(FC_VER)_$(TARGET)_$(REVISION)
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Things we will build
|
# Things we will build
|
||||||
#
|
#
|
||||||
TARGET_BIN = $(TARGET_BASENAME).bin
|
TARGET_BIN = $(TARGET_BASENAME).bin
|
||||||
TARGET_HEX = $(TARGET_BASENAME).hex
|
TARGET_HEX = $(TARGET_BASENAME).hex
|
||||||
|
TARGET_HEX_REV = $(TARGET_BASENAME)_$(REVISION).hex
|
||||||
TARGET_DFU = $(TARGET_BASENAME).dfu
|
TARGET_DFU = $(TARGET_BASENAME).dfu
|
||||||
TARGET_ZIP = $(TARGET_BASENAME).zip
|
TARGET_ZIP = $(TARGET_BASENAME).zip
|
||||||
TARGET_ELF = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET).elf
|
TARGET_ELF = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET).elf
|
||||||
|
@ -330,7 +324,7 @@ TARGET_MAP = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET).map
|
||||||
TARGET_EXST_HASH_SECTION_FILE = $(OBJECT_DIR)/$(TARGET)/exst_hash_section.bin
|
TARGET_EXST_HASH_SECTION_FILE = $(OBJECT_DIR)/$(TARGET)/exst_hash_section.bin
|
||||||
|
|
||||||
CLEAN_ARTIFACTS := $(TARGET_BIN)
|
CLEAN_ARTIFACTS := $(TARGET_BIN)
|
||||||
CLEAN_ARTIFACTS += $(TARGET_HEX)
|
CLEAN_ARTIFACTS += $(TARGET_HEX_REV) $(TARGET_HEX)
|
||||||
CLEAN_ARTIFACTS += $(TARGET_ELF) $(TARGET_OBJS) $(TARGET_MAP)
|
CLEAN_ARTIFACTS += $(TARGET_ELF) $(TARGET_OBJS) $(TARGET_MAP)
|
||||||
CLEAN_ARTIFACTS += $(TARGET_LST)
|
CLEAN_ARTIFACTS += $(TARGET_LST)
|
||||||
CLEAN_ARTIFACTS += $(TARGET_DFU)
|
CLEAN_ARTIFACTS += $(TARGET_DFU)
|
||||||
|
@ -574,6 +568,16 @@ binary:
|
||||||
hex:
|
hex:
|
||||||
$(V0) $(MAKE) -j $(TARGET_HEX)
|
$(V0) $(MAKE) -j $(TARGET_HEX)
|
||||||
|
|
||||||
|
TARGETS_REVISION = $(addsuffix _rev,$(VALID_TARGETS))
|
||||||
|
## <TARGET>_rev : build target and add revision to filename
|
||||||
|
$(TARGETS_REVISION):
|
||||||
|
$(V0) $(MAKE) hex_rev TARGET=$(subst _rev,,$@)
|
||||||
|
|
||||||
|
hex_rev: hex
|
||||||
|
$(V0) mv -f $(TARGET_HEX) $(TARGET_HEX_REV)
|
||||||
|
|
||||||
|
all_rev: $(addsuffix _rev,$(CI_TARGETS))
|
||||||
|
|
||||||
unbrick_$(TARGET): $(TARGET_HEX)
|
unbrick_$(TARGET): $(TARGET_HEX)
|
||||||
$(V0) stty -F $(SERIAL_DEVICE) raw speed 115200 -crtscts cs8 -parenb -cstopb -ixon
|
$(V0) stty -F $(SERIAL_DEVICE) raw speed 115200 -crtscts cs8 -parenb -cstopb -ixon
|
||||||
$(V0) stm32flash -w $(TARGET_HEX) -v -g 0x0 -b 115200 $(SERIAL_DEVICE)
|
$(V0) stm32flash -w $(TARGET_HEX) -v -g 0x0 -b 115200 $(SERIAL_DEVICE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue