platformio / platform-espressif32

Espressif 32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif32
Apache License 2.0
859 stars 577 forks source link

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

Open ivankravets opened 8 months ago

ivankravets commented 8 months ago

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: https://github.com/espressif/arduino-esp32/pull/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.

richievos commented 5 months ago

+1 @sgryphon's statements. Seems like there's a play going on to try and force Espressif to pay PlatformIO some amount of money in a partnership. I can understand the justification for that.

It would clarify matters if a statement could be made on if the community can provide a solution, and have that merged/included, or if it'll only be done if something like a partnership payment is made.

0x0fe commented 5 months ago

Seems like there's a play going on to try and force Espressif to pay PlatformIO some amount of money in a partnership

Yes, that is what it looks like, pio wants to get a funding from espressif, rather than espressif wants to fund pio, strange business model tho. I can understand why espressif doesnt want to fund one more ecosystem, they already allocate ressources to support the IDF and the Arduino core. And it seems like there is enough options between IDF with vscode, Arduino core in arduino IDE, arduino core as a IDF component in VSCode, not much difference difference between using the latter and PIO. I stopped believing in "unified embedded development ecosystems" a long time ago. Using the vendor SDK and IDE saves time and hassle.

Jason2866 commented 5 months ago

@0x0fe espressif was a technology parter of Platformio and canceled this partnership. espressif is leaving users of Platformio now standing in the rain. Sorry support of IDF is needed since no chip can be sold without a SDK. It is the proprietary espressif stuff. To address the DIY the decided to be Arduino compatible. But ArduinoIDE is not an IDE. No complex project can be done with. It is a toy. Using Arduino as component of IDF is everything else than productive when just wanting to use Arduino. There is NO comparable Platformio alternative which is easy to use Arduino when doing complex projects.

sgryphon commented 5 months ago

@Jason2866 thanks for your help in getting a fix for the integration.

Although, I still don't think there is a clear statement. The post you refer to says:

"Espressif was one such partner, and we appreciate their long-standing collaboration. Currently, Espressif has ceased support for new products in PlatformIO,"

While the partner statement is in the past tense, it doesn't say it has been cancelled; and the "ceased support for new products in PlatformIO" seems to be the same reference to providing support to users, the wording of which has been further clarified on the current Espressif website.

The comments about funding model seem to imply that Espressif used to provide funding as a partner, and maybe now don't ... although if that is the case, why not just come out and say it. (My opinion ... it probably would be a good idea for Espressif to help provide for PlatformIO, as a vibrant ecosystem is probably good for them).

There is a lot of other evidence that they are still working as partners ... they feature heavily on each other's web sites, and (I think) 5.1 is supported by the IDF platform, just not via Arduino.

sgryphon commented 5 months ago

Anyway @ivankravets I have voted, by putting up a PR (backwards compatible) that fixes the issue and allows overrides of platform packages to ardino-esp32 alpha v3.0.0 to build, by adding the missing library (but only when it is referenced in the package, i.e. only for alpha).

https://github.com/platformio/platform-espressif32/pull/1281

Thanks @Jason2866 for pointing me in the right direction to the libraries and changes needed.

0x0fe commented 5 months ago

@Jason2866

@0x0fe espressif was a technology parter of Platformio and canceled this partnership. espressif is leaving users of Platformio now standing in the rain.

I assume that by "technology partner" you mean "funder".

Sorry support of IDF is needed since no chip can be sold without a SDK

I worked with countless SoCs and obviously every vendor is providing an SDK and some kind of ecosystem, most vendors use "free" tools such as eclipse or vscode as an IDE, that is what espressif does, they provide official support for their sdk, with vscode, they also provide official support for the arduino ESP32 core, that is more than most vendors.

No complex project can be done with. It is a toy

I did not mention arduino IDE which is targetted to DIY users and not an actual tool. The official IDE for the IDF is vscode, i dont see where it is more "proprietary" than PIO which also uses vscode. IMO the only case where pio cannot be replaced yet is for the (unsupported) case of running arduino esp32 core on top of IDF, where it is possible to modify the sdkconfig on the fly, but i suspect this can be done by adding arduino core as a component of IDF.

Using Arduino as component of IDF is everything else than productive when just wanting to use Arduino.

I did not have to use it, so i am not sure, but i guess there is an arduino extension for vscode, which presumably runs the precompiled IDF libraries just like Arduino IDE, but in vscode. ( vscode-arduino )

empewoow commented 4 months ago

Not sure if this is the right place to ask, but I thought the new ESP32 C6 would work with the Arduino platform in PlatformIO if I used the pre-release of the framework-arduinoespressif32 repo.

But when I try to add this to platformio.ini:

platform_packages =
    framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3

It still says: Error: This board doesn't support arduino framework!

Is there a fix for this, or is it just not supported yet in this way?

Jason2866 commented 4 months ago

@empewoow You have to use your own boards.json where you add "arduino". Something like this:

{
  "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-DevKitC-1",
  "upload": {
    "flash_size": "8MB",
    "maximum_ram_size": 327680,
    "maximum_size": 8388608,
    "require_upload_port": true,
    "speed": 460800
  },
  "url": "https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html",
  "vendor": "Espressif"
}
empewoow commented 4 months ago

@Jason2866 thanks for your message, I tried that but then I get this:

KeyError: 'framework-arduinoespressif32-libs':

...

  File "/home/alex/.platformio/packages/framework-arduinoespressif32/tools/platformio-build.py", line 40:
    FRAMEWORK_LIBS_DIR = platform.get_package_dir("framework-arduinoespressif32-libs")

...

as also described in this issue: https://github.com/espressif/arduino-esp32/discussions/8572

Maybe I just need to wait until there's official support...

Or is there some easy fix for this at the moment?

Jason2866 commented 4 months ago

@empewoow take a look at https://github.com/platformio/platform-espressif32/pull/1281

empewoow commented 4 months ago

Thanks, it works now! FYI, I added this to get it to work:

platform_packages =
    platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3
    platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
ajay10000 commented 4 months ago

As an implementer rather than a coder, I just like to get things done. PlatformIO with arduinoespressif32 framework enables me to do just that. I use PlatformIO for other types of projects/coding and it helps me a great deal to have the IDE consistency and also the great editing/support features of the platform.

Because I am not a C coder, I find everything about how these things work together extremely confusing. I have spent days trying to work out whether ESP32-C6 could be supported or not. I decided to try the last few comments above (from @Jason2866 and @empewoow) and was thrilled this morning to get my standard MQTT client code to compile and run on an ESP32-C6, along with voltage measurement.

To get this to work, I have used a combination of adding a section to platform.ini:

[env:esp32c6]
board = esp32-c6-devkitc-1
platform = https://github.com/platformio/platform-espressif32.git
platform_packages =
    platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3
    platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
monitor_speed = 115200
build_flags=
    -fexceptions
    -DESP32_STAGE
    -DESP_IDF_VERSION_MAJOR=5
    -DLIBRARIES_NO_LOG=1
    -DDISABLE_SC16IS752_SPI
    -DCONFIG_PM_ENABLE
    -DCONFIG_LWIP_L2_TO_L3_COPY
    -DCONFIG_FREERTOS_USE_TICKLESS_IDLE=1
    -DCONFIG_FREERTOS_IDLE_TIME_BEFORE_SLEEP=3
    -DNEOPIXEL_ESP32_RMT_DEFAULT
    -DCRON_USE_LOCAL_TIME
    -I$PROJECT_DIR/src/include
    -include "sdkconfig.h"

Some of these lines come from https://github.com/letscontrolit/ESPEasy/blob/mega/platformio_core_defs.ini as advised elsewhere. I'm not sure if they are all necessary.

I also added a file: /boards/esp32-c6-devkitc-1.json as per @Jason2866's https://github.com/platformio/platform-espressif32/issues/1225#issuecomment-1952513412 (above, a few comments up).

A huge thank you to all, both paid and unpaid, for putting so much effort into these projects. I wish it was simpler to understand the versions and how they interact, but the fact that they are there in the first place is an amazing feat of human endeavour.

I hope to try some ZigBee code next and get an endpoint up and running. Now that would be something.

sgryphon commented 3 months ago

Hi @ivankravets . I'm wondering if you have had a chance to review my pull request to add Arduino ESP32 v3.0 support to PlatformIO. https://github.com/platformio/platform-espressif32/pull/1281

Thanks

(Note: This is not about Espressif supporting PlatformIO, but updating PlatformIO to support Espressif ESP32 v3.0, which was a relatively small change that I am happy to contribute to PlatformIO).

hitecSmartHome commented 2 months ago

Well. I, and my team are very confused hearing this. What is espressif thinking? As others said, the Arduino IDE is a toy. We need a much more robust IDE. Our project grow so much in the past year using PIO with arduino,idf, we can't go back to only arduino or only idf. Maybe its time to find an other chip... :( Really sucks to stuck on idf 4.4.0 and arduino 2.0.0...

mhaberler commented 2 months ago

Obviously espressif are thinking their VSCode plugin is a replacement for Platformio, which basically means developers are now in the business of helping develop and debug their plugin rather than their own code.

