SparkFun Forums 

Where electronics enthusiasts find answers.

Topics pertaining to the Arduino Core & software used with the Artemis module and Artemis development boards.
By tlrrobb
#207474
exec format error
Error compiling for board SparkFun BlackBoard Artemis Nano.

Don't quite understand what the error refers to.
Just trying to compile the stock "blink" script.
The files exist, the IDE is Arduino1.8.9 and the Apollo3 Core is ver.1.0.7 OS is Ubuntu 18.04.3

complete error message follows:

Arduino: 1.8.9 (Linux), Board: "SparkFun BlackBoard Artemis Nano, 921600, SparkFun Variable Loader (Recommended)"
Code: Select all
/home/terry/ArduinoIDE/arduino-1.8.9/arduino-builder -dump-prefs -logger=machine -hardware /home/terry/ArduinoIDE/arduino-1.8.9/hardware -hardware /home/terry/.arduino15/packages -hardware /home/terry/sketchbook/hardware -tools /home/terry/ArduinoIDE/arduino-1.8.9/tools-builder -tools /home/terry/ArduinoIDE/arduino-1.8.9/hardware/tools/avr -tools /home/terry/.arduino15/packages -built-in-libraries /home/terry/ArduinoIDE/arduino-1.8.9/libraries -libraries /home/terry/sketchbook/libraries -fqbn=SparkFun:apollo3:amap3nano:svl_baud=921600,loader=sparkfun_svl -vid-pid=1A86_7523 -ide-version=10809 -build-path /tmp/arduino_build_292058 -warnings=none -build-cache /tmp/arduino_cache_191678 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=/home/terry/.arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major -prefs=runtime.tools.arm-none-eabi-gcc-8-2018-q4-major.path=/home/terry/.arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major -verbose /home/terry/ArduinoIDE/arduino-1.8.9/examples/01.Basics/Blink/Blink.ino
/home/terry/ArduinoIDE/arduino-1.8.9/arduino-builder -compile -logger=machine -hardware /home/terry/ArduinoIDE/arduino-1.8.9/hardware -hardware /home/terry/.arduino15/packages -hardware /home/terry/sketchbook/hardware -tools /home/terry/ArduinoIDE/arduino-1.8.9/tools-builder -tools /home/terry/ArduinoIDE/arduino-1.8.9/hardware/tools/avr -tools /home/terry/.arduino15/packages -built-in-libraries /home/terry/ArduinoIDE/arduino-1.8.9/libraries -libraries /home/terry/sketchbook/libraries -fqbn=SparkFun:apollo3:amap3nano:svl_baud=921600,loader=sparkfun_svl -vid-pid=1A86_7523 -ide-version=10809 -build-path /tmp/arduino_build_292058 -warnings=none -build-cache /tmp/arduino_cache_191678 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=/home/terry/.arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major -prefs=runtime.tools.arm-none-eabi-gcc-8-2018-q4-major.path=/home/terry/.arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major -verbose /home/terry/ArduinoIDE/arduino-1.8.9/examples/01.Basics/Blink/Blink.ino
Using board 'amap3nano' from platform in folder: /home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7
Using core 'arduino' from platform in folder: /home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7
Detecting libraries used...
/home/terry/.arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/arm-none-eabi-g++ -DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3 -c -g -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -fdata-sections -Os -ffunction-sections -std=gnu++11 -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -mcpu=cortex-m4 -DF_CPU=48000000L -DARDUINO=10809 -DARDUINO_AM_AP3_SFE_BB_ARTEMIS_NANO -DARDUINO_ARCH_APOLLO3 -DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3 -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/variants/SparkFun_BlackBoard_Artemis_Nano/config -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/ard_sup -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/ard_sup/ard_supers -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/variants/SparkFun_BlackBoard_Artemis_Nano -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/mcu/apollo3 -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/mcu/apollo3/hal -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/mcu/apollo3/regs -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/utils -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/CMSIS/AmbiqMicro/Include -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/CMSIS/ARM/Include -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/uecc/micro-ecc -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/hci/ambiq -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/sw/wsf/ambiq -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/sw/wsf/include -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/stack/include -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/sw/util -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/include -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/hci/include -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/apps/app/include -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/stack/hci -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/stack/cfg -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/sec/include -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/services -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/sec/common -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/hci/ambiq/apollo3 -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/apps/app -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/profiles -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/profiles/gatt -I/home/terry/.arduino15/packages/SparkFun/hardware/apollo3/1.0.7/cores/arduino/am_sdk_ap3/third_party/exactle/sw/profiles/gap /tmp/arduino_build_292058/sketch/Blink.ino.cpp -o /dev/null
fork/exec /home/terry/.arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/arm-none-eabi-g++: exec format error
Error compiling for board SparkFun BlackBoard Artemis Nano.
#207592
Hi tlrrobb,

