Cannot compile Heltec Lora 32 V3 on arduino IDE

I have completed everything what the manuals says(Heltec ESP32 Series Quick Start — esp32 latest documentation) but still have a problem. I have tried the same procedure with other laptops, it worked.

The error: c:/users/mansur/appdata/local/arduino15/packages/heltec-esp32/tools/esp-xs3/2302/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: cannot find -llorawan: No such file or directory
c:/users/mansur/appdata/local/arduino15/packages/heltec-esp32/tools/esp-xs3/2302/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: cannot find -llorawan: No such file or directory
collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

  1. Which version of the IDE? You did post this in IDE 1.x.
  2. Are the usernames on all the computers the same; meaning: does the path in the error message that you showed have the same length.
  3. Same operating system on all computers?
  4. Which sketch? I tried both the blank sketch and the RMakerCustom and they compiled without a problem in IDE 2.3.3 in Win11.

Note:
Vague problems with ESP32 board packages under Windows in general seem to relate to the length of commands.
You can rename the board package directory (see your error message) from heltec-esp32 to h-esp32 and see if that solves the problem. The side effect is, if not mistaken, that the board package will not be updated.

Below the board that I compiled for

FQBN: h-esp32:esp32:heltec_wifi_lora_32_V3
Using board 'heltec_wifi_lora_32_V3' from platform in folder: C:\Users\bugge\AppData\Local\Arduino15\packages\h-esp32\hardware\esp32\3.0.2
Using core 'esp32' from platform in folder: C:\Users\bugge\AppData\Local\Arduino15\packages\h-esp32\hardware\esp32\3.0.2
  1. Arduino IDE 2.3.3
  2. I did not quite understand your question
  3. Yes
  4. Factory_test for lora V3

I renamed the heltec-esp32 folder to h-esp32, after that run the arduino it showed error:
Platform 'Heltec-esp32:esp32' not found: platform not installed

Compilation error: Platform 'Heltec-esp32:esp32' not found: platform not installed.

Aruidno recommended to download again the board manager for heltec. I run the code again with downloaded board manager:

ibrary Heltec ESP32 Dev-Boards has been declared precompiled:
Using precompiled library in c:\Users\Mansur\OneDrive\Документы\Arduino\libraries\Heltec_ESP32_Dev-Boards\src\esp32s3
c:/users/mansur/appdata/local/arduino15/packages/heltec-esp32/tools/esp-xs3/2302/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: cannot find -llorawan: No such file or directory
c:/users/mansur/appdata/local/arduino15/packages/heltec-esp32/tools/esp-xs3/2302/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: cannot find -llorawan: No such file or directory
collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

I see in ur board that you complied the path is the same. For me the path precompiled library is different comparing to the error:

This is what I did and it did not give errors. I will retry tomorrow again.

  1. Close the IDE.
  2. Rename directory.
  3. Start IDE.

Is your username on all your computers mansur?


Topic moved to the IDE 2.x section of the forum.


What did you install? The second one or the third one? My previous comments are about the second one.

I did notice non-ascii characters in the path-name in your screenshot in post #3. There are known issues with that and I suggest that you move the sketchbook directory to another location that does not contain non-ascii characters.

  1. Create a directory somewhere; e.g. c:\Users\Mansur\OneDrive\Arduino.
  2. Edit the sketchbook location under file/preferences in the IDE and point to the newly created directory.
  3. Close the IDE.
  4. Move the content of c:\Users\Mansur\OneDrive\nonascii\Arduino to the new directory.
  5. Start the IDE.

If in doubt, make backups.

I would delete the content of the following directories as well so you have a fresh start.

  1. C:\Users\yourUsername\AppData\Local\Temp\arduino
  2. C:\Users\yourUsername\AppData\Roaming\arduino-ide

The problem was in directory path of sketchbook, as you can see from previous screens, some of the folder was in cirilic so I changed it, now it is working BUT there is another problem with PORT even though I downloaded the Cp210X prot driver.
Error is displayed:

Library Heltec ESP32 Dev-Boards has been declared precompiled:
Using precompiled library in c:\Users\Mansur\OneDrive\Arduino\libraries\Heltec_ESP32_Dev-Boards\src\esp32s3
Sketch uses 322989 bytes (9%) of program storage space. Maximum is 3342336 bytes.
Global variables use 18520 bytes (5%) of dynamic memory, leaving 309160 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.6
Serial port COM3
Connecting......

A serial exception error occurred: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)
Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or drivers.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation

In device manager port is displayed:

I can't help you with the upload error. You either don't have permission or the port is in use by something else; for the latter you can try to close serial monitor (if it's open) and see if the problem goes away.