The chaps working on it are nice and try the best, but the results are beyond pale.

If you think this is too harsh a critique, have a read of its reviews

Frankly the IDE situation for espressif users is preposterous. And I have no idea why other companies being perfectly capably of coming up with a competitive product are letting espressif get away with this quality of developer support.

Jason2866 commented 2 months ago

We will know soon what happens. Platformio never supported not released versions. In a few weeks espressif Arduino Core 3.0.0 will be released. The few needed (breaking) changes in Platformio and Arduino Platformio scripts to support core 3.0.0 (where I did PRs for) are merged from espressif and Platformio. There is no blocking of either sides.

hitecSmartHome commented 2 months ago

Well, if we can easily port our code to vscode idf from pio arduino,idf i see it as a win to use the latest. PIO was always behind on versions.

sblantipodi commented 2 months ago

I haven't understood one thing, is platofrmio going to support Arduino core 3 or not?

kzlk commented 1 month ago

Trying this config:

[env:esp32-s3-devkitc-1-n16r8v]
platform = espressif32
board = esp32-s3-devkitc-1-n16r8v
framework = arduino
platform_packages =
    platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-rc1
    platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
lib_deps = 
    ESP_I2S@^1.0.0
    ESP_SR
    bodmer/TFT_eSPI@^2.5.43
    lvgl/lvgl@^9.1.0
    ; fastled/FastLED@^3.6.0
    adafruit/RTClib@^2.1.4
    gyverlibs/GyverBME280@^1.5.2

; lib_ldf_mode = deep+
build_flags = -DCORE_DEBUG_LEVEL=5 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -Wdeprecated-declarations -Ofast
build_type = debug
monitor_speed = 115200
board_build.arduino.memory_type = dio_opi
monitor_filters = esp32_exception_decoder
board_build.partitions = partitions.csv

But got this error: **_* [.pio\build\esp32-s3-devkitc-1-n16r8v\bootloader.bin] Source C:\Users\dkozl\.platformio\packages\framework-arduinoespressif32-libs\esp32s3\bin\bootloader_qio_.elf' not found, needed by target.pio\build\esp32-s3-devkitc-1-n16r8v\bootloader.bin'._

Jason2866 commented 1 month ago

Pin the platform! the memory mode is not valid. This should work

[env:esp32-s3-devkitc-1-n16r8v]
platform = espressif32 @ 6.6.0
framework = arduino
board = esp32-s3-devkitc-1

# Configure options for the N16R8V variant
build_flags= -DBOARD_HAS_PSRAM
board_build.arduino.memory_type = qio_opi 
board_build.partitions = default_16MB.csv
board_upload.flash_size = 16MB

platform_packages
    platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
    platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
lib_deps = 
    bodmer/TFT_eSPI@^2.5.43
    lvgl/lvgl@^9.1.0
    ; fastled/FastLED@^3.6.0
    adafruit/RTClib@^2.1.4
    gyverlibs/GyverBME280@^1.5.2

build_type = release
monitor_speed = 115200
monitor_filters = esp32_exception_decoder

The error you see is from a wrong setup for the board. PSRAM fixes are not needed for S3/S2.

Jason2866 commented 1 month ago

Better use this boards.json https://github.com/platformio/platform-espressif32/blob/deb6aa342245ad7bcb3d9ed69050f203779833ab/boards/esp32-s3-devkitc-1-n16r8v.json and remove any entry which changes boards stuff.

kzlk commented 1 month ago

@Jason2866 thanks for your reply, it solved my problem described above. But another problem happened with Arduino Core 3.0.0-rc1 in PlatfromIO, but in Arduino IDE with Arduino Core 3.0.0-rc1 works as expected. Also this problem not reproduce with Arduino Core 2 in PlatformIO.

main.ino

#include <TFT_eSPI.h> // Hardware-specific library
#include <SPI.h>

TFT_eSPI tft = TFT_eSPI();       // Invoke custom library
void setup(void) {
  tft.begin();   <---- CAUSE OF ERROR
}
void loop() {
}

Expected result: App successfully launched Actual result:

Rebooting...
�ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40379886
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x508
load:0x403c9700,len:0x4
load:0x403c9704,len:0xad0
load:0x403cc700,len:0x29e4
entry 0x403c9880
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x42002c6b  PS      : 0x00060e30  A0      : 0x82002cf8  A1      : 0x3fcec130  
A2      : 0x00000010  A3      : 0x00000000  A4      : 0x60004000  A5      : 0x0000000b  
A6      : 0x000000ff  A7      : 0x00000008  A8      : 0x08000000  A9      : 0x3fcec100  
A10     : 0x3fc975fc  A11     : 0x00000001  A12     : 0x02160ec0  A13     : 0xffffffff  
A14     : 0x00000031  A15     : 0x00000000  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000010  LBEG    : 0x4201a1d0  LEND    : 0x4201a217  LCOUNT  : 0x00000000  

