[solved] Specify location of arm-none-eabi-g++

I'm getting a build error when running the following command:

arduino-cli compile -b P1AM-100:samd:P1AM-100_native Blink --verbose

Error:

Using board 'P1AM-100_native' from platform in folder: /home/nvidia/.arduino15/packages/P1AM-100/hardware/samd/1.6.20
Using core 'arduino' from platform in folder: /home/nvidia/.arduino15/packages/P1AM-100/hardware/samd/1.6.20
Detecting libraries used...
/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x1354 -DUSB_PID=0x4000 -DUSBCON "-DUSB_MANUFACTURER=\"Facts Engineering\"" "-DUSB_PRODUCT=\"P1AM-100\"" -I/home/nvidia/.arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/home/nvidia/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/ -I/home/nvidia/.arduino15/packages/P1AM-100/hardware/samd/1.6.20/cores/arduino -I/home/nvidia/.arduino15/packages/P1AM-100/hardware/samd/1.6.20/variants/P1AM-100 /tmp/arduino-sketch-CFAD0A7419F44EA0C64DB24197ABBF70/sketch/Blink.ino.cpp -o /dev/null
Error during build: fork/exec /bin/arm-none-eabi-g++: no such file or directory

(P1AM-100 is a custom board - I'm working with that team directly as well to debug this).

What I'm curious about here is that the compiler isn't able to find arm-none-eabi-g++. I have it installed but it's located in /usr/bin, not /bin/

Is there a way to specify to the compiler where to look for this file? Or is this something specific to the custom core?

It should probably be getting the compiler from the packages directory where the arduino core has installed it.
I’m not sure what you’ve done to get it to try /bin/...
Check platforms.txt ?

hm great idea. I found the following line in my platform.txt (located at ~/.arduino15/packages/P1AM-100/hardware/samd/1.6.20/platform.txt)

compiler.path={runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path}/bin/

changing it to

compiler.path=/usr/bin/

solved it!

(albeit I'm having separate issues now with arduino-cli upload, but hey one step at a time..)