Sorta a noob question. Got a ESP32 Mini D1 clone from aliexpress. Have absolutely no issue uploading to it from Arduino IDE with the board parameters set to ESP32 Dev module.
However, if trying to work with the board in VScode with Platform IO extension i run into a very weird situation. It connects and uploads successfully. However, the micro controller gets stuck in a infinite boot loop due to brownout trigger.
I switch to arduino IDE upload the code and the controller runs as perfectly as before.
The same code, the same cable, i don’t even disconnect the controller between uploads.
Platform.ini file looks like this. although i tried different boards to no avail.
Hello World sketch runs without brownout triggers. which makes the whole thing even more confusing, i suppose.
My original code is interfacing with PS5 controller over Bluetooth. that’s when i inititally noticed the issue. But since then i tried a few Arduino example sketches involving wifi network connection and wifi network scans. All of those failed when compiled via platform IO.
I asked the same question on reddit, and someone replied with the following:
"Esp-idf and pio will start both cores in boot. Legacy Arduino won’t because its world revolves around tiny 8 bitters. With the snippet you show on pio Arduino runs on one and the radios and interrupts run in the other. If course, any other threads you start have scheduling policies largely up to you. "
I’d lie if i say i comprehend the meaning completely. However, I’d like to know what configuration changes can be made to replicate Arduino IDE compiler settings in PlatformIO.
Esspressif32 in PlatformIO 6.10.0 is Arduino 2.0.17 which is based on ESP-IDF 4.4.7. Whereby your ArduinoIDE is using Espressif Arduino 3.0.7 which is based on ESP-IDF 5.1.4. So there is a big mismatch in the Arduino and ESP-IDF version.
To get the latest Espressif32 Arduino 3.1.1 (based on ESP-IDF 5.3.2) to PlatformIO use pioarduino. Change the platform setting in platformio.ini to:
the link didn’t work for me but i downloaded a .zip and linked it in platformio.ini.
the message didn’t go away. I don’t use PIN 255 in my code. Maybe it’s coming form one of the libraries??
At the moment, it seems like the code runs properly though, but more testing is required. Thanks for your help
No, this wasn’t meant to be a download link. You have to put it in your platformio.ini as described above. Change the platform setting in platformio.ini to: