Проблема:
При попытке компиляции вашей прошивки ESP-IDF (с PlatformIO или без), вы видите сообщение об ошибке, например
espidf_porttick_error.txt
src/main.cpp:13:27: error: 'portTICK_PERIOD_MS' was not declared in this scope
13 | vTaskDelay(1000 / portTICK_PERIOD_MS);Решение
Подключите FreeRTOS, добавив следующие строки в начало файла, где возникла ошибка (src/main.cpp в этом примере):
freertos_includes.cpp
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
Check out similar posts by category:
ESP8266/ESP32 FreeRTOS PlatformIO
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow