
areeb (Customer) asked a question.
I'm looking to build and upload .ino files from a headless linux server connected to the P1AM-100 via USB. I'm running into a somewhat cryptic error: "Error during build: fork/exec /bin/arm-none-eabi-g++: no such file or directory"
I've followed the steps on the arduino-cli github as follows
1. updated ~/.arduino15/arduino-cli.yaml to contain:
- board_manager:
- additional_urls:
- - https://raw.githubusercontent.com/facts-engineering/facts-engineering.github.io/master/package_productivity-P1AM-boardmanagermodule_index.json
2. arduino-cli core update-index
- Updating index: package_index.json downloaded
- Updating index: package_productivity-P1AM-boardmanagermodule_index.json downloaded
3. ard core install P1AM-100:samd
- Downloading packages...
- arduino:CMSIS@4.5.0 already downloaded
- arduino:CMSIS-Atmel@1.1.0 already downloaded
- P1AM-100:samd@1.6.20 already downloaded
- Installing arduino:arm-none-eabi-gcc@4.8.3-2014q1...
- Installing arduino:bossac@1.7.0...
- Installing arduino:openocd@0.9.0-arduino6-static...
- Installing arduino:CMSIS@4.5.0...
- arduino:CMSIS@4.5.0 installed
- Installing arduino:CMSIS-Atmel@1.1.0...
- arduino:CMSIS-Atmel@1.1.0 installed
- Installing arduino:arduinoOTA@1.2.0...
- Installing P1AM-100:samd@1.6.20...
- P1AM-100:samd@1.6.20 installed
4. ard core list # note I also installed the arduino:samd core
- ID Installed Latest Name
- P1AM-100:samd 1.6.20 1.6.20 P1AM-100
- arduino:avr 1.8.2 1.8.3 Arduino AVR Boards
- arduino:samd 1.8.6 1.8.6 Arduino SAMD Boards (32-bits ARM Cortex-M0+)
5. ard lib install P1AM
- P1AM depends on P1AM@1.0.0
- Downloading P1AM@1.0.0...
- P1AM@1.0.0 downloaded
- Installing P1AM@1.0.0...
- Installed P1AM@1.0.0
6. arduino-cli compile -b P1AM-100:samd:P1AM-100_native Blink --verbose
- 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
Any ideas what I might be missing?
SOLUTION
Summarizing everything that happened below:
1.
Make sure you have gcc installed:
- sudo apt-get install gcc-arm-none-eabi
2.
Make sure the compiler can find gcc. In ~/.arduino15/packages/P1AM-100/hardware/samd/1.6.20/platform.txt, update the line
- compiler.path={runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path}/bin/
to
- compiler.path=/usr/bin/
(this is where my gcc got installed, yours may be different)
3.
Upload with bossa:
3.1 - Install bossa
- git clone https://github.com/shumatech/BOSSA.git -b "arduino"
- cd BOSSA
- make bin/bossac -j4
3.2 - Put the P1AM-100 into bootloader using 1200 touch
- stty -F /dev/ttyACM0 speed 1200 cs8 -cstopb -parenb
3.3 - Upload program. Make sure to change the path to the bin for you program
- ./bin/bossac --port=/dev/ttyACM0 --force_usb_port=true -e -w -v /home/pi/blink/build/P1AM-100.samd.P1AM-100_native/blink.ino.bin -R
OK so I got it working with just bossa.