Closed ouinouin closed 1 month ago
i got into the esp32 doc , apparently the function esp_task_wdt_init() is not taking an integer as argument but a special type : doc here from espressif i dont know if this function is done differently in arduino.
i commented the watchdog initialisation and could go to the end of the compilation :
// initialize watchdog
//esp_task_wdt_init(WATCHDOG_TIMEOUT_S, true);
//esp_task_wdt_add(nullptr);
Hey, well I've looked into this and it is a bit complicated: The error appears on your end, cause you build against a newer espressif platform (3.0.1) which breaks the API. My build is still using 2.0.17 . Watchdog needs to be configured differently, you might try with:
#include "freertos/FreeRTOS.h"
// (...)
esp_task_wdt_config_t twdt_config = {
.timeout_ms = WATCHDOG_TIMEOUT_S * 1000,
.idle_core_mask = (1 << configNUM_CORES) - 1,
.trigger_panic = true,
};
// (...)
void setup()
{
// (...)
// initialize watchdog
esp_task_wdt_init(&twdt_config);
esp_task_wdt_add(nullptr);
I am not sure how you managed to upgrade the framework to a later version, because it seems platformio dropped support for espressif, and with the board arduino_nano_esp32
I always get a fairly old platform version. Maybe because you were building previously against a different board m5stack-atom
and it re-uses the framework which has been previously fetched :man_shrugging:
I managed to upgrade to the latest platform by using https://github.com/pioarduino/platform-espressif32 . I think I will do the upgrade anytime soon, so this build issues should also disappear for you and I am happy to finally get some framework patches, ....
good catch , i dont think platformio is dropping support for espressif, i use a lot the compilation for esphome, and esp-idf seems actively maintained.
in the meantime, you can pin the version of the framework on the platformio.ini
platform = espressif32@version:
(im still seeking which version is linked with arduinoespressif framework. ill have a look tomorrow.
(indeed, i just ordered one board on aisler.net, but got 3, if you know some interrested people , i can send the 2 remaining free of charge.
@tspopp
i found the latest version containing the 2.0.17 arduino esp32 framework : this is the 6.8.0 : seen here.
in fact the 3.2.XX of the arduino : framework-arduinoespressif32 means 2.0.17... : - framework-arduinoespressif32 @ 3.20017.0 (2.0.17)
whereas the framework-arduinoespressif32 @ 3.0.X is... the framework 3.0.... what a mess...
so using platform = espressif32@6.8.0
in he platformio.ini is compiling your code with the old style watchdog
using platform = espressif32
is not compiling your code with the old style watchdog
using platform = espressif32@6.8.1
which seems to be a bugfix release is compiling your code with the old style watchdog
hope this helps
(to what i understand its a good practice to "pin" the version of the framework in the platformio.ini to ensure we re all starting from the same line :-).
indeed , your portion of code compiles with the latest framework.
#include "freertos/FreeRTOS.h" // (...) esp_task_wdt_config_t twdt_config = { .timeout_ms = WATCHDOG_TIMEOUT_S * 1000, .idle_core_mask = (1 << configNUM_CORES) - 1, .trigger_panic = true, }; // (...) void setup() { // (...) // initialize watchdog esp_task_wdt_init(&twdt_config); esp_task_wdt_add(nullptr);
Well, I thought moving to v5 will be easy, the first test seemed promising but today I noticed ntp time not working. So I went debugging and also noticed ota is broken, too. So I reverted my initial patch and will prepare the migration to v5 in another branch.
Hi, me again :-) i just split the topic for clarity, i tried to compile without any modification in the code and couldnt success (i guess we got some different versions of arduino or something like that in the platformio setup since the are no versions of the packages defined. the log states that the platform used is 2024.6.10
here is the full log , maybe you can paste the log of a successful compilation to see any offending packages version.