Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Arduino ESP32 v3.0 based on ESP-IDF v5.1 #1225

Open
ivankravets opened this issue Nov 4, 2023 · 117 comments
Open

Support Arduino ESP32 v3.0 based on ESP-IDF v5.1 #1225

ivankravets opened this issue Nov 4, 2023 · 117 comments
Labels

Comments

@ivankravets
Copy link
Member

ivankravets commented Nov 4, 2023

The ESP32 Core for Arduino 2.x is the most recent major version currently recommended for use with PlatformIO. The decision to discontinue support was made by the Espressif company, as indicated in their official statement: espressif/arduino-esp32#8606

If you're an Espressif user who relies on PlatformIO for your projects, kindly share your thoughts in the comments below and cast your vote on this matter. Once we gather enough interest from the Espressif community, we plan to reach out to the Espressif company and request a reconsideration of support for PlatformIO.

@thijstriemstra
Copy link

thijstriemstra commented Nov 8, 2023

I've been trying this with following config:

; see https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#how-to-update-to-the-latest-code
[env:arduino-latest]
platform = https://github.com/platformio/platform-espressif32.git
board = az-delivery-devkit-v4
framework = arduino
platform_packages =
    framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32#master

but the build fails with KeyError: 'framework-arduinoespressif32-libs':

