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

Overview of ESP-IDF 5.1 Support #7852

Closed
VojtechBartoska opened this issue Feb 15, 2023 · 36 comments
Closed

Overview of ESP-IDF 5.1 Support #7852

VojtechBartoska opened this issue Feb 15, 2023 · 36 comments
Labels
Milestone

Comments

@VojtechBartoska
Copy link
Collaborator

VojtechBartoska commented Feb 15, 2023

This issue tracks work progress for support of ESP-IDF 5.1.

General explanation

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.

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 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 ADC DOCs PR YES - Done
Bluetooth -
Bluetooth Classic -
BLE -
DAC Refactoring @me-no-dev DONE Pull Request No need YES - Done
Ethernet RMII Peripheral Manager Implementation @P-R-O-C-H-Y PR YES - Done
Ethernet SPI -
GPIO Refactoring @P-R-O-C-H-Y Done GPIO Peripheral Manager implementation 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 YES - Done
I2C Slave Testing & Peripheral M. implementation @P-R-O-C-H-Y OK I2C master & Slave Peripheral M. implementation 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 YES YES - Done Fix on LEDC
Motor PWM -
Pulse Counter -
RMT Refactoring @SuGlider Done RMT refactoring To-Do YES - Done
SD MMC Peripheral Manager Implementation @P-R-O-C-H-Y Pull Request YES - Done
SigmaDelta Refactoring @me-no-dev DONE Pull Request To-Do YES - Done
SPI Tested & Peripheral M. implementation @P-R-O-C-H-Y OK SPI Peripheral Manager impl. YES - Done SPI Peripheral Manager fix
Timer Refactoring @P-R-O-C-H-Y Done Timer refactoring Timer DOCs PR -
Temp. Sensor -
Touch Refactoring @P-R-O-C-H-Y Done TOUCH Peripheral M. implemented No API changes YES - Done
TWAI -
UART Test & Peripheral M. implementation @SuGlider OK UART Peripheral M. implementation YES - Done
USB Improvements needed & Peripheral M. @SuGlider OK USB Peripheral M. implementation YES - Done
Wi-Fi To be tested OK - tested examples
Allow usage of blocked GPIOs To-Do
@VojtechBartoska
Copy link
Collaborator Author

Table updated today.

@Hedda
Copy link

Hedda commented May 26, 2023

Originally posted by @Headcrabed in espressif/esp-idf#10423 (comment)

Might be off-topic, but why c6's riscv trace support isn't on this table?

Originally posted by @igrr in espressif/esp-idf#10423 (comment)

@Headcrabed indeed we did not include CPU Trace support into the plan, as we saw relatively few people using the similar feature on the previous Xtensa chips. It will get supported, eventually, especially if more users express interest.

@VojtechBartoska Should maybe Trace for RISC-V support be added to this table as well even if not currently planned for v5.1?

@igrr
Copy link
Member

igrr commented May 26, 2023

I wouldn't expect that arduino-esp32 project would provide any specific API for CPU Trace. At least, it doesn't provide such an API on Xtensa.

In fact, most of the CPU trace implementation is done in the tools, not in the embedded software:

@VojtechBartoska
Copy link
Collaborator Author

Status update with the list of left tasks:

  • UART Peripheral Manager Implementation - in Progress
  • SD MMC Peripheral Manager Implementation - in Progress

  • Ethernet RMII Peripheral Manager Implementation - To-Do
  • Allow usage of blocked GPIOs - To - Do

@VojtechBartoska
Copy link
Collaborator Author

VojtechBartoska commented Jun 12, 2023

Status update:

To-Do:

  • USB (@SuGlider)
  • Allow usage of blocked GPIOs - newly added

@VojtechBartoska
Copy link
Collaborator Author

Status update:

in Review

  • Ethernet
  • UART
  • USB

In progress

  • I2S

To-Do

  • Allow usage of blocked GPIOs

@lboue
Copy link
Contributor

lboue commented Jul 1, 2023

ESP-IDF Release v5.1 has been released.

@alba-ado
Copy link

alba-ado commented Jul 5, 2023

Calling the SPIFFS.begin() causes the following linker error with ESP32-S3 using IDF v5.1-rc2:

