SparkFun Forums 

Where electronics enthusiasts find answers.

Hardware or product specific questions are best asked here.
By clsnwrks
#223359
This persistent error: Error compiling for board SparkFun Artemis Thing Plus.

Dell Inspiron, Arduino 1.8.13, Artiemis and Apollo3 boards no problem, several good codes running on SF RB Artemis and SF RB Artemis Nano. Officially:
"Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: "SparkFun Artemis Thing Plus, 921600, Ambiq Secure Bootloader (Advanced)"

Two new SF LoRa Thing Plus board. TTN gateway, application, device and associated codes all fine.

Example code LoRaWAN_node_ABP_method, example as downloaded from SF, does not work. Will not compile on SF Artemis Thing Plus.

Errors ( listed below) apparently all derive from hal.cpp

Error list copied verbatim

"
C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp:192:12: error: 'SPIName' does not name a type; did you mean 'SPIClass'?

extern "C" SPIName spi_get_peripheral_name(PinName mosi, PinName miso, PinName sclk); // this mbed internal function determines the IOM module number for a set of pins
^~~~~~~
SPIClass

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp: In function 'void hal_spi_init()':

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp:197:52: error: 'D38' was not declared in this scope

printf("SPI IOM %d\n", spi_get_peripheral_name(D38, D43, D42));
^~~

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp:197:57: error: 'D43' was not declared in this scope

printf("SPI IOM %d\n", spi_get_peripheral_name(D38, D43, D42));
^~~

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp:197:62: error: 'D42' was not declared in this scope

printf("SPI IOM %d\n", spi_get_peripheral_name(D38, D43, D42));
^~~

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp:197:28: error: 'spi_get_peripheral_name' was not declared in this scope

printf("SPI IOM %d\n", spi_get_peripheral_name(D38, D43, D42));
^~~~~~~~~~~~~~~~~~~~~~~

Multiple libraries were found for "SPI.h"

Used: C:\Users\clsnf\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\1.2.1\libraries\SPI

Not used: C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\SPI-master

exit status 1

Error compiling for board SparkFun Artemis Thing Plus.

End of copy"

hal.cpp does not work. 2015 version?
I corrected some errors by replacing SPI1 with SPI but you really do not want me overwriting *.cpp codes.

Also, on https://learn.sparkfun.com/tutorials/sp ... e-overview, box implies version 2.0.5 for SF Apollo3 board but my Arduino IDE shows latest version of SF Apollo3 boards as 1.2.1, installed.

I read this text " “The library includes modifications for the SPI pins use by the NM180100 to connect the Apollo3 MCU to the SX1262 module. Additionally, it also contains modifications to pre-configure the library to use the SX1262, the US LoRa frequency band, and defaults to a SF7 (spreading factor).” on https://learn.sparkfun.com/tutorials/sp ... e-overview. Apparently not true.

Another substantial disappointment for a supposedly new well-supported SF product ....
By clsnwrks
#223514
Following latest instructions, installed updated Artemis Apollo core. Now I find version 2.0.5 of board definitions as well explicit board listing for Thing Plus ExpLoRaBLE. Using correct version, board and port I get a different error message:

Error compiling for board LoRa Thing Plus expLoRaBLE.

Details:

Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: "LoRa Thing Plus expLoRaBLE, 921600, SparkFun Variable Loader (Recommended)"

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o: in function `hal_ant_switch':

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:116: undefined reference to `lmic_pins'

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o: in function `hal_pin_rst':

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:121: undefined reference to `lmic_pins'

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o: in function `hal_pin_busy_wait':

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:176: undefined reference to `lmic_pins'

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o: in function `hal_dio3_controls_tcxo':

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:181: undefined reference to `lmic_pins'

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o: in function `hal_dio2_controls_rxtx':

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:184: undefined reference to `lmic_pins'

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o:C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:331: more undefined references to `lmic_pins' follow

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for "SPI.h"

Used: C:\Users\clsnf\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.0.5\libraries\SPI
Not used: C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\SPI-master
exit status 1

Error compiling for board LoRa Thing Plus expLoRaBLE.

Now an error in specific section of hal.cpp related t lmic_pins? Help, please.
By clsnwrks
#223698
Good suggestion, thanks. I disabled (commented out) that line in code. Code compiled successfully. And, miracle, now I see regular payloads going out (via Arduino IDE serial monitor) and coming in via my TTN router.
By clsnwrks
#223746
Sunday, 2021-03-07
After disruption in household wireless connections but without any other changes to files, code, connections or board, this morning I get this error:

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\lmic\radio-sx126x.c:778: assertion failed.

Error derives from this line in radio-sx126x.c:

ASSERT( ReadReg(REG_LORASYNCWORDLSB) == 0x24 );

Why the change?
By clsnwrks
#223749
Sunday, 2021-03-07, update

Once I disconnected that ExpLoRaBLE board completely, including from battery, for a truly cold reboot, it then worked. Radio evidently needed a reset that it did not get with battery connected?
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]