diff --git a/.github/workflows/build-firmware.yaml b/.github/workflows/build-firmware.yaml index 7721a43e09..1245db91d4 100644 --- a/.github/workflows/build-firmware.yaml +++ b/.github/workflows/build-firmware.yaml @@ -321,9 +321,9 @@ jobs: env: 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 - wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.xz' -O compiler.tar.xz - tar -xvf compiler.tar.xz - echo "`pwd`/gcc-arm-none-eabi-9-2020-q2-update/bin" >> $GITHUB_PATH + 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 + tar -xvf compiler.tar.bz2 + 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 - name: Test Compiler @@ -443,9 +443,9 @@ jobs: env: 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 - wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.xz' -O compiler.tar.xz - tar -xvf compiler.tar.xz - echo "::add-path::`pwd`/gcc-arm-none-eabi-9-2020-q2-update/bin" + 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 + tar -xvf compiler.tar.bz2 + 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 - name: Test Compiler diff --git a/.github/workflows/hardware-ci.yaml b/.github/workflows/hardware-ci.yaml index 6eb590cba8..16857e990f 100644 --- a/.github/workflows/hardware-ci.yaml +++ b/.github/workflows/hardware-ci.yaml @@ -53,7 +53,7 @@ jobs: run: ./gen_live_documentation.sh - name: Add compiler to PATH - run: echo "$HOME/.rusefi-tools/gcc-arm-none-eabi-9-2020-q2-update/bin" >> $GITHUB_PATH + run: echo "$HOME/.rusefi-tools/gcc-arm-none-eabi-10.3-2021.10/bin" >> $GITHUB_PATH # Make sure the compiler works - name: Test/Identify Compiler diff --git a/firmware/Makefile b/firmware/Makefile index b808360b7b..5878ab934c 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -73,8 +73,8 @@ endif # C++ specific options here (added to USE_OPT). ifeq ($(USE_CPPOPT),) - USE_CPPOPT = -std=c++2a -Wno-register -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-use-cxa-atexit - # gcc-10 c++ 2a depricated uses of volatile errors + USE_CPPOPT = -std=c++20 -Wno-register -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-use-cxa-atexit + # gcc-10 c++ 20 depricated uses of volatile errors USE_CPPOPT += -Wno-deprecated endif diff --git a/firmware/bootloader/src/Makefile b/firmware/bootloader/src/Makefile index 56e01e3908..ecef94ad86 100644 --- a/firmware/bootloader/src/Makefile +++ b/firmware/bootloader/src/Makefile @@ -42,7 +42,9 @@ endif # C++ specific options here (added to USE_OPT). ifeq ($(USE_CPPOPT),) # constexpr float expf_taylor_impl probably needs just c++14 but why not go with 17? - USE_CPPOPT = -std=c++2a -Wno-register -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Werror=write-strings -Werror=type-limits -Winvalid-pch + USE_CPPOPT = -std=c++20 -Wno-register -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Werror=write-strings -Werror=type-limits -Winvalid-pch + # gcc-10 c++ 20 depricated uses of volatile errors + USE_CPPOPT += -Wno-deprecated endif # Enable this if you want the linker to remove unused code and data diff --git a/firmware/check.c b/firmware/check.c index dac7a13284..c3d8aecd89 100644 --- a/firmware/check.c +++ b/firmware/check.c @@ -8,17 +8,11 @@ #define STR_HELPER(x) #x #define STR(x) STR_HELPER(x) -// Firmware builds require at least GCC 9.3.1 -#if (GCC_VERSION < 931) - #pragma message("GCC is " STR(__GNUC__)"."STR(__GNUC_MINOR__)"."STR(__GNUC_PATCHLEVEL__)) - #error "GCC compiler >= 9.3.1 required" -#endif +#pragma message("GCC is " STR(__GNUC__)"."STR(__GNUC_MINOR__)"."STR(__GNUC_PATCHLEVEL__)) -// Firmware builds but does not actually run on GCC10 :( -// todo: one day someone should fix it, do YOU want to help? -#if (GCC_VERSION > 1000) - #pragma message("GCC is " STR(__GNUC__)"."STR(__GNUC_MINOR__)"."STR(__GNUC_PATCHLEVEL__)) - #error "GCC10 not supported see https://github.com/rusefi/rusefi/labels/Gcc10" +// Firmware builds require at least GCC 10.3.1 +#if (GCC_VERSION < 1031) + #error "GCC compiler >= 10.3.1 required" #endif #endif diff --git a/firmware/setup_linux_environment.sh b/firmware/setup_linux_environment.sh index de70d88a20..3eb035fce1 100755 --- a/firmware/setup_linux_environment.sh +++ b/firmware/setup_linux_environment.sh @@ -26,14 +26,14 @@ cd ~/.rusefi-tools rm -rf arm-none-eabi-gcc.tar.bz2 # Download and extract GCC compiler -curl -L -o arm-none-eabi-gcc.tar.bz2 https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 +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 -echo 'export PATH=$PATH:$HOME/.rusefi-tools/gcc-arm-none-eabi-9-2020-q2-update/bin' >> ~/.profile +echo 'export PATH=$PATH:$HOME/.rusefi-tools/gcc-arm-none-eabi-10.3-2021.10/bin' >> ~/.profile # Allow the current user to use serial ports sudo usermod -a -G dialout $USER