amnth
July 12, 2021, 6:25pm
1
Hi,
I just got 2 Thing Plus Lora Artemis boards to start a project and tried to load some basic examples that require external libraries.
The boards work fine with the Examples provided with the Apollo3 core, but when I try to load examples from other libraries, it sometimes fails because it’s not finding the header files.
I am using Mac OSX (BigSur) and the Arduino IDE 1.8.12 (Also tried .14 and .15).
I downloaded the following libraries and installed it using the Arduino IDE:
https://github.com/bakercp/CRC32
Then loaded the example application. The compilation fails for the Sparkfun Device because the Arduino IDE is not able to detect the library. The same example works for all other platforms I have (including Arduino Nano 33 which is also Mbed OS based).
Any ideas what could be causing this? This is kind of a deal breaker if we can’t use external libraries.
Thanks,
A.
amnth
July 12, 2021, 7:08pm
2
Here is the log from the Arduino IDE
/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/anathoo/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/anathoo/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/anathoo/Documents/Arduino/libraries -fqbn=SparkFun:apollo3:lora_thing_plus:svl_baud=115200,loader=option_svl -vid-pid=0000_0000 -ide-version=10815 -build-path /var/folders/57/0h65vzcn5px_061yp_bmc31r0000gn/T/arduino_build_616395 -warnings=none -build-cache /var/folders/57/0h65vzcn5px_061yp_bmc31r0000gn/T/arduino_cache_985043 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=/Users/anathoo/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major -prefs=runtime.tools.arm-none-eabi-gcc-8-2018-q4-major.path=/Users/anathoo/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major -verbose /Users/anathoo/Documents/Arduino/libraries/CRC32/examples/CRC32/CRC32.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/anathoo/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/anathoo/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/anathoo/Documents/Arduino/libraries -fqbn=SparkFun:apollo3:lora_thing_plus:svl_baud=115200,loader=option_svl -vid-pid=0000_0000 -ide-version=10815 -build-path /var/folders/57/0h65vzcn5px_061yp_bmc31r0000gn/T/arduino_build_616395 -warnings=none -build-cache /var/folders/57/0h65vzcn5px_061yp_bmc31r0000gn/T/arduino_cache_985043 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=/Users/anathoo/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major -prefs=runtime.tools.arm-none-eabi-gcc-8-2018-q4-major.path=/Users/anathoo/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major -verbose /Users/anathoo/Documents/Arduino/libraries/CRC32/examples/CRC32/CRC32.ino
Using board 'lora_thing_plus' from platform in folder: /Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1
Using core 'arduino' from platform in folder: /Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1
Detecting libraries used...
/Users/anathoo/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/arm-none-eabi-g++ -include /Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/mbed_config.h -include /Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/sdk/ArduinoSDK.h -iprefix /Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/ @/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/.cxx-flags -w -x c++ -E -CC -DARDUINO=10815 -DARDUINO_LoRa_THING_PLUS_expLoRaBLE -DARDUINO_ARCH_MBED -DARDUINO_ARCH_APOLLO3 -DMBED_NO_GLOBAL_USING_DIRECTIVE -DCORDIO_ZERO_COPY_HCI @/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/.cxx-symbols -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/mbed-bridge -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/mbed-bridge/core-api -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/mbed-bridge/core-api/api/deprecated @/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/.includes /var/folders/57/0h65vzcn5px_061yp_bmc31r0000gn/T/arduino_build_616395/sketch/CRC32.ino.cpp -o /dev/null
Generating function prototypes...
/Users/anathoo/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/arm-none-eabi-g++ -include /Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/mbed_config.h -include /Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/sdk/ArduinoSDK.h -iprefix /Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/ @/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/.cxx-flags -w -x c++ -E -CC -DARDUINO=10815 -DARDUINO_LoRa_THING_PLUS_expLoRaBLE -DARDUINO_ARCH_MBED -DARDUINO_ARCH_APOLLO3 -DMBED_NO_GLOBAL_USING_DIRECTIVE -DCORDIO_ZERO_COPY_HCI @/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/.cxx-symbols -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/mbed-bridge -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/mbed-bridge/core-api -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/mbed-bridge/core-api/api/deprecated @/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/.includes /var/folders/57/0h65vzcn5px_061yp_bmc31r0000gn/T/arduino_build_616395/sketch/CRC32.ino.cpp -o /var/folders/57/0h65vzcn5px_061yp_bmc31r0000gn/T/arduino_build_616395/preproc/ctags_target_for_gcc_minus_e.cpp
/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/57/0h65vzcn5px_061yp_bmc31r0000gn/T/arduino_build_616395/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/Users/anathoo/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/arm-none-eabi-g++ -include /Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/mbed_config.h -include /Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/sdk/ArduinoSDK.h -iprefix /Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/ @/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/.cxx-flags -MMD -DARDUINO=10815 -DARDUINO_LoRa_THING_PLUS_expLoRaBLE -DARDUINO_ARCH_MBED -DARDUINO_ARCH_APOLLO3 -DMBED_NO_GLOBAL_USING_DIRECTIVE -DCORDIO_ZERO_COPY_HCI @/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/.cxx-symbols -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/mbed-bridge -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/mbed-bridge/core-api -I/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/cores/arduino/mbed-bridge/core-api/api/deprecated @/Users/anathoo/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.1.1/variants/LoRa_THING_PLUS_expLoRaBLE/mbed/.includes /var/folders/57/0h65vzcn5px_061yp_bmc31r0000gn/T/arduino_build_616395/sketch/CRC32.ino.cpp -o /var/folders/57/0h65vzcn5px_061yp_bmc31r0000gn/T/arduino_build_616395/sketch/CRC32.ino.cpp.o
/Users/anathoo/Documents/Arduino/libraries/CRC32/examples/CRC32/CRC32.ino: In function 'void loop()':
CRC32:28:3: error: 'CRC32' was not declared in this scope
CRC32 crc;
^~~~~
/Users/anathoo/Documents/Arduino/libraries/CRC32/examples/CRC32/CRC32.ino:28:3: note: suggested alternative: 'CRC32_H'
CRC32 crc;
^~~~~
CRC32_H
CRC32:33:5: error: 'crc' was not declared in this scope
crc.update(byteBuffer[i]);
^~~
/Users/anathoo/Documents/Arduino/libraries/CRC32/examples/CRC32/CRC32.ino:33:5: note: suggested alternative: 'erfc'
crc.update(byteBuffer[i]);
^~~
erfc
CRC32:37:23: error: 'crc' was not declared in this scope
uint32_t checksum = crc.finalize();
^~~
/Users/anathoo/Documents/Arduino/libraries/CRC32/examples/CRC32/CRC32.ino:37:23: note: suggested alternative: 'erfc'
uint32_t checksum = crc.finalize();
^~~
erfc
CRC32:50:14: error: 'CRC32' is not a class, namespace, or enumeration
checksum = CRC32::calculate(byteBuffer, numBytes);
^~~~~
exit status 1
'CRC32' was not declared in this scope
It could be a compatibility issue between the library and board. Have you filed an issue in the github repo?
amnth
July 12, 2021, 11:18pm
4
TS-Chris:
It could be a compatibility issue between the library and board. Have you filed an issue in the github repo?
The library is generic and not using any kind of platform specific code.
I looked into this a little more. It seems related to the now legacy Arduino Builder (which is being replaced with arduino-cli). But something in the Apollo3 board package definition may be causing the arduino builder to skip or not “see” header files located in the same src folder as the cpp file.
amnth
July 14, 2021, 11:35pm
5
Any other ideas?
How do I get support for this? It’s clearly a Sparkfun side issue as the core configuration is not triggering the library discovery in the arduino builder tool.
At this point, the 2 boards I have can’t be used for anything much if it doesn’t support widely used Arduino libraries.
amnth
July 15, 2021, 12:53am
6
I made some more progress on this.
I downgraded the Arduino IDE to version 1.8.9 . And with that, I am able to compile the examples of the CRC32 library that didn’t work previously. Hopefully this workaround will also work for any other libraries available and compatible with the Artemis core.