ESP32-P4 and Platformio

Hi…
just a simple question Will ESP32-P4 supported by Platformio IDE ?

Thanks a lot

Is there any update on a given question? :slight_smile:

The ESP32-P4 requires ESP-IDF 5.3 as shown here:

ESP-IDF 5.3 is available since espressif32 platform version 6.8.0:

Writing esp-idf projects for the ESP32-P4 should be possible.

If it comes to Arduino, this is another story which starts here

and probably leads to

With the release of the Arduino Core 3.1.x (which is based on ESP-IDF 5.3 and is currently still a release candidate) it should then also be possible to create Arduino projects for the ESP32-P4.

1 Like

They haven’t even finished adding Arduino-ESP32 core support for everything and there is no board definition entry in the boards.txt for it.

I’m sure that when the Arduino-ESP32 3.1.x release comes out and officially ads ESP32P4 support, then https://github.com/pioarduino/platform-espressif32 would support it, too.

1 Like

Agreed. If you’re tracking modern hardware, being closer to the vendor toolchain gives you fewer middle layers to track to catch up. In this regard, ESP-IDF is the place to be if you’re tracking P4 and anxiously awaiting production hardware like many of us. You have the benefit of being on a MUCH newer C++ chain.

If you’re trapped in Arduino, it’s far more likely that the community-developed PIOarduino platform will support it before the platformio project does.

Thumbs-ups to regular contributors Max and Sivar for nuanced guidance. I’ll be less subtle. If you need P4 now, ESP-IDF is simply the place to be. If you want Arduino, PIOArduino - and being prepared to help contribute in any missing pieces - is the project to track.

P4 is fully supported as in espressif Arduino repo in pioarduino fork
To be clear. Official Platformio will not support Arduino core 3.x.x This train has left
I agree for professional development Arduino is the wrong choice. But when Arduino is used pioarduino will be as actual as espressif Arduino repo!
Regarding toolchains, the statement is just wrong. The same toolchains are used which are used in the IDF version where Arduino is based on.

P4 is supported in branch GitHub - pioarduino/platform-espressif32 at Arduino/IDF53 to use do

platform = https://github.com/pioarduino/platform-espressif32.git#Arduino/IDF53
2 Likes

Thank you for confirming that concisely, @jason2866 : PIOArduino supports P4 (and C6 and…) and PlatformioARDUINO does not. Tying that to the next point, that riff will only continue to grow.

Interesting to hear that the train has officially left. OK, Espressif rail no longer stops at PlatformIO and it’s time to quit pestering them about it. I mean, it’s not stopped there in over a year, so it’s probably just realistic to admit that Platformio no longer supports modern/current ESP devices and supports even old ones poorly.

The closest stop is in the suburb of PioArduino, which is a lovely place and has much nicer board support anyway. (Thank you Jason, and team!)

I suppose we can track down the exact association of my wording a little tighter, but I believe (because I have an existence proof) the following: Leaving pioarduino out of this for now, if you use platform = espressif (or whatever it is) you get g++ 12 or so and if you use platform = arduino, you get g++ 8. Do you disagree with that?

Certainly, the project that brought me here is the latter and we get

PACKAGES: 
 - framework-arduinoespressif32 @ 3.20017.0 (2.0.17) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - **toolchain-xtensa-esp32 @ 8.4.0**+2021r2-patch5

which tracks to a language conformance root of about 2017 or so, which is a world of hurt for modern g++. There’s some C++20, but it’s pretty spotty.

So I suppose it’s “just wrong” because the official platform/Arduino combination is Arduino 2 which is GCC8 while platform=espidf is ESP-IDF which is GCC 14? Maybe I’m just blaming the wrong layer.

Selfishly, I’d love to move our project to newer language features, but we’re trapped under several abandoned Arduino project that I have to fix/fork first. I’ve been whittling away at that, but at every level, I’m asking if I should just be replacing all this abandonware anyway, but that just becomes recursive. Platformio’s trick of “hiding” the source it’s actually compiling down in .pio/libdeps/MY_PROJECT_VARIANT/PACKAGENAME and trying to keep 39 copies of that in sync to push my project through a build is just torture.

So perhaps it’s “just wrong”, but I’m finding that framework = arduino drags out GCC 8.4. Now I’m going to have to tear into this project and find a fundamental misunderstanding of mine or in this coe somewhere. Let me dig! “My” project (not actually mine - I’m just a worker bee) seems to be battling life on multiple different fronts.

The corresponding toolchain to the used IDF version of that point in time has to be used. So since Platformio only supports Arduino core 2.0.17 which is based on IDF 4.4.x the GCC 8.4 toolchains needs to be used. Trying to use newer toolchains will end in horrible errors. Since IDF 4.4.x is not ready for this!
At the end it is simple. If newer toolchains wants to be used Arduino Core needs to be updated to 3.x.x and all Code of Arduino projects.
There is no possibility to use newer toolchains with old Arduino core 2.0.x

1 Like

Right. So choosing framework = arduino, you get the ancient toolchain. We’re agreeing.
Well, unless you also choose to pioarduino, which I carved out of the above search for understanding.

I think we got tied around the ‘just wrong’ thing - its true, though we used slightly different terms to describe it. It’s not “all arduino”, it’s “default arduino” which can, of coruse, be replaced by pioarduino.

In the end, I’m just going to have to decide if I want recent C++ badly enough to go fix and for about 4-6 abandoned Arduino libraries, including battling the horrible platformio build system to do so.

Has there beeen a centralized place to announce fixed forks of abandoned code like me-no-dev’s stuff , arduinoFFT (or should I uust replace with Espressif’s own), RemoteDebug, and more? I think FastLED was recently updated. It seems there’s been a stalemate where nobody can fix one package because they all have to fix everything that’s broken by Arduino 3.

Open an issue at the repos which are not core 3.x.x ready. If the don’t fix there ancient stuff it is in general better to move and use a maintained alternative.
I see no reason old working projects to change. If the have bugs it is time to move to Arduino core 3.x.x There is a good change this bugs have been fixed.

In my experience Arduino core 3.x.x is the stable and better than all cores before

1 Like