* gcc11

* Gcc 11 hw ci (#4754)

* hw ci -> gcc11

* setup script

* GCC 11.3 (#4757)

* setup_linux_environment.sh tar uses --auto-compress

* use ARM GCC 11.3

* gcc11 #4680

* update build-primary-bundle GCC to v11.3 (#4758)

* factor GCC toolchain provider (#4761)

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
Co-authored-by: Matthew Kennedy <matthewkennedy@outlook.com>
Co-authored-by: Nathan Schulte <8540239+nmschulte@users.noreply.github.com>
This commit is contained in:
rusefillc 2022-11-08 18:10:53 -05:00 committed by GitHub
parent 448d71a047
commit e3cfb5ce0b
5 changed files with 36 additions and 24 deletions

View File

@ -318,10 +318,9 @@ jobs:
if: ${{ env.skip != 'true' }} if: ${{ env.skip != 'true' }}
env: env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time run: |
wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2' -O compiler.tar.bz2 sh ./firmware/provide_gcc.sh
tar -xvf compiler.tar.bz2 echo "::add-path::`pwd`/gcc-arm-none-eabi/bin"
echo "`pwd`/gcc-arm-none-eabi-10.3-2021.10/bin" >> $GITHUB_PATH
# Make sure the compiler we just downloaded works - just print out the version # Make sure the compiler we just downloaded works - just print out the version
- name: Test Compiler - name: Test Compiler
@ -440,10 +439,9 @@ jobs:
- name: Download & Install GCC - name: Download & Install GCC
env: env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time run: |
wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2' -O compiler.tar.bz2 sh ./firmware/provide_gcc.sh
tar -xvf compiler.tar.bz2 echo "::add-path::`pwd`/gcc-arm-none-eabi/bin"
echo "::add-path::`pwd`/gcc-arm-none-eabi-10.3-2021.10/bin"
# Make sure the compiler we just downloaded works - just print out the version # Make sure the compiler we just downloaded works - just print out the version
- name: Test Compiler - name: Test Compiler

View File

@ -53,7 +53,7 @@ jobs:
run: ./gen_live_documentation.sh run: ./gen_live_documentation.sh
- name: Add compiler to PATH - name: Add compiler to PATH
run: echo "$HOME/.rusefi-tools/gcc-arm-none-eabi-10.3-2021.10/bin" >> $GITHUB_PATH run: echo "$HOME/.rusefi-tools/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi/bin" >> $GITHUB_PATH
# Make sure the compiler works # Make sure the compiler works
- name: Test/Identify Compiler - name: Test/Identify Compiler

View File

@ -10,9 +10,9 @@
#pragma message("GCC is " STR(__GNUC__)"."STR(__GNUC_MINOR__)"."STR(__GNUC_PATCHLEVEL__)) #pragma message("GCC is " STR(__GNUC__)"."STR(__GNUC_MINOR__)"."STR(__GNUC_PATCHLEVEL__))
// Firmware builds require at least GCC 10.3.1 // Firmware builds require at least GCC 11.3.1
#if (GCC_VERSION < 1031) #if (GCC_VERSION < 1131)
#error "GCC compiler >= 10.3.1 required" #error "GCC compiler >= 11.3.1 required"
#endif #endif
#endif #endif

21
firmware/provide_gcc.sh Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Download and extract GCC arm-none-eabi toolchain
URL="https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz"
ARCHIVE="${URL##*/}"
DIR="gcc-arm-none-eabi"
# Delete existing archive
rm -rf ${ARCHIVE}
# Download and extract archive
curl -L -o ${ARCHIVE} ${URL}
tar -xavf ${ARCHIVE}
# Create colloquially named link
ARCHIVE_DIR=$(tar --exclude="*/*" -tf ${ARCHIVE})
ln -s ${ARCHIVE_DIR%/} ${DIR}
# Delete downloaded archive
rm ${ARCHIVE}

View File

@ -22,18 +22,11 @@ rm -rf ~/.rusefi-tools
mkdir ~/.rusefi-tools mkdir ~/.rusefi-tools
cd ~/.rusefi-tools cd ~/.rusefi-tools
# in case not first execution # provide GCC arm-none-eabi toolchain
rm -rf arm-none-eabi-gcc.tar.bz2 sh ./provide_gcc.sh
# Download and extract GCC compiler
curl -L -o arm-none-eabi-gcc.tar.bz2 https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
tar -xjvf arm-none-eabi-gcc.tar.bz2
# Delete downloaded image
rm arm-none-eabi-gcc.tar.bz2
# Add the compiler to your path # Add the compiler to your path
echo 'export PATH=$PATH:$HOME/.rusefi-tools/gcc-arm-none-eabi-10.3-2021.10/bin' >> ~/.profile echo 'export PATH=$PATH:$HOME/.rusefi-tools/gcc-arm-none-eabi/bin' >> ~/.profile
# Allow the current user to use serial ports # Allow the current user to use serial ports
sudo usermod -a -G dialout $USER sudo usermod -a -G dialout $USER