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 for the latest Arduino v2.0 #619

Closed
valeros opened this issue Sep 9, 2021 · 122 comments
Closed

Support for the latest Arduino v2.0 #619

valeros opened this issue Sep 9, 2021 · 122 comments
Labels

Comments

@valeros
Copy link
Member

valeros commented Sep 9, 2021

The latest Arduino core adds support for ESP32S2, ESP32C3 SoCs and a great amount of new boards. Related issues:

@MichaelDu9226
Copy link

Hi all
Are there any plans for this feature? When will it be supported?

@maxgerhardt
Copy link
Contributor

You might also want to take a look at espressif/arduino-esp32#5505 in regards to this.

@olicooper
Copy link

I've been trying to understand how I can get Arduino v2.0.0 to work in PlatformIO because there are some important bugfixes in esp-idf v4.3 which I need.. I have tried building with Arduino as an IDF component but that only supports up to IDF v4.0 and is buggy. I can't think of a way to get these updates without a lot of rework on my project by converting entirely to IDF.

Maybe it is my lack of experience with the platform, but I am confused about what prevents us using Arduino v2.0 in PlatformIO, can you explain it for me?

@forkineye
Copy link

forkineye commented Oct 14, 2021

I've been trying to understand how I can get Arduino v2.0.0 to work in PlatformIO because there are some important bugfixes in esp-idf v4.3 which I need.. I have tried building with Arduino as an IDF component but that only supports up to IDF v4.0 and is buggy. I can't think of a way to get these updates without a lot of rework on my project by converting entirely to IDF.

Maybe it is my lack of experience with the platform, but I am confused about what prevents us using Arduino v2.0 in PlatformIO, can you explain it for me?

Here's an example that may help you out. The relevant tidbits are in [esp32git] which just extends the [esp32] entry I have an overrides the platform until support is added. Note you'll have to still use Arduino IDE to build and upload LittleFS if you're using it.

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
; ESP32 defaults for 4MB flash                                     ;
; https://docs.platformio.org/en/latest/platforms/espressif32.html ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
[esp32]
platform = espressif32
board_build.filesystem = littlefs
board_build.partitions = min_spiffs.csv
monitor_filters = esp32_exception_decoder
build_flags =
    ${env.build_flags}
lib_deps =
    ${env.lib_deps}
    esphome/AsyncTCP-esphome @ 1.2.2

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
; ESP32 pulling from upstream core ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
[esp32git]
extends = esp32
platform  = https://github.com/platformio/platform-espressif32.git#feature/arduino-idf-master
platform_packages =
   framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.0

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
; Build targets (environments) ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;

; Lolin D32 Pro
[env:d32_pro]
extends = esp32git ; use until 2.0.0 core makes it into PlatformIO
board = lolin_d32_pro
build_flags =
    -DBOARD_HAS_PSRAM
    -mfix-esp32-psram-cache-issue
    -mfix-esp32-psram-cache-strategy=memw

@olicooper
Copy link

olicooper commented Oct 15, 2021

Thanks for your response @forkineye !
I followed your advice and created a project with your suggestions but I am unable to get a simple project to build still in PlatformIO. Although it is compiling, it is not linking. I Can't see anything different in my configuration that would cause this. I wonder if your cached packages are older than that latest?
The project can be found here: https://github.com/olicooper/arduino-v2-esp32-platformio

Update

I found this: espressif/arduino-esp32#5436 (comment)
Which says to use branch feature/arduino-upstream instead of feature/arduino-idf-master.. which now compiles. I also had to delete the .vscode\c_cpp_properties.json file because this was causing the build to fail after updating platformio.ini multiple times.
I'll do more testing to confirm though.

@hyzgit
Copy link

hyzgit commented Oct 16, 2021

When can this problem be closed

@sblantipodi
Copy link

many days passed since the Arduino V2 release... is there an ETA for closing this issue?

@atclarkson
Copy link

atclarkson commented Oct 18, 2021

Is it released?

When I build using Espressif 32 (3.3.2) it still pulls in framework-arduinoespressif32 3.10006.210326 (1.0.6)

Any guesses as to what I'm doing wrong?


