mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #2751 from openmv/update_toolchain
misc: Update GCC toolchain.
This commit is contained in:
commit
287e387122
4
.github/workflows/firmware.yml
vendored
4
.github/workflows/firmware.yml
vendored
@ -68,7 +68,7 @@ jobs:
|
||||
~/cache/llvm
|
||||
~/cache/make
|
||||
~/cache/stedgeai
|
||||
key: 'gcc-13.2.rel1_llvm-18.1.3_make-4.4.1_stedgeai-2.1'
|
||||
key: 'gcc-14.3.rel1_llvm-18.1.3_make-4.4.1_stedgeai-2.1'
|
||||
|
||||
- name: '🐍 Install Python'
|
||||
uses: actions/setup-python@v5
|
||||
@ -129,7 +129,7 @@ jobs:
|
||||
~/cache/llvm
|
||||
~/cache/make
|
||||
~/cache/stedgeai
|
||||
key: 'gcc-13.2.rel1_llvm-18.1.3_make-4.4.1_stedgeai-2.1'
|
||||
key: 'gcc-14.3.rel1_llvm-18.1.3_make-4.4.1_stedgeai-2.1'
|
||||
|
||||
- name: '🐍 Install Python'
|
||||
uses: actions/setup-python@v5
|
||||
|
||||
5
Makefile
5
Makefile
@ -127,9 +127,10 @@ MPY_MKARGS = PORT=$(PORT) BOARD=$(TARGET) DEBUG=$(DEBUG) MICROPY_MANIFEST_OMV_LI
|
||||
MICROPY_ROM_TEXT_COMPRESSION=$(ROM_TEXT_COMPRESSION) USER_C_MODULES=$(TOP_DIR)
|
||||
|
||||
|
||||
# Disable broken optimization for CM55.
|
||||
|
||||
# Check GCC toolchain version.
|
||||
ifeq ($(CPU),cortex-m55)
|
||||
CFLAGS += -fdisable-rtl-loop2_doloop
|
||||
include $(TOP_DIR)/common/check_toolchain.mk
|
||||
endif
|
||||
|
||||
# Configure additional built-in modules. Note must define both the CFLAGS and the Make command line args.
|
||||
|
||||
@ -49,8 +49,8 @@ endif
|
||||
# Include the port Makefile.
|
||||
include $(PORT_DIR)/$(PORT_LOWER)_port.mk
|
||||
|
||||
# Disable broken optimization for CM55.
|
||||
# Check GCC toolchain version.
|
||||
ifeq ($(CPU),cortex-m55)
|
||||
CFLAGS += -fdisable-rtl-loop2_doloop
|
||||
include $(TOP_DIR)/common/check_toolchain.mk
|
||||
endif
|
||||
|
||||
|
||||
17
common/check_toolchain.mk
Normal file
17
common/check_toolchain.mk
Normal file
@ -0,0 +1,17 @@
|
||||
ifeq ($(CPU),cortex-m55)
|
||||
# Check if GCC version is less than 14.3
|
||||
GCC_VERSION := $(shell arm-none-eabi-gcc -dumpversion | cut -d. -f1-2)
|
||||
GCC_MAJOR := $(shell echo $(GCC_VERSION) | cut -d. -f1)
|
||||
GCC_MINOR := $(shell echo $(GCC_VERSION) | cut -d. -f2)
|
||||
|
||||
# Convert to comparable number (14.3 becomes 1403)
|
||||
GCC_VERSION_NUM := $(shell echo $$(($(GCC_MAJOR) * 100 + $(GCC_MINOR))))
|
||||
|
||||
# Only add the flag if version < 14.3 (1403)
|
||||
ifeq ($(shell test $(GCC_VERSION_NUM) -lt 1403 && echo yes),yes)
|
||||
$(warning *** ERROR ***)
|
||||
$(warning GCC $(GCC_VERSION) has known issues with Cortex-M55)
|
||||
$(warning Upgrade to GCC 14.3+ for proper CM55 support)
|
||||
$(error )
|
||||
endif
|
||||
endif
|
||||
@ -10,7 +10,7 @@ RUN apt update && apt install -y \
|
||||
|
||||
# Download and extract GCC
|
||||
RUN mkdir -p /workspace/gcc
|
||||
ENV GCC_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"
|
||||
ENV GCC_URL="https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/binrel/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi.tar.xz"
|
||||
RUN wget --no-check-certificate -O - ${GCC_URL} | tar --strip-components=1 -Jx -C /workspace/gcc
|
||||
|
||||
# Download and extract LLVM
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
########################################################################################
|
||||
# Install ARM GCC.
|
||||
GCC_TOOLCHAIN_PATH=${HOME}/cache/gcc
|
||||
GCC_TOOLCHAIN_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"
|
||||
GCC_TOOLCHAIN_URL="https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/binrel/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi.tar.xz"
|
||||
|
||||
ci_install_arm_gcc() {
|
||||
mkdir -p ${GCC_TOOLCHAIN_PATH}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user