*error: sh1: avr-gcc no such file or directory(Error no.127)*

I installed latest version of PlatformIO in Termux through pip install platformio. Everything goes well and I install platform atmelavr. But when I type pio run it gives me this error in the screenshot


Please can anyone help me fix the issue?

I’ve encountered a similar issue:

system: Manjaro ARM on aarch64
IDE: vscode insiders

platform: titiva
board: lptm4c1294ncpdt
framework: none (same error with libopencm3)

I’ve reinstalled gcc and verified that it exists but the error persists.

installtaion

[rumlyne@pbp embsys]$ pio platform install titiva --with-package tool-openocd
Platform Manager: Installing titiva
Platform Manager: titiva @ 3.0.0 has been installed!
Tool Manager: Installing toolchain-gccarmnoneeabi @ >=1.40803.0,<1.40805.0
Tool Manager: Warning! More than one package has been found by toolchain-gccarmnoneeabi @ >=1.40803.0,<1.40805.0 requirements:

  • platformio/toolchain-gccarmnoneeabi @ 1.90301.200702
  • maxgerhardt/toolchain-gccarmnoneeabi @ 1.40903.0
    Tool Manager: Please specify detailed REQUIREMENTS using package owner and version (showed above) to avoid name conflicts
    Unpacking [####################################] 100%
    Tool Manager: toolchain-gccarmnoneeabi @ 1.40803.0 has been installed!
    Tool Manager: tool-openocd @ 2.1000.200630 is already installed
    The platform ‘titiva’ has been successfully installed!
    The rest of the packages will be installed later depending on your build environment.
build

Executing task in folder embsys: platformio run <

Processing lptm4c1294ncpdt (platform: titiva; board: lptm4c1294ncpdt)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: TI TIVA (3.0.0) > TI LaunchPad (Tiva C) w/ tm4c129 (120MHz)
HARDWARE: LPTM4C1294NCPDT 120MHz, 256KB RAM, 1MB Flash
DEBUG: Current (ti-icdi) On-board (ti-icdi)
PACKAGES:

  • toolchain-gccarmnoneeabi 1.40803.0 (4.8.3)
    LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 0 compatible libraries
    Scanning dependencies…
    No dependencies
    Building in release mode
    Compiling .pio/build/lptm4c1294ncpdt/src/main.o
    sh: /home/rumlyne/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc: No such file or directory
    *** [.pio/build/lptm4c1294ncpdt/src/main.o] Error 127
    ==================================================================================== [FAILED] Took 3.19 seconds ====================================================================================
    The terminal process “platformio ‘run’” terminated with exit code: 1.

arm-none-eabi-gcc is exactly where it should be.

Oh this is interesting. My package (which is for Windows) was picked over a PlatformIO provided lib. So basically the same as in Toolchain-gccarmnoneeabi for aarch64 - #7 by dolfandringa. Try the recommendations there.

Thx for the fast reply!

Before the reinstallation I had v1.40803 installed which resulted in the same error.
Still I’ll try the proposed solution in the evening and let you know how it went :+1:t2:

Jup, adding

platform_packages = toolchain-gccarmnoneeabi@~1.90301.0

to platformio.ini did the trick.

Now I’m getting:

arm-none-eabi-as: unrecognized option ‘-x’

but I’ll figure that out.

Thx!

If I remember correctly, this is an error regarding assembler files (.S and .s), I think the files must be named .S so that arm-none-eabi-gcc is invoked instead of as, so check all assembler files for an uppercase S.