I’ve been using platformio for ESP32 DevKit development using the Arduino framework with great success. I’ve recently gotten the Adafruit Qt Py (which I believe uses the ESP32-S2) and am trying to use it with the Arduino framework and Arduino NimBLE library.
When I try to build my project, I get the compiler error message at the end of this message. I’ve also put a minimal project that should make the error reproducible here: GitHub - devalbo/test-qtpy-pio-nimble-arduino .
Does anyone know what’s going on or what would be a good way to proceed with this error?
Thanks!
Processing adafruit_qtpy_esp32s2 (platform: espressif32; board: adafruit_qtpy_esp32s2; framework: arduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/adafruit_qtpy_esp32s2.html
PLATFORM: Espressif 32 (4.3.0+sha.b1b44fe) > Adafruit QT Py ESP32-S2
HARDWARE: ESP32S2 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, 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.20003.0 (2.0.3)
- tool-esptoolpy @ 1.30300.0 (3.3.0)
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch3
- toolchain-xtensa-esp32s2 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 33 compatible libraries
Scanning dependencies...
Dependency Graph
|-- NimBLE-Arduino @ 1.3.8
|-- ESP32 BLE Arduino @ 2.0.0
Building in release mode
Compiling .pio/build/adafruit_qtpy_esp32s2/src/bluetooth.cpp.o
In file included from src/bluetooth.cpp:2:
src/bluetooth.h:8:1: error: 'NimBLEServer' does not name a type
NimBLEServer * initBluetoothServer(const char * deviceName);
^~~~~~~~~~~~
src/bluetooth.h:9:27: error: variable or field 'startBluetoothServer' declared void
void startBluetoothServer(NimBLEServer * server);
^~~~~~~~~~~~
src/bluetooth.h:9:27: error: 'NimBLEServer' was not declared in this scope
Compiling .pio/build/adafruit_qtpy_esp32s2/lib2b7/NimBLE-Arduino/esp-hci/src/esp_nimble_hci.c.o
src/bluetooth.h:9:42: error: 'server' was not declared in this scope
void startBluetoothServer(NimBLEServer * server);
^~~~~~
src/bluetooth.h:9:42: note: suggested alternative: 'perror'
void startBluetoothServer(NimBLEServer * server);
^~~~~~
perror
src/bluetooth.cpp:8:1: error: 'NimBLEServer' does not name a type
NimBLEServer * initBluetoothServer(const char * deviceName) {
^~~~~~~~~~~~
src/bluetooth.cpp:32:27: error: variable or field 'startBluetoothServer' declared void
void startBluetoothServer(NimBLEServer * server) {
^~~~~~~~~~~~
src/bluetooth.cpp:32:27: error: 'NimBLEServer' was not declared in this scope
src/bluetooth.cpp:32:42: error: 'server' was not declared in this scope
void startBluetoothServer(NimBLEServer * server) {
^~~~~~
src/bluetooth.cpp:32:42: note: suggested alternative: 'perror'
void startBluetoothServer(NimBLEServer * server) {
^~~~~~
perror
Compiling .pio/build/adafruit_qtpy_esp32s2/lib2b7/NimBLE-Arduino/ext/tinycrypt/src/ctr_mode.c.o
Compiling .pio/build/adafruit_qtpy_esp32s2/lib2b7/NimBLE-Arduino/ext/tinycrypt/src/ctr_prng.c.o
Compiling .pio/build/adafruit_qtpy_esp32s2/lib2b7/NimBLE-Arduino/ext/tinycrypt/src/ecc.c.o
Compiling .pio/build/adafruit_qtpy_esp32s2/lib2b7/NimBLE-Arduino/ext/tinycrypt/src/ecc_dh.c.o
Compiling .pio/build/adafruit_qtpy_esp32s2/lib2b7/NimBLE-Arduino/ext/tinycrypt/src/ecc_dsa.c.o
*** [.pio/build/adafruit_qtpy_esp32s2/src/bluetooth.cpp.o] Error 1
Compiling .pio/build/adafruit_qtpy_esp32s2/lib2b7/NimBLE-Arduino/ext/tinycrypt/src/ecc_platform_specific.c.o
In file included from /Users/ajb/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/esp_hw_support/include/soc/compare_set.h:12,
from /Users/ajb/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/esp_hw_support/include/soc/spinlock.h:13,
from /Users/ajb/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/portmacro.h:42,
from /Users/ajb/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/freertos/include/freertos/portable.h:51,
from /Users/ajb/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/freertos/include/freertos/FreeRTOS.h:63,
from .pio/libdeps/adafruit_qtpy_esp32s2/NimBLE-Arduino/src/nimble/nimble_npl_os.h:26,
from .pio/libdeps/adafruit_qtpy_esp32s2/NimBLE-Arduino/src/nimble/nimble_npl.h:54,
from .pio/libdeps/adafruit_qtpy_esp32s2/NimBLE-Arduino/src/os/os.h:38,
from .pio/libdeps/adafruit_qtpy_esp32s2/NimBLE-Arduino/src/nimble/ble.h:26,
from .pio/libdeps/adafruit_qtpy_esp32s2/NimBLE-Arduino/src/nimble/hci_common.h:23,
from .pio/libdeps/adafruit_qtpy_esp32s2/NimBLE-Arduino/src/esp-hci/src/esp_nimble_hci.c:24:
/Users/ajb/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/include/soc/soc_memory_types.h: In function 'esp_ptr_in_iram':
/Users/ajb/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/include/soc/soc_memory_types.h:105:28: error: 'SOC_CACHE_APP_LOW' undeclared (first use in this function); did you mean 'SOC_RTC_DRAM_LOW'?
return ((intptr_t)p >= SOC_CACHE_APP_LOW && (intptr_t)p < SOC_IRAM_HIGH);
^~~~~~~~~~~~~~~~~
SOC_RTC_DRAM_LOW
/Users/ajb/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/include/soc/soc_memory_types.h:105:28: note: each undeclared identifier is reported only once for each function it appears in
.pio/libdeps/adafruit_qtpy_esp32s2/NimBLE-Arduino/src/esp-hci/src/esp_nimble_hci.c: At top level:
.pio/libdeps/adafruit_qtpy_esp32s2/NimBLE-Arduino/src/esp-hci/src/esp_nimble_hci.c:30:10: fatal error: esp_bt.h: No such file or directory