kike-canaries / canairio_firmware

CanAirIO is a citizen science initiative. We are developing a mobile application that is able to set a PM2.5 or CO2 sensors, and other related sensors, as a fixed station using WiFi or mobile station with an smartphone by using a Bluetooth connection.
https://canair.io
GNU General Public License v3.0
104 stars 23 forks source link

LoRA WAN LMIC improvement #268

Open hpsaturn opened 11 months ago

hpsaturn commented 11 months ago
roberbike commented 9 months ago

Why do these warnings appear?

Archiving .pio\build\LORADEVKIT\libFrameworkArduino.a Linking .pio\build\LORADEVKIT\firmware.elf c:/users/tecni/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/LORADEVKIT/lib54c/libLMIC-node.a(LMIC-node.cpp.o): in function boardInit(InitType)': C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/boards/bsf_ttgo_t_beam.h:113: multiple definition ofboardInit(InitType)'; .pio/build/LORADEVKIT/src/main.cpp.o:C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/boards/bsf_ttgo_t_beam.h:113: first defined here c:/users/tecni/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/LORADEVKIT/lib54c/libLMIC-node.a(LMIC-node.cpp.o): in function printChars(Print&, char, unsigned char, bool)': C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.h:190: multiple definition ofprintChars(Print&, char, unsigned char, bool)'; .pio/build/LORADEVKIT/src/main.cpp.o:C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.h:190: first defined here c:/users/tecni/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/LORADEVKIT/lib54c/libLMIC-node.a(LMIC-node.cpp.o): in function printSpaces(Print&, unsigned char, bool)': C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.h:203: multiple definition ofprintSpaces(Print&, unsigned char, bool)'; .pio/build/LORADEVKIT/src/main.cpp.o:C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.h:203: first defined here c:/users/tecni/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/LORADEVKIT/lib54c/libLMIC-node.a(LMIC-node.cpp.o): in function printHex(Print&, unsigned char*, unsigned int, bool, char)': C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.h:209: multiple definition ofprintHex(Print&, unsigned char*, unsigned int, bool, char)'; .pio/build/LORADEVKIT/src/main.cpp.o:C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.h:209: first defined here c:/users/tecni/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/LORADEVKIT/lib54c/libLMIC-node.a(LMIC-node.cpp.o): in function setTxIndicatorsOn(bool)': C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.h:230: multiple definition ofsetTxIndicatorsOn(bool)'; .pio/build/LORADEVKIT/src/main.cpp.o:C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.h:230: first defined here
c:/users/tecni/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/LORADEVKIT/lib54c/libLMIC-node.a(LMIC-node.cpp.o): in function initSerial(unsigned long, short)': C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.h:298: multiple definition ofinitSerial(unsigned long, short)'; .pio/build/LORADEVKIT/src/main.cpp.o:C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.h:298: first defined here c:/users/tecni/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/LORADEVKIT/lib54c/libLMIC-node.a(LMIC-node.cpp.o): in function setup()': C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.cpp:810: multiple definition ofsetup()'; .pio/build/LORADEVKIT/src/main.cpp.o:C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/src/main.cpp:251: first defined here c:/users/tecni/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/LORADEVKIT/lib54c/libLMIC-node.a(LMIC-node.cpp.o): in function loop()': C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.cpp:867: multiple definition ofloop()'; .pio/build/LORADEVKIT/src/main.cpp.o:C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/src/main.cpp:358: first defined here c:/users/tecni/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/LORADEVKIT/lib54c/libLMIC-node.a(LMIC-node.cpp.o):C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/boards/bsf_ttgo_t_beam.h:99: multiple definition of serial'; .pio/build/LORADEVKIT/src/main.cpp.o:C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/boards/bsf_ttgo_t_beam.h:99: first defined here c:/users/tecni/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/LORADEVKIT/lib54c/libLMIC-node.a(LMIC-node.cpp.o):C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/boards/bsf_ttgo_t_beam.h:85: multiple definition oflmic_pins'; .pio/build/LORADEVKIT/src/main.cpp.o:C:\Users\tecni\OneDrive\Documentos\platformio\canairio_firmware/.pio/libdeps/LORADEVKIT/LMIC-node/src/boards/bsf_ttgo_t_beam.h:85: first defined here collect2.exe: error: ld returned 1 exit status *** [.pio\build\LORADEVKIT\firmware.elf] Error 1 =========================================== [FAILED] Took 544.58 seconds ===========================================

hpsaturn commented 9 months ago

I have a different issue:

Compiling .pio/build/LORADEVKIT/lib2c4/batterylib/battery_oled.cpp.o
In file included from .pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.h:82,
                 from .pio/libdeps/LORADEVKIT/LMIC-node/src/LMIC-node.cpp:53:
.pio/libdeps/LORADEVKIT/LMIC-node/src/boards/bsf_ttgo_t_beam_v1.h:83:10: fatal error: axp20x.h: No such file or directory

****************************************************************
* Looking for axp20x.h dependency? Check our library registry!

but maybe is possible that is a duplicated header or include or definition, in your case. Do you have a different branch? or it happens with this branch? with LoRA_Wan_LMic_improv ?

roberbike commented 9 months ago

Yes, the same branch LoRA_Wan_LMic_improv. The same issue for ttgo_lora32_v1. You can define ttgo_t_beam.h that does not use axp20.h and run with t_beam v1