github espressif/esp-idf v4.2-beta1
ESP-IDF Pre-release v4.2-beta1

latest releases: v5.1.4, v5.4-dev, v5.2.1...
pre-release3 years ago

Documentation for pre-release v4.2-beta1 is available at https://docs.espressif.com/projects/esp-idf/en/v4.2-beta1/

ESP-IDF v4.2 is a minor update for ESP-IDF v4.1.

This is the list of changes since release v4.1:

Major New Features

  • Secure Boot V2 support (RSA based) added for ESP32 V3
  • Support for ESP32+ATECC608A (ESP32-WROOM-32SE) platform along with sample application
  • Added feature to utilize residual IRAM as data memory for ESP32 single core configuration
  • Added support of Bluetooth 5.0 for ESP32
  • Added ESP-HID Component
  • WiFi: Added and utilize WPA3/WPA2 Mixed mode Authtype
  • WiFi: Added support of multiple phy init data
  • WiFi: Added wpa_supplicant parsing support for WEP40 key
  • ESP-WIFI-MESH: Support chain topology
  • ESP-WIFI-MESH: Support mesh network power save function
  • Support for ESP32-S2 SoC
    • Wi-Fi
      • Wi-Fi driver
      • Wi-Fi modem sleep
      • Wi-Fi with automatic light sleep
    • Security
      • Flash & PSRAM encryption
      • RSA accelerator
      • AES accelerator
      • SHA accelerator
      • Digital signature
      • HMAC
    • Peripherals
      • UART
      • Timer group
      • GPIO
      • SPI Master
      • SPI Slave
      • I2C
      • I2S
      • LEDC
      • PCNT
      • SigmaDelta
      • RMT
      • USB Device
      • Touch sensor
      • ADC
      • DAC
      • SD card over SPI
      • Ethernet over SPI
      • RTC interrupts
      • Brownout detector
      • Temperature sensor
      • ULP coprocessor (RISC-V)
    • System features
      • Cache
      • esp_timer
      • SPI Flash
      • PSRAM — 2MB
      • I/D RAM separation
      • OTA
      • RTC Slow clock selection (e.g. 32k XTAL)
      • Task, interrupt watchdogs
      • Efuse API and espefuse.py
      • Console over USB
      • DFU flashing
      • CDC flashing
    • Build system and tools
      • Building the project using CMake (build, flash, monitor, menuconfig)
      • "idf.py size"
    • Sleep modes
      • Deep sleep
      • Light sleep
      • DFS
      • Automatic light sleep and esp_pm power management
      • Light sleep GPIO wakeup
    • Debugging
      • Core dump
      • app_trace
      • Systemview
      • OpenOCD
    • Protocols
      • Modbus
      • Provisioning
      • Other protocols on top of TCP/IP

Known Issues

  • The esp-2020r2 toolchain has been added in this release which includes some fixes for C++ exceptions, a fix for -O2 optimization of volatile word accesses, and an improved PSRAM fix. Extended stress testing of Wi-Fi & BT coexistence with heavy PSRAM use show there is a difficult to reproduce issue with the updated PSRAM fix. It is possible to roll back to the esp-2020r1 toolchain release by running git revert --no-edit 298f23c9 in the ESP-IDF directory, then re-run the install.sh/install.bat/install.ps1 and . export.sh/export.bat/export.ps1 steps as described in the Get Started guide. This issue will be fixed in the v4.2 final release.
  • A new macro to call a function with a user-allocated stack has been added but is non-functional
  • Secure Boot is not yet supported on ESP32-S2. Will be included in the v4.2 final release.
  • Early boot Random Number Generation is not enabled on ESP32-S2. The Flash Encryption feature should not be used in this release, unless keys are generated on the host and burned to eFuse manually. Do not rely on any random numbers generated before Wi-Fi is enabled. Early boot RNG for ESP32-S2 will be enabled before the v4.2 final release.
  • SPP: Not able to use BT SPP because exception happens when init BT SPP.
  • Light sleep: Wi-Fi light sleep is not stable on ESP32-S2. Wi-Fi could disconnect from AP in light sleep.

Bluetooth

Classic Bluetooth

Controller

  • Fixed the issue that when host runs different core from controller and sleep enabled,HCI timeout may occur
  • Added user invisible kconfig for BT MAC offset (#5320)
  • Fixed time jitter in FHS during role switch
  • Fixed time jitter in first POLL packet during role switch
  • Fixed failure in receiving EDR packet after role switch
  • Fall back to main XTAL as Bluetooth sleep clock when EXT 32K CRYS is configured but not detected
  • Set non-zero initial value for BT sleep clock cycle to avoid div-by-zero error in function "btdm_us_2_lpcycles" when BT modem sleep is not enabled
  • Fixed assert when creating connection cancellled
  • Fixed ASSERT for RXDESC
  • Fixed ASSERT in ld_acl at line 302 forclkoff1 and localval
  • Fixed ld_acl schedule issue to parity shift
  • Fixed ASSERT in ld_pscan.c at line 1032
  • Fixed free lmp tx buf in EM in the procedure of handling LMP_detach_Req when not received the last acknowledge from peer device and separate them by ACL State
  • Fixed no mode change event reported when slave initiates unsniff procedure and a transaction collision occurs
  • Fixed interrupt WDT timeout due to interrupt disabled period
  • Fixed Connection fail in loop
  • Fixed ASSERT(25,0) in lc_task.c
  • Disabled frequent warning log in ld_acl
  • Fixed future events scheduling error in case of wifi and bluetooth
  • Fixed clk offset error in ld_acl.c

Bluedroid

  • Separate BTA_JV_L2CAP for less bin size
  • Fixed cases having fallback to link up event
  • GAP: Fixed error EIR type in config eir event
  • GAP: fixed the issue when calling esp_bt_gap_remove_bond_device to remove a bonded device and then calling esp_bt_gap_get_bond_device_list, it may return invalid Bluetooth address (#5395)
  • SPP: Added API esp_spp_stop_srv()
  • SPP: Fixed task watchdog when running SPP example in VFS mode
  • SPP: Fixed the error parameter in spp examples (#5408)
  • HID-Host: Added HID Host support in Bluedroid
  • A2DP: Fixed the issue that A2DP_SINK example cannot successfully compile when Compiler Optimization Level is performance (O-2)
  • AVRCP: Replaced U+0092 with regular apostrophes in avrc_defs.h (#4667)
  • HFP-AG: Fixed connection failure and crash when receiving unknown AT command
  • HFP-AG: Fixed error of return line in AG API (#5554)
  • HFP-AG: Fixed AG audio crash (change the return position)
  • HFP: Enabled PCM config in menuconfig and controller

Bluetooth Low Energy

Controller

  • Added BLE connect parameter check
  • Fixed channel map instant reverse
  • Fixed ASSERT(64,0) in rwble.c
  • Fixed for HCI desync deadlock issue in BLE controller
  • Fixed ble crash issue triggered by ble event irq miss(0x20000) (d2a1d18d)
  • Fixed the crash when controller disabled and then re-enabled for ble
  • Fixed the missed channel map update when the slave latency is greater than 0.
  • Fixed the missed channel map update when the instant value is 0

Bluedroid

  • Added API to query the number of available buffers for the current connection
  • Consider link_xmit_data_q in congest events to prevent excessive memory usage
  • Changed HCI task size back to 2048
  • Fixed the issue of incomplete data packets caused by disordered acl data packets
  • Fixed ble memory leak issue, buff_semaphore was not released
  • Added HID Host and Device support in Bluedroid
  • Added some general HID utilities and definitions to help integrate with other stacks and native USB
  • Fixed the issue that bluedroid task pinned_to_core doesn't take effect
  • Authentication fixes in Legacy and Secure Connection
  • Fixed don't dequeue the command queue after process the read_by_type_req
  • Fixed notify malloc failed when testing multi-connection notify performance
  • Fixed client no BLE_AUTH_CMPL_EVT when client proactively initiate an encryption request after device restart
  • Fixed btc disable crash sometimes
  • Fixed the state not synchronized between controller and host when disconnected

Blufi

  • Reply with an error response when the format of the received data packet is wrong

NimBLE

  • Added menuconfig option for NimBLE host flow control
  • Added Non-Resolvable private address (NRPA) support
  • Added NimBLE config options in sdkconfig.rename
  • Added header guards and closing bracket conditional for c++ in ble_hs_pvcy.h (espressif/esp-nimble#12)
  • Added ble_hs_lock in ble_gap_unpair: upstream PR!584
  • Added Host based privacy (RPA) feature support
  • Added IRAM allocation provision under nimble_platform_mem_malloc()
  • Fixed repeated pairing failure in RPA (#5530)
  • Fixed potential issue with strncpy in os_mempool.c: upstream PR!843
  • Included changes in blecent example: upstream PR!702
  • Fix checking for NOP in ble_hs_hci_rx_evt: upstream PR!738
  • Fixed check for static random address & add MSYS_1 in menuconfig
  • Fixed NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT in esp_nimble_cfg and bleprph README
  • Fixed build failures due to non static declarations in RPA feature (#4413)
  • Reset master and slave states on host reset
  • Use macros for log level filtering which reduces the size of the compiled binary, PR: espressif/esp-nimble#6
  • Fix NULL pointer passed as a parameter: upstream [PR!701)(https://github.com/apache/mynewt-nimble/pull/701)
  • Pairing procedure abort on unexpected req: upstream PR!710
  • Fix conn flags after pairing: upstream PR!730
  • Remove notification for update process timeout (Vol 6, Part B, section 5.2 ): upstream PR!782
  • CCCD related fixes: upstream PR!790 and PR!804
  • Host based Privacy (RPA) related fix: espressif/esp-nimble#7

ESP-BLE-Mesh

  • Miscellaneous modifications for Provisioner
    • Support Provisioner persistent functionality
    • Added a function to set Provisioner static oob value
    • Added a function to set Provisioner unicast address
    • Added a function to provision devices with fixed address
    • Added a function to store node composition data
    • Added a function to get node with device uuid
    • Added a function to get node with unicast address
    • Added a function to delete node with device uuid
    • Added a function to delete node with unicast address
    • Added a function for Provisioner to update local AppKey
    • Added a function for Provisioner to update local NetKey
    • Fixed Provisioner entering IV Update procedure
    • Fixed Provisioner failed to publish messages
    • Provisioner ignores msg from removed node
    • Fixed Provisioner provisioning deadlock
    • Checks if the AppKey exists before deleting it
    • Modified the Provisioner disable function
    • Add parameters for Provisioner binding AppKey comp event
    • Fixed not reset transport info when node is removed
    • Removed BLE_MESH_MAX_STORED_NODES option
    • Changed to continue node info restore even if failure happens
    • Added check if assigned node address is duplicated
    • Associates replay protection list size with nodes count
    • Updated next alloc address when node info is added
    • Continue notifying unprovisioned device beacon to application layer
    • Add a function to get the entry of the nodes table (#5397)
    • Use same functions for node composition data store/restore
    • Added functions to get node information with node name
  • Synchronized a few Zephyr BLE Mesh updates
  • Support using a specific partition for BLE Mesh
  • Added a function to de-initialize BLE Mesh stack
  • Fixed use-after-free issue when de-initialize mesh
  • Fixed not free beacon timer when de-initialize mesh
  • Fixed de-initialize error when using NimBLE host
  • Added mutex for mesh related timer operations
  • Fixed an issue which may cause client failed to send messages
  • Use bt_mesh.flags to indicate mesh device role
  • Callback RSSI of received mesh provisioning packets
  • Change some stack log level from debug to info
  • Fixed node ignoring relay messages issue
  • Fixed compile warning when proxy related macros are disabled
  • Clean up BLE Mesh stack included header files
  • Fixed compile warning when BT log is disabled
  • NULL can be used if client message has no parameters
  • Initialize BLE Mesh stack local variables
  • Support using PSRAM for BLE Mesh mutex, queue and task
  • Added an option to enable using memory from PSRAM
  • Allow sending messages with maximum 377 octets payload
  • Unified client application and lower transport layer timeout
  • No timeout for client message to non-unicast address
  • Fixed timer start when sending client acknowledged messages
  • Fixed client local parameters not initialized
  • Calculates incomplete message timeout based on message info
  • Added check of buf->ref before decrementing buffer ref count
  • Used the right net_idx & app_idx for publish
  • Used the right netkey during iv update
  • Fixed time scene wrong spelled macro name
  • Added length check for some mesh operations
  • Reworked provisioning pdu length check
  • Added proxy configuration pdu length check
  • Fixed not erasing mesh node information completely
  • Added an option to fix node nvs information restore
  • Added missing #ifdef __cplusplus
  • Fixed using a UTF-8 comma in Kconfig
  • Fixed not updating provisioner address in fast provisioning
  • Fixed ignoring messages when fast provisioning is enabled
  • Fixed compile error when including from C++ files
  • Support for BLE advertising simultaneously when mesh is working
  • Added init flag for friend init/deinit
  • Fixed compile error when -O2 (performance) is chosen
  • not ignore messages from the nodes whose addresses are not in the provisioning database
  • Removed the fix patch for Bluetooth Mesh Android App v1.1.0
  • Fix the issue of using old config for duplicate scan
  • Fixed the issue of not using pre-initialized private key
  • Added check of the result of creating timer
  • Defined an application macro for invalid company ID
  • Removed relay option dependency
  • Do not #define bool when compiling in C++ (#5100)
  • Removed boolean type definitions
  • Added checking model status with variable length
  • Added functions for model subscribing/unsubscribing group addresses locally
  • Fixed wrong log output when using bt_hex
  • Fixed the issue that RSSI of the received message is always 0 (#5505)
  • Added checking if subnet exists before updating beacon_sent
  • Fixed compile error when only proxy enabled
  • Updated send_ttl when receiving a message (#5300)
  • Added two application macros for TTL
  • Added an option of using IRAM for memory allocation
  • Reworked using dev flag to check scan status
  • Fixed receiving health current status incorrectly
  • Optimized calling of client model related functions

Wi-Fi Coexistence

  • Fixed watchdog timeout when sleep enabled
  • Fixed misspelling in Kconfig
  • Fixed A2DP stuck after creating another connection
  • Adjust coexist scheme when BT is in connected status
  • Fixed wakeup delay when DFS is enabled
  • Optimized WiFi/BT coexist sleep
  • Added coexist API to enable BLE connection dynamic priority

Wi-Fi

  • Added and utilize WPA3/WPA2 Mixed mode Authtype
  • Added support of multiple phy init data
  • Added wpa_supplicant parsing support for WEP40 key
  • Added TX packets size check
  • Added esp_wifi_get_tsf_time() API to get the tsf time
  • Added check for Wi-Fi stop when calling esp_wifi_deinit
  • Added sending sta connection event again after ap sent disconnect event
  • Added API of setting/getting inactive time
  • Added new API esp_wifi_ap_get_sta_aid
  • Added an API for peripherals to set callbacks to skip light sleep when WiFi TSF is active
  • Added TBTT update when AP reset TSF
  • Added API to get available internal heap size
  • Added softap example channel configuration
  • Removed AUTH_CHANGED reason code logic
  • Fixed the issue when calculating the PMK, the local rx beacon time increment is 0
  • wpa_supplicant: Support for mbedtls tls handshake
  • wpa_supplicant: Fixed invalid pointer deference and memory leak
  • wpa_supplicant: Fixed inter operability issue with freeradius version 3.0.21 and openssl 1.1.1f when internal tls client is used which requires extension elements in client hello
  • wpa_supplicant: Fix WPA3 and WPA2 transition related failures
  • wpa_supplicant: Fixed compilation errors when USE_MBEDTLS is disabled
  • wpa_supplicant: Ported dpp feature from supplicant
  • wpa_supplicant: Fix formatting of file esp_wpa3.c
  • wpa_supplicant: Allow NULL-padded WPS attributes
  • wpa_supplicant: Allow building with mbedTLS integration but no hardware MPI (#5321)
  • wpa_supplicant: Added wpa_supplicant debug logging as a configurable option (#3839)
  • wpa_supplicant: Fix SAE test-case failure on mbedtls version udpate
  • WPS: fixed handling of multiple AP credentials in WPS
  • Fixed WPS config for support with gnu++11 as well as c99 (#4625)
  • esp_wps.c: Fixed datatype for wps task handle
  • Fixed the issue that API esp_wifi_sta_get_ap_info returns actual values of group
  • Fixed an crash in executing wifi deinit in softap + sta mode and AMPDU is on
  • Fixed the issue that sniffer fails to work during mode switch
  • Place the Vendor Specific element at the end according to the protocol
  • Fixed the memory leak caused by WiFi stop
  • Fixed the crash when wifi stop after deinit
  • Fixed the issue that softap will no prompt if the STA is powered off or the AP does not receive disassoc/deauth
  • Fixed the issue when station connects to hidden AP, fails to update rssi value of hidden AP
  • Fixed setting channel when Wi-Fi is in NULL mode
  • Fixed a crash during WEP shared auth
  • Disabled WiFi API parameter checking log
  • Fixed select_waiting assert and crash after reapplying for UDP socket when UDP is turned off
  • Fixed the issue that information of scanned AP will be saved only when the current scanning channel is the same as AP's channel
  • Avoid parsing RSN/WPA IE's after connection
  • Configure bandwidth and phy mode to store NVS
  • Now returns an error if the setting AP's channel is out of range
  • Fixed error in printing level in wifi log
  • Disabled wpa_supplicant TLS 1.2 support by default due to issues with some Enterprise Authentication Servers
  • Fixed esp_wifi_stop crash without calling init
  • Fixed obsolete interface gethostbyname
  • Fixed the bug for softAP update second channel wrong
  • Fixed country code query when policy change from manual to auto
  • Fixed internal scan data struct definition, changed wifi_scan_time_t from union to struct
  • Enable WPA3 & PMF by default
  • Fixed WPA3 Auth timeout issue in BLE coexistence scenario
  • Fixed memory leak in wpa3
  • Fixed AP switch to adjacent channel without disconnect (CVE-2020-12638)
  • Fixed wpa_supplicant memory leaks and invalid memory access
  • Fixed a timeout issue in the EAPOL four-way handshake
  • Optimized four-way handshake failure time
  • Fixed esp_wifi_set_max_tx_power description
  • Removed wifi tx buffer limits
  • Fixed addba ssn and send bar for first ampdu
  • Fixed interrupt handle psram variable error (#5354)
  • Fixed the issue of regdomian update
  • Fixed an issue when setting TX DMA buffer above 32 would not take effect
  • Fixed WPA memory leak in softap mode
  • Moved esp_phy_common_clock_disable into periph_ctrl and put it into IRAM
  • Added esp_wifi_ap_get_sta_aid
  • Fixed AP power save buffer issue by returning no memory error code is power save buffer is not enough
  • Fixed scan saves wrong RSSI value
  • Added esp_wifi_statis_dump to dump the key WiFi statistics
  • Optimize WiFi TX

ESP-WIFI-MESH

  • Support chain topology
  • Add esp_mesh_set_topology and esp_mesh_get_topology
  • Support mesh network power save function
  • Add esp_mesh_enable_ps and esp_mesh_disable_ps
  • Add esp_mesh_is_ps_enabled and esp_mesh_is_device_active
  • Add esp_mesh_set_active_duty_cycle and esp_mesh_get_active_duty_cycle
  • Add esp_mesh_set_network_duty_cycle and esp_mesh_get_network_duty_cycle
  • Add esp_mesh_get_running_active_duty_cycle
  • Add mesh PS option to the add announcement packet
  • esp_mesh_set_type supports MESH_IDLE and MESH_STA
  • Remove coexist warnings in ESP_WIFI_MESH
  • If the root is specified (FIXED-ROOT) by set type or set parent, change ie.mesh_type to MESH_ROOT before connect to router
  • Release esp_mesh_recv_toDS when the root becomes non-root
  • Fix esp_mesh_deinit blocking issue
  • Remove coexist warnings for ESP_WIFI_MESH
  • Add an example showing internal IP capable mesh network

ESP-NOW

  • Fixed ESP-NOW API random crash
  • Fixed the crash issue when fetching peer after delete cur_peer
  • Supported ESPNOW + PMF co-existance

Smartconfig

  • Airkiss: Fixed bug where connection would timeout but success was returned (#3362)
  • Fixed the bug that airkiss find hidden AP fail

Ethernet

  • Added the support of pin emac task to core
  • Added ETH_MAC_FLAG_WORK_WITH_CACHE_DISABLE flag to make Ethernet driver
    possible to work when cache disabled (#4635)
  • Added ENC28J60 Ethernet Driver (#4435)
  • Ensure that eth_driver handle is allocated in internal RAM (#4635)
  • Fixed potential null pointer dereference in ethernet driver ( #4890)
  • Ensure that calling esp_eth_stop() stops the EMAC hardware layer
  • Improved reliability of ethernet driver start/stop/uninstall/install
  • Insert mininum assert time for PHY HW reset (#5528)
  • Fixed potential task watch dog timeout

Security

  • Added platform independent CMake signing
  • secure boot: Fix anti-fault value if hash is shorter than curve
  • optimize AES-GCM via enabling HW acceleration for GCM by default
  • HMAC: adding upstream message support
  • Enable flash encryption by setting FLASH_CRYPT_CNT to max
  • SHA: add fallback for when memory alloc fails
  • ESP32-S2: Added the support of disabling legacy boot mode & ROM remap modes if either Secure Boot or Flash Encryption is on

Peripheral Drivers

  • ADC: Disabled the synchronization operation function of ADC1 and DAC
  • ADC: Fixed adc io pullup/pulldown initialization bug
  • GPIO: Fixed light sleep can't be awoken by GPIO issue
  • I2C: Added check whether SCL and SDA are on different pins
  • I2C: Made data argument of i2c_slave_write_buffer const
  • I2S: Fixed issue: ADC read values inverted (#4557)
  • I2S: Fixed issue: i2s_comm_format_t configuration parameter does not match the TRM (#4522)
  • I2S-ADC: Fixed issue: GPIO may not configured properly when ADC is used with I2S
  • I2S, PCNT: Cleaned up public header
  • MCPWM: Fixed init MCPWM Fault line via config struct (#5491)
  • MCPWM: Fix fault pin initialization issue (#5491)
  • PCNT: Add pcnt_isr_unregister new interface
  • PSRAM: Fixed the read id failure for 16mbit PSRAM
  • PSRAM: Added support for esp32-pico-v3-02
  • RMT: Fixed missing 0x in rmt_ll.h (#4760)
  • RMT: Fixed the breaking change: application needs to call rmt_driver_install before rmt_config (#4664)
  • RMT: Fixed the breaking change: Do not support memory block count > 1 (#4959)
  • RMT: Supported using REF_TICK as channel clock source
  • RMT: Disabled carrier feature by default
  • RTCIO: Fixed the issue sometimes hold cannot be disabled (#4600)
  • SDIO: Fixed compilation error on verbose level (#4786)
  • SPI: Supported sharing SPI bus among drivers
  • SPI: Fixed the memory accessed while cache disabled issue in the bus lock when log level is verbose
  • SDSPI: Supported mounting multiple SD cards and using polling transactions to increase reading speed
  • TWAI: Fixed issue that some program logic are placed in assert()
  • UART: Fixed uart_set_line_inverse issue (#4581)
  • UART: Fixed the issue of missing txfifo reset
  • UART: Fix RXFIFO_CNT bug on ESP32 (#5101)
  • periph_ctrl: Added LL for clock and reset control
  • periph_ctrl: Added reference counter in periph_ctrl
  • periph_ctrl: moved esp_phy_common_clock_disable from WiFi, BT

Core System

  • Added alloc failed hook with optional abort option
  • Added semi-colon to esp_event_loop_create(...) (https://github.com/espressif/esp-idf/pull/4711/files)
  • Added support of LoadStore Exception Handlers
  • Added a Kconfig option - Number of attempts to repeat 32k XTAL calibration
  • Added soft solution for esp32 eco3 live lock issue
  • Added Task Watchdog backtrace printing
  • efuse: Added support of mac address allocation for ESP32-S2
  • efuse: Add new esp_efuse_write_field_bit() convenience function
  • efuse: Add 'disable Download Mode' & ESP32-S2 'Secure Download Mode' functionality
  • efuse: Fixed get_coding_scheme() when CONFIG_SECURE_FLASH_ENC_ENABLED and LOG_LEVEL is Debug (#4862)
  • efuse: Added an API to return the efuse descriptor for a key block's purpose field
  • efuse: Don't need to burn WR_CRYPT_CNT if CRYPT_CNT is already max
  • efuse: Add some fields in efuse_table and update esp_efuse_get_pkg_ver()
  • Fixed case when alarm_reg > counter_reg but FRC_TIMER_INT_STATUS is not set (#2954)
  • Fix esp_timer_impl_set_alarm() when CPU and APB freqs are changed (#2954)
  • soc: clear PHY status when cpu start
  • soc: add hal api to set exception vector table base address
  • soc: added hal api to set exception vector table base address
  • soc: Separates soc component into abstraction, description, and implementation files
  • heap: added aligned alloc implementation on multi_heap layer
  • heap: added alloc failed hook and configuration options
  • heap: pushed down all the aligned_alloc / free implementation
  • heap: added rtc fast memory region to dynamic memory pool
  • heap: Only fill new heaps with FREE_FILL_PATTERN on init if Comprehensive poisoning is enabled, allowing faster boot in other situations (especially when PSRAM is used)
  • esp_timer: Added implementation based on TG0 LAC timer
  • esp_timer: Create esp_timer as a separate component + LAC timer + SYSTIMER for ESP32-S2
  • log: Use proper API to get Tick Count in esp_log_timestamp
  • Fixed accessing some files from 2nd part of the bootloader
  • shared_stack: fixed watchpoint placement on shared stack
  • shared_stack: using watchpoint 1 to monitor the shared_stack instead of watchpoint 0
  • ESP-Event: added support of esp_event multiple registrations
  • Fixed compilation error, add missing gpio_periph.h header (#4797)
  • atomic: support fetch_and, fetch_and and fetch_xor
  • Create abstraction layer for cpu related operations
  • shared abort panic with port layer
  • let panic handler break on debug mode on software abort
  • suppress reason display on software abort panic
  • retain backtrace no space
  • Fixed case when elf file SHA256 should be printed by panic handler while cache is disabled
  • xtensa: add a script for parsing CPU traces (TRAX)
  • xtensa: fix sign-conversion warning (#4965)
  • multi_heap: ensure that malloc(0) return NULL pointer in any poisoning configuration
  • watchdog: Add LL (low-layer) and HAL (hardware abstraction layer) for watchdog timers
  • systimer: add HAL layer
  • log: added new macros to log when the cache is disabled
  • Console: Don't return NULL on 0 length input (#4926)
  • console_repl: Changed config structure to support different devices, added uart param to config structure (#4845)
  • esp_system: restored weak esp_reset_reason functions
  • pthread: Used INTERFACE in target_link_libraries for vPortCleanUpTCB wrapper
  • esp_efuse: Updated esptool and add reedsolo and bitstring into requirements.txt
  • esp_ipc: Moved esp_ipc to new component
  • intr_alloc: don't using esp_log in ISR context, using ISR version of critical section
  • Reduce using ESP_EARLY_LOGx and move some code after the stdout initialization (#5343)
  • Added psram stack check in backtrace
  • Added brownout detector HAL for esp32 and ESP32-S2
  • Enabled brownout reset for esp32 rev. 1 and above

Debugging

  • core dump: Disable core dump to flash if stack in PSRAM option is enabled
  • core dump: fixed coredump data overwriting due to 'TaskSnapshot_t' and 'core_dump_task_header_t' difference
  • core dump: Fixes size of memory region used by espcoredump.py
  • app_trace: Added support for multi-core traces in single file to SystemView processing scripts
  • panic handler: Fixed printing of ELF file SHA-256 if cache is disabled
  • Make espcoredump more resilient when decoding specific thread stack (#4865)
  • app_trace: Add coverage generations by gcovr
  • gcov: Fixed APP CPU syscall table

FreeRTOS

  • Optimized task selection on single core configurations
  • spin_lock: added new spinlock interface and decoupled it from RTOS
  • Added feature to utilize IRAM memory using exception handlers for unaligned access fixups
  • fpu: Enable usage of FPU inside of an ISR
  • moved all xtensa specific files into a separated folder
  • Added task state field inside of TaskSnapshot_t to capture it

newlib libc

  • move abort to newlib
  • remove direct dependencies on VFS functions
  • newlib: provide default implementations for more syscalls
  • newlib: Added endian.h header file for compatibility (#4784)
  • newlib: initialize syscall_table_ptr_app in single core mode

LWIP

  • Added IPV6 stateless address autoconfiguration support
  • Added config option for SO_LINGER
  • Added simple SMTP email client
  • Add LWIP_ASSERT control
  • Added host name in discover packets
  • Added to sys_arch_protect() a check that the mutex is created before use if not then creates it (#944)
  • Added support for IPv6 events from PPP interface
  • Added support for NAPT functionality
  • pppos_client: Fix power_down dce immediately after got IP (#4618)
  • pppos_client: added support for PPPAUTHTYPE_NONE
  • Wrap lwip/tcp.h header for compatibility (#4637)
  • Fix the crash caused by socket lock not initialized
  • Fixed an issue entering an incorrect multicast address will return success
  • make IPV6 link-local support over PPP configurable (#4782)
  • esp_netif_ppp: added NETIF_PPP_AUTHTYPE_NONE to esp_netif_auth_type_t (#4639)
  • esp_netif_ppp: fixed posting ip-event data (#4634)
  • esp-netif: easier creation for WiFi interfaces with custom parameters (#4611)
  • esp-netif: fix get/set hostname API to reflect user settings (#4737)
  • esp-netif: make the IPv6 configurable for PPP netifs
  • esp-netif: Added API to get the underlying interface name
  • esp-netif: Fix compilation if ESP_GRATUITOUS_ARP not enabled (#5294)
  • Fixed assertion "netconn marked closed" (#3842)
  • esp-netif: set default interface for ppp netif must be called from lwip context
  • esp-netif: Enable easier configuration of custom DHCP server address
  • esp-netif-ppp: added support for setting ppp netif up and down
  • esp_netif: Remove restarting DHCP client and server if it has already been started
  • esp-netif: added new API to get the type of the IPv6 address
  • esp-netif: ppp netif to use netif_is_link_up() to update interface state (#5069)
  • esp_netif: fix default connect handler to check dhcpc return value (#5184)
  • Fixed the issue that socket can still send data after the station disconnected from WiFi in IPv6 environment
  • dhcp-server: fixed static analysis warnings
  • dhcp sever: Make option netmask configurable (#4988)
  • esp_modem: updated pppos_client modem to use uart with REF_TICK (#4801)
  • esp_modem: Ensure uart_param_config and uart pins are set before uart_driver_install (#4904)
  • esp_modem: Fix misuse event_queue_size as pattern_queue_size (#5182)
  • esp_modem.c: post PPP stop event when requested (#4642)
  • Fixed the issue of failing to set DHCP timeout during system initialization
  • Fixed assert when calling tcp_kill_state
  • Fixed failure to set DHCP timeout during system initialization
  • Fixed the issue of UDP packets loss in ARP in UDP tx performance testing
  • Make LWIP TCP rto time configurable
  • IPv6: fixed the issue that packets exceeding MTU can still be sent and received when IP fragmentation is turned off
  • Fixed ICMP bug to reply correctly to pings with arbitrary length
  • esp-netif: Enable easier configuration of custom DHCP server address
  • Optimization in creating a TCPv6 connection
  • Fixed potential crash in reapplying for UDP socket when UDP is turned off,sock->select_waiting !=0

mDNS

  • Allow config mDNS task stack size (#5216)
  • Limit the GOT_IP6_EVENT to only known network interfaces
  • Remove mbedtls dependency (#5188)

Provisioning

  • Use dynamic buffers instead of static memory
  • Unified Provisioning: Fixed BLE characteristics read response issue when read response length is a multiple of (MTU-1) length
  • wifi_prov_mgr: Add config options to switch transport and support for custom data
  • esp_prov: Add support for sending some abstract custom data
  • BLE: Change service_uuid to non-standard 128-bit UUID
  • BLE provisioning: Add check for valid ble read offset
  • Wifi_prov_manager: Fix to ensure Wi-Fi events still received after Connection errors
  • protocomm_httpd: Restart security session if request is received on a new session

OTA

  • Added fix in case of URL redirection and a test case of URL redirection (#4780)
  • Added errno check for WiFi disconnection while performing OTA
  • Fixed bug where erase size could be one sector too long (#4953)
  • Added API to write data in a non contiguous manner

HTTP Client

  • Added helper API to read larger data chunks from HTTP Stream
  • Added API to get URL from client (#5115)
  • http_header.c: Add error print in http_header_generate_string if buffer size is less than required size
  • Fixed error handling in esp_http_client_read and esp_https_ota_perform

HTTP Server

  • Added support of Mutual Authentication in HTTPs Server (#4184)
  • Added WebSocket support (#4306)
    • Handling WebSocket handshake
    • Receive WebSocket packets
    • Send WebSocket frames
    • Receive WebSocket frame
    • Automatic control frame handling
  • Fixed HTTPD_SSL_CONFIG_DEFAULT doesn't compile on C++ (#4981)
  • Fixed syntax error in esp_http_server.rst (#5021)
  • Fixed a bug which could cause issues with LRU purge (#4753)
  • Updated LRU counter on accepting a new connection (#3851)

mbedTLS

  • Added ESP certificate bundle feature, X509 certificate management
  • Added configurable option to redirect TLS buffers to IRAM for ESP32 single core configuration
  • Added configuration options for EC-JPAKE (#5106)
  • Added config options for chacha20, poly1305 and chachapoly
  • Added a config option to enable HKDF
  • Added dynamic buffer and local resource management to decrease SSL heap cost
  • Added config options in mbedtls
  • Added options to mbedtls for hardware acceleration
  • Updated to mbedtls release v2.16.7
  • cert bundle: Fix memory leak during cert verification (#4983)
  • cert_bundle: fixes the "No CA Chain is set" error
  • Disable mbedtls EC curves if hardware acceleration is selected since the hardware will have to define the curves supported
  • Don't compile hardware MPI & SHA files if disabled in config

ULP

  • Fixed ulp external project arguments (#4713)

Bootloader

  • Removed bootloader_flash_gpio_config () due to its same function of bootloader_flash_dummy_config
  • Don't print an error message after WDT reset in unicore mode (#4388)
  • bootloader_support: Fixed bootloader_flash_read alignment error when compiling at -O0 optimization level
  • bootloader: Force bootloader_image_hdr to be word aligned
  • bootloader_support: read random from register
  • bootloader_support: initialize mbedtls_ctr_drbg_context per mbedtls v2.16.5 requirement

ESP-ROM

  • link newlib nano from ROM only if SPIRAM cache workaround is disabled
  • Fix esp32.rom.newlib-time.ld should includes all time ROM functions/data (#4925)
  • Fix broken CONFIG_LEGACY_INCLUDE_COMMON_HEADERS

ESP-TLS

  • Added API to retrieve sockfd from tls connection
  • Added connection timeout to esp_tls_conn_new_sync()
  • Added support for https_server using wolfSSL
  • Added error flags specific wolfSSL
  • Added support for PSK, SNI, ALPN using wolfSSL
  • Added support for DER formatted certificates
  • Added support for using hardware security module, ESP32-WROOM-32SE
  • Fixed error captures
  • Made respective changes to esp_err_to_name.c
  • Changed argument pointer type to (void *) for esp_crt_bundle_attach
  • Fixed incorrect error message after handshake fails
  • Enable TLS renegotiation using explicit API call

TCP Transport

  • Implement connect timeout (#3791)
  • Close to return error only for socket error or invalid arguments (#4872)
  • Updated DNS host name resolution using getaddrinfo for tcp transports (#4510)
  • Reset state on connection closure for SSL transports (#4598)

Websocket

  • Fixed opcodes when performing a fragmented send (#4974)
  • websocket client: the client now aborts the connection if send fails

ESP-MQTT

  • Added option to configure MQTT task priority (#4947)
  • Fixed an issue which could result in a race condition and subsequent crash
  • Change the message printed after MQTT connection failure
  • Documentation: Makes clear that publish API could block
  • Added option to configure output buffer size
  • Set duplicate flag for both qos1 and qos2 (#4787)
  • Fixed C++ build failing on incorrect event enum conversion
  • Fixed releasing lock if subscribe/unsubscribe message fails to be created
  • Fixed receiving longer (websocket) data with standard tcp_transport reads
  • Fixed possible double free of client config if init fails
  • Fixed queueing oversized messaged even if not connected
  • Fixed outbox_destroy() to correctly delete all queued messages
  • Added set_config to update ssl-transport configuration
  • Fixed storing timestamps in long-long format
  • Added runtime selection of mqtt protocol version
  • Support larger buffers and messages

Storage

  • NVS: Change all new to new (nothrow)
  • NVS: Fixed missing implementations for string/blob
  • NVS: add support for i16, u64, i64 types to NVS partition generation tool
  • NVS: added nvs support data encodings
  • NVS: allow to specify custom partition (#5172)
  • NVS: iterator skipping version 1 blobs
  • NVS: improved behavior for erasing partitions
  • SPIFFS: Fixed bugs when CONFIG_SPIFFS_USE_MTIME is not defined
  • SPIFFS: restore dependency of flash targets on spiffs images (#5066)
  • NVS Flash: prevented erasing initialized partition (#4755)
  • spi_flash: fix regression in encrypted flash write (#5467)
  • spi_flash: added support of MXIC flash chips
  • spi_flash: fixed the regression of non-quad mode by default chip driver, issues in add_device
  • spi_flash: Fixed the write performance regression
  • SDMMC: Fixed the probe issue that forbid sdspi working in highspeed mode
  • SDMMC: Added check for function parameters before using them (#5000)

VFS

  • VFS: Check in select() if the UART driver is installed or not
  • VFS: add option to disable VFS layer, saving some RAM and code size
  • VFS: supporting semihosting_common handler from OpenOCD
  • VFS: support vfs uart set line endings with specified uart number

Modbus

  • freemodbus: fixed long buffer failure
  • freemodbus: added extern c block into common header for cpp (#5071)

Tools

  • Added tools support for secure boot v2 for ESP32 ECO3
  • Added check if idf_tools.py install-python-env is called from a venv
  • Added proper multi-chip support for idf_size.py
  • Added option to show differences between MAP files with idf_size.py
  • Added the functionality of autodetecting the target of MAP files in idf_size.py
  • Added export and install scripts for fish shell (#4944)
  • Added --gdbinit argument to gdb, gdbgui, gdbtui
  • Added Kconfig for enabling 0 length returns from linenoise
  • ninja: update to 1.10.0
  • cmake: update to 3.16.4
  • Updated toolchain to esp-2020r2
  • esptool_py: retained flash targets when building RAM loadable apps
  • esptool_py: pass flash mode/frequency/size to elf2image
  • Updated kconfiglib to 13.7.1
  • Marked ULP toolchain as not available on 32-bit Linux
  • idf_tools.py: fix typo in PYVENV_LAUNCHER env variable name
  • docker: install CMake version provided in tools.json (#4644)
  • docker: enable ccache by default
  • tools: work around usbser.sys bug in idf_monitor (#4676)
  • gen_esp32part: fixed subtype in PartitionTable.find_by_type (#4723)
  • check_python_dependencies: If overriding requirements.txt path, provide a pip command line
  • idf_tools.py: fixed install-python-env failure with virtualenv 20.0.0
  • installer: fix copying IDF to a destination on another drive (#4128)
  • installer: used bundled idf_tools when installing IDF v3.3.1, IDF v4.0
  • installer: added PYTHONUNBUFFERED=1 when calling idf_tools.py
  • tools: bump version of windows tools installer to v2.3
  • idf_monitor: automatically decode UART core dumps
  • idf_monitor: fixed gdb issue opening large COM port on Windows
  • confserver: Standardize and document the handling of hex values
  • confserver: Always store hex values in sdkconfig with 0x prefix
  • C++: added experimental C++ component
  • C++: added ESPException class to the C++ experimental component
  • C++: make attribute((init_priority(n))) work (#5038)
  • Force the order of cmake generators
  • partition_table: output partition table info for partition_table target
  • partition_table: do not always display partition table contents on build
  • Updates OpenOCD version to 'v0.10.0-esp32-20200420'
  • Removed unused toolchain-prefix argument from idf_size.py
  • Fixed flashing encrypted binaries from IDF Monitor
  • export.sh: added better detection and checking of IDF_PATH
  • idf_monitor: support to re-flash with the using port
  • Make Unicode from subprocess result in the CMake convert script (#5189)
  • tools: allow alternative spellings of target name (ESP32-S2, ESP32S2)
  • gdb: Modify PC in case of invalid PC
  • Fixed spelling in core_ext.py (#5145)
  • parttool: Fixed crash when retrieving partition info (#5271)
  • idf.py: prevent reloading duplicate extension paths. Do not load cwd if IDF_EXTRA_ACTIONS_PATH is not set (#5278)
  • idf.py: replace the "run" method of Task with the magic "call" method (#5279)
  • Mention ESPPORT and ESPBAUD in idf.py --help (#5461)
  • export.sh: fix compatibility with dash shell (#5366)

Build System

  • CMake: Used underlying flash targets for idf.py
  • Cmake: add subdirectory if exists utility
  • CMake: now use new component registration function
  • CMake: add elf dir information
  • make: Fixed quoting when flashing port is set via sdkconfig file
  • build: Added CONFIG_APP_PROJECT_VER to set the project version from Kconfig
  • idf_py: fixed the ESPPORT environment variable type issue
  • idf.py: added monitor-baud option to monitor command
  • idf.py: guess IDF_TARGET from sdkconfig if CMakeCache doesn't exist
  • idf.py: fail and show instructions on IDF_TARGET mismatch
  • idf.py: added support of debug targets for easier execution of openocd, gdb, gdbui
  • Fixed idf.py to be able to select a generator for build
  • confgen.py: Escape special characters for cmake (#4751)
  • ulp: use quotes when specifying files for embedding ulp binaries
  • make: fix 'make monitor' target when core dump is not enabled
  • CMake: Fixed an issue where builds are invoked twice when executing flash targets with idf.py
  • CMake: show error message on encrypted flash targets without proper config
  • Cmake: fixed possible whitespace issues
  • Cmake: Add warnings that convert_to_cmake.py doesn't calculate component requirements
  • Cmake: fix setting defaults in idf_build_process (#5053)
  • Fixed passing argument to ULP CMake script
  • msys2: add package mingw-w64-i686-gcc for installing python packages
  • ldgen linker script mapping rules order is now deterministic
  • kconfig: Fix generation of hex outputs for Make & CMake
  • kconfig: Fix two cases of hex values being handled incorrectly (espressif/vscode-esp-idf-extension#83)
  • Updated MSYS2 pre-compiled legacy build environment to use Python 3

ESP-COMMON

  • esp-compiler: add designated init macros to make esp configuration pattern viable under C++

External Libraries

  • Updated to mbedtls release v2.16.7
  • cJSON: include only source file objects for cmake build
  • coap: move mbedTLS config options from component to examples(#5262)

Others

  • linenoise: move allocations from stack to heap, fix calloc result checking (#5161)
  • Fixed the broken python lint on Github Action (#5318)

Examples

  • Added ENC28J60 Example
  • Added example of ble mesh coexisting with tcp
  • Added atecc608_ecdsa example (#4432)
  • softap example: Added channel configuration
  • spi: add eeprom example
  • Added Heap Task Tracking example
  • example: new DAC example of waveform generator controlled by software
  • NimBLE: Update the documentation link in the examples
  • ble_mesh: Fixed broken links to examples
  • ble_mesh: Added BLE mesh sensor model examples
  • ble_mesh: Add bluedroid and nimble example configurations
  • ble_mesh: Added BLE mesh vendor models examples
  • ble_mesh: Update mesh console example
  • ble_mesh: Added nvs operations for some examples
  • ble_mesh: Fixed example README & tutorial link error
  • sdio: updated the host example to support working with a slave without DAT1
  • Fixed Advanced OTA Example with chunked servers
  • Simplified console examples
  • Moved C++ examples to a new cxx folder in examples
  • Fixed markdown table formatting in examples/peripherals/temp_sensor_esp32s2/README.md (#4609)
  • Improved ble_spp_server example
  • Fixed the error macro name and error return in hfp_hf example
  • Cleaned up sdkconfig.defaults of BLE Mesh examples
  • Fixed standard NEC IR transmission (#4750)
  • Updated websocket example to send textual data with esp_websocket_client_send_text() (#4640)
  • pppos_client: update sdkconfig.defaults
  • Enabled IPv6 in example common connect for esp32s2
  • common connect: fixed build error if ipv6 disabled
  • common connect: add support for getting multiple IPv6 addresses
  • Fixed typo in i2ctool example README
  • provisioning_examples: Move older examples to legacy/ folder
  • Restructured wifi_provisioning example
  • Fixed http_perform_as_stream_reader example
  • esp_http_client: Added example to demonstrate use of low level APIs for GET and POST requests
  • Fixed broken http2_request example
  • socket-example: IPv6 related update for examples to set correct scoped id
  • socket-example: Add tcp client example for multiple interfaces
  • I2S: Fixed sine wave sample calculation incorrect issue in I2S example
  • Updated esp event examples using new event register API
  • socket examples: Fixed udp_client build error (#5014)
  • Fixed format string in websocket example (#5052)
  • http-server-example: correction of regex waiting to acquire IP address
  • Fix instance names for event handler unregistering in WiFi station example (#5064)
  • uart_echo_readme: Remove duplicate commands and invalid serial port information
  • Updated HID examples to comply with the new requirements
  • Fixed links to example directories for fast_scan and scan (#5186)
  • Fix usage example in xSemaphoreCreateBinaryStatic (#5272)
  • esp_http_client_example.c: Added note regarding use of URL and configuration parameters
  • Fixed flake8 warning for esp-cryptoauthlib submodule
  • ble_hid_device: fix build if building with c++ (#5191)
  • RMT: Fixed check issue in ir_builder_rmt_nec.c and removed the wait_tx_done for ir_protocols_main.c (#4750)

Documentation

  • Documentation is now built separately for ESP32 & ESP32-S2
  • Added Chinese translation to LEDC
  • Added new top-level docs builder that builds docs for a single chip
  • Added API guide page about IDF Tools
  • Added extension that replaces generic target variable with idf_target
  • Added external RAM note link to Chinese translation
  • Added a link to Chinese translation for power_management_esp32
  • Added note that the idf target formatting filters don't work on "included" documents
  • Added Chinese translation for esp-ble-mesh-faq
  • Added a short user guide for how to write multi target docs
  • Added docs for secure boot v2 ESP32 ECO3
  • Added multi target include dir support
  • Added User Guide for ESP32-DevKitS-R
  • Added Chinese translation for ESP-WIFI-MESH document under api guide
  • Added Chinese translation for ota tool and partition tool
  • Added Chinese translation for linker script generation
  • Added Ethernet API reference
  • Added exact git version & target SoC to feedback form parameters
  • Added warnings about using JTAG debugging with hardware security features
  • Added configuration information about INT & Task WDTs
  • Added Chinese translation for modules-and-boards
  • Added alloc failed hook documentation
  • Added new section about using ESP-IDF with PlatformIO (#5132)
  • Added peripheral_types.h as API reference for peripheral docs
  • Added generation of tags from sdkconfig and x_caps.h headers
  • Added link back to ESP-ADF documentation in ESP-LyraT-8311A user guide
  • Added another case and recommendation to use Python 3 instead of Python 2
  • Added the support of building a subset of the documentation with build_docs
  • Added peripheral_types.h as API reference for peripheral docs
  • Added a note about ESP-IDF FreeRTOS version
  • Added description to Getting started guides of possible issues preventing Development boards from entering Firmware Download mode automatically while trying to flash the boards
  • Make docs build Python 3 compatible
  • Small changes for C++ code style
  • Manage parallel sphinx-build runs with optional parallel jobs within them
  • Replace all TRM urls will generic template variable and remove duplicate sections
  • Temporarily mark RF calibration chapter as ESP32 only
  • documenting-code: Add a couple of follow up notes on top of last commit
  • README: Drop the RTD docs status badge, add a note about docs not updating for a period
  • Updated chip features in Getting Started documentation
  • Updated documentation build system to use sphinx_idf_theme pip package
  • Provided Digital Signature documentation for ESP32-S2
  • Fixed broken links in README

Obtaining v4.2-beta1

For full installation instructions, see the ESP-IDF Programming Guide.

The source files attached to this release will not work due to our use of git submodules. Use one of the following methods instead:

Using git

To get this release, use the following commands:

git clone -b v4.2-beta1 --recursive https://github.com/espressif/esp-idf.git esp-idf-v4.2-beta1
cd esp-idf-v4.2-beta1/

This is the recommended way of obtaining v4.2-beta1 of ESP-IDF.

Download an archive with submodules included

Attached to this release is an esp-idf-v4.2-beta1.zip archive. It includes .git directory and all the submodules, so can be used out of the box. This archive is provided for users who have connectivity issues preventing them from cloning from GitHub.

This archive can also be downloaded from Espressif's download server:
https://dl.espressif.com/github_assets/espressif/esp-idf/releases/download/v4.2-beta1/esp-idf-v4.2-beta1.zip

Don't miss a new esp-idf release

NewReleases is sending notifications on new releases.