Mac OSX 11.6 & Arduino IDE 1.18.19 & Heltec ESP32

Hi,

I started a project with a HELTEC ESP32 LoRa Board. I installed the board drivers and the library on my old m Macbook Air, where OSX 10.13.6 and Arduino IDE 1.18.13 is running. I tested the HELTEC board with the example files on my Macbook and compiler and loader is working correct.

After these tests I installed Arduino 1.18.19 (fresh download today) on my M1 iMac with OSX 11.6. I got serious error messages:


Arduino: 1.8.19 (Mac OS X), Board: "WiFi LoRa 32(V2), Disabled, 240MHz (WiFi/BT), 921600, None, REGION_EU868, None"

Traceback (most recent call last):
File "esptool.py", line 57, in
File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
File "serial/tools/list_ports.py", line 29, in
File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
File "serial/tools/list_ports_posix.py", line 31, in
File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
File "serial/tools/list_ports_osx.py", line 32, in
ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found
Failed to execute script esptool
Mehrere Bibliotheken wurden für "WiFi.h" gefunden
Benutzt: /Users/larsmahling/Library/Arduino15/packages/Heltec-esp32/hardware/esp32/0.0.5/libraries/WiFi
Nicht benutzt: /Applications/Arduino.app/Contents/Java/libraries/WiFi
exit status 255
/Applications/Arduino.app/Contents/Java/arduino-builder gab 255 zurück
Fehler beim Kompilieren für das Board WiFi LoRa 32(V2).


I double checked all installations - all identical on Macbook an iMac. Redi several installation of Arduino itself and the board drivers and libraries. No success.

Does anyone have an idea, why it is not working on my iMac?

Thank you - LaMa-1964

Hi @lama-1964

I believe the error is caused by this issue:

The older versions of the esptool tool used to upload sketches to the ESP32 board was not compatible with the newer versions of macOS.

This issue has already been fixed in the 1.0.5 release of the ESP32 boards platform, a year ago, but you are using a forked "Heltec-esp32" variant of the platform which seems to be outdated.

My recommended solution is to use the Arduino IDE Boards Manager (accessed through the Tools > Board > Boards Manager menu in the IDE) remove the "Heltec-esp32" platform and then install the standard ESP32 platform, following the official instructions under the "Installing using Boards Manager" section of this page:
https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-boards-manager

The standard ESP32 platform also has a "WiFi LoRa 32(V2)" board selection, so it should provide proper support for your board (the Heltek platform you are using is likely only a copy of the standard platform).

Thank you for your advise. Did that. After removing the heltec board platform and installing the ESP32 Espressiv platform according the link and restart Arduino app I find several ESP32 boards in the board manager. Even the heltec esp32 board is under "ESP32 Arduino" available. But I still get error messages while compiling:


Arduino: 1.8.19 (Mac OS X), Board: "Heltec WiFi LoRa 32(V2), Disabled, 240MHz (WiFi/BT), 921600, None, REGION_EU868, None"

/Users/larsmahling/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/BMP180.cpp: In member function 'boolean BMP085::begin(uint8_t)':
/Users/larsmahling/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/BMP180.cpp:12:28: error: call of overloaded 'begin(int, int, int)' is ambiguous
Wire.begin(13, 12, 100000);
^
In file included from /Users/larsmahling/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/BMP180.h:5,
from /Users/larsmahling/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards/src/BMP180.cpp:1:
/Users/larsmahling/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/Wire/src/Wire.h:79:10: note: candidate: 'bool TwoWire::begin(int, int, uint32_t)'
bool begin(int sda=-1, int scl=-1, uint32_t frequency=0); // returns true, if successful init of i2c bus
^~~~~
/Users/larsmahling/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/Wire/src/Wire.h:80:10: note: candidate: 'bool TwoWire::begin(uint8_t, int, int, uint32_t)'
bool begin(uint8_t slaveAddr, int sda=-1, int scl=-1, uint32_t frequency=0);
^~~~~
Mehrere Bibliotheken wurden für "WiFi.h" gefunden
Benutzt: /Users/larsmahling/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi
Nicht benutzt: /Applications/Arduino.app/Contents/Java/libraries/WiFi
exit status 1
Fehler beim Kompilieren für das Board Heltec WiFi LoRa 32(V2).

I tried different boards - ESP32 Dev Module. But the error list is even longer.

OK! The tricky thing about complex technical undertakings like Arduino is that sometimes fixing one problem only gets you to the next one. This can make it difficult to see that progress is happening, but this is indeed progress.

You can see that the signature of your function call:

Wire.begin(13, 12, 100000);

is begin(int, int, int). The reason is the the default type of integer literals is int.

Wire.begin is an overloaded function, which means there are two variants of the function each with a different function signature:

  • bool TwoWire::begin(int, int, uint32_t)
  • bool TwoWire::begin(uint8_t, int, int, uint32_t)

Your function signature doesn't match either of them perfectly, so the compiler gets confused and produces this "is ambiguous" error.

We can see that the overload you wanted was the first one, so it is only necessary to make the signature of the call in your sketch match so that there is no ambiguity for the compiler. That can be done by adding a type suffix to the integer literal to specify that it should be treated as having an unsigned int type:

Wire.begin(13, 12, 100000u);

I followed the instruction in this very helpful video:

Did that for the esp32 and the Heltec esp32 package.

Thank you all for your help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.