Skip to content

Commit

Permalink
Fix hal_init name collision between arduino-esp32 and arduino-lmic
Browse files Browse the repository at this point in the history
The bug is tracked here: mcci-catena/arduino-lmic#714

This pull request fixes the following linker failure when building using vscode, platformio on Linux.
///.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/lib/libpp.a(hal_mac.o): in function `hal_init':
(.text.hal_init+0xb4): multiple definition of `hal_init'; .pio/build/working-in-progress/libdad/libMCCI LoRaWAN LMIC library.a(hal.cpp.o):///git/g/hzgl-lora-communicator/.pio/libdeps/working-in-progress/MCCI LoRaWAN LMIC library/src/hal/hal.cpp:416: first defined here
collect2: error: ld returned 1 exit status
*** [.pio/build/working-in-progress/firmware.elf] Error 1
  • Loading branch information
4004 authored Sep 15, 2023
1 parent bf37864 commit b4ef260
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ build_flags =
; Select the power management chip
-D AXP192=1
; -D AXP2101=1
; hal_init is already used by arduino-esp32 (2.0), rename to LMIC_HAL_init
; to avoid name collision.
; https://github.com/mcci-catena/arduino-lmic/issues/714
-D hal_init=LMIC_HAL_init
deps_3rd_party =
ESP8266 and ESP32 OLED driver for SSD1306 displays
MCCI LoRaWAN LMIC library
Expand Down

0 comments on commit b4ef260

Please sign in to comment.