LowPowerLab Forum

Hardware support => CurrentRanger => Topic started by: schmelle2 on June 25, 2019, 04:13:10 AM

Title: Can't compile Firmware [SOLVED]
Post by: schmelle2 on June 25, 2019, 04:13:10 AM
Hi,
I'm new to CurrentRanger.
I've installed the latest Arduino IDE 1.8.9, have added the Board Info file and installed the SAMD Library v1.2.0.
The selected Board is CurentRanger.
While trying to compile the slightly modified firmware (Andreas Spiess Autorange mod), I receive the following error message
/opt/arduino-1.8.9/arduino-builder -dump-prefs -logger=machine -hardware /opt/arduino-1.8.9/hardware -hardware /home/<USERNAME>/.arduino15/packages -tools /opt/arduino-1.8.9/tools-builder -tools /opt/arduino-1.8.9/hardware/tools/avr -tools /home/<USERNAME>/.arduino15/packages -built-in-libraries /opt/arduino-1.8.9/libraries -libraries /home/<USERNAME>/Arduino/libraries -fqbn=Moteino:samd:current_ranger -ide-version=10809 -build-path /tmp/arduino_build_943211 -warnings=none -build-cache /tmp/arduino_cache_557527 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.bossac.path=/home/<USERNAME>/.arduino15/packages/arduino/tools/bossac/1.7.0 -prefs=runtime.tools.bossac-1.7.0.path=/home/<USERNAME>/.arduino15/packages/arduino/tools/bossac/1.7.0 -verbose /home/<USERNAME>/Arduino/CurrentRanger/CurrentRanger.ino
/opt/arduino-1.8.9/arduino-builder -compile -logger=machine -hardware /opt/arduino-1.8.9/hardware -hardware /home/<USERNAME>/.arduino15/packages -tools /opt/arduino-1.8.9/tools-builder -tools /opt/arduino-1.8.9/hardware/tools/avr -tools /home/<USERNAME>/.arduino15/packages -built-in-libraries /opt/arduino-1.8.9/libraries -libraries /home/<USERNAME>/Arduino/libraries -fqbn=Moteino:samd:current_ranger -ide-version=10809 -build-path /tmp/arduino_build_943211 -warnings=none -build-cache /tmp/arduino_cache_557527 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.bossac.path=/home/<USERNAME>/.arduino15/packages/arduino/tools/bossac/1.7.0 -prefs=runtime.tools.bossac-1.7.0.path=/home/<USERNAME>/.arduino15/packages/arduino/tools/bossac/1.7.0 -verbose /home/<USERNAME>/Arduino/CurrentRanger/CurrentRanger.ino
Using board 'current_ranger' from platform in folder: /home/<USERNAME>/.arduino15/packages/Moteino/hardware/samd/1.2.0
Using core 'arduino' from platform in folder: /home/<USERNAME>/.arduino15/packages/Moteino/hardware/samd/1.2.0
Detecting libraries used...
/home/<USERNAME>/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/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=10809 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x04d8 -DUSB_PID=0xee4c -DUSBCON "-DUSB_MANUFACTURER=\"LowPowerLab LLC\"" "-DUSB_PRODUCT=\"CurrentRanger\"" -I/home/<USERNAME>/.arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/CMSIS/Device/ATMEL/ -I/home/<USERNAME>/.arduino15/packages/Moteino/hardware/samd/1.2.0/cores/arduino -I/home/<USERNAME>/.arduino15/packages/Moteino/hardware/samd/1.2.0/variants/current_ranger /tmp/arduino_build_943211/sketch/CurrentRanger.ino.cpp -o /dev/null
In file included from /tmp/arduino_build_943211/sketch/CurrentRanger.ino.cpp:1:0:
/home/<USERNAME>/.arduino15/packages/Moteino/hardware/samd/1.2.0/cores/arduino/Arduino.h:48:10: fatal error: sam.h: No such file or directory
#include "sam.h"
          ^~~~~~~
compilation terminated.
exit status 1
Error compiling for board CurrentRanger.

I'm running Ubuntu 18.04 LTS
Does anyone has an idea?

Thanks Peter
Title: Re: Can't compile Firmware
Post by: Felix on June 25, 2019, 09:08:48 AM
Do you have the Arduino SAMD Boards package installed?
(https://i.imgur.com/WQcgVbD.png)
Title: Re: Can't compile Firmware
Post by: Felix on June 25, 2019, 03:12:02 PM
Looks like newer Arduino SAMD Boards releases are causing this. If you install an older version (ex. 1.6.19) it will work.
I had an older version installed which worked. (1.6.19). With the latest, I get the same error.
I will try to figure out what breaking changes they made in the new release that cause this compile error.
Title: Re: Can't compile Firmware
Post by: Felix on June 25, 2019, 08:09:09 PM
Update:

I actually just published Moteino SAMD Boards 1.3.0 (https://github.com/LowPowerLab/LowPowerLab.github.io/commit/67562c1efba038c8f725fb022612eeeea3fcc685). Please restart your IDE and it should popup a notification showing you that there are Boards to update.
Or just go to Boards Manager and update it from there.
Also note this is going to require going back to latest Arduino SAMD Boards 1.8.1.

Please try it and let me know if there is any issue compiling now.
Title: Re: Can't compile Firmware
Post by: schmelle2 on June 26, 2019, 01:38:52 AM
Hi Felix,
it's working now with Lib v1.3.0.

Thanks for your quick help!


Best regards//
Peter