matthijskooijman / arduino-lmic

:warning: This library is deprecated, see the README for alternatives.
710 stars 652 forks source link

plz help us rectify this error!! we are geeting this error when we compile the "hello world" code with lmic and hal files!! #78

Closed Preetham288 closed 7 years ago

Preetham288 commented 7 years ago

Arduino: 1.8.2 (Windows 8.1), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Preetham\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10802 -build-path C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802 -warnings=none -build-cache C:\Users\Preetham\AppData\Local\Temp\arduino_cache_222068 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Preetham\AppData\Local\Temp\arduino_modified_sketch_299158\HelloWorld.ino C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Preetham\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10802 -build-path C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802 -warnings=none -build-cache C:\Users\Preetham\AppData\Local\Temp\arduino_cache_222068 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Preetham\AppData\Local\Temp\arduino_modified_sketch_299158\HelloWorld.ino Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr Detecting libraries used... "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\sketch\HelloWorld.ino.cpp" -o "nul" "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\libraries\lmic" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\sketch\HelloWorld.ino.cpp" -o "nul" "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\libraries\lmic" "-IC:\Program Files (x86)\Arduino\libraries\hall" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\sketch\HelloWorld.ino.cpp" -o "nul" Using cached library dependencies for file: C:\Program Files (x86)\Arduino\libraries\lmic\lmic.c Using cached library dependencies for file: C:\Program Files (x86)\Arduino\libraries\lmic\oslmic.c Using cached library dependencies for file: C:\Program Files (x86)\Arduino\libraries\lmic\radio.c Using cached library dependencies for file: C:\Program Files (x86)\Arduino\libraries\hall\hall.cpp Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\SPI.cpp Generating function prototypes... "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\libraries\lmic" "-IC:\Program Files (x86)\Arduino\libraries\hall" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\sketch\HelloWorld.ino.cpp" -o "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\preproc\ctags_target_for_gcc_minus_e.cpp" "C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\preproc\ctags_target_for_gcc_minus_e.cpp" Compiling sketch... "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\libraries\lmic" "-IC:\Program Files (x86)\Arduino\libraries\hall" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\sketch\HelloWorld.ino.cpp" -o "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\sketch\HelloWorld.ino.cpp.o" Compiling libraries... Compiling library "lmic" Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\libraries\lmic\lmic.c.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\libraries\lmic\oslmic.c.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\libraries\lmic\radio.c.o Compiling library "hall" Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\libraries\hall\hall.cpp.o Compiling library "SPI" Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\libraries\SPI\SPI.cpp.o Compiling core... Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\wiring_pulse.S.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\WInterrupts.c.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\hooks.c.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\wiring.c.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\wiring_analog.c.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\wiring_digital.c.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\wiring_pulse.c.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\wiring_shift.c.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\CDC.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\HardwareSerial.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\HardwareSerial0.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\HardwareSerial1.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\HardwareSerial2.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\HardwareSerial3.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\IPAddress.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\PluggableUSB.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\Print.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\Stream.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\Tone.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\USBCore.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\WMath.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\WString.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\abi.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\main.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\new.cpp.o Using previously compiled file: C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\core\core.a Archiving built core (caching) in: C:\Users\Preetham\AppData\Local\Temp\arduino_cache_222068\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a Linking everything together... "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802/HelloWorld.ino.elf" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\sketch\HelloWorld.ino.cpp.o" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\libraries\lmic\lmic.c.o" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\libraries\lmic\oslmic.c.o" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\libraries\lmic\radio.c.o" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\libraries\hall\hall.cpp.o" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802\libraries\SPI\SPI.cpp.o" "C:\Users\Preetham\AppData\Local\Temp\arduino_build_400802/core\core.a" "-LC:\Users\Preetham\AppData\Local\Temp\arduino_build_400802" -lm C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans0.ltrans.o: In function `aes_encrypt':

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:176: undefined reference to `os_aes'

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans0.ltrans.o: In function `aes_verifyMic0':

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:170: undefined reference to `os_aes'

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans0.ltrans.o: In function `aes_sessKeys':

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:202: undefined reference to `os_aes'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:204: undefined reference to `os_aes'

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans0.ltrans.o: In function `micB0':

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:138: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:138: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:139: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:140: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:141: undefined reference to `AESAUX'

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans0.ltrans.o:C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:142: more undefined references to `AESAUX' follow

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans0.ltrans.o: In function `aes_verifyMic':

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:149: undefined reference to `AESKEY'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:149: undefined reference to `AESKEY'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:150: undefined reference to `os_aes'

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans1.ltrans.o: In function `rxschedInit.constprop.11':

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:429: undefined reference to `AESKEY'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:429: undefined reference to `AESKEY'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:433: undefined reference to `os_aes'

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans2.ltrans.o: In function `aes_appendMic0':

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:164: undefined reference to `os_aes'

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans2.ltrans.o: In function `micB0':

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:138: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:138: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:139: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:140: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:141: undefined reference to `AESAUX'

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans2.ltrans.o:C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:142: more undefined references to `AESAUX' follow

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans2.ltrans.o: In function `aes_appendMic':

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:156: undefined reference to `AESKEY'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:156: undefined reference to `AESKEY'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:158: undefined reference to `os_aes'

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans3.ltrans.o: In function `radio_rand1':