Hmm, that is a really weird error. Out of curiosity, does this error persist regardless of what board you select? Do you have any other board definitions packages installed that use the ARM toolchain? There may be a conflict happening there. Another suggestion would be to try switching to the Ambiq Secure Bootloader and retry compiling. Other Ubuntu users have reported issues compiling with the SparkFun Variable Bootloader that we are still looking into.
#207638
TS-Mark wrote:Hi tlrrobb,
does this error persist regardless of what board you select?
I get the same error with "BlackBoard Artemis ATP", "Artemis Module", and "SparkFun Edge"
Do you have any other board definitions packages installed that use the ARM toolchain?
I have the Adafruit SAMD boards package installed . The Adafruit Feather M0 compiles normally.
Another suggestion would be to try switching to the Ambiq Secure Bootloader and retry compiling.
The SparkFun Edge is compiled with the Ambiq Secure Bootloader by default. I get the same Result.

--Terry
By fe7565
#207697
Similar issue here. I had to manually install the artemis files under Arduino IDE "hardware" folder. The Json link in BoardManager did not work. Here is the error file:

Arduino: 1.8.10 (Windows 10), Board: "SparkFun BlackBoard Artemis Nano, 115200, SparkFun Variable Loader (Recommended)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\HPi7\AppData\Local\Arduino15\packages -hardware C:\Users\HPi7\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\HPi7\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\HPi7\Documents\Arduino\libraries -fqbn=Arduino_Boards-master:Arduino_Apollo3-master:amap3nano:svl_baud=115200,loader=sparkfun_svl -vid-pid=1A86_7523 -ide-version=10810 -build-path C:\Temp\arduino_build_52862 -warnings=none -build-cache C:\Temp\arduino_cache_518859 -prefs=build.warn_data_percentage=75 -verbose C:\Users\HPi7\Documents\Arduino\hardware\Arduino_Boards-master\Arduino_Apollo3-master\libraries\Examples\examples\Example1_Blink\Example1_Blink.ino
loading hardware from C:\Users\HPi7\Documents\Arduino\hardware: loading package Arduino_Boards-master: invalid version dir C:\Users\HPi7\Documents\Arduino\hardware\Arduino_Boards-master\sparkfun\avr: no major version found

Error compiling for board SparkFun BlackBoard Artemis Nano.
By Guest
#207698
Managed to get the errors down to one after downloading the Apollo3 directly from github and placing it in "Arduino/hardware/Arduino_Boards-master folder.

This is the error. I suspect that my "avr" folder is in the wrong location or not the correct one.

exec: "/bin/arm-none-eabi-g++": file does not exist
#207738
HI all - I suspect we have a few different issues being described here:

fe7565 and Guest:

Can you describe why the boards manager install did not work? It is significantly easier to use that tool than to install manually.

There should be no "avr" directory involved with the Apollo3 arduino core. If you must perform a manual install there will be a few additional steps you need to take. First make sure that the repo is contained by the directory
Code: Select all
{Arduino_Sketchbook}/hardware/SparkFun/apollo3
(You can find your sketchbook location in Arduino's preferences, and as an example path you should have '{Arduino_Sketchbook}/hardware/SparkFun/apollo3/platform.txt')

Then you will have to modify 'platform.txt' to use the ARMCC compiler tools of your choice. You could, for one, point at the tools that are used for Arduino SAMD boards, or you could download your own copy to use from https://developer.arm.com/tools-and-sof ... /downloads
(Beware that the latest release - Version 8-2019-q3-update - has known issues so I recommend 8-2018-q4-major)


tlrrob:

It appears that you have the arm-non-eabi-gcc executables properly installed, but your machine says that they are an invalid executable format. I would suspect that this is because we only provide a couple different flavors of the toolchain (specifically one for Windows, one for Mac, and one for any other *nix flavor).

You can see the tools we provide for various platforms here: https://github.com/sparkfun/Arduino_Boa ... 1093-L1133

For the time being you might be able to solve this in one of two ways:

1. replace the provided tools with a copy that works on your system (i.e. download the correct tools [use version 8-2018-q4-major] from https://developer.arm.com/tools-and-sof ... /downloads) and replace the tools that live at your equivalent of
Code: Select all
C:\Users\owen.lyke\AppData\Local\Arduino15\packages\SparkFun\tools\arm-none-eabi-gcc\8-2018-q4-major
2. Redirect the apollo3 core to use the arm-none-eabi-gcc tool that is downloaded by the SAMD boards. (You must install Arduino SAMD boards to do this). This means changing '~\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\1.0.7\platform.txt' under the section '## Compiler and Toolchain' so that compiler.path equals '{runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path}'

Hope that helps!