upd:
I found in vscode/platformio Library section and there is one library from Heltec - Heltec ESP32 Dev-Boards
I’ve added it to my project via button “Add to Project”
after this platformio.ini has been changed to:
[env:heltec_wifi_lora_32_V3]
platform = espressif32
board = heltec_wifi_lora_32_V3
framework = arduino
lib_deps = heltecautomation/Heltec ESP32 Dev-Boards@^2.1.2
and seems it installed into folder with my project files:
c:\projects\my_test_proj.pio\libdeps\heltec_wifi_lora_32_V3\
and now there no error about “LoRaWan_APP.h” module but a lot of another error messages:
Processing heltec_wifi_lora_32_V3 (platform: espressif32; board: heltec_wifi_lora_32_V3; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/heltec_wifi_lora_32_V3.html
PLATFORM: Espressif 32 (6.9.0) > Heltec WiFi LoRa 32 (V3)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20017.0 (2.0.17)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
- toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 34 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Heltec ESP32 Dev-Boards @ 2.1.2
Building in release mode
Compiling .pio\build\heltec_wifi_lora_32_V3\src\wifi_lora32_v3_lorawan.cpp.o
Compiling .pio\build\heltec_wifi_lora_32_V3\lib781\Heltec ESP32 Dev-Boards\HT_st7789spi.cpp.o
In file included from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.h:9,
from src/wifi_lora32_v3_lorawan.cpp:16:
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/loramac/LoRaMac.h:141: warning: "LORA_MAC_PRIVATE_SYNCWORD" redefined
#define LORA_MAC_PRIVATE_SYNCWORD 0x12
In file included from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/ESP32_Mcu.h:13,
from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.h:7,
from src/wifi_lora32_v3_lorawan.cpp:16:
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/driver/sx126x.h:122: note: this is the location of the previous definition
#define LORA_MAC_PRIVATE_SYNCWORD 0x1424
In file included from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.h:9,
from src/wifi_lora32_v3_lorawan.cpp:16:
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/loramac/LoRaMac.h:146: warning: "LORA_MAC_PUBLIC_SYNCWORD" redefined
#define LORA_MAC_PUBLIC_SYNCWORD 0x34
In file included from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/ESP32_Mcu.h:13,
from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.h:7,
from src/wifi_lora32_v3_lorawan.cpp:16:
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/driver/sx126x.h:127: note: this is the location of the previous definition
#define LORA_MAC_PUBLIC_SYNCWORD 0x3444
Compiling .pio\build\heltec_wifi_lora_32_V3\lib781\Heltec ESP32 Dev-Boards\LoRaWan_APP.cpp.o
Compiling .pio\build\heltec_wifi_lora_32_V3\lib781\Heltec ESP32 Dev-Boards\driver\gpio-board.c.o
src/wifi_lora32_v3_lorawan.cpp: In function 'void setup()':
src/wifi_lora32_v3_lorawan.cpp:55:15: error: 'HELTEC_BOARD' was not declared in this scope
Mcu.begin(HELTEC_BOARD,SLOW_CLK_TPYE);
^~~~~~~~~~~~
src/wifi_lora32_v3_lorawan.cpp:55:28: error: 'SLOW_CLK_TPYE' was not declared in this scope
Mcu.begin(HELTEC_BOARD,SLOW_CLK_TPYE);
^~~~~~~~~~~~~
Compiling .pio\build\heltec_wifi_lora_32_V3\lib781\Heltec ESP32 Dev-Boards\loramac\region\RegionCN779.c.o
Compiling .pio\build\heltec_wifi_lora_32_V3\lib781\Heltec ESP32 Dev-Boards\loramac\region\RegionCommon.c.o
*** [.pio\build\heltec_wifi_lora_32_V3\src\wifi_lora32_v3_lorawan.cpp.o] Error 1
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/driver/gpio-board.c: In function 'GpioMcuWrite':
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/driver/gpio-board.c:56:15: error: 'RADIO_NSS' undeclared (first use in this function); did you mean 'RAD_TO_DEG'?
if(obj->pin==RADIO_NSS && radio_nss_inited==false)
^~~~~~~~~
RAD_TO_DEG
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/driver/gpio-board.c:56:15: note: each undeclared identifier is reported only once for each function it appears in
*** [.pio\build\heltec_wifi_lora_32_V3\lib781\Heltec ESP32 Dev-Boards\driver\gpio-board.c.o] Error 1
In file included from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/HT_st7789spi.cpp:25:
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/HT_st7789spi.h:30:10: fatal error: Adafruit_GFX.h: No such file or directory
**********************************************************************
* Looking for Adafruit_GFX.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:Adafruit_GFX.h"
* Web > https://registry.platformio.org/search?q=header:Adafruit_GFX.h
*
**********************************************************************
#include <Adafruit_GFX.h>
^~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\heltec_wifi_lora_32_V3\lib781\Heltec ESP32 Dev-Boards\HT_st7789spi.cpp.o] Error 1
In file included from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.h:9,
from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.cpp:1:
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/loramac/LoRaMac.h:141: warning: "LORA_MAC_PRIVATE_SYNCWORD" redefined
#define LORA_MAC_PRIVATE_SYNCWORD 0x12
In file included from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/ESP32_Mcu.h:13,
from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.h:7,
from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.cpp:1:
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/driver/sx126x.h:122: note: this is the location of the previous definition
#define LORA_MAC_PRIVATE_SYNCWORD 0x1424
In file included from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.h:9,
from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.cpp:1:
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/loramac/LoRaMac.h:146: warning: "LORA_MAC_PUBLIC_SYNCWORD" redefined
#define LORA_MAC_PUBLIC_SYNCWORD 0x34
In file included from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/ESP32_Mcu.h:13,
from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.h:7,
from .pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.cpp:1:
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/driver/sx126x.h:127: note: this is the location of the previous definition
#define LORA_MAC_PUBLIC_SYNCWORD 0x3444
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.cpp:40:34: error: 'LoRaWAN_DEBUG_LEVEL' was not declared in this scope
RTC_DATA_ATTR uint8_t debugLevel=LoRaWAN_DEBUG_LEVEL;
^~~~~~~~~~~~~~~~~~~
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.cpp:40:34: note: suggested alternative: 'XCHAL_DEBUGLEVEL'
RTC_DATA_ATTR uint8_t debugLevel=LoRaWAN_DEBUG_LEVEL;
^~~~~~~~~~~~~~~~~~~
XCHAL_DEBUGLEVEL
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.cpp: In member function 'void LoRaWanClass::sleep(DeviceClass_t)':
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.cpp:666:33: error: 'HELTEC_BOARD' was not declared in this scope
Mcu.sleep(classMode,debugLevel,HELTEC_BOARD,SLOW_CLK_TPYE);
^~~~~~~~~~~~
.pio/libdeps/heltec_wifi_lora_32_V3/Heltec ESP32 Dev-Boards/src/LoRaWan_APP.cpp:666:46: error: 'SLOW_CLK_TPYE' was not declared in this scope
Mcu.sleep(classMode,debugLevel,HELTEC_BOARD,SLOW_CLK_TPYE);
^~~~~~~~~~~~~
*** [.pio\build\heltec_wifi_lora_32_V3\lib781\Heltec ESP32 Dev-Boards\LoRaWan_APP.cpp.o] Error 1
===================================================================================== [FAILED] Took 2.34 seconds =====================================================================================