mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-12 19:10:32 +03:00
Merge branch 'make_uf2_support' into RP2350
This commit is contained in:
commit
fb09d6b5d5
4 changed files with 107 additions and 32 deletions
94
Makefile
94
Makefile
|
@ -57,7 +57,11 @@ CFLAGS_DISABLED :=
|
||||||
FORKNAME = betaflight
|
FORKNAME = betaflight
|
||||||
|
|
||||||
# Working directories
|
# Working directories
|
||||||
|
# ROOT_DIR is the full path to the directory containing this Makefile
|
||||||
|
ROOT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||||
|
# ROOT is the relative path to the directory containing this Makefile
|
||||||
ROOT := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
|
ROOT := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
|
||||||
|
|
||||||
PLATFORM_DIR := $(ROOT)/src/platform
|
PLATFORM_DIR := $(ROOT)/src/platform
|
||||||
SRC_DIR := $(ROOT)/src/main
|
SRC_DIR := $(ROOT)/src/main
|
||||||
LIB_MAIN_DIR := $(ROOT)/lib/main
|
LIB_MAIN_DIR := $(ROOT)/lib/main
|
||||||
|
@ -90,12 +94,16 @@ MAKE_PARALLEL = $(if $(filter -j%, $(MAKEFLAGS)),$(EMPTY),-j$(DEFAULT_PAR
|
||||||
# pre-build sanity checks
|
# pre-build sanity checks
|
||||||
include $(MAKE_SCRIPT_DIR)/checks.mk
|
include $(MAKE_SCRIPT_DIR)/checks.mk
|
||||||
|
|
||||||
# list of targets that are executed on host (using exe as goal)
|
|
||||||
EXE_TARGETS := SITL
|
|
||||||
|
|
||||||
# basic target list
|
# basic target list
|
||||||
PLATFORMS := $(sort $(notdir $(patsubst /%,%, $(wildcard $(PLATFORM_DIR)/*))))
|
PLATFORMS := $(sort $(notdir $(patsubst /%,%, $(wildcard $(PLATFORM_DIR)/*))))
|
||||||
BASE_TARGETS := $(filter-out $(EXE_TARGETS),$(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(PLATFORM_DIR)/*/target/*/target.mk))))))
|
BASE_TARGETS := $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(PLATFORM_DIR)/*/target/*/target.mk)))))
|
||||||
|
|
||||||
|
# list of targets that are executed on host - using exe as goal recipe
|
||||||
|
EXE_TARGETS := $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(PLATFORM_DIR)/*/target/*/.exe)))))
|
||||||
|
# list of targets using uf2 as goal recipe
|
||||||
|
UF2_TARGETS := $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(PLATFORM_DIR)/*/target/*/.uf2)))))
|
||||||
|
# list of targets using hex as goal recipe (default)
|
||||||
|
HEX_TARGETS := $(filter-out $(EXE_TARGETS) $(UF2_TARGETS),$(BASE_TARGETS))
|
||||||
|
|
||||||
# configure some directories that are relative to wherever ROOT_DIR is located
|
# configure some directories that are relative to wherever ROOT_DIR is located
|
||||||
TOOLS_DIR ?= $(ROOT)/tools
|
TOOLS_DIR ?= $(ROOT)/tools
|
||||||
|
@ -134,7 +142,7 @@ HSE_VALUE ?= 8000000
|
||||||
|
|
||||||
CI_EXCLUDED_TARGETS := $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(PLATFORM_DIR)/*/target/*/.exclude)))))
|
CI_EXCLUDED_TARGETS := $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(PLATFORM_DIR)/*/target/*/.exclude)))))
|
||||||
CI_COMMON_TARGETS := STM32F4DISCOVERY CRAZYBEEF4SX1280 CRAZYBEEF4FR MATEKF405TE AIRBOTG4AIO TBS_LUCID_FC IFLIGHT_BLITZ_F722 NUCLEOF446 SPRACINGH7EXTREME SPRACINGH7RF
|
CI_COMMON_TARGETS := STM32F4DISCOVERY CRAZYBEEF4SX1280 CRAZYBEEF4FR MATEKF405TE AIRBOTG4AIO TBS_LUCID_FC IFLIGHT_BLITZ_F722 NUCLEOF446 SPRACINGH7EXTREME SPRACINGH7RF
|
||||||
CI_TARGETS := $(filter-out $(CI_EXCLUDED_TARGETS), $(BASE_TARGETS) $(EXE_TARGETS)) $(filter $(CI_COMMON_TARGETS), $(BASE_CONFIGS))
|
CI_TARGETS := $(filter-out $(CI_EXCLUDED_TARGETS), $(BASE_TARGETS) $(filter $(CI_COMMON_TARGETS), $(BASE_CONFIGS)))
|
||||||
PREVIEW_TARGETS := MATEKF411 AIKONF4V2 AIRBOTG4AIO ZEEZF7V3 FOXEERF745V4_AIO KAKUTEH7 TBS_LUCID_FC SITL SPRACINGH7EXTREME SPRACINGH7RF
|
PREVIEW_TARGETS := MATEKF411 AIKONF4V2 AIRBOTG4AIO ZEEZF7V3 FOXEERF745V4_AIO KAKUTEH7 TBS_LUCID_FC SITL SPRACINGH7EXTREME SPRACINGH7RF
|
||||||
|
|
||||||
TARGET_PLATFORM := $(notdir $(patsubst %/,%,$(subst target/$(TARGET)/,, $(dir $(wildcard $(PLATFORM_DIR)/*/target/$(TARGET)/target.mk)))))
|
TARGET_PLATFORM := $(notdir $(patsubst %/,%,$(subst target/$(TARGET)/,, $(dir $(wildcard $(PLATFORM_DIR)/*/target/$(TARGET)/target.mk)))))
|
||||||
|
@ -227,17 +235,15 @@ endif # TARGET specified
|
||||||
# openocd specific includes
|
# openocd specific includes
|
||||||
include $(MAKE_SCRIPT_DIR)/openocd.mk
|
include $(MAKE_SCRIPT_DIR)/openocd.mk
|
||||||
|
|
||||||
ifeq ($(CONFIG),)
|
ifeq ($(CONFIG)$(TARGET),)
|
||||||
ifeq ($(TARGET),)
|
|
||||||
.DEFAULT_GOAL := all
|
.DEFAULT_GOAL := all
|
||||||
else ifneq ($(filter $(TARGET),$(EXE_TARGETS)),)
|
else ifneq ($(filter $(TARGET),$(EXE_TARGETS)),)
|
||||||
.DEFAULT_GOAL := exe
|
.DEFAULT_GOAL := exe
|
||||||
|
else ifneq ($(filter $(TARGET),$(UF2_TARGETS)),)
|
||||||
|
.DEFAULT_GOAL := uf2
|
||||||
else
|
else
|
||||||
.DEFAULT_GOAL := hex
|
.DEFAULT_GOAL := hex
|
||||||
endif
|
endif
|
||||||
else # ifeq ($(CONFIG),)
|
|
||||||
.DEFAULT_GOAL := hex
|
|
||||||
endif
|
|
||||||
|
|
||||||
INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
||||||
$(ROOT)/lib/main/MAVLink
|
$(ROOT)/lib/main/MAVLink
|
||||||
|
@ -378,21 +384,22 @@ TARGET_FULLNAME = $(FORKNAME)_$(FC_VER)_$(TARGET_NAME)
|
||||||
#
|
#
|
||||||
# Things we will build
|
# Things we will build
|
||||||
#
|
#
|
||||||
TARGET_BIN = $(BIN_DIR)/$(TARGET_FULLNAME).bin
|
TARGET_BIN := $(BIN_DIR)/$(TARGET_FULLNAME).bin
|
||||||
TARGET_HEX = $(BIN_DIR)/$(TARGET_FULLNAME).hex
|
TARGET_HEX := $(BIN_DIR)/$(TARGET_FULLNAME).hex
|
||||||
TARGET_EXE = $(BIN_DIR)/$(TARGET_FULLNAME)
|
TARGET_UF2 := $(BIN_DIR)/$(TARGET_FULLNAME).uf2
|
||||||
TARGET_DFU = $(BIN_DIR)/$(TARGET_FULLNAME).dfu
|
TARGET_EXE := $(BIN_DIR)/$(TARGET_FULLNAME)
|
||||||
TARGET_ZIP = $(BIN_DIR)/$(TARGET_FULLNAME).zip
|
TARGET_DFU := $(BIN_DIR)/$(TARGET_FULLNAME).dfu
|
||||||
TARGET_OBJ_DIR = $(OBJECT_DIR)/$(TARGET_NAME)
|
TARGET_ZIP := $(BIN_DIR)/$(TARGET_FULLNAME).zip
|
||||||
TARGET_ELF = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME).elf
|
TARGET_OBJ_DIR := $(OBJECT_DIR)/$(TARGET_NAME)
|
||||||
TARGET_EXST_ELF = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME)_EXST.elf
|
TARGET_ELF := $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME).elf
|
||||||
TARGET_UNPATCHED_BIN = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME)_UNPATCHED.bin
|
TARGET_EXST_ELF := $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME)_EXST.elf
|
||||||
TARGET_LST = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME).lst
|
TARGET_UNPATCHED_BIN := $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME)_UNPATCHED.bin
|
||||||
TARGET_OBJS = $(addsuffix .o,$(addprefix $(TARGET_OBJ_DIR)/,$(basename $(SRC))))
|
TARGET_LST := $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME).lst
|
||||||
TARGET_DEPS = $(addsuffix .d,$(addprefix $(TARGET_OBJ_DIR)/,$(basename $(SRC))))
|
TARGET_OBJS := $(addsuffix .o,$(addprefix $(TARGET_OBJ_DIR)/,$(basename $(SRC))))
|
||||||
TARGET_MAP = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME).map
|
TARGET_DEPS := $(addsuffix .d,$(addprefix $(TARGET_OBJ_DIR)/,$(basename $(SRC))))
|
||||||
|
TARGET_MAP := $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME).map
|
||||||
|
|
||||||
TARGET_EXST_HASH_SECTION_FILE = $(TARGET_OBJ_DIR)/exst_hash_section.bin
|
TARGET_EXST_HASH_SECTION_FILE := $(TARGET_OBJ_DIR)/exst_hash_section.bin
|
||||||
|
|
||||||
ifeq ($(DEBUG_MIXED),yes)
|
ifeq ($(DEBUG_MIXED),yes)
|
||||||
TARGET_EF_HASH := $(shell echo -n -- "$(EXTRA_FLAGS)" "$(OPTIONS)" "$(DEVICE_FLAGS)" "$(TARGET_FLAGS)" | openssl dgst -md5 -r | awk '{print $$1;}')
|
TARGET_EF_HASH := $(shell echo -n -- "$(EXTRA_FLAGS)" "$(OPTIONS)" "$(DEVICE_FLAGS)" "$(TARGET_FLAGS)" | openssl dgst -md5 -r | awk '{print $$1;}')
|
||||||
|
@ -426,6 +433,10 @@ $(TARGET_HEX): $(TARGET_ELF)
|
||||||
@echo "Creating HEX $(TARGET_HEX)" "$(STDOUT)"
|
@echo "Creating HEX $(TARGET_HEX)" "$(STDOUT)"
|
||||||
$(V1) $(OBJCOPY) -O ihex --set-start 0x8000000 $< $@
|
$(V1) $(OBJCOPY) -O ihex --set-start 0x8000000 $< $@
|
||||||
|
|
||||||
|
$(TARGET_UF2): $(TARGET_ELF)
|
||||||
|
@echo "Creating UF2 $(TARGET_UF2)" "$(STDOUT)"
|
||||||
|
$(V1) $(PICOTOOL) uf2 convert $< $@ || { echo "Failed to convert ELF to UF2 format"; exit 1; }
|
||||||
|
|
||||||
$(TARGET_DFU): $(TARGET_HEX)
|
$(TARGET_DFU): $(TARGET_HEX)
|
||||||
@echo "Creating DFU $(TARGET_DFU)" "$(STDOUT)"
|
@echo "Creating DFU $(TARGET_DFU)" "$(STDOUT)"
|
||||||
$(V1) $(PYTHON) $(DFUSE-PACK) -i $< $@
|
$(V1) $(PYTHON) $(DFUSE-PACK) -i $< $@
|
||||||
|
@ -539,17 +550,22 @@ $(TARGET_OBJ_DIR)/%.o: %.S
|
||||||
## all : Build all currently built targets
|
## all : Build all currently built targets
|
||||||
all: $(CI_TARGETS)
|
all: $(CI_TARGETS)
|
||||||
|
|
||||||
$(BASE_TARGETS):
|
$(HEX_TARGETS):
|
||||||
$(V0) @echo "Building target $@" && \
|
$(V0) @echo "Building hex target $@" && \
|
||||||
$(MAKE) hex TARGET=$@ && \
|
$(MAKE) hex TARGET=$@ && \
|
||||||
echo "Building $@ succeeded."
|
echo "Building $@ succeeded."
|
||||||
|
|
||||||
|
$(UF2_TARGETS):
|
||||||
|
$(V0) @echo "Building uf2 target $@" && \
|
||||||
|
$(MAKE) uf2 TARGET=$@ && \
|
||||||
|
echo "Building $@ succeeded."
|
||||||
|
|
||||||
$(EXE_TARGETS):
|
$(EXE_TARGETS):
|
||||||
$(V0) @echo "Building executable target $@" && \
|
$(V0) @echo "Building executable target $@" && \
|
||||||
$(MAKE) exe TARGET=$@ && \
|
$(MAKE) exe TARGET=$@ && \
|
||||||
echo "Building $@ succeeded."
|
echo "Building $@ succeeded."
|
||||||
|
|
||||||
TARGETS_CLEAN = $(addsuffix _clean,$(BASE_TARGETS) $(EXE_TARGETS))
|
TARGETS_CLEAN = $(addsuffix _clean,$(HEX_TARGETS) $(UF2_TARGETS) $(EXE_TARGETS))
|
||||||
|
|
||||||
CONFIGS_CLEAN = $(addsuffix _clean,$(BASE_CONFIGS))
|
CONFIGS_CLEAN = $(addsuffix _clean,$(BASE_CONFIGS))
|
||||||
|
|
||||||
|
@ -584,7 +600,7 @@ preview: $(PREVIEW_TARGETS) test
|
||||||
## all_configs : Build all configs
|
## all_configs : Build all configs
|
||||||
all_configs: $(BASE_CONFIGS)
|
all_configs: $(BASE_CONFIGS)
|
||||||
|
|
||||||
TARGETS_FLASH = $(addsuffix _flash,$(BASE_TARGETS))
|
TARGETS_FLASH = $(addsuffix _flash,$(HEX_TARGETS))
|
||||||
|
|
||||||
## <TARGET>_flash : build and flash a target
|
## <TARGET>_flash : build and flash a target
|
||||||
$(TARGETS_FLASH):
|
$(TARGETS_FLASH):
|
||||||
|
@ -622,26 +638,33 @@ openocd-gdb: $(TARGET_ELF)
|
||||||
$(V0) $(OPENOCD_COMMAND) & $(CROSS_GDB) $(TARGET_ELF) -ex "target remote localhost:3333" -ex "load"
|
$(V0) $(OPENOCD_COMMAND) & $(CROSS_GDB) $(TARGET_ELF) -ex "target remote localhost:3333" -ex "load"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TARGETS_ZIP = $(addsuffix _zip,$(BASE_TARGETS))
|
TARGETS_ZIP = $(addsuffix _zip,$(HEX_TARGETS))
|
||||||
|
|
||||||
## <TARGET>_zip : build target and zip it (useful for posting to GitHub)
|
## <TARGET>_zip : build target and zip it (useful for posting to GitHub)
|
||||||
$(TARGETS_ZIP):
|
$(TARGETS_ZIP):
|
||||||
$(V0) $(MAKE) hex TARGET=$(subst _zip,,$@)
|
$(V0) $(MAKE) hex TARGET=$(subst _zip,,$@)
|
||||||
$(V0) $(MAKE) zip TARGET=$(subst _zip,,$@)
|
$(V0) $(MAKE) zip TARGET=$(subst _zip,,$@)
|
||||||
|
|
||||||
|
.PHONY: zip
|
||||||
zip:
|
zip:
|
||||||
$(V0) zip $(TARGET_ZIP) $(TARGET_HEX)
|
$(V0) zip $(TARGET_ZIP) $(TARGET_HEX)
|
||||||
|
|
||||||
|
.PHONY: binary
|
||||||
binary:
|
binary:
|
||||||
$(V0) $(MAKE) $(MAKE_PARALLEL) $(TARGET_BIN)
|
$(V0) $(MAKE) $(MAKE_PARALLEL) $(TARGET_BIN)
|
||||||
|
|
||||||
|
.PHONY: hex
|
||||||
hex:
|
hex:
|
||||||
$(V0) $(MAKE) $(MAKE_PARALLEL) $(TARGET_HEX)
|
$(V0) $(MAKE) $(MAKE_PARALLEL) $(TARGET_HEX)
|
||||||
|
|
||||||
.phony: exe
|
.PHONY: uf2
|
||||||
|
uf2:
|
||||||
|
$(V0) $(MAKE) $(MAKE_PARALLEL) $(TARGET_UF2)
|
||||||
|
|
||||||
|
.PHONY: exe
|
||||||
exe: $(TARGET_EXE)
|
exe: $(TARGET_EXE)
|
||||||
|
|
||||||
TARGETS_REVISION = $(addsuffix _rev,$(BASE_TARGETS))
|
TARGETS_REVISION = $(addsuffix _rev,$(HEX_TARGETS))
|
||||||
## <TARGET>_rev : build target and add revision to filename
|
## <TARGET>_rev : build target and add revision to filename
|
||||||
$(TARGETS_REVISION):
|
$(TARGETS_REVISION):
|
||||||
$(V0) $(MAKE) hex REV=yes TARGET=$(subst _rev,,$@)
|
$(V0) $(MAKE) hex REV=yes TARGET=$(subst _rev,,$@)
|
||||||
|
@ -675,6 +698,12 @@ $(DIRECTORIES):
|
||||||
version:
|
version:
|
||||||
@echo $(FC_VER)
|
@echo $(FC_VER)
|
||||||
|
|
||||||
|
.PHONY: submodules
|
||||||
|
submodules:
|
||||||
|
@echo "Updating submodules"
|
||||||
|
$(V1) git submodule update --init --recursive || { echo "Failed to update submodules"; exit 1; }
|
||||||
|
@echo "Submodules updated"
|
||||||
|
|
||||||
## help : print this help message and exit
|
## help : print this help message and exit
|
||||||
help: Makefile mk/tools.mk
|
help: Makefile mk/tools.mk
|
||||||
@echo ""
|
@echo ""
|
||||||
|
@ -690,7 +719,7 @@ help: Makefile mk/tools.mk
|
||||||
@echo "To populate configuration targets:"
|
@echo "To populate configuration targets:"
|
||||||
@echo " make configs"
|
@echo " make configs"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Valid TARGET values are: $(EXE_TARGETS) $(BASE_TARGETS)"
|
@echo "Valid TARGET values are: $(BASE_TARGETS)"
|
||||||
@echo ""
|
@echo ""
|
||||||
@sed -n 's/^## //p' $?
|
@sed -n 's/^## //p' $?
|
||||||
|
|
||||||
|
@ -699,6 +728,7 @@ targets:
|
||||||
@echo "Platforms: $(PLATFORMS)"
|
@echo "Platforms: $(PLATFORMS)"
|
||||||
@echo "Valid targets: $(BASE_TARGETS)"
|
@echo "Valid targets: $(BASE_TARGETS)"
|
||||||
@echo "Executable targets: $(EXE_TARGETS)"
|
@echo "Executable targets: $(EXE_TARGETS)"
|
||||||
|
@echo "UF2 targets: $(UF2_TARGETS)"
|
||||||
@echo "Built targets: $(CI_TARGETS)"
|
@echo "Built targets: $(CI_TARGETS)"
|
||||||
@echo "Default target: $(TARGET)"
|
@echo "Default target: $(TARGET)"
|
||||||
@echo "CI common targets: $(CI_COMMON_TARGETS)"
|
@echo "CI common targets: $(CI_COMMON_TARGETS)"
|
||||||
|
|
45
mk/tools.mk
45
mk/tools.mk
|
@ -331,3 +331,48 @@ breakpad_clean:
|
||||||
$(V1) [ ! -d "$(BREAKPAD_DIR)" ] || $(RM) -rf $(BREAKPAD_DIR)
|
$(V1) [ ! -d "$(BREAKPAD_DIR)" ] || $(RM) -rf $(BREAKPAD_DIR)
|
||||||
@echo " CLEAN $(BREAKPAD_DL_FILE)"
|
@echo " CLEAN $(BREAKPAD_DL_FILE)"
|
||||||
$(V1) $(RM) -f $(BREAKPAD_DL_FILE)
|
$(V1) $(RM) -f $(BREAKPAD_DL_FILE)
|
||||||
|
|
||||||
|
# Raspberry Pi Pico tools
|
||||||
|
PICOTOOL_REPO := https://github.com/raspberrypi/picotool.git
|
||||||
|
PICOTOOL_DL_DIR := $(DL_DIR)/picotool
|
||||||
|
PICOTOOL_BUILD_DIR := $(PICOTOOL_DL_DIR)/build
|
||||||
|
PICOTOOL_DIR := $(TOOLS_DIR)/picotool
|
||||||
|
PICO_SDK_PATH ?= $(ROOT_DIR)/lib/main/pico-sdk
|
||||||
|
PICOTOOL ?= $(PICOTOOL_DIR)/picotool
|
||||||
|
|
||||||
|
ifeq ($(filter picotool_install,$(MAKECMDGOALS)), picotool_install)
|
||||||
|
ifneq ($(wildcard $(PICO_SDK_PATH)/CMakeLists.txt),$(PICO_SDK_PATH)/CMakeLists.txt)
|
||||||
|
$(error "PICO_SDK_PATH ($(PICO_SDK_PATH)) does not point to a valid Pico SDK. Please 'make submodules' to hydrate the Pico SDK.")
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(filter uf2,$(MAKECMDGOALS)), uf2)
|
||||||
|
ifeq (,$(wildcard $(PICOTOOL)))
|
||||||
|
ifeq (,$(shell which picotool 2>/dev/null))
|
||||||
|
$(error "picotool not in the PATH or setup in tools. Run 'make picotool_install' to install in the tools folder.")
|
||||||
|
else
|
||||||
|
PICOTOOL := picotool
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: picotool_install
|
||||||
|
picotool_install: | $(DL_DIR) $(TOOLS_DIR)
|
||||||
|
picotool_install: picotool_clean
|
||||||
|
@echo "\n CLONE $(PICOTOOL_REPO)"
|
||||||
|
$(V1) git clone --depth 1 $(PICOTOOL_REPO) "$(PICOTOOL_DL_DIR)" || { echo "Failed to clone picotool repository"; exit 1; }
|
||||||
|
@echo "\n BUILD $(PICOTOOL_BUILD_DIR)"
|
||||||
|
$(V1) [ -d "$(PICOTOOL_DIR)" ] || mkdir -p $(PICOTOOL_DIR)
|
||||||
|
$(V1) [ -d "$(PICOTOOL_BUILD_DIR)" ] || mkdir -p $(PICOTOOL_BUILD_DIR)
|
||||||
|
$(V1) cmake -S $(PICOTOOL_DL_DIR) -B $(PICOTOOL_BUILD_DIR) -D PICO_SDK_PATH=$(PICO_SDK_PATH) || { echo "CMake configuration failed"; exit 1; }
|
||||||
|
$(V1) $(MAKE) -C $(PICOTOOL_BUILD_DIR) || { echo "picotool build failed"; exit 1; }
|
||||||
|
$(V1) cp $(PICOTOOL_BUILD_DIR)/picotool $(PICOTOOL_DIR)/picotool || { echo "Failed to install picotool binary"; exit 1; }
|
||||||
|
@echo "\n VERSION:"
|
||||||
|
$(V1) $(PICOTOOL_DIR)/picotool version
|
||||||
|
|
||||||
|
.PHONY: picotool_clean
|
||||||
|
picotool_clean:
|
||||||
|
@echo " CLEAN $(PICOTOOL_DIR)"
|
||||||
|
$(V1) [ ! -d "$(PICOTOOL_DIR)" ] || $(RM) -rf $(PICOTOOL_DIR)
|
||||||
|
@echo " CLEAN $(PICOTOOL_DL_DIR)"
|
||||||
|
$(V1) [ ! -d "$(PICOTOOL_DL_DIR)" ] || $(RM) -rf $(PICOTOOL_DL_DIR)
|
||||||
|
|
0
src/platform/PICO/target/RP2350/.uf2
Normal file
0
src/platform/PICO/target/RP2350/.uf2
Normal file
0
src/platform/SIMULATOR/target/SITL/.exe
Normal file
0
src/platform/SIMULATOR/target/SITL/.exe
Normal file
Loading…
Add table
Add a link
Reference in a new issue