Platformio configuration: framework = arduino,espidf esp32-s2 with latest 2.0.14 and 4.4.6

while(1);
Posts: 18
Joined: Mon May 02, 2022 9:03 pm

Platformio configuration: framework = arduino,espidf esp32-s2 with latest 2.0.14 and 4.4.6

Postby while(1); » Sun Oct 15, 2023 1:50 pm

Thanks in advance for your help.

I'm trying to create a platformio.ini that uses the latest arduino @ 2.0.14 and the espoidf it needs @ 4.4.6 for an esp32-s2.

Here is what I have in my platformio.ini file:

[env:esp32-s2-saola-1]
platform = espressif32
framework = arduino, espidf
board = esp32-s2-saola-1
platform_packages =
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.14
framework-espidf @ https://github.com/espressif/esp-idf#v4.4.6
toolchain-xtensa-esp32s2 @ 8.4.0+2021r2-patch5
toolchain-xtensa-riscv32-esp @ 8.4.0+2021r2-patch3

The first thing I get is this error:
UnknownPackageError: Could not find the package with 'toolchain-xtensa-riscv32-esp @ 8.4.0+2021r2-patch3' requirements for your system 'windows_amd64'

What is interesting is that I have an intel i7 windows 11.

What version of espressif32 must I install in platformio?

Is there a way to directly install espidf @ 4.4.6 into the .platformio/packages directory and set arduino 4.4.6 as a component? I tried this, but i'm not sure how to tell platformio to use this package ofer the one it installed.

lbernstone
Posts: 831
Joined: Mon Jul 22, 2019 3:20 pm

Re: Platformio configuration: framework = arduino,espidf esp32-s2 with latest 2.0.14 and 4.4.6

Postby lbernstone » Sun Oct 15, 2023 5:00 pm

You should be able to point the compiler packages directly at a URL, just as you are doing with the frameworks. You can find the URL in the package json (https://github.com/espressif/arduino-es ... plate.json).
AMD64 (aka x86_64) is an architecture. It was developed by AMD, but Intel uses it now also.

while(1);
Posts: 18
Joined: Mon May 02, 2022 9:03 pm

Re: Platformio configuration: framework = arduino,espidf esp32-s2 with latest 2.0.14 and 4.4.6

Postby while(1); » Sun Oct 15, 2023 6:09 pm

I installed a fresh IDF and arduino and ran the hello world example. The steps are below.
this assumes I already have installed esp idf in the default location c:\Users\UserName\esp

cd c:\Users\UserName\esp
git clone -b v4.4.6 --recursive https://github.com/espressif/esp-idf.git esp-idf-v4.4.6
cd components
git clone -b 2.0.14 --recursive https://github.com/espressif/arduino-esp32.git arduino
cd arduino
git submodule update --init --recursive
cd ../..
install.bat
export.bat
cd examples\get-started\hello_world
idf.py set-target esp32s2
...
CMake Error at C:/Users/AC-Beelink/esp/esp-idf-v4.4.6/components/arduino/CMakeLists.txt:218 (message):
esp32-arduino requires CONFIG_FREERTOS_HZ=1000 (currently 100)
cd build
del */*
cd ..
echo CONFIG_FREERTOS_HZ=1000 > sdkconfig.defaults
del sdkconfig
idf.py set-target esp32s2
idf.py build

while(1);
Posts: 18
Joined: Mon May 02, 2022 9:03 pm

Re: Platformio configuration: framework = arduino,espidf esp32-s2 with latest 2.0.14 and 4.4.6

Postby while(1); » Sun Oct 15, 2023 7:00 pm

I guess my next question is how do I setup PlatformIO to use my installed IDF at C:\Users\UserName\esp\esp-idf-v4.4.6?

lbernstone
Posts: 831
Joined: Mon Jul 22, 2019 3:20 pm

Re: Platformio configuration: framework = arduino,espidf esp32-s2 with latest 2.0.14 and 4.4.6

Postby lbernstone » Mon Oct 16, 2023 4:18 pm

On a real file system, you could make a symbolic link there from the platform directory. On Windows, I think your best bet is to put it into a github repo, and point your ini to that.

Who is online

Users browsing this forum: Google [Bot] and 31 guests