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?
User avatar
By humbertokramm
#228023
clsnwrks wrote: Sun Mar 07, 2021 9:28 am 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?
I'm testing this card and I had the same problems you described above.
I solved the pending issues with the mapping of the pins and he started to make the transmission attempts.
However, nothing was received on TTN. Alias, it looks like it passes the join very quickly.

The pinmap I defined was this:
Code: Select all
#define _NSS 36
#define _MOSI 38
#define _MISO 43
#define _SCK 42
#define _Busy 39
#define _DIO1 40
#define _DIO3 47
#define _NRESET 44
I know some are not used, but I made sure to put them all.

As a last test, I did what you suggested to turn off the power module and turn it on again. But I was not successful.
Did you find out anything else about this?
User avatar
By humbertokramm
#228024
Note that it tries to join and quickly starts transmitting the data.
Code: Select all
Starting

SPI1 begin
SPI IOM 3
2033: EV_JOINING
00:00:000.033: engineUpdate[opmode=0x4]
00:00:01.030: engineUpdate[opmode=0x4]
64661: EV_TXSTART
00:00:01.036: engineUpdate[opmode=0x884]
00:00:01.039: TX[mod=LoRa,sf=10,bw=125,cr=4/5,nocrc=0,ih=0,fcnt=0,freq=902.5,pow=30,len=23] : 00F50955520C9A6E1670B3D57ED004440D627635BA0000
89447: EV_TXDONE
00:00:01.432: engineUpdate[opmode=0x884]
00:00:06.425: RX_MODE[mod=LoRa,sf=10,bw=500,cr=4/5,nocrc=1,ih=0,freq=923.9,rxtime=401932]
00:00:06.439: WARNING: rxtime is 540 ticks in the past! (ramp-up time 5 ms / 369 ticks)
00:00:06.460: RX: TIMEOUT
User avatar
By humbertokramm
#228029
jmjo wrote: Thu Mar 04, 2021 5:01 am Hello, I fix that kind of compile error by disabling the USE_STANDARD_PINMAP (placing it on comment //USE_STANDARD_PINMAP ). Compile is OK but I cannot join. Another problem. :-)
Did you solve your problem?
 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? [...]