1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00

Update ARM SDK (#12286)

* Update ARM SDK
* Add ARM_SDK_BASE_DIR
* Update ARM SDK to latest 13.2.Rel1
This commit is contained in:
Mark Haslinghuis 2024-05-30 05:06:42 +02:00 committed by GitHub
parent 6ba4944a9f
commit 1074950e42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 18 deletions

View file

@ -150,7 +150,7 @@ else
ifeq ($(DEBUG),INFO) ifeq ($(DEBUG),INFO)
DEBUG_FLAGS = -ggdb2 DEBUG_FLAGS = -ggdb2
endif endif
OPTIMISATION_BASE := -flto -fuse-linker-plugin -ffast-math -fmerge-all-constants OPTIMISATION_BASE := -flto=auto -fuse-linker-plugin -ffast-math -fmerge-all-constants
OPTIMISE_DEFAULT := -O2 OPTIMISE_DEFAULT := -O2
OPTIMISE_SPEED := -Ofast OPTIMISE_SPEED := -Ofast
OPTIMISE_SIZE := -Os OPTIMISE_SIZE := -Os

View file

@ -2,10 +2,11 @@
# #
# Installers for tools # Installers for tools
# #
# NOTE: These are not tied to the default goals # NOTE: These are not tied to the default goals and must be invoked manually
# and must be invoked manually
# #
# ARM SDK Version: 10.3-2021.10 # ARM SDK Version: 13.2.Rel1
#
# Release date: October 30, 2023
# #
############################################################### ###############################################################
@ -16,36 +17,37 @@
############################## ##############################
# Set up ARM (STM32) SDK # Set up ARM (STM32) SDK
ARM_SDK_DIR ?= $(TOOLS_DIR)/gcc-arm-none-eabi-10.3-2021.10 ARM_SDK_BASE_DIR ?= $(TOOLS_DIR)/arm-gnu-toolchain-13.2.Rel1
# Checked below, Should match the output of $(shell arm-none-eabi-gcc -dumpversion) # Checked below, Should match the output of $(shell arm-none-eabi-gcc -dumpversion)
GCC_REQUIRED_VERSION ?= 10.3.1 GCC_REQUIRED_VERSION ?= 13.2.1
.PHONY: arm_sdk_version
arm_sdk_version:
$(V1) $(ARM_SDK_PREFIX)gcc --version
## arm_sdk_install : Install Arm SDK ## arm_sdk_install : Install Arm SDK
.PHONY: arm_sdk_install .PHONY: arm_sdk_install
ARM_SDK_URL_BASE := https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10 # source: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
# source: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
ifeq ($(OSFAMILY), linux) ifeq ($(OSFAMILY), linux)
ARM_SDK_URL := $(ARM_SDK_URL_BASE)-$(shell uname -m)-linux.tar.bz2 ARM_SDK_URL := https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz?rev=e434b9ea4afc4ed7998329566b764309&hash=CA590209F5774EE1C96E6450E14A3E26
ARM_SDK_DIR := $(ARM_SDK_BASE_DIR)-x86_64-arm-none-eabi
endif endif
ifeq ($(OSFAMILY), macosx) ifeq ($(OSFAMILY), macosx)
ARM_SDK_URL := $(ARM_SDK_URL_BASE)-mac.tar.bz2 ARM_SDK_URL := https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-x86_64-arm-none-eabi.tar.xz?rev=a3d8c87bb0af4c40b7d7e0e291f6541b&hash=D1BCDFFD19D3EE94A915B5347E3CDA5A
ARM_SDK_DIR := $(ARM_SDK_BASE_DIR)-darwin-x86_64-arm-none-eabi
endif endif
ifeq ($(OSFAMILY), windows) ifeq ($(OSFAMILY), windows)
ARM_SDK_URL := $(ARM_SDK_URL_BASE)-win32.zip ARM_SDK_URL := https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip?rev=93fda279901c4c0299e03e5c4899b51f&hash=99EF910A1409E119125AF8FED325CF79
endif endif
ARM_SDK_FILE := $(notdir $(ARM_SDK_URL)) ARM_SDK_FILE := $(notdir $(ARM_SDK_URL))
SDK_INSTALL_MARKER := $(ARM_SDK_DIR)/bin/arm-none-eabi-gcc-$(GCC_REQUIRED_VERSION) SDK_INSTALL_MARKER := $(ARM_SDK_DIR)/bin/arm-none-eabi-gcc-$(GCC_REQUIRED_VERSION)
.PHONY: arm_sdk_version
arm_sdk_version: | $(ARM_SDK_DIR)
$(V1) $(ARM_SDK_DIR)/bin/arm-none-eabi-gcc --version
# order-only prereq on directory existance: # order-only prereq on directory existance:
arm_sdk_install: | $(TOOLS_DIR) arm_sdk_install: | $(TOOLS_DIR)
arm_sdk_install: arm_sdk_download $(SDK_INSTALL_MARKER) arm_sdk_install: arm_sdk_download $(SDK_INSTALL_MARKER)
@ -53,7 +55,7 @@ arm_sdk_install: arm_sdk_download $(SDK_INSTALL_MARKER)
$(SDK_INSTALL_MARKER): $(SDK_INSTALL_MARKER):
ifneq ($(OSFAMILY), windows) ifneq ($(OSFAMILY), windows)
# binary only release so just extract it # binary only release so just extract it
$(V1) tar -C $(TOOLS_DIR) -xjf "$(DL_DIR)/$(ARM_SDK_FILE)" $(V1) tar -C $(TOOLS_DIR) -xf "$(DL_DIR)/$(ARM_SDK_FILE)"
else else
$(V1) unzip -q -d $(ARM_SDK_DIR) "$(DL_DIR)/$(ARM_SDK_FILE)" $(V1) unzip -q -d $(ARM_SDK_DIR) "$(DL_DIR)/$(ARM_SDK_FILE)"
endif endif

View file

@ -556,7 +556,7 @@ static void flashConfigurePartitions(void)
#endif #endif
} }
flashPartition_t *flashPartitionFindByType(uint8_t type) flashPartition_t *flashPartitionFindByType(flashPartitionType_e type)
{ {
for (int index = 0; index < FLASH_MAX_PARTITIONS; index++) { for (int index = 0; index < FLASH_MAX_PARTITIONS; index++) {
flashPartition_t *candidate = &flashPartitionTable.partitions[index]; flashPartition_t *candidate = &flashPartitionTable.partitions[index];