fittyfu
February 19, 2023, 8:41pm
1
I found some very useful functions in ESP32-IDF 5.0.1 but PIO seems to have version 4.3 integrated?
Is there a way to use the most recent version?
framework-espidf framework ~3.40302.0 3.40302.0 (4.3.2)
If you only get ESP-IDF 4.x you haven’t updated your platform-espressif32 yet. You can do that via the PIO Home GUI or more directly via the CLI and
pio pkg update -g -p espressif32
fittyfu
February 19, 2023, 9:21pm
3
Thank you!
pio pkg update -g -p espressif32
Platform Manager: espressif32@6.0.1 is already up-to-date
Tool Manager: framework-arduinoespressif32@3.20006.221224 is already up-to-date
Tool Manager: tool-cmake@3.16.4 is already up-to-date
Tool Manager: tool-esptoolpy@1.40400.0 is already up-to-date
Tool Manager: tool-idf@1.0.1 is already up-to-date
Tool Manager: tool-mconf@1.4060000.20190628 is already up-to-date
Tool Manager: tool-mkfatfs@2.0.1 is already up-to-date
Tool Manager: tool-mklittlefs@1.203.210628 is already up-to-date
Tool Manager: tool-mkspiffs@2.230.0 is already up-to-date
Tool Manager: tool-ninja@1.9.0 is already up-to-date
Tool Manager: toolchain-xtensa-esp32@8.4.0+2021r2-patch5 is already up-to-date
But I think it’s not done???
I discovered new functions for esp-now in in the espressif esp32-idf programming guide version 5.0.1
( struct esp_now_recv_info ).
How can I verify which version is used by pio?
Do I need to upgrade other parts too?
What’s the platformio.ini
? If you are using the special framework = espidf, arduino
combination it might be different, since Arduino is built for a specific ESP-IDF version, it might still be at 4.x.
fittyfu
February 20, 2023, 10:23am
5
This is the platformio.ini:
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps =
me-no-dev/ESP Async WebServer@^1.2.3
me-no-dev/AsyncTCP@^1.1.1
bblanchon/ArduinoJson@^6.20.0
bodmer/TFT_eSPI@^2.5.21
gmag11/ESPNtpClient@^0.2.7
paulstoffregen/Time@^1.6.1
monitor_speed = 115200
This is 100% correct. The Arduino-ESP32 core does not use ESP-IDF 5.0, it uses 4.4.3.
I should rather say: You can use ESP-IDF 5.x in PlatformIO, in a raw ESP-IDF project. (framework = espidf
). When you chose framework = arduino
, you get the ESP-IDF version that the Arduino-ESP32 version uses. For 2.0.6, this is ESP-IDF 4.4.3.
See ESP-IDF projects at
fittyfu
February 20, 2023, 10:54am
8
Do you know how long it usually takes until the arduino framework gets updated?
I’ve red about an “framework = arduino, espid f” in this Post (2019).
But I don’t have the option in platformio project configuration - is that outdated?
I also stumbled upon ESP32 Arduino Lib Builder .
Could this help?
Arduino-ESP32 + ESP-IDF projects still work. It will be using the ESP-IDF framework that Arduino wants, however, which is v4.4.3.
Upgrading Arduino-ESP32 to compile with ESP-IDF 5.x is still an open issue per
opened 03:01PM - 05 Feb 23 UTC
closed 07:40AM - 06 Feb 23 UTC
Type: Question
### Board
ESP32
### Device Description
DevKitc
### Hardware Configuration
… No
### Version
v2.0.6
### IDE Name
Arduino IDE 2.0.3
### Operating System
Windows 11, Ubuntu Linux 22.10
### Flash frequency
80Mhz
### PSRAM enabled
yes
### Upload speed
115200
### Description
There seems to be a discrepancy in the Arduino IDE v2.0.6 version of include module esp_chip-info.h in the values of enumerator esp_chip_model_t:. The Arduino IDE definition differs from that in the ESP-IDF v5.0 version.
- In the Arduino library version 2.0.6 (https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/esp32/include/esp_hw_support/include/esp_chip_info.h), the definition looks like this:
/**
* @brief Chip models
*/
typedef enum {
CHIP_ESP32 = 1, //!< ESP32
CHIP_ESP32S2 = 2, //!< ESP32-S2
CHIP_ESP32S3 = 9, //!< ESP32-S3
CHIP_ESP32C3 = 5, //!< ESP32-C3
**CHIP_ESP32H2 = 6, //!< ESP32-H2**
} esp_chip_model_t;
- In the ESP-IDF library version 5.0 (https://github.com/espressif/esp-idf/blob/8464186e67e34b417621df6b6f1f289a6c60b859/components/esp_hw_support/include/esp_chip_info.h), the definition looks like this:
typedef enum {
CHIP_ESP32 = 1, //!< ESP32
CHIP_ESP32S2 = 2, //!< ESP32-S2
CHIP_ESP32S3 = 9, //!< ESP32-S3
CHIP_ESP32C3 = 5, //!< ESP32-C3
**CHIP_ESP32H4 = 6, //!< ESP32-H4
CHIP_ESP32C2 = 12, //!< ESP32-C2
CHIP_ESP32C6 = 13, //!< ESP32-C6
CHIP_ESP32H2 = 16, //!< ESP32-H2
CHIP_POSIX_LINUX = 999, //!< The code is running on POSIX/Linux simulator**
} esp_chip_model_t;
Please note the conflicting definitions of ESP32H2 with value 6 and/or 16 depending on IDE.
So if a chip has this value (6) in the model field, is it an ESP32H2 or an ESP32H4?
Is this difference intended?
### Sketch
```cpp
>>Please see the contents of the above-mentioned libraries on GitHub. If i add the missing values to my Arduino sketch i get a compilation error due to the conflicting duplicate values described above.
```
### Debug Message
```plain
n/a
```
### Other Steps to Reproduce
_No response_
### I have checked existing issues, online documentation and the Troubleshooting Guide
- [X] I confirm I have checked existing issues, online documentation and Troubleshooting guide.
opened 12:58PM - 15 Feb 23 UTC
closed 01:27PM - 23 Oct 23 UTC
Area: ESP-IDF related
Status: Solved
This issue tracks work progress for support of ESP-IDF 5.1.
## General explan… ation
Current version of Arduino ESP32 Core with numbering 2.X.X are based on ESP-IDF v4.4. ESP-IDF 5.0 is already released and we are working on porting our Arduino Core to be based on ESP-IDF 5, more precisely we are heading to upcoming ESP-IDF v5.1.
ESP-IDF v5.0 includes braking changes, refactoring of some of the peripherals and drivers. For more details, take a look on [Migration Guides](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/index.html).
## Branches & Releases of Arduino Core
We'll release few bug fix versions 2.0.X. After last release, first [initial Pull Request including ESP-IDF 5.1 changes](https://github.com/espressif/arduino-esp32/pull/7733) will be merged into Master branch and we'll be work on ESP-IDF 5.1 support in Master branch.
If we decide to do one more bugfix release 2.0.X, fixes will be cherrypicked and merged manually into v4.4 branch. We are not going to add any new features to version 2.X.X.
## Progress
_This table will be kept up to date._
Last update: 29.06.2023
| Peripheral | Action | Assignee | Testing | Pull Request | Docs | Peripheral Manager | Comments | |
|:----------------------------:|:--------------------------------------:|:------------:|:-----------:|:-------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------:|:------------------:|-------------------------------------------------------------------------------------------------|---|
| ADC | Refactoring | @P-R-O-C-H-Y | DONE | [ADC refactoring](https://github.com/espressif/arduino-esp32/pull/7827) | [ADC DOCs PR](https://github.com/espressif/arduino-esp32/pull/7906) | YES - Done | | |
| Bluetooth | | | | | | - | | |
| Bluetooth Classic | | | | | | - | | |
| BLE | | | | | | - | | |
| DAC | Refactoring | @me-no-dev | DONE | [Pull Request](https://github.com/espressif/arduino-esp32/pull/7733) | No need | YES - Done | | |
| Ethernet RMII | Peripheral Manager Implementation | @P-R-O-C-H-Y | | [PR](https://github.com/espressif/arduino-esp32/pull/8297) | | YES - Done | | |
| Ethernet SPI | | | | | | - | | |
| GPIO | Refactoring | @P-R-O-C-H-Y | Done | [GPIO Peripheral Manager implementation](https://github.com/espressif/arduino-esp32/pull/8179) | No API changes | YES - Done | | |
| Hall Sensor | Removed | - | - | - | - | - | No longer supported | |
| I2C Master | Testing & Peripheral M. implementation | @P-R-O-C-H-Y | OK | [I2C master & Slave Peripheral M. implementation](https://github.com/espressif/arduino-esp32/pull/8220) | | YES - Done | | |
| I2C Slave | Testing & Peripheral M. implementation | @P-R-O-C-H-Y | OK | [I2C master & Slave Peripheral M. implementation](https://github.com/espressif/arduino-esp32/pull/8220) | | YES - Done | | |
| I2S | Refactoring | @me-no-dev | In progress | | To-Do | YES - In progress | | |
| LEDC | Refactoring | @P-R-O-C-H-Y | Done | [LEDC Peripheral M. implementation](https://github.com/espressif/arduino-esp32/pull/8126) | YES | YES - Done | [Fix on LEDC](https://github.com/espressif/arduino-esp32/pull/8264) | |
| Motor PWM | | | | | | - | | |
| Pulse Counter | | | | | | - | | |
| RMT | Refactoring | @SuGlider | Done | [RMT refactoring](https://github.com/espressif/arduino-esp32/pull/7994) | To-Do | YES - Done | | |
| SD MMC | Peripheral Manager Implementation | @P-R-O-C-H-Y | | [Pull Request](https://github.com/espressif/arduino-esp32/pull/8289) | | YES - Done | | |
| SigmaDelta | Refactoring | @me-no-dev | DONE | [Pull Request](https://github.com/espressif/arduino-esp32/pull/7733) | To-Do | YES - Done | | |
| SPI | Tested & Peripheral M. implementation | @P-R-O-C-H-Y | OK | [SPI Peripheral Manager impl.](https://github.com/espressif/arduino-esp32/pull/8255) | | YES - Done | [SPI Peripheral Manager fix](https://github.com/espressif/arduino-esp32/pull/8279) | |
| Timer | Refactoring | @P-R-O-C-H-Y | Done | [Timer refactoring](https://github.com/espressif/arduino-esp32/pull/7904) | [Timer DOCs PR](https://github.com/espressif/arduino-esp32/pull/7906) | - | | |
| Temp. Sensor | | | | | | - | | |
| Touch | Refactoring | @P-R-O-C-H-Y | Done | [TOUCH Peripheral M. implemented](https://github.com/espressif/arduino-esp32/pull/8129) | No API changes | YES - Done | | |
| TWAI | | | | | | - | | |
| UART | Test & Peripheral M. implementation | @SuGlider | OK | [UART Peripheral M. implementation](https://github.com/espressif/arduino-esp32/pull/8328) | | YES - Done | | |
| USB | Improvements needed & Peripheral M. | @SuGlider | OK | [USB Peripheral M. implementation](https://github.com/espressif/arduino-esp32/pull/8335) | | YES - Done | | |
| Wi-Fi | To be tested | OK | | | | - | [tested examples](https://github.com/espressif/arduino-esp32/pull/7733#issuecomment-1401932223) | |
| Allow usage of blocked GPIOs | | To-Do | | | | | | |
If you just need ESP-IDF 5.x without Arduino, start a normal ESP-IDF project.
fittyfu
February 20, 2023, 11:12am
10
Thanks a lot for your support!
I’ll give it a try …