legacy Click
Processing esp-wrover-kit (platform: espressif32; board: esp-wrover-kit; framework: arduino)
-----------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp-wrover-kit.html
PLATFORM: Espressif 32 (3.3.2) > Espressif ESP-WROVER-KIT
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (ftdi) On-board (ftdi) External (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.10006.210326 (1.0.6)
 - tool-esptoolpy 1.30100.210531 (3.1.0)
 - tool-mkspiffs 2.230.0 (2.30)
 - toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 32 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP Async WebServer> 1.2.3
|   |-- <AsyncTCP> 1.1.1
|   |-- <FS> 1.0
|   |-- <WiFi> 1.0
|   |-- <ArduinoJson> 6.18.5
|-- <AsyncTCP> 1.1.1
|-- <ArduinoJson> 6.18.5
|-- <HTTPClient> 1.2
|   |-- <WiFi> 1.0
|   |-- <WiFiClientSecure> 1.0
|   |   |-- <WiFi> 1.0
|-- <WiFi> 1.0
|-- <WiFiClientSecure> 1.0
|   |-- <WiFi> 1.0
|-- <Preferences> 1.0
|-- <FS> 1.0
|-- <SD(esp32)> 1.0.5
|   |-- <FS> 1.0
|   |-- <SPI> 1.0
|-- <Update> 1.0
Building in release mode

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

[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino

build_flags = 
    -DPIO_FRAMEWORK_ESP_IDF_ENABLE_EXCEPTIONS
    -DBOARD_HAS_PSRAM
    -mfix-esp32-psram-cache-issue
board_build.partitions = no_ota.csv

lib_deps =
    ESP Async WebServer
    AsyncTCP
    ArduinoJson

; Custom Serial Monitor speed (baud rate)
monitor_speed = 115200

@maxgerhardt
Copy link
Contributor

Is it released?

No, hence your observed behavior is correct. You'd need to modify the platformio.ini per above to get a technical preview, or wait for release.

@olicooper
Copy link

@atclarkson If you need Arduino v2.0.0 in PlatformIO now then copy the configuration from my repo mentioned above... https://github.com/olicooper/arduino-v2-esp32-platformio/tree/main
Memory consumption is not optimised in this version yet though.
Make sure to clean your build before rebuilding.

@rtu-dataframe
Copy link
Contributor

There is an ETA for this release?

@louislewis2
Copy link

While I am aware there are a few workarounds to get going with v2 as shown above.
It would be great to get a rough idea when this work planned for.

Thanks

@sblantipodi
Copy link

sblantipodi commented Oct 26, 2021

It is clear that it will be ready, when it's ready
but the absence of any planned schedule along with no communication from the dev team make me feel "uhm".

ESP32 is one of the main board on the PlatformIO ecosystem if not the main board.
This project is too good to make me feel "uhm".

Come on guys, are you alive? Can you give us an idea of the ETA?

@sblantipodi
Copy link

ESP32 Arduino 2.0.1 based on ESP-IDF 4.4 is out...

@tablatronix
Copy link

I have been playing with this for a few days with an esp32 S2, I cannot get OTA to work at all, updater class always aborts on erasepartition.. Its like there is something wrong with my partitions, if i compile with arduino ide, it works fine.

There also seems to be some timing issues with wifi funcs, adding typical workarounds like delays after setmode etc seems to be fixing most of them..

Anyone have OTA working with #arduino-upstream

@Jason2866
Copy link
Contributor

@tablatronix yes, Tasmota is doing OTA with.
Install via https://tasmota.github.io/install/
Connect to AP 192.168.1.4 do your wifi settings. Open the website of the device (via ip) and do a OTA upgrade (for example http://ota.tasmota.com/tasmota32/tasmota32-bluetooth.bin) It just works. Tasmota is compiled with Platformio

@tablatronix
Copy link

tablatronix commented Nov 12, 2021

hmm I have not tried httpota, only esptool from ide, is tasmota compiling using arduino-upstream ?

@Jason2866
Copy link
Contributor

Jason2866 commented Nov 13, 2021

Tasmota is compiled with a slightly changed setup of sdkconfig in the Arduino Lib builder and has the same code base as release core 2.0.1. The platformio setup can be seen in my former post

@tablatronix
Copy link

tablatronix commented Nov 13, 2021

Thanks for looking,

It looks like it is using feature/arduino-idf-master, I cannot get it to compile for S2 though
/Users/shawn/.platformio/packages/toolchain-xtensa32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: final link failed: bad value

Let me see if tasmota builds

@dexter323i
Copy link

Hi! I'd like to use an ESP32-S2-Saola-1 board for simulating different USB devices. No OTA, no SPIFFS, no any special needs. Just get a gamepad arduino example code working. Could you guys help me out with a working platformio.ini config? I googled it, but found so many different settings from June until now. Suggesting different alpha and rc1 releases, different toolchains, commit hashes, etc. Which are all outdated by right now, I guess.
It looks like for some of you it is working somehow... Any ini config help would be appreciated!

@Jason2866
Copy link
Contributor

Jason2866 commented Nov 16, 2021

@dexter323i
You can use this. Actual released core 2.0.1

[env:esp32-s2]
framework = arduino
board = esp32-s2-saola-1
platform                    = https://github.com/platformio/platform-espressif32.git#feature/arduino-idf-master
platform_packages           = framework-arduinoespressif32 @ https://github.com/tasmota/arduino-esp32/releases/download/2.0.1/framework-arduinoespressif32-release_IDF4.4.tar.gz
                              platformio/tool-esptoolpy @ https://github.com/tasmota/esptool/releases/download/v3.2/esptool-v3.2.zip

@visicon-masc
Copy link

visicon-masc commented Nov 16, 2021

To Make it work I had to:

  • in the foillowing file i changed #if to #ifdef because of:
    .platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits\locale_facets_nonio.tcc:773:21: error: #if with no expression

  • and platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-idf-master
    results in:
    Linking .pio\build\esp32dev_main_ref1\firmware.elf c:/users/masc/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: final link failed: bad value collect2.exe: error: ld returned 1 exit status *** [.pio\build\esp32dev_main_ref1\firmware.elf] Error 1

Therefore I changed it to:
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream

@torntrousers
Copy link

Latest official core 2.0.3-rc1 can be used with this adopted fork

platform = https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip

Trying using that i get: warning: #warning "Please configure IDF framework to include mbedTLS

@Jason2866
Copy link
Contributor

Pitty, since this the official release package just added the needed platform.json for PlatformIO

@torntrousers
Copy link

Probably I'm just doing something wrong, but I can't see what yet. Its coming from line 22 in ssl_client.cpp here, a PR that I'm trying on top of your platformio update.

@gonzabrusco
Copy link

Probably I'm just doing something wrong, but I can't see what yet. Its coming from line 22 in ssl_client.cpp here, a PR that I'm trying on top of your platformio update.

I think that happens because you are not using the latest pushes to that PR from me-no-dev (espressif/arduino-esp32@33af65f)

@maxgerhardt
Copy link
Contributor

maxgerhardt commented Mar 31, 2022

When I use

[env:arduino-esp32c3]
platform = https://github.com/Jason2866/platform-espressif32.git
board = esp32-c3-devkitm-1
framework = arduino
platform_packages =
 framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32#master

and use pio platform update https://github.com/Jason2866/platform-espressif32.git on the CLI and force PlatformIO to redownload Arduino-ESP32 by deleting all C:\Users\<user>\.platformio\packages\framework-arduinoespressif32* folders, I get a successfull compilation.

@torntrousers
Copy link

Probably I'm just doing something wrong, but I can't see what yet. Its coming from line 22 in ssl_client.cpp here, a PR that I'm trying on top of your platformio update.

I think that happens because you are not using the latest pushes to that PR from me-no-dev (espressif/arduino-esp32@33af65f)

You're right, that fixes it. Thank you!

@Jason2866
Copy link
Contributor

Mhh, there is something wrong with your platformio setup. ssl_client.cpp is now in library WiFiClientSecure and has the needed change. I just checked the zip file.

@Jason2866
Copy link
Contributor

Jason2866 commented Mar 31, 2022

I just tried the setup and it does compile successful using ssl_client.cpp
You have probably somewhere a old version in your config or search path.

@Jason2866
Copy link
Contributor

Update Release core 2.0.3-rc1 has a major bug. See espressif/arduino-esp32#6507
Fixed in my fork

platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.3rc1/platform-espressif32-2.0.3.zip

@Jason2866
Copy link
Contributor

@torntrousers @gonzabrusco You are talking about a PR espressif/arduino-esp32#6055 which is still open, so it can not be in the official build. If you want to use you have to add in platform_packages.

@torntrousers
Copy link

torntrousers commented Mar 31, 2022

I'm good now after the reminder from @gonzabrusco to use the latest PR update. Its working with what you posted here, thanks!
(I just manually added the code from espressif/arduino-esp32#6055 to my environment)

@TheButlah
Copy link

TheButlah commented Apr 3, 2022

Update Release core 2.0.3-rc1 has a major bug. See espressif/arduino-esp32#6507 Fixed in my fork

platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.3rc1/platform-espressif32-2.0.3.zip

I am attempting this, and getting an error in a simple hello world app with the following build flag defines:

build_flags =
    -DARDUINO_USB_CDC_ON_BOOT=1
    -DCONFIG_TINYUSB_ENABLED=1
    -DCONFIG_TINYUSB_CDC_ENABLED=1

Here is the error:

In file included from D:/Ryan/.platformio/packages/framework-arduinoespressif32/cores/esp32/USB.cpp:20:
D:/Ryan/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-tinyusb.h:24:10: fatal error: tusb.h: No such file or directory

@Jason2866

@Jason2866
Copy link
Contributor

@TheButlah Wrong place for Arduino issues. Open a issue in espressif Arduino github.

@TheButlah
Copy link

TheButlah commented Apr 6, 2022

@Jason2866 does debugging work in your fork? I get the following error:
image

undefinedD:\Ryan\.platformio\packages\toolchain-riscv32-esp\bin\riscv32-esp-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from d:\Ryan\Programming\slimevr\firmware\.pio\build\esp32-c3\firmware.elf...
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = esp-prog
PlatformIO: Initializing remote target...
Open On-Chip Debugger  v0.10.0-esp32-20210721 (2021-07-21-13:35)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz

adapter speed: 5000 kHz

Info : tcl server disabled
Info : telnet server disabled
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description '*', serial '*' at bus location '*'

.pioinit:11: Error in sourced command file:
Remote communication error.  Target disconnected.: Success.

If this is the wrong place, I apologize. I'm not clear on what problems are the fork, what is the esp32-c3, what is platformio, and what is arduino 😅

@Jason2866
Copy link
Contributor

@TheButlah I asked espressif to upload latest OCD (needed for C3 and newer mcu)
with this feature request
We have to wait until this is done.

@torntrousers
Copy link

I'm good now after the reminder from @gonzabrusco to use the latest PR update. Its working with what you posted here, thanks! (I just manually added the code from espressif/arduino-esp32#6055 to my environment)

Actually, I've had to run this on another machine and can't get it to build there now.

[env:arduino-esp32latest]
platform = https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip
board = m5stack-core2

gives:

> Executing task: C:\Users\ant\.platformio\penv\Scripts\platformio.exe run <

Processing arduino-esp32latest (platform: https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip; board: m5stack-core2; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------Platform Manager: Installing https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip
Unpacking  [#################################---]   92%
Unpacking...
Error: Traceback (most recent call last):
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\commands\platform.py", line 322, in init_platform
    return PlatformFactory.new(name)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\platform\factory.py", line 54, in new
    raise UnknownPlatform(pkg_or_spec)
platformio.platform.exception.UnknownPlatform: Unknown development platform 'https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip'

Any ideas what the problem could be?

@maxgerhardt
Copy link
Contributor

In C:\Useres\<user>\.platformio, delete the folders .cache and and all folders inside packages and platforms, then rebuild the project.

@torntrousers
Copy link

In C:\Useres\<user>\.platformio, delete the folders .cache and and all folders inside packages and platforms, then rebuild the project.

Thanks @maxgerhardt , I tried that and now get:

> Executing task: C:\Users\ant\.platformio\penv\Scripts\platformio.exe run --target clean <

Processing arduino-esp32latest (platform: https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip; board: m5stack-core2; framework: arduino)
------------------------------------------------------------------------------------------------------------Platform Manager: Installing https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip
Downloading  [####################################]  100%
Unpacking  [#################################---]   92%
Unpacking...
Error: Traceback (most recent call last):
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\commands\platform.py", line 322, in init_platform
    return PlatformFactory.new(name)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\platform\factory.py", line 54, in new    
    raise UnknownPlatform(pkg_or_spec)
platformio.platform.exception.UnknownPlatform: Unknown development platform 'https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 38, in unpack
    return fu.unpack(dst, with_progress=with_progress)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\package\unpack.py", line 179, in unpack  
    self._archiver.extract_item(item, dest_dir)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\package\unpack.py", line 48, in extract_item
    self._afo.extract(item, dest_dir)
  File "C:\Users\ant\.platformio\python3\lib\zipfile.py", line 1616, in extract
    return self._extract_member(member, path, pwd)
  File "C:\Users\ant\.platformio\python3\lib\zipfile.py", line 1687, in _extract_member
    open(targetpath, "wb") as target:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\ant\\.platformio\\.cache\\tmp\\pkg-installing-ej4vqs_9\\__MACOSX\\platform-espressif32-2.0.3-rc1\\examples\\espidf-aws-iot\\components\\esp-aws-iot\\aws-iot-device-sdk-embedded-C\\samples\\linux\\subscribe_publish_library_sample\\._subscribe_publish_library_sample.c'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\__main__.py", line 121, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "C:\Users\ant\.platformio\penv\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\commands\__init__.py", line 44, in invoke    return super(PlatformioCLI, self).invoke(ctx)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\ant\.platformio\penv\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\commands\run\command.py", line 134, in cli
    process_env(
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\commands\run\command.py", line 176, in process_env
    result = {"env": name, "duration": time(), "succeeded": ep.process()}
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\commands\run\processor.py", line 67, in process
    result = init_platform(self.options["platform"]).run(
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\commands\platform.py", line 325, in init_platform
    _platform_install([name], skip_default_package=skip_default_package)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\commands\platform.py", line 212, in _platform_install
    pkg = pm.install(
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\package\manager\platform.py", line 51, in install
    pkg = super(PlatformPackageManager, self).install(
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 48, in install
    pkg = self._install(
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 97, in _install
    pkg = self.install_from_url(spec.url, spec, silent=silent)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 139, in install_from_url
    self.unpack(dl_path, tmp_dir)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 43, in unpack
    return fu.unpack(dst, with_progress=False)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\package\unpack.py", line 174, in unpack  
    self._archiver.extract_item(item, dest_dir)
  File "C:\Users\ant\.platformio\penv\lib\site-packages\platformio\package\unpack.py", line 48, in extract_item
    self._afo.extract(item, dest_dir)
  File "C:\Users\ant\.platformio\python3\lib\zipfile.py", line 1616, in extract
    return self._extract_member(member, path, pwd)
  File "C:\Users\ant\.platformio\python3\lib\zipfile.py", line 1687, in _extract_member
    open(targetpath, "wb") as target:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\ant\\.platformio\\.cache\\tmp\\pkg-installing-ej4vqs_9\\__MACOSX\\platform-espressif32-2.0.3-rc1\\examples\\espidf-aws-iot\\components\\esp-aws-iot\\aws-iot-device-sdk-embedded-C\\samples\\linux\\subscribe_publish_library_sample\\._subscribe_publish_library_sample.c'

============================================================

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section
  https://docs.platformio.org/page/faq.html

* Report this problem to the developers
  https://github.com/platformio/platformio-core/issues

============================================================

The terminal process "C:\Users\ant\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'clean'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Is that something more somewhere i need to also delete?

@torntrousers
Copy link

torntrousers commented Apr 6, 2022

Or is there a better way to be using 2.0.3-RC1 now than with platform = https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip?

@Jason2866
Copy link
Contributor

@torntrousers I packed the file on my Mac. Maybe Windows does not like the additional files the mac adds. I just have repacked. Please do again what Max recommended.

@maxgerhardt
Copy link
Contributor

And if that still doesn't help just use the git version

platform = https://github.com/Jason2866/platform-espressif32.git

@torntrousers
Copy link

>pio run
Processing arduino-esp32latest (platform: https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip; board: m5stack-core2; framework: arduino)
------------------------------------------------------------------------------------------------------------------------
Platform Manager: Installing https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip
Downloading  [####################################]  100%

...

Successfully created esp32 image.
============================================ [SUCCESS] Took 1134.64 seconds ============================================

w00t

Thanks so much for the responsive help @Jason2866 and Max.

@douardda
Copy link

valeros closed this in 581c7d0

\o/ thx

@maxgerhardt
Copy link
Contributor

But is this v2.0.0 or v2.0.2 or v2.0.3-rc? https://registry.platformio.org/tools/platformio/framework-arduinoespressif32/versions says only 2.0.0

@valeros
Copy link
Member Author

valeros commented Apr 14, 2022

Hi guys, just to make it clear, all 2.0.x versions will be added gradually. We started from 2.0.0 to make sure the transition from Arduino framework v1 to v2 will be as smooth as possible as it involves many changes and bugfixes. Stay tuned.

@ivankravets
Copy link
Member

Hi Guys,

Great news! 🚀

PlatformIO team will provide professional integration services for the Espressif products, especially support for the Arduino ESP32 framework.

Please navigate to the issues page and vote (👍 ) for the issues that are important/blockers for you. We will process them ASAP.

A big THANK YOU to the Espressif Systems company that trusted in our technology 🙏
It is a big honest for us to provide you with a superior developer experience.

More news will come soon. Stay tuned.

Regards,
The PlatformIO team 💙💛

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