Backtrace: 0x42002c68:0x3fcec130 0x42002cf5:0x3fcec160 0x42002d00:0x3fcec180 0x42001cb5:0x3fcec1a0 0x4200657e:0x3fcec1c0

platformio.ini

[env:esp32-s3-devkitc-1-n16r8v]
platform = espressif32 @6.6.0
board = esp32-s3-devkitc-1-n16r8v
framework = arduino
platform_packages =
    platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
    platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
lib_deps = 
    bodmer/TFT_eSPI@^2.5.43
build_type = release
monitor_speed = 115200
monitor_filters = esp32_exception_decoder

Assets: Arduino Core: 3.0.0-rc1 Board: esp32-s3-devkitc-1-n16r8v IDE: VS Code with PlatformIO Library: TFT_eSPI@^2.5.43

Jason2866 commented 1 month ago

Off topic. There is no software programming support. Just can say we are using our Platformio fork to compile project Tasmota and it does work as expected.

hitecSmartHome commented 1 month ago

Pin the platform! the memory mode is not valid. This should work

[env:esp32-s3-devkitc-1-n16r8v]
platform = espressif32 @ 6.6.0
framework = arduino
board = esp32-s3-devkitc-1

# Configure options for the N16R8V variant
build_flags= -DBOARD_HAS_PSRAM
board_build.arduino.memory_type = qio_opi 
board_build.partitions = default_16MB.csv
board_upload.flash_size = 16MB

platform_packages
  platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
  platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
lib_deps = 
  bodmer/TFT_eSPI@^2.5.43
  lvgl/lvgl@^9.1.0
  ; fastled/FastLED@^3.6.0
  adafruit/RTClib@^2.1.4
  gyverlibs/GyverBME280@^1.5.2

build_type = release
monitor_speed = 115200
monitor_filters = esp32_exception_decoder

The error you see is from a wrong setup for the board. PSRAM fixes are not needed for S3/S2.

Strange, i got these errors

fatal: not a git repository (or any of the parent directories): .git
CMake Error at C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/tools/cmake/build.cmake:463 (message):
  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  ERROR: Because project depends on idf (>=5.1) which doesn't match any
  versions, version solving failed.

Call Stack (most recent call first):
  C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/tools/cmake/project.cmake:476 (idf_build_process)
  CMakeLists.txt:4 (project)

========================= [FAILED] Took 57.84 seconds 
Jason2866 commented 1 month ago

Platformio seems screwed up. Close VSC and delete the hidden folder .platformio with all content. After restart VSC will rebuild Platformio and should work again.

hitecSmartHome commented 1 month ago

I've got a .pio folder. Will try to delete that.

hitecSmartHome commented 1 month ago

Platformio seems screwed up. Close VSC and delete the hidden folder .platformio with all content. After restart VSC will rebuild Platformio and should work again.

I have deleted .pio folder, restarted vscode and i got the same error :/

hitecSmartHome commented 1 month ago

This is my PIO.ini

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
build_cache_dir = ./cache

[env:esp-wrover-kit]
check_skip_packages = yes
platform = espressif32 @6.6.0
board = esp-wrover-kit
framework = arduino, espidf
platform_packages =
    platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
    platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
board_build.filesystem = littlefs

upload_speed    = 921600

monitor_speed   = 115200
monitor_filters = colorize, esp32_exception_decoder

board_upload.flash_size = 16MB
board_build.flash_mode = qio
board_build.partitions = ./Partitions/hshPartition_APP_3MB.csv
board_build.f_cpu   = 240000000L
board_build.f_flash = 80000000L

build_flags = 
    -DBOARD_HAS_PSRAM
    -mfix-esp32-psram-cache-issue
    -mfix-esp32-psram-cache-strategy=memw
    -DCONFIG_SPIRAM_USE_MALLOC=1
    -DCONFIG_MBEDTLS_DYNAMIC_BUFFER=1
    -DCONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST=1
    -DCONFIG_SPIRAM_CACHE_WORKAROUND=1
    -DCORE_DEBUG_LEVEL=0
    -std=gnu++17

build_unflags =
    -std=gnu++11
Jason2866 commented 1 month ago

You changed the setup too framework = arduino, espidf. This is not working. The error is as expected. The subject of this issue is support for Arduino and not Arduino as an component from IDF. You are off topic.

