ecocurious2 / MultiGeiger

Geigerzähler mit ESP32 und empfindlichem Si22g-Zählrohr (Gamma)
https://multigeiger.readthedocs.io/
GNU General Public License v3.0
69 stars 29 forks source link

Software Error: Board not supported / multiple definition of `hal_init' #461

Open norbi919 opened 2 years ago

norbi919 commented 2 years ago

Hallo,

bekomme beim Kompilieren erst eine Warnung:

hal.cpp: C:\Users\Norbert\Documents\Arduino\libraries\arduino-lmic-master\src\hal\getpinmap_thisboard.cpp: In function 'const Arduino_LMIC::HalPinmap_t* Arduino_LMIC::GetPinmap_ThisBoard()': C:\Users\Norbert\Documents\Arduino\libraries\arduino-lmic-master\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")

später dann ein Exit:

kurz vorm Ende des Compilevorgangs: c:/users/norbert/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Norbert\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3-RC1/tools/sdk/esp32/lib\libpp.a(hal_mac.o): in function hal_init': (.text.hal_init+0xb4): multiple definition ofhal_init'; C:\Users\Norbert\AppData\Local\Temp\arduino_build_964013\libraries\arduino-lmic-master\hal\objs.a(hal.cpp.o):C:\Users\Norbert\Documents\Arduino\libraries\arduino-lmic-master\src\hal/hal.cpp:416: first defined here collect2.exe: error: ld returned 1 exit status

Kompiliere mit der Arduinoapp und den aktuellsten Libraries. Die MCCI LoRaWAN library and die ESP32 base libraries haben da irgendwie ein Problem.

Gibt es evtl. Libversionen die entsprechend zusammen passen?

Grüße, Norbert.

rexfue commented 2 years ago

Das liegt wohl an der neuesten Espressif32-Arduino-Anpassung. Es gibt zwei Workarounds:

ThomasWaldmann commented 9 months ago

1 Jahr später... - ist das Problem immer noch nicht richtig gelöst?

rexfue commented 9 months ago

It IS solved, use

build_flags = -D CFG_eu868=1 -D CFG_sx1276_radio=1 -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS=1 -D hal_init=LMICHAL_init <---------------------

in platform.ini.

On 15. Oct 2023, at 21:45, TW @.***> wrote:

1 Jahr später... - ist das Problem immer noch nicht richtig gelöst?

— Reply to this email directly, view it on GitHub https://github.com/ecocurious2/MultiGeiger/issues/461#issuecomment-1763486755, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSNFB6LJUSGJAF3DDVVNTTX7Q4O3AVCNFSM52SIKCJ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZWGM2DQNRXGU2Q. You are receiving this because you commented.

ThomasWaldmann commented 9 months ago

I have that (have copied git-committed platformio-example.ini to local platformio.ini), but as I use the arduino IDE, I guess that is not used?

rexfue commented 9 months ago

You are right. If you find, how to set precompiler flags in Arduino IDE, then you can try it

On 16. Oct 2023, at 12:22, TW @.***> wrote:

I have that (have copied git-committed platformio-example.ini to local platformio.ini), but as I use the arduino IDE, I guess that is not used?

— Reply to this email directly, view it on GitHub https://github.com/ecocurious2/MultiGeiger/issues/461#issuecomment-1764167960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSNFB6J3TMWGYJX4RR5RV3X7UDGZAVCNFSM52SIKCJ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZWGQYTMNZZGYYA. You are receiving this because you commented.

ThomasWaldmann commented 9 months ago

Didn't find a way yet. There is no GUI dialogue.

Also tried this script to invoke arduino ide, but the compilation still does not work:

export CFLAGS="-DCFG_eu868=1 -DCFG_sx1276_radio=1 -DARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS=1 -Dhal_init=LMICHAL_init"

/Applications/Arduino\ IDE.app/Contents/MacOS/Arduino\ IDE
rexfue commented 9 months ago

Hmmm, ich verwende auf dem MAC Visual Studio Code und Platformio für alle ESP32 Anwendungen

On 16. Oct 2023, at 14:05, TW @.***> wrote:

Didn't find a way yet. There is no GUI dialogue.

Also tried this script to invoke arduino ide, but the compilation still does not work:

export CFLAGS="-DCFG_eu868=1 -DCFG_sx1276_radio=1 -DARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS=1 -Dhal_init=LMICHAL_init"

/Applications/Arduino\ IDE.app/Contents/MacOS/Arduino\ IDE — Reply to this email directly, view it on GitHub https://github.com/ecocurious2/MultiGeiger/issues/461#issuecomment-1764330571, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSNFB627IKCAM3WQRJBJTTX7UPH7AVCNFSM52SIKCJ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZWGQZTGMBVG4YQ. You are receiving this because you commented.