forked from flipperdevices/flipperzero-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into release-candidate
- Loading branch information
Showing
302 changed files
with
47,946 additions
and
49,990 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
* text=auto | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
PROJECT_ROOT := $(abspath $(dir $(abspath $(firstword $(MAKEFILE_LIST))))) | ||
COPRO_DIR := $(PROJECT_ROOT)/lib/STM32CubeWB/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x | ||
|
||
NPROCS := 1 | ||
OS := $(shell uname -s) | ||
|
||
ifeq ($(OS), Linux) | ||
NPROCS := $(shell grep -c ^processor /proc/cpuinfo) | ||
else ifeq ($(OS), Darwin) | ||
NPROCS := $(shell sysctl -n hw.ncpu) | ||
endif | ||
|
||
.PHONY: all | ||
all: bootloader_all firmware_all | ||
|
||
.PHONY: whole | ||
whole: flash_radio bootloader_flash firmware_flash | ||
|
||
.PHONY: clean | ||
clean: bootloader_clean firmware_clean | ||
|
||
.PHONY: flash | ||
flash: bootloader_flash firmware_flash | ||
|
||
.PHONY: debug | ||
debug: | ||
$(MAKE) -C firmware -j$(NPROCS) debug | ||
|
||
.PHONY: wipe | ||
wipe: | ||
$(PROJECT_ROOT)/scripts/flash.py wipe | ||
$(PROJECT_ROOT)/scripts/ob.py set | ||
|
||
.PHONY: bootloader_all | ||
bootloader_all: | ||
$(MAKE) -C $(PROJECT_ROOT)/bootloader -j$(NPROCS) all | ||
|
||
.PHONY: firmware_all | ||
firmware_all: | ||
$(MAKE) -C $(PROJECT_ROOT)/firmware -j$(NPROCS) all | ||
|
||
.PHONY: bootloader_clean | ||
bootloader_clean: | ||
$(MAKE) -C $(PROJECT_ROOT)/bootloader -j$(NPROCS) clean | ||
|
||
.PHONY: firmware_clean | ||
firmware_clean: | ||
$(MAKE) -C $(PROJECT_ROOT)/firmware -j$(NPROCS) clean | ||
|
||
.PHONY: bootloader_flash | ||
bootloader_flash: | ||
rm $(PROJECT_ROOT)/bootloader/.obj/f*/flash || true | ||
$(MAKE) -C $(PROJECT_ROOT)/bootloader -j$(NPROCS) flash | ||
|
||
.PHONY: firmware_flash | ||
firmware_flash: | ||
rm $(PROJECT_ROOT)/firmware/.obj/f*/flash || true | ||
$(MAKE) -C $(PROJECT_ROOT)/firmware -j$(NPROCS) flash | ||
|
||
.PHONY: flash_radio | ||
flash_radio: | ||
$(PROJECT_ROOT)/scripts/flash.py core2radio 0x080CA000 $(COPRO_DIR)/stm32wb5x_BLE_Stack_full_fw.bin | ||
$(PROJECT_ROOT)/scripts/ob.py set | ||
|
||
.PHONY: flash_radio_fus | ||
flash_radio_fus: | ||
@echo | ||
@echo "================ DON'T DO IT ================" | ||
@echo "= Flashing FUS is going to erase secure enclave =" | ||
@echo "= You will loose ability to use encrypted assets =" | ||
@echo "= type 'find / -exec rm -rf {} \;' =" | ||
@echo "= In case if you still want to continue =" | ||
@echo "================ JUST DON'T ================" | ||
@echo | ||
|
||
.PHONY: | ||
flash_radio_fus_please_i_m_not_going_to_complain: | ||
$(PROJECT_ROOT)/scripts/flash.py core2fus 0x080EC000 --statement=AGREE_TO_LOOSE_FLIPPER_FEATURES_THAT_USES_CRYPTO_ENCLAVE $(COPRO_DIR)/stm32wb5x_FUS_fw_for_fus_0_5_3.bin | ||
$(PROJECT_ROOT)/scripts/flash.py core2fus 0x080EC000 --statement=AGREE_TO_LOOSE_FLIPPER_FEATURES_THAT_USES_CRYPTO_ENCLAVE $(COPRO_DIR)/stm32wb5x_FUS_fw.bin | ||
$(PROJECT_ROOT)/scripts/ob.py set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.