hitecSmartHome commented 1 month ago

Oh, i see.... :(

hitecSmartHome commented 1 month ago

Thank you for the clarification

szerwi commented 1 month ago

Looking through this long thread, I haven't catched one important thing and I'm not alone with that - @sblantipodi also didn't catch that. Will arduino-esp32 v3.0.0 be supported in PlatformIO? If yes, then when? Once it become stable version? Can someone from PlatformIO give clear statement about it? I believe a lot of people use PlatformIO for their projects and not supporting arduino-esp32 3.0.0 at all would be very disappointing.

hitecSmartHome commented 1 month ago

Espressif does not support PIO. They stopped. PIO said they want to support us but if Espressif does not give them money for it, they wont. So they will wait for enough user feedback to go to Espressif for support. Until this resolves, we are ( as users of PIO ) not supported.

sblantipodi commented 1 month ago

I don't know if this is the best way to proceed: 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. I mean, I'm sure that there are so many users who does not use GitHub or that does not know about this issue that can't comment on this.

I'm not an expert and I have nothing to teach to Ivan but sharing some data from the PlatformIO registry that shows how many users uses PlatformIO could be a better indicator for Espressif than some comments on an issue like this.

I really hope that things will move forward on this topic, this "uncertainty" is not good for the PlatformIO project and for all the people that uses it.

vshymanskyy commented 1 month ago

[!IMPORTANT] The 3.0.0 was released: https://github.com/espressif/arduino-esp32/releases/tag/3.0.0

I am able to use it in some of my projects by having this in my platformio.ini:

[env:esp32]
platform = espressif32@6.7.0
board = esp32dev
framework = arduino

platform_packages =
    platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0
    platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.0/esp32-arduino-libs-3.0.0.zip

[!NOTE] Many libraries are not compatible with 3.0.0 yet and may need adjustments to work

szerwi commented 1 month ago

@vshymanskyy Did you have to apply changes described in this PR: https://github.com/platformio/platform-espressif32/pull/1281 to make arduino-esp32 3.0 working, or applying changes only to project's platformio.ini file is enough?

vshymanskyy commented 1 month ago

I didn't apply the patch. However, it may mean that my build may be working incorrectly. At least it builds and runs without noticeable issues.

вт, 28 трав. 2024 р., 13:16 користувач Piotr Gniado < @.***> пише:

@vshymanskyy https://github.com/vshymanskyy Did you have to apply changes described in this PR: #1281 https://github.com/platformio/platform-espressif32/pull/1281 to make arduino-esp32 3.0 working, or applying changes only to project's platformio.ini file is enough?

— Reply to this email directly, view it on GitHub https://github.com/platformio/platform-espressif32/issues/1225#issuecomment-2134853041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALP3FA4GVVK3RI4KUGQNJDZERKPZAVCNFSM6AAAAAA65MARK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZUHA2TGMBUGE . You are receiving this because you were mentioned.Message ID: @.***>

hitecSmartHome commented 1 month ago

Could this work with arduino , idf as framework ?

Like that in the ini

framework = arduino, espidf
Jason2866 commented 1 month ago

@hitecSmartHome Yes, it is using core 2.0.16 and IDF 4.4.x

hitecSmartHome commented 1 month ago

I mean, like that

[env:esp32]
platform = espressif32@6.7.0
board = esp32dev
framework = arduino, espidf

platform_packages =
    platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0
    platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
Jason2866 commented 1 month ago

@vshymanskyy Better to use this

[env:arduino-3]
platform = espressif32@6.7.0
platform_packages=
  framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0
  framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.0/esp32-arduino-libs-3.0.0.zip

since the way you do, you dont know which libs are used.

The PR #1281 is not needed at all

Jason2866 commented 1 month ago

@hitecSmartHome Not possible to build arduino as a component with IDF with Arduino Core 3.0.0 and Platformio. For doing this Platformio has to support Arduino Core 3.0.0 and the needed IDF 5.1.4.

hitecSmartHome commented 1 month ago

I see. That is the whole reason we are here. To support the new idf release.

vshymanskyy commented 1 month ago

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 commented 1 month ago

As a note, the currently released framework-espressif32 (6.7.0) uses arduino-esp32 2.0.16 which unfortunately has a fairly bad bug https://github.com/espressif/arduino-esp32/issues/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 commented 1 month ago

@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 commented 1 month ago

Looks like there's a typo in 6.7.0 release notes

szerwi commented 1 month ago

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 commented 1 month ago

@szerwi See https://github.com/platformio/platform-espressif32/issues/1225#issuecomment-2134975344

szerwi commented 1 month ago

@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.