I’m trying to build a project on ct-62, this one: Heltec_ESP32/examples/LoRaWAN
/LoRaWanWiFi/
Everything works fine in Arduino IDE. But Arduino IDE is a developer’s nightmare. It’s impossible to work in it. I’m trying to build the same project in Platformio. And I get a huge bummer.
big wall of errors like this:
c:/users/dihalt/.platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld.exe: failed to merge target specific data of file c:/users/dihalt/.platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/rv32imc/ilp32/no-rtti\libgcc.a(lesf2.o)
c:/users/dihalt/.platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld.exe: -march=: ISA string must begin with rv32 or rv64
c:/users/dihalt/.platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld.exe: failed to merge target specific data of file c:/users/dihalt/.platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/rv32imc/ilp32/no-rtti\libgcc.a(mulsf3.o)
It feels like the ESP32 framework installed in Arduino IDE is different from the framework from Platformio. And the Heltec_ESP32 library contains precompiled libraries (lorawan.a) that are compiled only in a project built in Arduino IDE.
platformio.ini
[env:esp32-c3-devkitm-1]
platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino
build_flags =
-DSLOW_CLK_TPYE=0
-DLoRaWAN_DEBUG_LEVEL=3
-DREGION_EU868
-DACTIVE_REGION=LORAMAC_REGION_EU868
-DHELTEC_BOARD=70
-DWIRELESS_MINI_SHELL
-DMCU_ESP32_C3
-DRADIO_CHIP_SX1262
lib_deps =
heltecautomation/Heltec ESP32 Dev-Boards
And how to make it work in platformio?
In principle, I don’t care about this library, I just need a project that would work on this hardware (cx1262 and esp32c3) and provide me with the work of lorawan otaa or abp. I have already tried the radiolib libraries, but not a single example from there worked normally with my gateway and it is not clear why. No debug information. It just does not work.