Skip to content

Added IGNORE_SYSTEM_GCC option to provision.sh #2645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions scripts/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ if [ "$ARM" = "1" ]; then
echo "===== ARM"
EXPECTEDARMGCCVERSION="13.2.1"
EXPECTEDARMGCCFILENAME="arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi"
if type arm-none-eabi-gcc 2> /dev/null > /dev/null; then

if type arm-none-eabi-gcc 2> /dev/null > /dev/null && [[ -z $IGNORE_SYSTEM_GCC ]]; then
ARMGCCVERSION=$(arm-none-eabi-gcc -dumpfullversion)
echo arm-none-eabi-gcc installed, version $ARMGCCVERSION
if [ ! "$ARMGCCVERSION" = "$EXPECTEDARMGCCVERSION" ]; then
Expand All @@ -284,26 +285,29 @@ if [ "$ARM" = "1" ]; then
echo "*** ***"
echo "*** The build may work with your compiler version, but it ***"
echo "*** is possible you will encounter errors, or issues with ***"
echo "*** build size ***"
echo "*** build size. If you wish to ignore the installed version ***"
echo "*** and install and embedded version set IGNORE_SYSTEM_GCC=1 ***"
echo "*** ***"
echo "*********************************************************************"
echo "*********************************************************************"
echo " Expected $EXPECTEDARMGCCVERSION"
echo " Got $ARMGCCVERSION"
fi
else
echo "installing gcc-arm-embedded to Espruino/$EXPECTEDARMGCCFILENAME/bin"
#sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
#sudo apt-get update
#sudo DEBIAN_FRONTEND=noninteractive apt-get --force-yes --yes install libsdl1.2-dev gcc-arm-embedded
# OR download from 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
# Unpack from GitHub-hosted file - newer, and much faster
if [ ! -d "$EXPECTEDARMGCCFILENAME" ]; then
echo "installing gcc-arm-embedded to Espruino/$EXPECTEDARMGCCFILENAME/bin"
curl -Ls "https://github.com/espruino/EspruinoBuildTools/raw/master/arm/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi-stripped.tar.xz" | tar xfJ - --no-same-owner
else
echo "Folder found"
echo "gcc-arm-embedded installation found"
fi
export PATH=$PATH:$(pwd)/$EXPECTEDARMGCCFILENAME/bin

ARMGCCPATH="$(pwd)/$EXPECTEDARMGCCFILENAME/bin"
[[ ":$PATH:" != *":$ARMGCCPATH"* ]] && export PATH="$ARMGCCPATH:${PATH}"
fi
fi

Expand Down
Loading