/home/ado/Programs/Espressif/tools-v5.1/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/arduino/libarduino.a(vfs_api.cpp.obj):(.literal._ZN11VFSFileImplD2Ev+0x4): undefined reference to `_ZTVN2fs8FileImplE'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/ado/Projects/Espressif/idf-v5.1_deneme/build/log/idf_py_stderr_output_37988 and /home/ado/Projects/Espressif/idf-v5.1_deneme/build/log/idf_py_stdout_output_37988

From what I'm understanding, it is having difficulty finding fs::FileImpl class in the object files. Could be a simple include error.

Here is the full output:

[7/9] Linking CXX executable OPIS_Cloud_Module.elfFAILED: OPIS_Cloud_Module.elf 
: && /home/ado/Programs/Espressif/tools-v5.1/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++ -mlongcalls -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32S3=0 -Wl,--Map=/home/ado/Projects/Espressif/idf-v5.1_deneme/build/OPIS_Cloud_Module.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32s3.peripherals.ld -T esp32s3.rom.ld -T esp32s3.rom.api.ld -T esp32s3.rom.libgcc.ld -T esp32s3.rom.newlib.ld -T esp32s3.rom.version.ld -T memory.ld -T sections.ld CMakeFiles/OPIS_Cloud_Module.elf.dir/project_elf_src_esp32s3.c.obj -o OPIS_Cloud_Module.elf -L/home/ado/Programs/Espressif/esp-idf-v5.1/components/soc/esp32s3/ld   -L/home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_rom/esp32s3/ld   -L/home/ado/Projects/Espressif/idf-v5.1_deneme/build/esp-idf/esp_system/ld   -L/home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_phy/lib/esp32s3   -L/home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3 esp-idf/xtensa/libxtensa.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/efuse/libefuse.a  esp-idf/driver/libdriver.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/pthread/libpthread.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/cxx/libcxx.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/app_trace/libapp_trace.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/protobuf-c/libprotobuf-c.a  esp-idf/console/libconsole.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/protocomm/libprotocomm.a  esp-idf/json/libjson.a  esp-idf/wifi_provisioning/libwifi_provisioning.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/wear_levelling/libwear_levelling.a  esp-idf/sdmmc/libsdmmc.a  esp-idf/fatfs/libfatfs.a  esp-idf/spiffs/libspiffs.a  esp-idf/esp_hid/libesp_hid.a  esp-idf/arduino/libarduino.a  esp-idf/unity/libunity.a  esp-idf/cmock/libcmock.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/esp_psram/libesp_psram.a  esp-idf/esp_lcd/libesp_lcd.a  esp-idf/esp_local_ctrl/libesp_local_ctrl.a  esp-idf/espcoredump/libespcoredump.a  esp-idf/mqtt/libmqtt.a  esp-idf/perfmon/libperfmon.a  esp-idf/touch_element/libtouch_element.a  esp-idf/ulp/libulp.a  esp-idf/usb/libusb.a  esp-idf/main/libmain.a  esp-idf/app_trace/libapp_trace.a  esp-idf/app_trace/libapp_trace.a  esp-idf/arduino/libarduino.a  esp-idf/wifi_provisioning/libwifi_provisioning.a  esp-idf/json/libjson.a  esp-idf/fatfs/libfatfs.a  esp-idf/wear_levelling/libwear_levelling.a  esp-idf/sdmmc/libsdmmc.a  esp-idf/spiffs/libspiffs.a  esp-idf/esp_hid/libesp_hid.a  esp-idf/cmock/libcmock.a  esp-idf/unity/libunity.a  esp-idf/esp_lcd/libesp_lcd.a  esp-idf/esp_local_ctrl/libesp_local_ctrl.a  esp-idf/protocomm/libprotocomm.a  esp-idf/protobuf-c/libprotobuf-c.a  esp-idf/console/libconsole.a  esp-idf/espcoredump/libespcoredump.a  esp-idf/mqtt/libmqtt.a  esp-idf/perfmon/libperfmon.a  esp-idf/touch_element/libtouch_element.a  esp-idf/usb/libusb.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/efuse/libefuse.a  esp-idf/driver/libdriver.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/pthread/libpthread.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/cxx/libcxx.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/esp_psram/libesp_psram.a  esp-idf/ulp/libulp.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libcore.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libespnow.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libmesh.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libnet80211.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libpp.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libwapi.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/efuse/libefuse.a  esp-idf/driver/libdriver.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/pthread/libpthread.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/cxx/libcxx.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/esp_psram/libesp_psram.a  esp-idf/ulp/libulp.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libcore.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libespnow.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libmesh.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libnet80211.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libpp.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libwapi.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/efuse/libefuse.a  esp-idf/driver/libdriver.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/pthread/libpthread.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/cxx/libcxx.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/esp_psram/libesp_psram.a  esp-idf/ulp/libulp.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libcore.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libespnow.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libmesh.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libnet80211.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libpp.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libwapi.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/efuse/libefuse.a  esp-idf/driver/libdriver.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/pthread/libpthread.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/cxx/libcxx.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/esp_psram/libesp_psram.a  esp-idf/ulp/libulp.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libcore.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libespnow.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libmesh.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libnet80211.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libpp.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libwapi.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/efuse/libefuse.a  esp-idf/driver/libdriver.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/pthread/libpthread.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/cxx/libcxx.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/esp_psram/libesp_psram.a  esp-idf/ulp/libulp.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libcore.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libespnow.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libmesh.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libnet80211.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libpp.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libwapi.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/efuse/libefuse.a  esp-idf/driver/libdriver.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/pthread/libpthread.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/cxx/libcxx.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/esp_psram/libesp_psram.a  esp-idf/ulp/libulp.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libcore.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libespnow.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libmesh.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libnet80211.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libpp.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/esp_wifi/lib/esp32s3/libwapi.a  /home/ado/Programs/Espressif/esp-idf-v5.1/components/xtensa/esp32s3/libxt_hal.a  -u esp_app_desc  -u pthread_include_pthread_impl  -u pthread_include_pthread_cond_impl  -u pthread_include_pthread_local_storage_impl  -u pthread_include_pthread_rwlock_impl  -u pthread_include_pthread_semaphore_impl  -u ld_include_highint_hdl  -u start_app  -u start_app_other_cores  -u __ubsan_include  -Wl,--wrap=longjmp  -u __assert_func  -Wl,--undefined=uxTopUsedPriority  -Wl,--undefined=FreeRTOS_openocd_params  -u app_main  -lc  -lm  esp-idf/newlib/libnewlib.a  -u newlib_include_heap_impl  -u newlib_include_syscalls_impl  -u newlib_include_pthread_impl  -u newlib_include_assert_impl  -Wl,--wrap=_Unwind_SetEnableExceptionFdeSorting  -Wl,--wrap=__register_frame_info_bases  -Wl,--wrap=__register_frame_info  -Wl,--wrap=__register_frame  -Wl,--wrap=__register_frame_info_table_bases  -Wl,--wrap=__register_frame_info_table  -Wl,--wrap=__register_frame_table  -Wl,--wrap=__deregister_frame_info_bases  -Wl,--wrap=__deregister_frame_info  -Wl,--wrap=_Unwind_Find_FDE  -Wl,--wrap=_Unwind_GetGR  -Wl,--wrap=_Unwind_GetCFA  -Wl,--wrap=_Unwind_GetIP  -Wl,--wrap=_Unwind_GetIPInfo  -Wl,--wrap=_Unwind_GetRegionStart  -Wl,--wrap=_Unwind_GetDataRelBase  -Wl,--wrap=_Unwind_GetTextRelBase  -Wl,--wrap=_Unwind_SetIP  -Wl,--wrap=_Unwind_SetGR  -Wl,--wrap=_Unwind_GetLanguageSpecificData  -Wl,--wrap=_Unwind_FindEnclosingFunction  -Wl,--wrap=_Unwind_Resume  -Wl,--wrap=_Unwind_RaiseException  -Wl,--wrap=_Unwind_DeleteException  -Wl,--wrap=_Unwind_ForcedUnwind  -Wl,--wrap=_Unwind_Resume_or_Rethrow  -Wl,--wrap=_Unwind_Backtrace  -Wl,--wrap=__cxa_call_unexpected  -Wl,--wrap=__gxx_personality_v0  -u __cxa_guard_dummy  -lstdc++  esp-idf/pthread/libpthread.a  -lgcc  esp-idf/cxx/libcxx.a  -u __cxx_fatal_exception  -u vfs_include_syscalls_impl  -u include_esp_phy_override  -lphy  -lbtbb  esp-idf/esp_phy/libesp_phy.a  -lphy  -lbtbb  esp-idf/esp_phy/libesp_phy.a  -lphy  -lbtbb && :
/home/ado/Programs/Espressif/tools-v5.1/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/arduino/libarduino.a(vfs_api.cpp.obj):(.literal._ZN11VFSFileImplD2Ev+0x4): undefined reference to `_ZTVN2fs8FileImplE'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/ado/Projects/Espressif/idf-v5.1_deneme/build/log/idf_py_stderr_output_37988 and /home/ado/Projects/Espressif/idf-v5.1_deneme/build/log/idf_py_stdout_output_37988

