Heltec lora boards with cli on macOS M1

Hi everyone!

For the context: I am new to platformio but I have successfully coded some LoRa applications for Heltec Lora ESP32 v3 with the Arduino IDE.

I’d like to go with platformio because Arduino project structure, compiler runtime and IDE editor are somewhat PITA.

I tried to use PlatformIO IDE but cannot install compiler support for the M1 processor (using VSCodium and not using VSCode).

There was no previous version of platformio installed on my computer so this is a fresh install.

I tried a fresh install of platformio via brew and wanted to add the libraries for Heltec boards (LoRa v3 and Wireless Stick Lite). It seems like there is no support for ARM processors:

$ pio pkg install -l "Heltec WiFi LoRa 32 (V3)"

Resolving esp32-s3-devkit dependencies...
Library Manager: Installing Heltec WiFi LoRa 32 (V3)
UnknownPackageError: Could not find the package with 'Heltec WiFi LoRa 32 (V3)' requirements for your system 'darwin_arm64'

There was a topic with a similar context marked as “solved” (by removing previous installations via rm -rf ~/.platformio/packages/ but that didn’t help.

My questions are:

  • why does the Arduino IDE compile when using the libraries and why doesn’t do the pio command
  • has anybody solved this problem before? How?

Thanks for any spoilers!
Cheers!

The Heltec Arduino core is not well supported in PlatformIO (issue).

And by that I mean, only hacky workaround exist to include their version of the core: This one. Sadly, they do not upstream their changes in the Espressif-made Arduino-ESP32, so they always diverge.

So, while you can create a project with targeting the regular Espressif Arduino-ESP32 core, this will not be the Heltec core that has the additions for LoRaWAN.

[env:heltec_wifi_lora_32_V3]
platform = espressif32
board = heltec_wifi_lora_32_V3
framework = arduino

is what you would use as a platformio.ini there.

As such, if you want to develop applications for the Heltec LoRa boards in the intended way, with Heltec’s Arduino core, better stick with the Arduino IDE 2.x.

Hi Max! Thanks for your post. As you suggested I will (sadly) stick with the Arduino IDE.
This topic can be considered as completed.
Cheers!

1 Like