Processing arduino-latest (platform: https://github.com/platformio/platform-espressif32.git; board: az-delivery-devkit-v4; framework: arduino)
--------------------------------------------------------------------------------
Platform Manager: Installing git+https://github.com/platformio/platform-espressif32.git
git version 2.42.0
Cloning into '/home/runner/.platformio/.cache/tmp/pkg-installing-uz1yxjz0'...
Platform Manager: espressif32@6.4.0+sha.f6ec392 has been installed!
Tool Manager: Installing git+https://github.com/espressif/arduino-esp32#master
git version 2.42.0
Cloning into '/home/runner/.platformio/.cache/tmp/pkg-installing-kih232ry'...
Tool Manager: framework-arduinoespressif32@3.0.0+sha.bf822ef has been installed!
Library Manager: Installing fortyseveneffects/MIDI Library @ ^5.0.2
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: MIDI Library@5.0.2 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/az-delivery-devkit-v4.html
PLATFORM: Espressif 32 (6.4.0+sha.f6ec392) > AZ-Delivery ESP-32 Dev Kit C V4
HARDWARE: ESP32 240MHz, 520KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.0.0+sha.bf822ef 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Converting edrumulus.ino
/tmp/tmpj5gstour/src/edrumulus.ino:45: warning: "MYMIDI" redefined
 #  define MYMIDI                     usbMIDI
 
/tmp/tmpj5gstour/src/edrumulus.ino:39: note: this is the location of the previous definition
 #  define MYMIDI                     MIDI
 
/tmp/tmpj5gstour/src/edrumulus.ino:46: warning: "MIDI_CONTROL_CHANGE_TYPE" redefined
 #  define MIDI_CONTROL_CHANGE_TYPE   usbMIDI.ControlChange
 
/tmp/tmpj5gstour/src/edrumulus.ino:40: note: this is the location of the previous definition
 #  define MIDI_CONTROL_CHANGE_TYPE   midi::ControlChange
 
/tmp/tmpj5gstour/src/edrumulus.ino:47: warning: "MIDI_SEND_AFTER_TOUCH" redefined
 #  define MIDI_SEND_AFTER_TOUCH      sendAfterTouchPoly
 
/tmp/tmpj5gstour/src/edrumulus.ino:41: note: this is the location of the previous definition
 #  define MIDI_SEND_AFTER_TOUCH      sendAfterTouch
 
KeyError: 'framework-arduinoespressif32-libs':
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/builder/main.py", line 173:
    env.SConscript("$BUILD_SCRIPT")
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/home/runner/.platformio/platforms/espressif32@src-5f117260f75b328038ec9d3fd0e14a68/builder/main.py", line 346:
    target_elf = env.BuildProgram()
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:
    return self.method(*nargs, **kwargs)
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/builder/tools/piobuild.py", line 61:
    env.ProcessProgramDeps()
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:
    return self.method(*nargs, **kwargs)
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/builder/tools/piobuild.py", line 121:
    env.BuildFrameworks(env.get("PIOFRAMEWORK"))
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:
    return self.method(*nargs, **kwargs)
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/builder/tools/piobuild.py", line 342:
    SConscript(env.GetFrameworkScript(name), exports="env")
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 662:
    return method(*args, **kw)
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/home/runner/.platformio/platforms/espressif32@src-5f117260f75b328038ec9d3fd0e14a68/builder/frameworks/arduino.py", line 41:
    SConscript(
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 662:
    return method(*args, **kw)
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/home/runner/.platformio/packages/framework-arduinoespressif32/tools/platformio-build.py", line 40:
    FRAMEWORK_LIBS_DIR = platform.get_package_dir("framework-arduinoespressif32-libs")
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/platform/_packages.py", line 32:
    pkg = self.get_package(name)
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/platform/_packages.py", line 29:
    return self.pm.get_package(spec or self.get_package_spec(name))
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/platform/_packages.py", line 21:
    owner=self.packages[name].get("owner"),
========================== [FAILED] Took 4.31 seconds ==========================

@ivankravets
Copy link
Member Author

See the updated comment #1225 (comment)

@Jason2866
Copy link
Contributor

Jason2866 commented Nov 10, 2023

Adding Arduino 3.0.0 support is the only way to make the ESP32-C6 available for Arduino projects.
The needed changes are not that many, i have added Arduino 3.0.x alpha support in my Fork and bulding Arduino and IDF projects with the C6 are working.
We have ported Arduino project Tasmota to the C6 and it runs already surprisingly stable.

@Jason2866
Copy link
Contributor

Jason2866 commented Nov 10, 2023

If you're an Espressif user who relies on PlatformIO for your projects, kindly share your thoughts in the comments below and cast your vote on this matter. Once we gather enough interest from the Espressif community, we plan to reach out to the Espressif company and request a reconsideration of support for PlatformIO.

@ivankravets Does this mean that Espressif has dropped any support? Looking in current Arduino 3.0.0 code (branch master) everything regarding Platformio support is there.

@VojtechBartoska
Copy link

Hello all,

I do work in Arduino Core ESP32 project as a Project Manager so I would like to clarify this from our Team point of view.

Please take a look on this comment in original Pull request.

We also update a warning note in our documentation which should be a bit confusing.

To not duplicate what is written in original PR, we will be glad if PlatformIO supports our latest version and we are open to any contributions.

@ivankravets Feel free to contact us any time directly, we will be happy to discuss this if you see any points we can do differently.

Thanks

@0x0fe
Copy link

0x0fe commented Nov 22, 2023

Adding Arduino 3.0.0 support is the only way to make the ESP32-C6 available for Arduino projects.
The needed changes are not that many, i have added Arduino 3.0.x alpha support in my Fork and bulding Arduino and IDF projects with the C6 are working.
We have ported Arduino project Tasmota to the C6 and it runs already surprisingly stable.

@Jason2866
Do you know how i can setup the .ini file in a new project for using your 3.0.0 fork and 5.1 IDF at the same time (to keep the SDK menuConfig)?

@0x0fe
Copy link

0x0fe commented Nov 22, 2023

@ivankravets
there is something i dont understand, why is there a separate platformespressif32 core? It is based on arduinoespressif32, but always lags behind, and arduinoesp32 already lags behind IDF. So what is the point of this separate core? Why is PIO not using arduinoesp32 core as is directly?

I think a reason why many users use PIO is also to keep some of the arduinoesp32 APIs while having the possibility to modify the IDF SDK configuration (menuconfig) which is necessary in many cases and not possible in arduino, unless using the libbuilder (buggy and not convenient).

Maybe it would be wise for PIO to directly use arduinoesp32 core as is, and just focus on allowing users to run arduinoesp32 core along with IDF to keep access to menuconfig.

@mhaberler
Copy link

I am concerned about the viability of this repo long-term as folks like @Jason2866 have started to roll their own and this repo not catching up

I am currently using his https://github.com/tasmota/platform-espressif32/tree/Arduino/IDF5 branch and it works mostly great for me - even if I feel uneasy about relying on a private effort with unclear future - how do you see the longer-term perspective of your fork?

This fork has diverged from this repo massively - not sure this can brought back here easily

the other issue I have is the abysmal debugging experience esp32/pio/arduino compared to using straight IDF

@0x0fe
Copy link

0x0fe commented Nov 23, 2023

@mhaberler i did the same yesterday and used https://github.com/tasmota/platform-espressif32/tree/Arduino/IDF5

platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha2
framework = 
	arduino
	espidf
board = esp32dev

But then when building it complained of missing SPIFFS, i added it manually from previous version (in components directory) but then i get a dependancy error with esp_partition.h, despite it is well present in "components".

   17 | #include "esp_partition.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio\build\esp32dev\tcp_transport\transport.o
Compiling .pio\build\esp32dev\tcp_transport\transport_ssl.o
Compiling .pio\build\esp32dev\tcp_transport\transport_internal.o
*** [.pio\build\esp32dev\spiffs\esp_spiffs.o] Error 1
*** [.pio\build\esp32dev\spiffs\spiffs_api.o] Error 1

Did you met this issue too?

@Jason2866
Copy link
Contributor

Jason2866 commented Nov 23, 2023

@0x0fe @mhaberler My fork has not the goal to be compatible to anything official.
The fork is made for project Tasmota. Everything is optimized for that use. The sdkconfig settings differs a lot from the official espressif ones. There are components added and others are removed (for example SPIFFS).
Breaking changes can and will happen.
Imho no reason to be concerned about support of Arduino Espressif. Platformio always do a release when a RELEASED core is available. Core 3.0.0 is in ALPHA state!

Since project Tasmota is always in first row for new stuff, and is active in contributing to espressif Arduino Core, there was the need to have the development version of Arduino Core available with Platformio.
Project Tasmota is only possible with Platformio. Thx again to the Team of Platformio (@ivankravets ) for this awesome IDE!!

The needed changes for Arduino 3.0 in Platformio are not many. A small job for @valeros

@0x0fe
Copy link

0x0fe commented Nov 23, 2023

@Jason2866 oh, i see, that explains the error with SPIFFS

@mhaberler
Copy link

alpha stage - fair enough.

Now assume Core 3.0.0 gets released - does this have any bearing on the debugging situation?

who has the ticket to make that work?

I'm talking about openocd + gdb versions and matching debug configs which work - at least somewhat like Nordic Connect and Segger

I admit I am slightly confused about players and the who-does-what-and-why-not - I might be barking up the wrong tree (or repo) for that matter

@Jason2866
Copy link
Contributor

@mhaberler Does debugging work in espressif IDF env setup? If yes imho Platformio has the job for the devices which are currently supported with IDF 5.1. Not saying it will be easy to solve or it will be done soon. The debug issue for the C6 is known and there is an open issue.

@mhaberler
Copy link

Did you met this issue too?

@0x0fe yes, same here `Failed to resolve component 'spiffs'

@mhaberler
Copy link

@mhaberler Does debugging work in espressif IDF env setup? If yes imho Platformio has the job for the devices which are currently supported with IDF 5.1. Not saying it will be easy to solve or it will be done soon. The debug issue for the C6 is known and there is an open issue.

you mean like command line/shell? yes, repeatably

@0x0fe
Copy link

0x0fe commented Nov 23, 2023

@mhaberler It makes sense, well SPIFFS yo ucan add it manually from previous version but then you will get an error with esp_partition, and i am not sure where to re-enable the SPIFFS module and dependencies correctly.

@ivankravets
Copy link
Member Author

I'm a bit confused. Why is there a separate platform-espressif32 core? It seems to be based on arduino-espressif32, but it always seems to lag behind...

https://github.com/platformio/platform-espressif32 isn't a core itself. It's a software piece that makes the PlatformIO Build API work seamlessly with Espressif 32 products within the PlatformIO ecosystem. If you check the source code of this repository, you'll find other integrations, like ESP-IDF. If we support Zephyr/ESP32, it'll also be found here.

Would it be smarter for PIO to directly use the arduinoesp32 core as it is?

We do use it directly (https://registry.platformio.org/tools/platformio/framework-arduinoespressif32). There's no common ground between Arduino IDE and PlatformIO. The "arduino" in PlatformIO is just a framework. PlatformIO supports over 10+ different frameworks. The reason many developers see PlatformIO as a "replacement for Arduino IDE" is due to source code compatibility and advanced project management with lots of configuration and collaboration features based on PlatformIO's unique declarative principles.

If you've tried another framework besides "arduino", you'd notice there's no difference in the configuration aspect. You and your team can focus on project development without wrestling with bootstrapping and collaboration issues.

Lastly, for a VSCode-based solution with native ESP32/Arduino core support, I recommend the Arduino IDE for VSCode extension backed by Microsoft. It's similar to Arduino IDE 2.0 but uses VSCode as the editor. Both leverage "arduino-cli", so the build system and workflows are the same.

@0x0fe
Copy link

0x0fe commented Nov 23, 2023

@ivankravets I see, glue logic layer. the totally different versioning between these platforms and the cores they implement is rather annoying, though.

@mhaberler
Copy link

@ivankravets make me understand what your recommendation means - are you saying:

When I prefer to use VSCode, I should take the Microsoft Arduino extension for VSCode and drop Platformio?

@ivankravets
Copy link
Member Author

@mhaberler, we value openness in our community and aim to give you the freedom to choose. If there's a newer version of the software not yet supported by PlatformIO, we won't hide it.

The current supported version is Arduino Core v2.x for ESP32. Our collaboration with Espressif, including discussions about renewal, is ongoing. It's worth noting that we have @VojtechBartoska, a project manager from Espressif, in this thread. We're all working together to ensure you receive the best features and support. We'll keep everyone posted on any updates to ensure a smooth continuation of our services.

@hoeken
Copy link

hoeken commented Nov 25, 2023

I can see there's a bit of political project stuff happening, but as an end-user, all I want to do is be able to use the latest Arduino framework. Consider this a vote of support for making that happen, however it needs to be.

@ivankravets
Copy link
Member Author

PlatformIO is a commercial open-source project. In the past, it used to be a paid service before 2020, following a business-to-consumer (B2C) model. Unexpectedly, PlatformIO gained widespread popularity among millions of developers globally. Consequently, we shifted our strategy to make powerful tools for professional embedded development freely accessible to everyone.

The active development and maintenance of PlatformIO, along with its infrastructure, are now supported by technology partners dedicated to delivering an excellent developer experience. Espressif was one such partner, and we appreciate their long-standing collaboration.

Currently, Espressif has ceased support for new products in PlatformIO, but rest assured, we are committed to providing support for existing Espressif products integrated before this change, as per our technology licensing policy. Your projects won't face disruptions, and services will continue as usual.

If there's significant interest from Espressif customers in PlatformIO, we'll reach out to Espressif and explore the possibility of continuing our collaboration.

If you have any questions or need clarification, feel free to ask. We're here to provide all the answers you need.

@mhaberler
Copy link

ok, so Espressif jumped ship

@ivankravets what does that mean for the subject topic - Arduino3?

your wording would suggest to me "no new Espressif releases - be it Arduino or ESP-IDF, existing releases go on life support"

are you saying this repo stops at ESP-IDF 5.1.1/Arduino2 until Espressif changes its mind ?

@Jason2866
Copy link
Contributor

Jason2866 commented Nov 28, 2023

@mhaberler Looks like: as long there is not enough feedback from Platformio users wanting actual espressif framework support, there is no good position from Platformio side to argument why espressif should invest money having Platformio support.
espressif is thinking supporting the ArduinoIDE toy is enough :-(

@vshymanskyy
Copy link

This ticket is all about Arduino v3.x.x , not about running it on an arbitrary IDF version.
If you take a look at espressif32@6.7.0 package, it supports the ESP-IDF v5.1.2

@egnor
Copy link
Contributor

egnor commented May 28, 2024

As a note, the currently released framework-espressif32 (6.7.0) uses arduino-esp32 2.0.16 which unfortunately has a fairly bad bug espressif/arduino-esp32#9618 which effectively breaks ESP32-C3 and ESP32-S3 support for many users.

Those of us who are affected need to roll back to framework-espressif32 6.6.0 => arduino-esp32 2.0.14 (or stuff arduino-esp32 2.0.14 into framework-espressif32 6.7.0, not sure if that would work).

This issue is fixed in arduino-esp32 3.0.0 (since 3.0.0-rc3), but if we're not going to get support for that any time soon, @ivankravets and company might consider dropping back to 2.0.14.

@Jason2866
Copy link
Contributor

Jason2866 commented May 28, 2024

@vshymanskyy Wrong, 6.7.0 supports IDF 5.2.1
@egnor There will be for sure the update to Arduino core 2.0.17 for Platformio.
That's the major version which is in support with Platformio.
To the issues you linked, to be clear, the main bug is in the Bodmer TFT LCD library. It sets missing settings wrong, which are now set in later core builds (not 100% correct either but more correct than in the library). Btw. this library needs a major refactoring to work with core 3.0.0. Don't understand at all why you mentioned here.

@vshymanskyy
Copy link

Looks like there's a typo in 6.7.0 release notes

@szerwi
Copy link

szerwi commented May 28, 2024

Actually, if it is possible to use arduino-esp32 3.0 just by changing the versions in platformio.ini file, are there any noticeable changes for end users caused by no official support for 3.0 version?

I am aware that in future there may be some changes in arduino-esp32 that will make it harder to use with PlatformIO, but for now it seems that it is as easy to use as if it would be officially supported?

@Jason2866
Copy link
Contributor

@szerwi See #1225 (comment)

@szerwi
Copy link

szerwi commented May 29, 2024

@Jason2866 I saw your comment, however, my question is different. If we can use official version of arduino-esp32 just by changing platformio.ini to point to specific version, will end users of PlatformIO even notice that it is not officialy supported?

The only difference is that instead of updating espressif32 libs to use arduino-esp32 3.0, user needs to update arduino-esp32 version in platformio.ini.

@Jason2866
Copy link
Contributor

Yes, since C6 and H2 will not work with Arduino in Platformio.
In general there is no difference using the framework provided from espressif or Platformio.
The are the same. Only from where the are downloaded.

@vshymanskyy
Copy link

@Jason2866 I'm using ESP32-C6 with PlatformIO, by creating a custom esp32-c6.json:

{
  "build": {
    "core": "esp32",
    "f_cpu": "160000000L",
    "f_flash": "80000000L",
    "flash_mode": "qio",
    "mcu": "esp32c6",
    "variant": "esp32c6"
  },
  "connectivity": [
    "wifi"
  ],
  "debug": {
    "openocd_target": "esp32c6.cfg"
  },
  "frameworks": [
    "arduino",
    "espidf"
  ],
  "name": "Espressif ESP32-C6",
  "upload": {
    "flash_size": "4MB",
    "maximum_ram_size": 327680,
    "maximum_size": 4194304,
    "require_upload_port": true,
    "speed": 460800
  },
  "url": "https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitm-1/index.html",
  "vendor": "Espressif"
}

@Jason2866
Copy link
Contributor

Yep, for the c6 just the entry arduino needs to be added. Anyways C6 does not work "out of the box". The needed changes to support C2, H2 and C6 are not so many ;-)

@richievos
Copy link

richievos commented May 29, 2024

This seems like a situation where the most effective way to get a resolution is for someone who understands the changes needed to create a fork, add disclaimers on it in the readme, and we all move to that fork.

Being locked into an old version of one of the most common and useful embedded systems seems completely unrealistic. The current setup seems to be waiting for a corporate battle for sponsorship to play out. Presumably expressif is trying to force more lock in by breaking platformio and platformio is saying they're not going to do it unless they get funded.

A fork would help unblock people in the near term, giving everyone a central place to collab and increase the pressure to get this solved in mainline.

@Jason2866
Copy link
Contributor

Jason2866 commented May 29, 2024

I could do, or better said I have already done a special not fully compatible build for Arduino 3.0.0 for my needs. BUT i will not do the 100% espressif Arduino 3.0.0 compatible build. Reasons: I don't want and cant to do the support work and I don't do the complete work for free for a company (espressif) who is earning money without investing anything here.

espressif could fork Platformio and do the needed changes, but the are thinking the ArduinoIDE toy is enough...
Only many users who are unhappy there is no Platformio support for actual Arduino "tackling" espressif will have a chance to change the situation.

@sblantipodi
Copy link

@Jason2866
only Ivan can escalate the situation to some top managers at Espressif, I doubt that a GitHub issue like this can change anything.

@Jason2866
Copy link
Contributor

Jason2866 commented May 30, 2024

@sblantipodi Ivan can't escalate anything. He is "just" a guy asking for money for his product, where espressif does think it is not needed anymore to support. Or maybe Platformio has wanted to much money and espressif canceled? We don't know...

@Hedda
Copy link

Hedda commented May 31, 2024

If you're an Espressif user who relies on PlatformIO for your projects, kindly share your thoughts in the comments below and cast your vote on this matter. Once we gather enough interest from the Espressif community, we plan to reach out to the Espressif company and request a reconsideration of support for PlatformIO.

@ivankravets are the user demand still in doubt? Loads of ESP32 users do want PlatformIO to add support for Espressif's Arduino ESP32 Core v3.0.0 stable to platform-espressif32:

https://github.com/espressif/arduino-esp32/releases/tag/3.0.0

Maybe it is time to try to raise this issue to Espressif as well as it is indirectly a migration related issues for many of their users too?

espressif/arduino-esp32#8796

PS: Yes Arduino ESP32 core v3.0.0 was first announced over 7-months ago but now the version has finally been marked as stable.

@raphael-bmec-co
Copy link

+1 for espressif to support Pio 👍

@RalphBacon
Copy link

Upvote for Espressif Arduino v3.0.0 on PlatformIO

I write for both Arduino IDE and (mostly, and preferably) the VSC/PlatformIO and a user of my channel alerted me to the ESP-NOW callback function signature breaking change in the Arduino 3.0.0 version, which has not surfaced in the PlatformIO version (even though I am using platform = espressif32@^6.7.0 in my platformio.ini file).

It can be confusing/misleading what I'm working with, because when I compile I see (top line is the important one):

PACKAGES: 
 - framework-arduinoespressif32 @ 3.20016.0 (2.0.16)     <----- so not the most recent framework then?
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5

This ESP-NOW function change is just one instance of a breaking change - I'm guessing there will be many more. I'd like to see Espressif Arduino Platform version 3.0.0 (and future versions) on PlatformIO so we're all singing from the same hymn sheet.

For me, the Arduino IDE is just not up to the job for serious programming IMHO. It's not bad, and a huge leap from the old 1.x versions but PlatformIO has a long and stable history - and, let's face it, it is VSC which I've used professionally for decades!

C'mon Espressif, there are literally hundreds if not thousands of developers like me using VSC/PlatformIO but programming in the Arduino framework, not ESP-IDF, plus all the "hobbyists".

Please don't abandon us.

@fundix
Copy link

fundix commented Jun 2, 2024

I guess it's an easy solution? I'll just start using processors other than ESP32. It'll be a shame, but what can I do? Espressif will lose some sales revenue if usability drops. If I didn't use ESP8266 before I wouldn't buy ESP32 today, but that can easily change in the future.

Upvote for Espressif Arduino v3.0.0 on PlatformIO

I write for both Arduino IDE and (mostly, and preferably) the VSC/PlatformIO and a user of my channel alerted me to the ESP-NOW callback function signature breaking change in the Arduino 3.0.0 version, which has not surfaced in the PlatformIO version (even though I am using platform = espressif32@^6.7.0 in my platformio.ini file).

It can be confusing/misleading what I'm working with, because when I compile I see (top line is the important one):

PACKAGES: 
 - framework-arduinoespressif32 @ 3.20016.0 (2.0.16)     <----- so not the most recent framework then?
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5

This ESP-NOW function change is just one instance of a breaking change - I'm guessing there will be many more. I'd like to see Espressif Arduino Platform version 3.0.0 (and future versions) on PlatformIO so we're all singing from the same hymn sheet.

For me, the Arduino IDE is just not up to the job for serious programming IMHO. It's not bad, and a huge leap from the old 1.x versions but PlatformIO has a long and stable history - and, let's face it, it is VSC which I've used professionally for decades!

C'mon Espressif, there are literally hundreds if not thousands of developers like me using VSC/PlatformIO but programming in the Arduino framework, not ESP-IDF, plus all the "hobbyists".

Please don't abandon us.

@sgryphon
Copy link

sgryphon commented Jun 2, 2024

This issue is fixed in arduino-esp32 3.0.0 (since 3.0.0-rc3), but if we're not going to get support for that any time soon, @ivankravets and company might consider dropping back to 2.0.14.

This is not true. Espressif and Platform IO still work fine together, although you had to manually apply some changes while it was in betaa/alpha.

The original post and reference was an error/misinterpretation (Espressif removed -- and subsequently put back, in the same pull request -- links to Platform IO). The original link was to some work-in-progress, not any official statement.

Espressif still works fine with Platform IO.

@sgryphon
Copy link

sgryphon commented Jun 2, 2024

+1 for espressif to support Pio 👍

It already does. See the documentation here: https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-platformio

@softhack007
Copy link

softhack007 commented Jun 2, 2024

If you're an Espressif user who relies on PlatformIO for your projects, kindly share your thoughts in the comments below and cast your vote on this matter. Once we gather enough interest from the Espressif community, we plan to reach out to the Espressif company and request a reconsideration of support for PlatformIO.

From my point of view, as one of the maintainers of WLED, a very feature rich app for controlling addressable LEDs with esp32:

  • we have moved from Arduino-IDE to platformIO (and platform-espressif32) a few years ago. Today our firmware build system relies on platformIO, and we cannot (and don't want to) go back to arduino-ide. Moving to ESP-IDF without arduino is not an option for us, either.
  • it was a real pain to adopt arduino-esp32 v2.0.x, which is required for supporting esp32-C3/-S2/-S3. But we managed to get that job done.
  • whatever new hardware espressif wants to sell to our thousands of users - we don't even need to think about that as long as "arduino" support in platformIO is missing.
  • even worse, we will not be able to upgrade any of our currently supported MCUs (esp32, S3, S2, C3) to the new arduino-esp32 v3.0.x if we cannot build in platformIO.
  • there is a lot of of interest from our users to exploit the new features of esp32-C6, and -just one example- maybe create a usermod to interact with LEDs using zigbee. Again, we do not even think about this while the chip is not supported in arduino platform-espressif32.

I guess many open source projects would tell a similar story.

Open source firmware is used by lots of individuals and professionals, and today they happily purchase espressif hardware to run their favourite application. But if we don't have arduino support in platformIO for some newer chips, the chances of supporting these chips is absolutely zero.
Arduino-IDE support is good for a few years. Then the community project grows, and Arduino-IDE show its limits;
so platformIO is the logical next step when you can't afford to rewrite everything.

@Hedda
Copy link

Hedda commented Jun 3, 2024

+1 for espressif to support Pio 👍

It already does. See the documentation here: https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-platformio

@sgryphon check that again and read the warning that sais that explicitly says that PlatformIO is not supported by Espressif, but support is only provided by PlatformIO (and the community). So while it might still work fine for now, (at least for Arduino core 2.x.x users), PlatformIO and this platform-espressif32 library is not officially supported by Espressif, and with that warning Espressif tries to make it clear that they do not want users opening issues about PlatformIO to Espressif.

Warning

Integration of the Arduino Core ESP32 project in PlatformIO is maintained by PlatformIO developers. Arduino Core ESP32 Project Team cannot support PlatformIO-specific issues. Please report these issues in official PlatformIO repositories.

@heidi-bmec-co
Copy link

We have several production systems relying on ongoing support (whether financial or otherwise) between Espressif and PlatformIO. Dropping this support would be seriously detrimental to these projects, especially as time goes on.

@ivankravets
Copy link
Member Author

Hi friends, sorry for the delay. A lot has been happening around PlatformIO and Espressif in the past few days:

Let us share some updates.

The original post and reference was an error/misinterpretation (Espressif removed -- and subsequently put back, in the same pull request

Yes, the PR appears to be a mistake by Espressif's development team, and it's unclear if this action was approved by Espressif management. We continue to provide official support for ESP32 Core v2.0 for Arduino. The new warning indicates there is no official support for ESP32 Core v3.0.

Arduino-IDE shows its limits;

This is a common issue in the semiconductor industry and a reason why many embedded developers prefer alternatives to official vendor tools. Larger silicon vendors often have a disconnect with their customers. Developer reviews of the official VSCode extension highlight numerous issues. Vendors sometimes opt for paid solutions over investing in their tools, misunderstanding the needs of end developers. While they can replicate features, they can't duplicate the vision that makes successful tools effective.

We have several production systems relying on ongoing support (whether financial or otherwise) between Espressif and PlatformIO. Dropping this support would be seriously detrimental to these projects, especially as time goes on.

We are in active discussions with the Espressif team to help them understand the significant ROI they receive from collaborating with PlatformIO. PlatformIO has contributed immense value to Espressif's business over the past decade and is the leading alternative IDE solution for Espressif products. As a larger company now, Espressif has the resources to invest in its tools, which we understand is part of their business strategy. However, it's important to recognize that almost every silicon vendor tries to lock their customers into their tools, which can hinder switching to better competitive products.

Your feedback is crucial. I will tag a few people from the Espressif team. The information you provide is very important to them. There is a high demand for Thread/Zigbee solutions (such as this request), and having support for new Espressif products in PlatformIO is exactly what customers need for the future.

As always, we are committed to providing a superior developer experience and boosting your project development.

cc: @rftafas, @igrr, @pedrominatel, @VojtechBartoska

Regards,
Your friends at PlatformIO Labs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests