LMIC crashes on compile - Arduino Nano 33 Sense Rev2 and Adafruit RFM9x

I wired up the adafruit rfm9x to the Arduino Nano 33 BLE Ver2 with the wiring pictured. I tried to use the MCCI LoRaWAN LMIC library with the example script ttn-otaa.ino. My only modifications to the code were the APPEUI,DEVEUI and APPKEY and these pin mappings (which I believe match my physical wiring added here in images):
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 6,
.rxtx = LMIC_UNUSED_PIN,
.rst = 5,
.dio = {2, 3, 4},
};
the sketch blows up on compile with a failure stating this a few times:
“#pragma message(“Board not supported – use an explicit pinmap”)”
followed by a few hal errors thrown in too.
My searches have come up dry except a post on MCCI forum recently that did not make sense to me (TTGO T3 V1.6.1 FAILURE oslmic.c:53 - #2 by toddbu - MCCI IoT Forum) and I wonder if I just have the basics wrong


An expert on the MCCI LoRaWAN LMIC library I am not.

But you stand a better chance of getting help if you quote the actual text of the actual errors that you get that causes compilation to stop.

Note there is a differance between a warning and an error. A warning might result in a message in the complie window, but should not stop compilation.

1 Like

Thank you - will do (I was afraid to over-do the post)

c:\Users\Chris\Documents\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\getpinmap_thisboard.cpp: In function 'const Arduino_LMIC::HalPinmap_t* Arduino_LMIC::GetPinmap_ThisBoard()':
c:\Users\Chris\Documents\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\getpinmap_thisboard.cpp:71:72: note: #pragma message: Board not supported -- use an explicit pinmap
         #pragma message("Board not supported -- use an explicit pinmap")
                                                                        ^
C:\Users\Chris\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nano\4.0.4\variants\ARDUINO_NANO33BLE/libs/libmbed.a(sleep.o): In function `hal_sleep':
sleep.c:(.text.hal_sleep+0x0): multiple definition of `hal_sleep'
C:\Users\Chris\AppData\Local\Temp\arduino\sketches\20A8F10B0D63678CD884D83A680E8839\libraries\MCCI_LoRaWAN_LMIC_library\hal\hal.cpp.o:c:\Users\Chris\Documents\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal/hal.cpp:370: first defined here
collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

As described above, a warning is just a warning - in this case for you to use an explicit pinmap - which you have done. It’s not pertinent to this situation.

There is a line (in the now formatted code block using the </> on the toolbar) that says compiling stopped because there are two or more of the same thing in the code. Some research in to that is indicated.

Solved! Well thank you both. I made the edit to the cpp file and it rolled through the compile. If it helps future travelers on this path: the “hal_sleep” function is “// Not implemented” as per LMIC comments within the .cpp file so I just renamed it in one place. The device is online and joining TTN. Thank you both for the attention and time.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.