C:\Program Files (x86)\Arduino\libraries\lmic/radio.c:737: undefined reference to `os_aes'

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans3.ltrans.o: In function `aes_cipher.part.3.lto_priv.62':

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:183: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:183: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:184: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:184: undefined reference to `AESAUX'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:185: undefined reference to `AESAUX'

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans3.ltrans.o:C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:186: more undefined references to `AESAUX' follow

C:\Users\Preetham\AppData\Local\Temp\ccxdt9N7.ltrans3.ltrans.o: In function `aes_cipher.part.3.lto_priv.62':

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:188: undefined reference to `AESKEY'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:188: undefined reference to `AESKEY'

C:\Program Files (x86)\Arduino\libraries\lmic/lmic.c:189: undefined reference to `os_aes'

collect2.exe: error: ld returned 1 exit status

Using library lmic in folder: C:\Program Files (x86)\Arduino\libraries\lmic (legacy) Using library hall in folder: C:\Program Files (x86)\Arduino\libraries\hall (legacy) Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI exit status 1 Error compiling for board Arduino/Genuino Uno.

matthijskooijman commented 7 years ago

I'm totally unsure why this fails. How did you install this library? What example sketch are you compiling exactly? This library does not have a Hello World example.

Preetham288 commented 7 years ago

We included the library from zip file!! What else changes do we have to do?

On 28-Mar-2017 12:15 PM, "Matthijs Kooijman" notifications@github.com wrote:

I'm totally unsure why this fails. How did you install this library? What example sketch are you compiling exactly? This library does not have a Hello World example.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/matthijskooijman/arduino-lmic/issues/78#issuecomment-289678777, or mute the thread https://github.com/notifications/unsubscribe-auth/AZdwwAA8Y0u59wJMm9t-z9DKTRgPyDhyks5rqKyGgaJpZM4MqCtG .

matthijskooijman commented 7 years ago

What zip file? Where did you download it? Please be complete in your answers, I don't have unlimited time handling requests like these.

Preetham288 commented 7 years ago

I downloaded the zip file from git hub !! Cut pasted the library files to arduino/libraries It had some error to detect #include math\math.h But somehow got it figured it out!! Later on when we tried to compile we came across many errors Such as

On 28-Mar-2017 2:11 PM, "Matthijs Kooijman" notifications@github.com wrote:

What zip file? Where did you download it? Please be complete in your answers, I don't have unlimited time handling requests like these.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/matthijskooijman/arduino-lmic/issues/78#issuecomment-289702792, or mute the thread https://github.com/notifications/unsubscribe-auth/AZdwwM3J3qrCsPhZlM9kGL6mUd1cs6Nzks5rqMeugaJpZM4MqCtG .

gizmocuz commented 7 years ago

Two days ago i started on a clean system Downloaded/Installed the latest Arduino IDE (1.8.2) Made a blink example application->works

Next i downloaded this git repo, installed it in Documents\Arduino\libraries\arduino-lmic\

Opened an example (ttn-otaa), compiled, working

There is nothing wrong here...

matthijskooijman commented 7 years ago

@Preetham288, it sounds like your setup is severely broken somehow. You've also still not answered my questions about what example sketch you are using exactly, so I won't be able to help you out here, and I'm closing this ticket. Feel free to leave more comments, perhaps other users will want to comment still, but I probably will not.

I would suggest you try a clean install of the Arduino IDE, without any other libraries in a clean sketchbook and see if that helps.

Preetham288 commented 7 years ago

Hello sir, Thank you very much we compiled the code

On 28-Mar-2017 3:38 PM, "Matthijs Kooijman" notifications@github.com wrote:

Closed #78 https://github.com/matthijskooijman/arduino-lmic/issues/78.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matthijskooijman/arduino-lmic/issues/78#event-1018250763, or mute the thread https://github.com/notifications/unsubscribe-auth/AZdwwDUTNRmw254Db6zYuqfwSi8XzpS3ks5rqNwagaJpZM4MqCtG .