为什么要打补丁
因为在使用PSRAM时,会将一些默认的任务栈放到PSRAM中以节省内存。如果没有安装此补丁,则在编译期间将出现以下错误
Not found right xTaskCreateRestrictedPinnedToCore. Please apply the $ADF_PATH/idf_patches/idf_v3.3_freertos.patch first
打补丁方法
首先将idf_v3.3_esp_http_client.patch这个补丁放到esp-idf路径下,然后在esp-idf路径下鼠标右键git-bash-here输入:
git apply ./idf_v3.3_esp_http_client.patch
如果出现了下面的错误
./idf_v3.3_freertos.patch:12: trailing whitespace.
* xTaskCreateRestrictedPinnedToCore() should only be used in systems that
warning: 1 line adds whitespace errors.
则输入下面的代码
git config apply.whitespace nowarn
然后重新打补丁