@butaikis
Copy link

butaikis commented Jul 6, 2023

Hello. Tell me in the Arduino Core ESP-IDF v5.1 version, will the Update.h library support updates using encrypted bin ?

@me-no-dev
Copy link
Member

Hello. Tell me in the Arduino Core ESP-IDF v5.1 version, will the Update.h library support updates using encrypted bin ?

There are no plans currently to support such feature

@Jason2866
Copy link
Collaborator

Already a lot seems to work :-) A very stripped down and adopted Tasmota version does boot.
image

@Jason2866
Copy link
Collaborator

BLE is working.

@roleroz
Copy link

roleroz commented Aug 18, 2023

Do we have an ETA for this version?, I'm waiting for the newer compiler to use some more modern language features

@VojtechBartoska
Copy link
Collaborator Author

Hello @roleroz, the initial development only release of Arduino core version 3.0.0 will be out approx. at the end of August, we are still working on that. Stable version will be available later. Thanks for understanding.

@VojtechBartoska VojtechBartoska pinned this issue Sep 5, 2023
@peteDDD
Copy link

peteDDD commented Sep 5, 2023

Clearly this has been a major effort to get this running with 5.1. Your efforts are greatly appreciated. Since the end of August has come and gone, do you have any further update on when to expect a release?

@me-no-dev
Copy link
Member

