Hello,
I am trying to compile the standard OTTA LMIC Matthijs Kooijman examples from GitHub. If I enable verbose mode in the IDE, it appears to compile but not to link.
I obtained the library from here:
[https://github.com/matthijskooijman/arduino-lmic]
I haven’t actually changed anything in the code, assuming that it should compile even if I have chosen the incorrect board type, so long as I don’t try to download.
The header files included are:
#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
// This EUI must be in little-endian format, so least-significant-byte
// first. When copying an EUI from ttnctl output, this means to reverse
// the bytes. For TTN issued EUIs the last bytes should be 0xD5, 0xB3,
// 0x70........
The errors I get are as shown below.
Have I missed something obvious?
Build options changed, rebuilding all
Archiving built core (caching) in: C:\Users\Jim\AppData\Local\Temp\arduino_cache_807155\core\core_esp32_esp32_ttgo-lora32-v1_FlashFreq_80,UploadSpeed_921600,DebugLevel_none_3327137c8228851dded9ef697d9464f4.a
sketch\ttn-otaa.ino.cpp.o:(.literal._Z7do_sendP7osjob_t+0x0): undefined reference to `LMIC'
sketch\ttn-otaa.ino.cpp.o:(.literal._Z7do_sendP7osjob_t+0x14): undefined reference to `LMIC_setTxData2'
sketch\ttn-otaa.ino.cpp.o:(.literal._Z5setupv+0x10): undefined reference to `os_init'
sketch\ttn-otaa.ino.cpp.o:(.literal._Z5setupv+0x14): undefined reference to `LMIC_reset'
sketch\ttn-otaa.ino.cpp.o:(.literal._Z4loopv+0x0): undefined reference to `os_runloop_once'
sketch\ttn-otaa.ino.cpp.o: In function `do_send(osjob_t*)':
E:\Projects_New\ESP32\LMIC\arduino-lmic-master\examples\ttn-otaa/ttn-otaa.ino:138: undefined reference to `LMIC_setTxData2'
sketch\ttn-otaa.ino.cpp.o: In function `setup()':
E:\Projects_New\ESP32\LMIC\arduino-lmic-master\examples\ttn-otaa/ttn-otaa.ino:157: undefined reference to `os_init'
E:\Projects_New\ESP32\LMIC\arduino-lmic-master\examples\ttn-otaa/ttn-otaa.ino:157: undefined reference to `LMIC_reset'
sketch\ttn-otaa.ino.cpp.o: In function `loop()':
E:\Projects_New\ESP32\LMIC\arduino-lmic-master\examples\ttn-otaa/ttn-otaa.ino:172: undefined reference to `os_runloop_once'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board TTGO LoRa32-OLED V1.