Hello. I have installed platformio v3.1.1 in vscode editor. I am using windows 7.
When I create an empty project and try to “build” I get an error.
Please tell me how to fix this error and build.
Error:
* Executing task in folder p5: C:\Users\Anton2\.platformio\penv\Scripts\platformio.exe run
Processing featheresp32 (platform: espressif32; board: featheresp32; framework: arduino)
---------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/featheresp32.html
PLATFORM: Espressif 32 (6.1.0) > Adafruit ESP32 Feather
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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.20007.0 (2.0.7)
- tool-esptoolpy @ 1.40500.0 (4.5.0)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 33 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\featheresp32\src\main.cpp.o
Compiling .pio\build\featheresp32\FrameworkArduino\Esp.cpp.o
Compiling .pio\build\featheresp32\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pio\build\featheresp32\FrameworkArduino\HardwareSerial.cpp.o
In file included from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\sys\reent.h:503,
from C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/newlib/platform_include/sys/reent.h:17,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\stdio.h:60,
from C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:27,
from src/main.cpp:1:
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'void spinlock_initialize(spinlock_t*)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:46:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'bool spinlock_acquire(spinlock_t*, int32_t)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:75:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'void spinlock_release(spinlock_t*)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:154:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
*** [.pio\build\featheresp32\src\main.cpp.o] Error 1
In file included from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\sys\reent.h:503,
from C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/newlib/platform_include/sys/reent.h:17,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\stdio.h:60,
from C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:27,
from C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/cores/esp32/Esp.cpp:20:
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'void spinlock_initialize(spinlock_t*)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:46:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'bool spinlock_acquire(spinlock_t*, int32_t)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:75:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'void spinlock_release(spinlock_t*)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:154:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
In file included from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\sys\reent.h:503,
from C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/newlib/platform_include/sys/reent.h:17,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\wchar.h:6,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\cwchar:44,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits\postypes.h:40,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits\char_traits.h:40,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\string:40,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\stdexcept:39,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\array:39,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\tuple:39,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\functional:54,
from C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/cores/esp32/FunctionalInterrupt.h:11,
from C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/cores/esp32/FunctionalInterrupt.cpp:8:
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'void spinlock_initialize(spinlock_t*)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:46:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'bool spinlock_acquire(spinlock_t*, int32_t)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:75:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'void spinlock_release(spinlock_t*)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:154:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
In file included from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\sys\reent.h:503,
from C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/newlib/platform_include/sys/reent.h:17,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\stdlib.h:18,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\cstdlib:75,
from c:\users\anton2\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\stdlib.h:36,
from C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:1:
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'void spinlock_initialize(spinlock_t*)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:46:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'bool spinlock_acquire(spinlock_t*, int32_t)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:75:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h: In function 'void spinlock_release(spinlock_t*)':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:154:5: error: '__assert_func' was not declared in this scope
assert(lock);
^~~~~~
*** [.pio\build\featheresp32\FrameworkArduino\FunctionalInterrupt.cpp.o] Error 1
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/cores/esp32/Esp.cpp: In member function 'const char* EspClass::getChipModel()':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_common/include/esp_assert.h:39:13: error: '__assert_func' was not declared in this scope
assert(#MSG && (CONDITION)); \
^~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:96:38: note: in expansion of macro 'TRY_STATIC_ASSERT'
#define ASSERT_IF_DPORT_REG(_r, OP) TRY_STATIC_ASSERT(!IS_DPORT_REG(_r), (Cannot use OP for DPORT registers use DPORT_##OP));
^~~~~~~~~~~~~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:139:13: note: in expansion of macro 'ASSERT_IF_DPORT_REG'
ASSERT_IF_DPORT_REG((_r), REG_GET_FIELD);
\
^~~~~~~~~~~~~~~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/cores/esp32/Esp.cpp:268:25: note: in expansion of macro 'REG_GET_FIELD'
uint32_t chip_ver = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
^~~~~~~~~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_common/include/esp_assert.h:39:13: error: '__assert_func' was not declared in this scope
assert(#MSG && (CONDITION)); \
^~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:96:38: note: in expansion of macro 'TRY_STATIC_ASSERT'
#define ASSERT_IF_DPORT_REG(_r, OP) TRY_STATIC_ASSERT(!IS_DPORT_REG(_r), (Cannot use OP for DPORT registers use DPORT_##OP));
^~~~~~~~~~~~~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:109:13: note: in expansion of macro 'ASSERT_IF_DPORT_REG'
ASSERT_IF_DPORT_REG((_r), REG_READ);
\
^~~~~~~~~~~~~~~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:140:15: note: in expansion of macro 'REG_READ'
((REG_READ(_r) >> (_f##_S)) & (_f##_V));
\
^~~~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/cores/esp32/Esp.cpp:268:25: note: in expansion of macro 'REG_GET_FIELD'
uint32_t chip_ver = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
^~~~~~~~~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/cores/esp32/Esp.cpp: In member function 'FlashMode_t EspClass::getFlashChipMode()':
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_common/include/esp_assert.h:39:13: error: '__assert_func' was not declared in this scope
assert(#MSG && (CONDITION)); \
^~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:96:38: note: in expansion of macro 'TRY_STATIC_ASSERT'
#define ASSERT_IF_DPORT_REG(_r, OP) TRY_STATIC_ASSERT(!IS_DPORT_REG(_r), (Cannot use OP for DPORT registers use DPORT_##OP));
^~~~~~~~~~~~~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:109:13: note: in expansion of macro 'ASSERT_IF_DPORT_REG'
ASSERT_IF_DPORT_REG((_r), REG_READ);
\
^~~~~~~~~~~~~~~~~~~
C:/Users/Anton2/.platformio/packages/framework-arduinoespressif32/cores/esp32/Esp.cpp:344:24: note: in expansion of macro 'REG_READ'
uint32_t spi_ctrl = REG_READ(SPI_CTRL_REG(0));
^~~~~~~~
*** [.pio\build\featheresp32\FrameworkArduino\HardwareSerial.cpp.o] Error 1
*** [.pio\build\featheresp32\FrameworkArduino\Esp.cpp.o] Error 1
========================================= [FAILED] Took 4.94 seconds =========================================
* The terminal process "C:\Users\Anton2\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
platformio.ini file
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:featheresp32]
platform = espressif32
board = featheresp32
framework = arduino
My program:
#include <Arduino.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}