@peteDDD we will release alpha version probably next week. We are just making sure that 2.0.12 does not include any critical bugs.

@peteDDD
Copy link

peteDDD commented Sep 16, 2023

@me-no-dev

How is that release coming? I am eager to test. (I've wasted two months trying to get something to work).

@peteDDD we will release alpha version probably next week. We are just making sure that 2.0.12 does not include any critical bugs.

@dzungpv
Copy link

dzungpv commented Sep 21, 2023

@me-no-dev I am waiting to test the alpha version.

@SimonBrix
Copy link

@alba-ado Did you find a way to fix this issue? Getting the same error.

@Jason2866
Copy link
Collaborator

@SimonBrix Small sample sketch that fails? Not using SPIFFS anymore, using for all LittleFS and it does work without any issue with Arduino 3.0.0 branch from this repo.

@peteDDD
Copy link

peteDDD commented Sep 24, 2023

@SimonBrix
Instead of depending on "Arduino as a component", I am using platformio with the following platformio.ini and it works fine. I am now able to use all sorts of espidf stuff like wake stub and ULP processor stuff, lower-level register stuff like the following (just show as an example... you do NOT need to do any of these commands):

// Get current RTC time
 SET_PERI_REG_MASK(RTC_CNTL_TIME_UPDATE_REG, RTC_CNTL_TIME_UPDATE);
 while (GET_PERI_REG_MASK(RTC_CNTL_TIME_UPDATE_REG, RTC_CNTL_TIME_VALID) == 0)
 {
   ets_delay_us(1);
 }
 SET_PERI_REG_MASK(RTC_CNTL_INT_CLR_REG, RTC_CNTL_TIME_VALID_INT_CLR);

 uint64_t now = READ_PERI_REG(RTC_CNTL_TIME0_REG) | ((uint64_t)READ_PERI_REG(RTC_CNTL_TIME1_REG) << 32);

 // Set wakeup time
 uint64_t future = now + rtc_count_delta;
 WRITE_PERI_REG(RTC_CNTL_SLP_TIMER0_REG, future & UINT32_MAX);
 WRITE_PERI_REG(RTC_CNTL_SLP_TIMER1_REG, future >> 32);

 WRITE_PERI_REG(RTC_CNTL_SLP_REJECT_CONF_REG, 0);

To get to a productive development environment, here is what I did...

You have to configure your sdkconfig using menuconfig to have the Freertos HZ = 1000 (instead of 100) and may have to do that manually by editing the sdkconfig file before you can actually run menuconfig successfully. Also you may get a warning message when you build regarding encryption settings... you can follow the instructions in the warning message to make the appropriate changes to the sdkconfig using menuconfig. You will have to decide if you are going to use the arduino format of setup() and loop() or the espidf format of main_app(). You turn the Arduino setup() mode on in the Arduino section of the menuconfig settings. Lastly, pay attention to the need to add extern "C" around all your functions other than setup() and loop() if you use the arduino format. You can to this as follows:

#ifdef __cplusplus
extern "C"
{
#endif

void YourFunction1(void)
{}


void Your function2(void)
{}
//... etc

#ifdef __cplusplus
}
#endif

OR

Use forward declarations to all your functions this way.

#ifdef __cplusplus
extern "C"
{
#endif

void Yourfunction1(void);
void Yourfunction2(void);
int Yourfunction2(int x); 
// etc...

#ifdef __cplusplus
}
#endif

and here is the platformio.ini, for example for the esp32dev board. You can also add other build flags and your lib-deps... I show a few of those for example purposes here. I found the monitor filters used here useful; You can decide to use them or not.

[env:esp32dev]
platform = espressif32@6.4.0
board = esp32dev
framework = espidf, arduino
monitor_speed = 115200
upload_speed = 921600
monitor_filters = direct, esp32_exception_decoder
build_flags = 
     -fmax-errors=5
    -DCORE_DEBUG_LEVEL=2 ; show only warnings and errors
lib_deps = 
	Button2@1.0.0

Good luck.

@Jason2866
Copy link
Collaborator

Jason2866 commented Sep 24, 2023

@peteDDD Your Platformio setup is exactly Arduino as a Component. And your are not using IDF 5.1 here. This thread is a about IDF 5.1

@peteDDD
Copy link

peteDDD commented Sep 25, 2023

@Jason2866 Thank you but I think you miss my point. "Arduino as a component" does not run on OIDF 5.1. It crashes. This is my workaround to be productive so I can actual get my work done and stop waiting for 5.1 to work with "Arduino as a component". This is NOT, "Arduino as a component", which does (or in the case of 5.1 attempts to, but fails) a huge set of Arduino libraries into the component directory. This way, only the libraries you are included ate loaded and they go into the .pio/libdeps directory. It's really MUCH different than the "Arduino as a component" option.

@Jason2866
Copy link
Collaborator

@peteDDD It is exactly Arduino as a Component. Just done the Platformio way of setting up.
Knew Platformio very well. Contributed there. Building and using the actual Arduino 3.0 with Platformio. Anyways you found a solution for your use case. But again this thread is about IDF 5.1 / Arduino 3.0

@SimonBrix
Copy link

SimonBrix commented Sep 25, 2023

@Jason2866 I using ESP_IDF with the arduino-esp32 (branch idf-release/v5.1) as a component. I have made a minimal main.cpp file now:

#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "sdkconfig.h"
#include <Arduino.h>
#include "FS.h"
#include "LittleFS.h"


extern "C" void app_main(void)
{
	LittleFS.begin();
}

Where I get this error:

 esp-idf/arduino-esp32/libarduino-esp32.a(vfs_api.cpp.obj):(.literal._ZN11VFSFileImplD2Ev+0x4): undefined reference to `_ZTVN2fs8FileImplE'

It seems to be a problem with the linker not being able to find the vtable destructor of the FileImpl class.

This is my repository of the simple sketch:
https://github.com/SimonBrix/tinyfs_test

I have cloned the arduino-esp32 into a components folder and added littlefs to the set(requires ...) in this line:
https://github.com/espressif/arduino-esp32/blob/0595489450b3d0823309f79883ff5b9df8c1944f/CMakeLists.txt#L212C51-L212C51

@Jason2866
Copy link
Collaborator

Jason2866 commented Sep 25, 2023

@SimonBrix No since Platformio falls back to IDF 4.4.5 when config framework = espidf, arduino is used.
Can be seen here: https://github.com/platformio/platform-espressif32/blob/v6.4.0/platform.py#L95-L125

If you want to use an Arduino 3.0 build with Platfromio you can use my build (forked and modified Arduino and Platformio):

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

I am the maintainer of the Tasmota Arduino framework. Tasmota is already running on the pre release Arduino 3.0 with this Platformio config

@SimonBrix
Copy link

@Jason2866 I am not using Platformio, but pure ESP-IDF with arduino-esp32 as a component.

@Jason2866
Copy link
Collaborator

Jason2866 commented Sep 25, 2023

If you use official Platformio, you use ALWAYS Arduino core 2.0.x

SORRY @SimonBrix i mixed names. Mixed with @peteDDD

Yes, ESP-IDF with Arduino as component does work fine. Thats the way the Arduino 3.0 libs are built.

The littlefs issue is fixed with release v1.9.1

@SimonBrix
Copy link

SimonBrix commented Sep 25, 2023

@Jason2866 I also saw this release earlier today and hoped that it would fix my issue, but I am still getting the same linker error unfortunately.

@Jason2866
Copy link
Collaborator

Jason2866 commented Sep 29, 2023

@SimonBrix Make sure you have this settings in your sdkconfig and the linker error will be gone

CONFIG_AUTOSTART_ARDUINO=y
# CONFIG_WS2812_LED_ENABLE is not set
CONFIG_FREERTOS_HZ=1000

CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_OPTIMIZATION_SIZE=y

For whatever unknown bug this setting is the key CONFIG_COMPILER_OPTIMIZATION_SIZE=y

@peteDDD My working LittleFS Platformio test setup with IDF5.1 and Arduino 3.0 alpha build
https://github.com/Jason2866/Arduino_IDF_LittleFS/tree/IDF5.1

@dzungpv
Copy link

dzungpv commented Oct 10, 2023

@me-no-dev How can I use new 3.0 as IDF Component? like mention here for 2.0 https://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/esp-idf_component.html

@me-no-dev
Copy link
Member

same way. You setup an IDF5.1 project and import Arduino into the components folder.

@blackhack
Copy link
Contributor

blackhack commented Oct 12, 2023

Just in case this is useful for someone, I was able to use Arduino as a component with PlatformIO, using the latest 3.0.0 release and IDF 5.1.1, this is my platformio.ini

[env:esp32dev]
board = esp32dev
platform = espressif32@6.4.0
framework = arduino, espidf
platform_packages = framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#7438c6e9b17cac97650665e59765863d9d3fd25e
                    framework-espidf@3.50101.230828
                    toolchain-xtensa-esp32@12.2.0+20230208
                    toolchain-xtensa-esp32s2@12.2.0+20230208
                    toolchain-xtensa-esp32s3@12.2.0+20230208
                    toolchain-riscv32-esp@12.2.0+20230208

A bit convoluted, but at least it wasn't necessary to modify any source code.

https://github.com/blackhack/ESP32_arduino_as_component_PlatformIO

@peteDDD
Copy link

peteDDD commented Oct 12, 2023

@Blackhawk Thank you for posting that. We all help each other.

@VojtechBartoska
Copy link
Collaborator Author

#8714 I2S done

@VojtechBartoska
Copy link
Collaborator Author

RMT, Sigma documentation is done. Only left is I2S docs + examples.

I am closing this ticker as completed.

@VojtechBartoska VojtechBartoska added Status: Solved and removed Status: In Progress Issue is in progress labels Oct 23, 2023
@VojtechBartoska VojtechBartoska unpinned this issue Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests