Skip to content

Releases: espressif/esp-idf

ESP-IDF Release v3.0.1

20 Jun 06:17
Compare
Choose a tag to compare

Documentation for release v3.0.1 is available at https://docs.espressif.com/projects/esp-idf/en/v3.0.1/

ESP-IDF v3.0.1 is a bugfix-only update for ESP-IDF v3.0. Release v3.0 is compatible with apps written for ESP-IDF v3.0.

This is the list of changes since release v3.0:

Known Issues

(These bugs are scheduled for v3.0.2.)

  • Rare Wi-Fi interrupt WDT crash
  • Rare crash when writing to or erasing flash
  • When Wi-Fi STA disassociates and reassociates, stale TCP connections are not automatically closed

Bluetooth

  • Fix A2DP connection issues with iPhone 7
  • Fix notify memory leak
  • Fix crash on malloc failure
  • Fix esp_ble_gap_set_security_param() memory leak

Wi-Fi Related

  • Fix the issue that station fails to receive data in modem sleep mode if association ID is bigger than seven
  • Fix smartconfig crash issue with SPI RAM
  • Fix the issue that esp_wifi_connect() returns ESP_OK, but no system event posted (ap_loss) ([#1797](esp_wifi_connect() returns ESP_OK, but no system event posted (ap_loss)))

LWIP Related

  • Fix assertion issue in tcp_pcb_purge()

RF PHY

  • Log an error if storing PHY calibration data fails
  • Fix some situations where PHY calibration data may not be stored correctly
  • Reduce libphy IRAM usage

Drivers

  • I2S: Fix broken I2S ADC mode
  • UART: Fix uart buffer_full flag always being set

Obtaining v3.0.1

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 https://github.com/espressif/esp-idf.git esp-idf-v3.0.1
cd esp-idf-v3.0.1/
git checkout v3.0.1
git submodule update --init --recursive

This is the recommended way of obtaining v3.0.1 of ESP-IDF.

Download an archive with submodules included

Attached to this release is an esp-idf-v3.0.1.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.

ESP-IDF Prerelease v3.1-beta1

21 Jun 00:19
Compare
Choose a tag to compare
Pre-release

Documentation for release v3.1-beta1 is available at http://docs.espressif.com/projects/esp-idf/en/v3.1-beta1/.

This is a prerelease version with known issues (see below). The current release version is v3.0.1.

This is the list of changes since release v3.0. ESP-IDF v3.1 is compatible with apps written for v3.0 (apart from one breaking change in esp_ping, see below).

Known Issues

  • Bluetooth modem sleep mode (disabled by default) has stability issues
  • Bluetooth modem sleep mode can't work with Dynamic Frequency Scaling
  • Wi-Fi NULL mode is currently non-functional
  • When using BLE and Wi-Fi together, BLE advertising or scanning has a small chance of failing
  • Wi-Fi performance is not good when signal is weak

Breaking Changes

  • esp_ping units are now milliseconds (in v3.0 ping units were undocumented but they were treated as seconds)

Major Changes

  • Support for Wi-Fi & Bluetooth modem sleep
  • Support for Automatic Light Sleep to reduce overall power consumption (including Tickless FreeRTOS)
  • Multiple antenna support (automatic using external RF antenna switch)
  • Wi-Fi mesh functionality
  • OS adapter layer for Wi-Fi functionality (allows Wi-Fi libraries to run on other RTOS implementations)
  • SDIO Slave peripheral driver
  • Bootloader refactoring, configurable factory reset and test app trigger functionality
  • Partition table can be relocated to allow a larger bootloader binary

BLE

Link Layer

  • Fix the smartphone compatibility bug caused by LL Feature Exchange timing issue

GATT Client

  • Save GATTC cache in NVS and add an option to configure it through menuconfig
  • A new parameter incl_srvc_e_handle is added to the struct esp_gattc_incl_svc_elem_t while getting include service information
  • Fix the incorrect PID key result of the ESP_GAP_BLE_GET_BOND_DEV_COMPLETE_EVT event

GAP

  • Fix the bug where the start/stop advertising completed events sometimes are not accurate
  • Add the duplicate scan feature and add an option to configure the duplicate scan cache size through menuconfig
  • New API esp_ble_gap_config_local_icon to set the local GAP appearance icon
  • New API esp_ble_gap_get_local_used_addr to get the local address used (e.g. current random address used)

SMP

  • Fix the bug that lead to crash when deinit bluetooth with SMP disabled
  • Fix the incorrect results of the esp_ble_get_bond_device_list which is called after reboot

Blufi

  • New "get wifi list" command
  • New "report internal error report to phone" command
  • New "send/receive custom data" command

Examples

  • Add A2DP and BLE GATTS coex Demo
  • Add BLE Throughput Demo
  • Add HID Device Demo
  • Fix ble_spp_clientdemo error when SUPPORT_HEARTBEAT is enabled

Performance optimization

  • BLE throughput optimizations
  • Automatic registration of GATTC service change notify

Bluetooth Common Parts

  • Wi-Fi & Bluetooth coexistence support
  • Bluetooth modem sleep mode

Classic BT

  • HFP (Hands Free Profile) support
  • GAP device and sevice discovery
  • SPP profile (including VFS support to return a file descriptor)
  • dynamic memory allocation
  • A2DP: Source and sink functionality can be enabled/disabled at runtime (both cannot be enabled concurrently)
  • A2DP: Performance improvements
  • Allow setting BR/EDR TX power level

Wi-Fi

New Functionality

  • Wi-Fi & Bluetooth coexistence support
  • Modem sleep support
  • Mesh feature
  • Throughput optimizations
  • Support for Channel State Information (CSI)
  • Support to sniffer Wi-Fi control packets
  • Add parts of WPA Supplicant source to ESP-IDF
  • New event mask API
  • New esp_wifi_80211_tx function for sending 802.11 frames
  • WPS: Support WPS in APSTA mode
  • WPS: Add "set factory information" feature
  • Allow creating the Wi-Fi task pinned to either core

Bug Fixes

  • Fix issue where esp_wifi_stop never returns if start/stop is run repeatedly
  • Fix for connecting to WEP APs
  • Fix for de-authing station if Soft AP already has maximum connected
  • Thread safety fixes in Wi-Fi library
  • Fix issue that smartconfig crashes when switching channel
  • Fix smartconfig crash issue with SPI RAM
  • Fix the issue that esp_wifi_connect returns ESP_OK, but no system event posted (ap_loss) ([#1797](esp_wifi_connect returns ESP_OK, but no system event posted (ap_loss)))
  • WPA2 Enterprise PEAP connection fixes ([#1887](Enterprise PEAP connection issue))
  • Fix ESPNOW bug when add node in AP+STA mode

LWIP

New Functionality

  • Add VFS file descriptors in select
  • Add event SYSTEM_EVENT_AP_STAIPASSIGNED

Bug Fixes

  • Fix the issue that TCP connections don't abort when IP address is changed
  • Modify default value of MTU in dhcp offer to 1500
  • Fix the assertion issue caused by tcp_pcb_purge()

RF PHY

  • Fix for full calibration accidentally running twice
  • PHY performance improvements

Ethernet

Bug Fixes

  • Set direction of SMI MDC & MDIO pins correctly

Network Functionality

  • New esp-tls library (on top of mbedTLS) for high level TLS (SSL) functionality
  • New esp_http_client library for HTTP/S client functionality
  • mbedTLS: Update to v2.9.0
  • dhcpserver: Fix maximum number of leases (was one less than configured)
  • dhcpserver: Increase DHCP offer MTU size to 1500

Smartconfig

  • Moved to its own component (no longer part of 'esp32')

Soc-Level Functionality

New Functionality

  • Power Management: Support for automatic light sleep
  • Dump stack of both cores when Interrupt watchdog timeout occurs
  • New macros DMA_ATTR & WORD_ALIGNED_ATTR for declaring DMA-capable static buffers
  • Add option to continue running if PSRAM was enabled but not detected at boot
  • Support maximum CPU frequency rating efuse bits, if set from factory.
  • Power Management: Allow disabling a deep sleep wakeup source
  • Improve performance of DPORT access workaround
  • Support __NOINIT_ATTR and RTC_NOINIT_ATTR for static memory not cleared on reset

Bug Fixes

  • Power management: Dynamic frequency scaling stability improvements
  • Fix for runtime configuration of PSRAM (improves stability for 80MHz PSRAM)
  • Fix starting 32kHz crystal in some cases where crystal performance is borderline
  • Fix loss of precision when estimating XTAL frequency
  • Prevent Interrupt WDT from re-triggering in panic handler
  • Heap: Fix tracing of newlib internal allocations (not all of these were being included in the trace)

Core System Libraries

New Functionality

  • freeRTOS: Support tickless idle (works with Light Sleep)
  • newlib: Add support for adjtime()
  • New esp_err_to_name() function to look up error messages from esp_err_t codes.
  • New API esp_intr_set_in_iram() to change interrupt "in IRAM" status
  • pthreads: Allow configuring thread priority & stack size on creation
  • C11 Thread Local Storage support
  • Heap: New "record task" option for heap tracing
  • esp_timer: Add a function to get next alarm time

Bug Fixes

  • Remove debug logging from pthread conditional variables
  • Remove duplicate definition of system_restore
  • Increase default event task stack size by 256 bytes (prevent stack overflow at Debug log level)
  • Fix for idle task stack overflow under some circumstances
  • Refactors and stability fixes for ESP-IDF RingBuffers
  • Fix busy loop in esp_timer_impl_set_alarm (could trigger interrupt watchdog)

Bootloader

New Functionality

  • More modular bootloader. Minimal code in the bootloader component itself makes it easy to copy this component into a project to implement custom bootloader functionality.
  • New "reset to factory" and "start test app" config options to watch a GPIO and trigger behaviour on reset
  • Partition table can be relocated to allow a larger bootloader binary
  • Partition table now generated with MD5 checksum, checked on boot

Bug Fixes

  • Fix flash QIO mode configuration for some flash chips

Drivers

New Functionality

  • esp_adc_cal: Read factory calibration data from eFuse if present in chip
  • GPIO: Support digital pad hold function
  • I2S: Support "fixed_mclk" configuration
  • I2S: Support for expanding bit width for multi-data-bit input and output (not standard I2S)
  • LEDC: New thread-safe duty cycle & fade API
  • PCNT: Allow each unit to have its own interrupt handler
  • RMT: New function rmt_register_tx_end_callback(). Called when RMT ISR has queued all outgoing items
  • RMT: New API for sending generic uint8_t-typed data.
  • SDIO Slave: New driver
  • SDMMC: SDIO support at protocol layer
  • SDMMC: Add support for reading CD & WP pins in driver
  • SPI Master: Configuration item to place SPI send/receive code into IRAM for performance

Bug Fixes

  • Always reset various communication peripherals (UART, I2C, etc) on CPU reset
  • ADC: Fix bug where some peripherals (DAC, HALL) needed to be disabled before ADC conversion
  • esp_adc_cal: Simplify lookup table mode, due to inferior performance compared to linear mode for attenuations 0-2
  • GPIO: modify return value when gpio ISR service already exists.
  • I2C: Concurrency fixes
  • I2C: Add xQueue and xSemaphore static allocation support when intr_alloc_flag set to ESP_INTR_FLAG_IRAM.
  • I2S: Fix I2S ADC mode
  • LEDC: Fix duty cycle and fade overflow issues
  • SPI master: perform clock calculations in initialization not ISR
  • SPI master: Don't reconfigure peripheral if settings are unchanged
  • SPI master: Fix issue using GPIO0
  • SPI master: Fix issue with variable command and address flag
  • SPI master: Fix typo in LSBFIRST macro value
  • SPI master: Allow using GPIO34-39 as MISO
  • RMT: Remove logging which skewed timing
  • RMT: Fix for LoadProhibited crash
  • RMT: Fix TX stop API issue
  • SDMMC: Fix for slave sometimes falling into SPI mode
  • SDMMC: Fix init sequence ordering
    ...
Read more

ESP-IDF Release v3.0

24 Apr 08:06
Compare
Choose a tag to compare

Documentation for release v3.0 is available at http://esp-idf.readthedocs.io/en/v3.0/.

This is the list of changes since release v3.0-rc1.

If upgrading from previous stable release V2.1, check the v3.0-rc1 release notes for changes which also apply.

Breaking Changes

Release v3.0 is largely compatible with apps written for ESP-IDF v3.0-rc1. However some breaking behaviour and significant API changes have been introduced:

  • Some I2S APIs which mixed return values and error codes have been deprecated. New APIs have been introduced to replace them.

    • i2s_write should be used instead of i2s_write_bytes and i2s_push_sample, which are deprecated.
    • i2s_read should be used instead of i2s_read_bytes and i2s_pop_sample, which are deprecated
  • A new parameter remote_addr_type is added for esp_ble_gattc_open() (esp_ble_gattc_open())

  • Modify the parameter of the ESP_GATTS_ADD_CHAR_DESCR_EVT BLE GATTS event, renaming the char_uuid parameter of this event to descr_uuid (!1484)

  • Modify the Classic BT AVRC events

    • Remove the feat_mask parameter from the ESP_AVRC_CT_CONNECTION_STATE_EVT event
    • Delete the ESP_AVRC_CT_MAX_EVT event
    • Add a new event ESP_AVRC_CT_REMOTE_FEATURES_EVT

Build System and tools

New functionality

  • Support C++ source files with .cc extension
  • idf_monitor now supports pausing log output from the console
  • Support editorconfig for editing ESP-IDF source files
  • Fix for reduced RTC core voltage when waking from sleep

Bug fixes

  • Restore application compatibility with pre-IDF v2.1 bootloaders
  • Fix SysView support when building in single core mode

Bootloader

  • Disable logging before UART is reconfigured by second stage bootloader (possibly setting a custom baud rate)
  • Always boost VDD_SDIO voltage 1.8V -> 1.9V if flash frequency is 80MHz

FreeRTOS

New Functionality

  • Backported FreeRTOS V9.0.0 task deletion behaviour: a deleted task will be immediately cleaned up if it is not currently running.
  • IDF ringbuffer: Add new APIs xRingbufferGetCurFreeSize(), xRingbufferIsNextItemWrapped(), xRingbufferCreateNoSplit()

Bug fixes

  • Fix for cross-core deleted tasks not being cleaned up in some circumstances.

System Library Features

New Functionality

  • spi_flash: New configuration options to detect invalid writes

Bug Fixes

  • Fix esp_timer accuracy issues
  • Fix realloc() behaviour when heap tracing is enabled
  • Fix realloc() memory corruption bug when heap poisoning is enabled
  • Fix memory fragmentation issue when splitting large free blocks
  • Fix compilation error when RTC used as clock source
  • Fix invalid SPIRAM clock changes by clock subsystem
  • Fix clock initialization in single core mode
  • Restrict linker size of DRAM to enforce static RAM limits, rather than erroring at runtime

Drivers

New functionality

  • ADC eFuse factory calibration functionality
  • I2S driver: New function i2s_write_expand() to automatically expand bit width of supplied samples to match hardware
  • UART driver: Allow reading character pattern detection position without modifying the pattern detection queue

Bug fixes

  • I2C driver: fixes for timeout recovery, thread safety
  • I2C driver: allow NACKing last byte read
  • I2S driver: fix inaccurate errors returned from some functions

TCP/IP

New Functionality

Bug Fixes

  • Fix closing TCP socket causes system crash bug
  • Fix the bug that incorrect event is posted when setting static IP of soft-AP or Ethernet

Known Issues

  • Long time TCP traffic stability test causes LWIP assert, it is only found in dual core mode with PSRAM is enabled
  • TCP traffic stability test causes Interrupt watchdog timeout, it is found in dual core mode and when the WiFi mode of the device is configured as WIFI_MODE_APSTA mode

WiFi

Bug Fixes

  • Fix a bug that system crashes when station disconnects from AP.
  • Fix the bug that receiving beacon time is not correct.
  • Fix the bug that esp_wifi_restore() will cause a fail wifi connection.(#233)
  • Fix the bug that in sniffer mode it asserts when receive misc data.(#1037,#1404)
  • Fix a memory leak in espnow
  • Fix the bug that wpa2 assert when disconnect from AP
  • Fix QoS bug in 11g mode
  • Fix esp_wifi_stop() never returns bug
  • Fix esp_wifi_deinit() causes system assert bug
  • Fix EAPOL retransmission causes system crash bug
  • Fix WPS not work correctly on WIFI_MODE_APSTA bug (#1045)
  • Fix sha256 signature of WPA2 causes system assert bug ([#1297](Unable to use wpa2_enterprise example on ESP32))

Performance Improvements

  • Optimize WiFi retransmission and timeout mechanism

BLE

Known Issues

  • Bluetooth controller will crash if ESP32 is overloaded, e.g. running the BLE throughput example and printing a lot of logs at the same time

Link Layer

  • Fix the bug where the LL_LENGTH_REQ packet is sent even if the remote device doesn't support this feature

GATT Server

  • Fix the incorrect result of the esp_ble_gatts_get_attr_value() event when the characteristic value that the event gets is written by the remote device using Prepare Write Request (#1612)

GAP

  • Fix the bug where the start/stop advertising completed events sometimes are not accurate
  • Fix the bug where the connection parameters update procedure sometimes fails in the period of pairing
  • Fix the bug where the connection parameter update procedure sometimes leads to disconnection
  • Fix the bug where the bonding list that read from the flash is not correct once the chip reboots

SMP

  • Fix the bug where the reconnection sometimes fails when the device is already paired (#1561)

Performance optimization

  • Improve the stability of the multi-connection

Bluetooth Common Parts

  • Fix some bugs related to the memory leakage (BLE SMP, A2DP, Timer)
  • Fix some bugs that may lead to crash (xQueueGenericSend, page scan procedure, etc)

Classic BT

  • Add the option to configure the stack size of A2DP sink task through menuconfig
  • Fix the bug where the restart of media task fails when the esp_a2d_sink_deinit() is called in the period of connection (#1522
    )
  • Fix the incorrect disc_rsn parameter value of the ESP_A2D_CONNECTION_STATE_EVT event when the receiving device acts as a master
  • Fix the incorrect remote_bda parameter value of the ESP_AVRC_CT_CONNECTION_STATE_EVT event
  • Fix the bug that causes the initiating side to lose the link key notification event when the receiving device is repairing in simple_pairing mode(#1275)
  • Fix the bug about string_to_bdaddr where the address of the device that read from the flash is not converted correctly when nano formatting options is enabled in the menuconfig

openssl wrapper

  • Fix compilation error when ALPN is disabled in mbedTLS configuration

mbedTLS

Bug Fixes

Ultra Low Power Processor

Bug Fixes

  • Fix I_DELAY macro error when using new toolchain
  • Document execution time for ULP instructions

mDNS

Bug Fixes

  • Produce TXT records compatible with all mDNS parsers
  • Fix issue when mDNS service is NULL

External Libraries

  • cJSON updated to v1.7.1, includes some memory corruption fixes

Documentation

  • Add tutorials in some BLE examples
  • Modify the readme files in some BLE/BT examples
  • Improved RMT driver API documentation

Examples

New Examples

  • New RMT driver example

Bug Fixes

  • Fix some bugs for the Eddystone example (#1682)

Obtaining v3.0

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 pre-release, use the following commands:

git clone https://github.com/espressif/esp-idf.git esp-idf-v3.0
cd esp-idf-v3.0/
git checkout v3.0
git submodule update --init --recursive

This is the recommended way of obtaining v3.0 of ESP-IDF.

Download an archive with submodules included

Attached to this release is an esp-idf-v3.0.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.

ESP-IDF Pre-release 3.0-rc1

19 Apr 03:19
Compare
Choose a tag to compare
Pre-release

Documentation for pre-release 3.0-rc1 is available at http://esp-idf.readthedocs.io/en/v3.0-rc1/.

This is the list of changes since release 2.1.

Breaking Changes

Release v3.0 is largely compatible with apps written for ESP-IDF v2.1. However some breaking behaviour and significant API changes have been introduced:

  • Crystal frequency is now set to 40MHz by default (previously auto-detected). A warning is logged if the detected frequency doesn't match, but users of 26MHz boards such as Sparkfun ESP32 Thing will need to configure 26MHz manually. (documentation)

  • Bluetooth controller reserved memory is now determined at run time. Applications with Bluetooth enabled can use the esp_bt_controller_mem_release) function to reclaim unused controller memory.

  • New Task Watchdog API. esp_task_wdt_feed() has been replaced by esp_task_wdt_reset(). Tasks must now be explicitly added to the Task Watchdog. (documentation)

  • FreeRTOS tick and idle hooks are now assigned per-core (#781)

  • RMT peripheral function rmt_get_ringbuf_handler renamed to rmt_get_ringbuf_handle

  • Interrupt allocation: Multiple interrupt handlers assigned to the same interrupt source must have the same flags

  • By default, BASIC ROM Console fallback is permanently disabled (via efuse) on first boot, to avoid accidentally resetting to this mode

  • SPI driver: a number of SPI master APIs, SPI master address format, etc. have changed. See Drivers section (below) for details

  • tcpip_adapter_start function is now split into interface-specific tcpip_adapter_eth_start, tcpip_adapter_wifi_start, etc. (This is a breaking API change, but this function is not normally called directly by apps)

  • WiFi initialization function, esp_wifi_init, no longer calls nvs_flash_init internally. Applications need to call nvs_flash_init before calling esp_wifi_init.

  • esp_wifi_wps_enable is changed from esp_err_t esp_wifi_wps_enable(void) to esp_err_t esp_wifi_wps_enable(const esp_wps_config_t *config). Please check WPS example for details.

  • esp_wifi_sta_wpa2_ent_enable is changed from esp_err_t esp_wifi_sta_wpa2_ent_enable(void) to esp_err_t esp_wifi_sta_wpa2_ent_enable(const esp_wpa2_config_t *config). Please check WPA2 example for details.

  • Definition of wifi_country_t has been changed (documentation).

  • When WiFi station disconnects from the AP, IP address does not get immediately reset to 0. If the station is disconnected for some time, SYSTEM_EVENT_STA_LOST_IP event is generated, and IP address is set to 0. The timeout can be set using CONFIG_IP_LOST_TIMER_INTERVAL option (120 seconds by default).

  • New MTU API. esp_ble_gattc_config_mtu() has been replaced by esp_ble_gatt_set_local_mtu() and esp_ble_gattc_send_mtu_req(). The former API is used to set the local Rx MTU and the latter is used by GATTC to send MTU Request

  • GATTC APIs esp_ble_gattc_get_characteristic() and esp_ble_gattc_get_descriptor() are removed

    • New API esp_ble_gattc_get_db() can be used to get the whole GATT database.(esp_ble_gattc_get_db)
    • Some other new APIs are provided to get the specific characteristics by UUID or handle, like esp_ble_gattc_get_char_by_uuid().
  • The parameters of APIs used for the GATTC read/write operations are changed, handles are now used as identifiers instead of UUIDs.

    • esp_ble_gattc_read_char()
    • esp_ble_gattc_read_char_descr()
    • esp_ble_gattc_write_char()
    • esp_ble_gattc_write_char_descr()
    • esp_ble_gattc_prepare_write()
    • esp_ble_gattc_prepare_write_char_descr()
  • Add an event for enabling or disabling privacy(ESP_GAP_BLE_SET_LOCAL_PRIVACY_COMPLETE_EVT)

  • Add two GATTC events to indicate the physical connection status

    • ESP_GATTC_DISCONNECT_EVT
    • ESP_GATTC_CONNECT_EVT
  • Modify two GATTS events (ESP_GATTS_CONNECT_EVT and ESP_GATTS_DISCONNECT_EVT) that indicate the physical connection status

    • Remove an unnecessary parameter is_connected
    • Add a new parameter reason in the ESP_GATTS_DISCONNECT_EVT event
  • Modify GATTS event ESP_GATTS_CONF_EVT

    • Parameters len and value are added in the event to indicate the notification/indication that the event belongs to. These two parameters are valid only when the packet is not sent successflully.
  • bt.h header file has been renamed to esp_bt.h.

  • LWIP socket file descriptors now take higher numeric values (via the LWIP LWIP_SOCKET_OFFSET macro). BSD sockets code should mostly work as expected (and, new in V3.0, some standard POSIX functions can now be used with sockets). However any code which assumes a socket file descriptor is always a low numbered integer may need modifying to account for LWIP_SOCKET_OFFSET. Note that the common pattern of calling select(FD_SETSIZE, ....) will no longer work, as the set size is much smaller than the LWIP_SOCKET_OFFSET value. It is necessary to calculate the actual maximum fd numeric value.

Hardware Support

  • Support for ESP32-PICO-D4 System In Package and ESP-32-PICO-KIT development board
  • Support for external SPI-connected ESP-PSRAM32 chip (including options to enable heap in external PSRAM, with optional transparent malloc() for large buffers)

Build System and tools

New functionality

  • Support gcc Stack Smashing protection feature
  • GCOV support over JTAG
  • Runtime analysis via the SEGGER SysView tool using JTAG app tracing (documentation)
  • New make print_flash_cmd to print flashing command (can be redirected to a file)
  • Partition Table: Allow variables to span multiple CSV fields (#841)
  • Make now warns by default if undefined variables are expanded (#138)
  • Private include directories are now ordered before public ones in include search path
  • New "silent assertions" option to save app binary size while keeping assertions enabled
  • More complete "make size" output, new "make size_components" and "make size_files" targets for analysing ELF file makeup.
  • Each COMPONENTS_DIR can now either be a components directory, or a parent directory containing subdirectories which are components
  • esptool.py now generates smaller app binary images (almost 128KB smaller in some cases)

Bug fixes

  • Fix idf_monitor crash on Windows 10 since Fall Creators Update (#1136)
  • Fix idf_monitor "cancel" behaviour to match pyserial TIOCSTI ioctl
  • Apply component-level definitions via CPPFLAGS not CFLAGS (#1165)
  • Eclipse documentation: Fix CDT GCC parser to correctly parse C++ commands (#929)
  • Updating the project Makefile now triggers a full rebuild

Bootloader

  • Option to boost 1.8V VDDSDIO internal regulator voltage to 1.9V to workaround flash voltage stability issues.
  • Improved robustness and fallback options if OTA configuration is invalid or configured image not bootable.
  • App images now have a SHA256 hash of all contents appended by default. Bootloader verifies this if present.
  • Boot time optimisations. Can be close to twice as fast to boot an app in 80MHz QIO mode.
  • Allow custom SPI flash pin configurations for QIO/QOUT mode.

FreeRTOS

New Functionality

  • Previously "untested" (assertion failing) FreeRTOS 8.2.0 functions now fully supported (including Queue Registry, Task Notifications, eTaskGetState())
  • FreeRTOS Runtime statistics support (configurable via menuconfig)
  • Many FreeRTOS 9.0.0 features & API calls have been backported (documentation)
  • FreeRTOS tick and idle hooks are now per-core
  • Overhead of spinlocks (portMUX) reduced for improved performance in dual core mode

Bug fixes

  • Ringbuffer fixes for sizes which are not a multiple of 4.
  • Fix bug xTaskResumeAll() sometimes not resuming all tasks.

SoC-Level functions

New Functionality

  • Power Management: Support for SoC Light Sleep
  • Power Management: Support for dynamic runtime frequency scaling.
  • Brownout detector functionality (documentation)
  • New function to mmap non-contiguous flash pages to a contiguous memory space
  • High level interrupt handlers are now weak-linked symbols so components can override them
  • New SPI flash mutex API allows combining multiple SPI flash operations (writes, etc.) as an atomic operation with reference to other tasks
  • SPI flash erase/write operations disallowed in dangerous regions (bootloader, partition table, running app)

Bug Fixes

  • By default, BASIC ROM Console fallback is permanently disabled (via efuse) on first boot, to avoid hardware accidentally resetting to this mode.
  • Raise CPU core voltage when the maximum 80MHz SPI flash frequency is used (improves stability)
  • Fix for interrupt allocation not always assigning the same source (issue)
  • Disable unused peripheral clocks after reset, drivers will re-enable as needed
  • Fix crashes when more than 185KB of DRAM is statically allocated
  • Remove unused .data sections that were incorrectly linked into the final binary increasing RAM usage
  • F...
Read more

ESP-IDF Release 2.1.1

20 Nov 03:25
Compare
Choose a tag to compare

Release 2.1.1 is a bug fix release. It includes the fixes for KRACK and BlueBorne vulnerabilities.

Documentation for release 2.1.1 is available at http://esp-idf.readthedocs.io/en/v2.1.1/.

This is the list of changes since release 2.1.

Build system and tools

  • Add workaround for "git submodule" stray output bug on Windows

Bootloader

  • Optimize pin configuration for 80MHz flash frequency
  • Raise core voltage when 80MHz flash frequency is used
  • Add option to boost VDDSDIO regulator voltage to 1.9V (enabled by default)

FreeRTOS

  • Fix an assert that erroneously triggered when popping a zero-byte payload from the end of the ringbuffer
  • Make sure xPortGetCoreID and uxTopUsedPriority are placed into IRAM
  • Fix copy-paste error in HOLD_FORCE field name for GPIO26

SoC functions

  • By default, assume 40MHz crystal frequency (autodetection can still be enabed in menuconfig)
  • Fix possible lock-up when switching to higher CPU frequency
  • Fix possible race condition while stalling other CPU during esp_restart

WiFi

  • Fix a bug which caused calibration current as high as 800mA in some cases
  • Fix WPA/WPA2 PTK and GTK re-install vulnerability issue

LwIP

  • Take portTICK_PERIOD_MS into account when calculating timeouts
  • Broadcast IP route based on source IP address

BT/BLE

  • Add continuation offset check to SDP server
  • Fix BLE controller lock-up in long duration BLE scan
  • PHY library changes to increase BT/BLE performance
  • Disable role switch feature in Classic BT to increase compatibility
  • Adjust some timing parameters in BT/BLE controller to increase its stability
  • Fix controller to host flow control bug in HCI
  • Fix bonding-related bugs
  • Fix memory corruption caused by BT/BLE controller
  • Fix thread safety issues in BT/BLE host
  • Fix SMP-related bugs

Drivers

  • Fix reads/writes to/from unaligned buffers in SDMMC driver
  • Fix swapped reset bits of HSPI/VSPI peripherals

Storage

  • Check CRC of items on full pages in NVS library.

Third party libraries

  • nghttp2: Add submodule to COMPONENT_SUBMODULES, update to release v1.24, build port directory

Obtaining v2.1.1

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 https://github.com/espressif/esp-idf.git esp-idf-v2.1.1
cd esp-idf-v2.1.1/
git checkout v2.1.1
git submodule update --init --recursive

This is the recommended way of obtaining v2.1.1 of ESP-IDF.

Download an archive with submodules included

Attached to this release is an esp-idf-v2.1.1.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.

ESP-IDF Release v2.1

28 Jul 19:02
Compare
Choose a tag to compare

Changes since v2.0.

Breaking changes

Release v2.1 is aimed to be largely compatible with applications written for ESP-IDF v2.0. However, the following breaking changes were introduced:

  • esp_bt_controller_init function received a new esp_bt_controller_config_t * argument.
  • If the application is built with dual core support, access to DPORT registers using normal register access macros will result in an compile time error (or run time error if register address can not be evaluated at compile time). Applications must be updated to use register access macros with DPORT_ prefix.
  • nvs_flash_init function can now return an error code, which must be checked by the application (see NVS examples).
  • After calling esp_ble_gatts_create_attr_tab, application should only expect to receive ESP_GATTS_CREAT_ATTR_TAB_EVT in GATTS callback. ESP_GATTS_CREATE_EVT, ESP_GATTS_ADD_xxx_EVT will not be received now.
    Please refer to example gatt_server_service_table for detailed usage.

Build system and tools

  • Fix a bug where component src subdirs needed listing before parent source dirs
  • Add cleaner way to conditionally compile files
  • Significantly reduce startup time on Windows
  • esptool: Update to v2.0 final release
  • gen_esp32part: Fix app offset errors, Python 3 support
  • New 'make monitor' idf_monitor tool for better monitor output.

Bootloader

  • Fix secure boot enable - can verify bootloader image
  • Enable checks for encrypted flash in OTA (#453)
  • Enable SPI flash Quad I/O in bootloader: Bootloader checks flash ID, enables Quad I/O mode based on flash type.

FreeRTOS

Bug fixes

  • Fixes for the following APIs in SMP mode:
    • uxTaskGetSystemState
    • vTaskSuspend()/vTaskResume()
  • Always disable interrupts in a critical region
  • Release coprocessor registers when a task is deleted
  • Delay context switch from queue/task APIs until exiting critical section
  • Fix finding location of ISR stack space for CPU1
  • Fix cross-core event group sync

Other changes

  • Assert when a new task is started on CPU1 while application is running in single core mode
  • Make internal stack size variables in 32-bit instead of 16-bit
  • Increase timer task stack size to 2048 bytes
  • Add max task length name configuration
  • Expose task stack overflow watchpoint option
  • Use more regions previously reserved for ROM routines/stack as heap, freeing up about 28K of RAM.
  • Add an option to configure IPC task stack size

SoC functions

  • Introduce soc component, add source of rtc_clk and rtc_pm libraries
  • Add support for 32k XTAL as RTC clock source
  • Improved timekeeping accuracy when using internal RTC clock
  • Improve XTAL frequency detection, add support for selecting XTAL frequency in menuconfig
  • Default CPU frequency in menuconfig is set to 160 MHz (previously was 240 MHz)
  • Add workaround for DPORT access bug in ESP32. When accessing DPORT registers, applications must use register operation macros with DPORT_ prefix.
  • Allow REG_SET_FIELD macro to be used for bit fields
  • Update soc/io_mux_reg.h to latest version (#349)

WiFi

New features

  • Add smartconfig example
  • Support static WiFi TX buffers, the number of the buffers is configured via menuconfig
  • Support for active/passive scan with configurable dwell time (new members of wifi_scan_config_t structure)
  • Support for packet filtering in promiscuous mode using new esp_wifi_{get,set}_promiscuous_filter APIs
  • New member of wifi_auth_mode_t enum for WPA2 Enterprise
  • New channel number setting in wifi_sta_config_t for fast connection to the AP

Bug fixes

  • Fix a WiFi compatibility issue which caused failure to connects to some APs, such as TP-LINK 742N, in some scenarios
  • Fix a bug which caused OTA upgrade to fail
  • Improve WPS connection success ratio
  • Fix the bug that ESP32 didn't receive MIMO packet and missed some AMPDU encrypted packets in promiscuous mode
  • Fix the bug that Long Range mode was not working
  • Fix several WiFi crash bugs

Other changes

  • Add documentation for WiFi driver
  • Change scanned AP's SSID array length to 33 bytes
  • Update all examples to call nvs_flash_init before initializing WiFi

BLE

  • Gatt server creating GATT service via attribute table optimization

    • Remove restrictions in characteristic numbers for each service
    • Fix memory leak while creating or deleting services
    • Fix a bug while setting attribute values
  • Gatt server auto-response via stack optimization

    • Add process of prepare_write_request packet
    • Fix bugs while processing packets of read blob request, write request and read request
  • Gatt server general optimization

    • Add events of GATT server open, cancel open and close
  • Gatt client optimization

    • Register remote device’s GATT service change ccc descriptor automatically
    • Add API to prepare write descriptor
    • Add API to refresh cache of service discovery results to initiate a new service discovery procedure
  • GAP central role scan mode optimization

    • Fix a bug that scan lasts only 5 minutes in permanent scan mode
    • Add advertising data length and scan response length in scan results
  • GAP peripheral role advertising mode optimization

    • Add events of advertising stop and scan stop complete
    • Fix a bug that sometimes advertising is stopped unexpectedly
  • Connection establishment and disconnection APIs optimization

    • Add common gap disconnect API for both GATT server and GATT client
    • Add connected event and disconnected event for GATT client, to detect connection state in either GATT server or GATT client callback functions
  • GAP general optimization

    • Add LE data packet length set completed event
    • Add connection parameter update request completed event
    • Fix a bug that host can’t get remote device’s features
  • New SMP APIs

    • Add support of different pairing methods, including MITM, secure connection and others
    • Add APIs to configure secure parameters
    • Add SMP security example
    • Fix reconnection issue in security mode
  • L2CAP and HCI optimization

    • Fix a bug of HCI packet fragmentation error
    • Add support of HCI UART
  • Memory optimization

    • BT and BLE can be enabled individually
    • Support for disabling GATT server, GATT client, SMP, etc, in menuconfig
  • Merge bug fixes from Bluedroid 7.1.1

  • Smartphone compatibility optimization

  • BLE example code optimization

  • Enhance error checking and processing in stack

  • Improve packet receive performance

  • Update all examples to call nvs_flash_init before initializing BT

Classic BT

  • New Host APIs

    • Add APIs to set device name
    • Add APIs to set discoverability and connectability mode
  • New Profiles

    • Add A2DP Sink Profile
    • Add AVRCP Controller Profile
  • Controller Bugs Fixes

    • Fix a bug of inconsistent state handling in sniff mode
    • Fix a bug while using HCI Controller to host data flow control
    • Fix a bug of Invalid handling of HCI command "HCI_Host_Number_of_Completed_Packets"
    • Fix a bug of assertion fails in ACL-U data transmission for classic BT
    • Fix controller RX/TX bugs (using rand/srand in cache, tasks block, exception and etc)
    • Fix PHY init bug
  • Bluetooth tasks priorities optimization

  • Osi_alarm module optimized to be thread-safe

Drivers

New features

  • Motor Control PWM (MCPWM) driver and examples
  • SPI slave driver and examples
  • Support for PDM and built-in DAC in I2S driver
  • Support for low speed channels in LEDC driver
  • Add ADC1 example
  • Add example on using capacitive touch sensors

Bug fixes

  • Make arguments to all config calls 'const' (#519)
  • I2C driver:
    • Fix driver not working in 'RELEASE' configuration (#304)
    • Fix slave mode read size bug
    • Fix spikes on I2C master init (#393)
  • I2S driver:
    • Fix error when changing channel number in i2s_set_clk function
    • Fix support for 24 and 32 bit samples
    • Fix TX/RX at the same time
  • RMT driver:
    • Add const qualifier for config and tx data in RMT (#495)
    • Fix rmt_set_tx_thr_intr_en(): check evt_thresh only in enable path (#492)
    • fix some issues around interrupts
  • SPI master driver:
    • Use DMA-capable memory for display initialization in the example(#551)
    • Fix timing adjustment needed for higher speeds of SPI master bus (#363)
    • Add workaround for DMA issue
  • Handle SD card removal when CD signal is not used
  • Send init sequence to SD card before MMC_GO_IDLE_STATE command
  • Fix impossible check in uart_set_line_inverse (#489)
  • Fix UART data bug when stop-bit is set as 2-bit mode
  • Optimize touch pad read function to reduce time spent in spin lock

Ethernet

  • Add LAN8720 phy support, move PHY to components (#383)
  • Allow separate ethernet & wifi configuration

ULP and deep sleep

  • Support for generation of ULP coprocessor programs with binutils assembler
  • Add ULP pulse counting example
  • Add ULP ADC example
  • Add support for deep sleep wakeup using touch sensor
  • And deep sleep example illustrating various wakeup modes

Storage

New features

  • Add support for nested mount points in VFS
  • Add wear_levelling component, which presents an interface similar to the interface of spi_flash. Inside, it stores data inside a partition to in a way that reduces worst case number of erase cycles for any given sector.
  • enable support for multiple FATFS drives

Bug fixes

  • nvs: check value size before writing, document limitations
  • nvs: remove search cache at page level (#365)
  • nvs: improve error handling during initialization
  • fix inconsistent definition of PATH_MAX and ARG_MAX (#289)
  • fat/sdmmc: unmount FATFS object on error

SPI flash library

  • Fix large writes, unaligne...
Read more

ESP-IDF Pre-release v2.1-rc1

26 Jun 10:22
Compare
Choose a tag to compare
Pre-release

Changes since v2.0.

Breaking changes

Release v2.1 is aimed to be largely compatible with applications written for ESP-IDF v2.0. However, the following breaking changes were introduced:

  • esp_bt_controller_init function received a new esp_bt_controller_config_t * argument.
  • If the application is built with dual core support, access to DPORT registers using normal register access macros will result in an compile time error (or run time error if register address can not be evaluated at compile time). Applications must be updated to use register access macros with DPORT_ prefix.
  • nvs_flash_init function can now return an error code, which must be checked by the application (see NVS examples).
  • After calling esp_ble_gatts_create_attr_tab, application should only expect to receive ESP_GATTS_CREAT_ATTR_TAB_EVT in GATTS callback. ESP_GATTS_CREATE_EVT, ESP_GATTS_ADD_xxx_EVT will not be received now.
    Please refer to example gatt_server_service_table for detailed usage.

Build system and tools

  • Fix a bug where component src subdirs needed listing before parent source dirs
  • Add cleaner way to conditionally compile files
  • Significantly reduce startup time on Windows
  • esptool: Update to v2.0 final release
  • gen_esp32part: Fix app offset errors, Python 3 support
  • New 'make monitor' idf_monitor tool for better monitor output.

Bootloader

  • Fix secure boot enable - can verify bootloader image
  • Enable checks for encrypted flash in OTA (#453)
  • Enable SPI flash Quad I/O in bootloader: Bootloader checks flash ID, enables Quad I/O mode based on flash type.

FreeRTOS

Bug fixes

  • Fixes for the following APIs in SMP mode:
    • uxTaskGetSystemState
    • vTaskSuspend()/vTaskResume()
  • Always disable interrupts in a critical region
  • Release coprocessor registers when a task is deleted
  • Delay context switch from queue/task APIs until exiting critical section
  • Fix finding location of ISR stack space for CPU1
  • Fix cross-core event group sync

Other changes

  • Assert when a new task is started on CPU1 while application is running in single core mode
  • Make internal stack size variables in 32-bit instead of 16-bit
  • Increase timer task stack size to 2048 bytes
  • Add max task length name configuration
  • Expose task stack overflow watchpoint option
  • Use more regions previously reserved for ROM routines/stack as heap, freeing up about 28K of RAM.

SoC functions

  • Introduce soc component, add source of rtc_clk and rtc_pm libraries
  • Add support for 32k XTAL as RTC clock source
  • Improved timekeeping accuracy when using internal RTC clock
  • Improve XTAL frequency detection, add support for selecting XTAL frequency in menuconfig
  • Default CPU frequency in menuconfig is set to 160 MHz (previously was 240 MHz)
  • Add workaround for DPORT access bug in ESP32. When accessing DPORT registers, applications must use register operation macros with DPORT_ prefix.
  • Allow REG_SET_FIELD macro to be used for bit fields
  • Update soc/io_mux_reg.h to latest version (#349)

WiFI

New features

  • Add smartconfig example
  • Support static WiFi TX buffers, the number of the buffers is configured via menuconfig
  • Support for active/passive scan with configurable dwell time (new members of wifi_scan_config_t structure)
  • Support for packet filtering in promiscuous mode using new esp_wifi_{get,set}_promiscuous_filter APIs
  • New member of wifi_auth_mode_t enum for WPA2 Enterprise
  • New channel number setting in wifi_sta_config_t for fast connection to the AP

Bug fixes

  • Fix a WiFi compatibility issue which caused failure to connects to some APs, such as TP-LINK 742N, in some scenarios
  • Fix a bug which caused OTA upgrade to fail
  • Improve WPS connection success ratio
  • Fix the bug that ESP32 didn't receive MIMO packet and missed some AMPDU encrypted packets in promiscuous mode
  • Fix several WiFi crash bugs

Other changes

  • Change scanned AP's SSID array length to 33 bytes

BLE

  • Gatt server creating GATT service via attribute table optimization

    • Remove restrictions in characteristic numbers for each service
    • Fix memory leak while creating or deleting services
    • Fix a bug while setting attribute values
  • Gatt server auto-response via stack optimization

    • Add process of prepare_write_request packet
    • Fix bugs while processing packets of read blob request, write request and read request
  • Gatt server general optimization

    • Add events of GATT server open, cancel open and close
  • Gatt client optimization

    • Register remote device’s GATT service change ccc descriptor automatically
    • Add API to prepare write descriptor
    • Add API to refresh cache of service discovery results to initiate a new service discovery procedure
  • GAP central role scan mode optimization

    • Fix a bug that scan lasts only 5 minutes in permanent scan mode
    • Add advertising data length and scan response length in scan results
  • GAP peripheral role advertising mode optimization

    • Add events of advertising stop and scan stop complete
    • Fix a bug that sometimes advertising is stopped unexpectedly
  • Connection establishment and disconnection APIs optimization

    • Add common gap disconnect API for both GATT server and GATT client
    • Add connected event and disconnected event for GATT client, to detect connection state in either GATT server or GATT client callback functions
  • GAP general optimization

    • Add LE data packet length set completed event
    • Add connection parameter update request completed event
    • Fix a bug that host can’t get remote device’s features
  • New SMP APIs

    • Add support of different pairing methods, including MITM, secure connection and others
    • Add APIs to configure secure parameters
    • Add SMP security example
    • Fix reconnection issue in security mode
  • L2CAP and HCI optimization

    • Fix a bug of HCI packet fragmentation error
    • Add support of HCI UART
  • Memory optimization

    • BT and BLE can be enabled individually
    • Support for disabling GATT server, GATT client, SMP, etc, in menuconfig
  • Merge bug fixes from Bluedroid 7.1.1

  • Smart phone compatibility optimization

  • BLE example code optimization

  • Enhance error checking and processing in stack

Classic BT

  • New Host APIs

    • Add APIs to set device name
    • Add APIs to set discoverability and connectability mode
  • New Profiles

    • Add A2DP Sink Profile
    • Add AVRCP Controller Profile
  • Controller Bugs Fixes

    • Fix a bug of inconsistent state handling in sniff mode
    • Fix a bug while using HCI Controller to host data flow control
    • Fix a bug of Invalid handling of HCI command "HCI_Host_Number_of_Completed_Packets"
    • Fix a bug of assertion fails in ACL-U data transmission for classic BT
    • Fix controller RX/TX bugs (using rand/srand in cache, tasks block, exception and etc)
    • Fix PHY init bug
  • Bluetooth tasks priorities optimization

  • Osi_alarm module optimized to be thread-safe

Drivers

New features

  • Motor Control PWM (MCPWM) driver and examples
  • SPI slave driver and examples
  • Support for PDM and built-in DAC in I2S driver
  • Support for low speed channels in LEDC driver
  • Add ADC1 example
  • Add example on using capacitive touch sensors

Bug fixes

  • Make arguments to all config calls 'const' (#519)
  • I2C driver:
    • Fix driver not working in 'RELEASE' configuration (#304)
    • Fix slave mode read size bug
    • Fix spikes on I2C master init (#393)
  • I2S driver:
    • Fix error when changing channel number in i2s_set_clk function
    • Fix support for 24 and 32 bit samples
    • Fix TX/RX at the same time
  • RMT driver:
    • Add const qualifier for config and tx data in RMT (#495)
    • Fix rmt_set_tx_thr_intr_en(): check evt_thresh only in enable path (#492)
    • fix some issues around interrupts
  • SPI master driver:
    • Use DMA-capable memory for display initialization in the example(#551)
    • Fix timing adjustment needed for higher speeds of SPI master bus (#363)
    • Add workaround for DMA issue
  • Handle SD card removal when CD signal is not used
  • Send init sequence to SD card before MMC_GO_IDLE_STATE command
  • Fix impossible check in uart_set_line_inverse (#489)
  • Fix UART data bug when stop-bit is set as 2-bit mode
  • Optimize touch pad read function to reduce time spent in spin lock

Ethernet

  • Add LAN8720 phy support, move PHY to components (#383)
  • Allow separate ethernet & wifi configuration

ULP and deep sleep

  • Support for generation of ULP coprocessor programs with binutils assembler
  • Add ULP pulse counting example
  • Add ULP ADC example
  • Add support for deep sleep wakeup using touch sensor
  • And deep sleep example illustrating various wakeup modes

Storage

New features

  • Add support for nested mount points in VFS
  • Add wear_levelling component, which presents an interface similar to the interface of spi_flash. Inside, it stores data inside a partition to in a way that reduces worst case number of erase cycles for any given sector.
  • enable support for multiple FATFS drives

Bug fixes

  • nvs: check value size before writing, document limitations
  • nvs: remove search cache at page level (#365)
  • nvs: improve error handling during initialization
  • fix inconsistent definition of PATH_MAX and ARG_MAX (#289)
  • fat/sdmmc: unmount FATFS object on error

SPI flash library

  • Fix large writes, unaligned writes, and writes from flash
  • Fix race condition in s_flash_op_complete access
  • Move some parts of ROM SPI flash driver into ESP-IDF to fix a bug in Wait_SPI_Idle() function
  • SPI flash operations lock for shorter periods
  • Fix partition iteration order in esp_partition APIs
  • Add a workaround for stale...
Read more

ESP-IDF Release 2.0

06 Apr 04:40
Compare
Choose a tag to compare

Changes since v1.0.

Build system and tools

  • Updated toolchain to use to GCC 5.2.0, which includes a fix for FP division bug (#96)
  • C++ and STL support in the build system and RTOS
  • Add IDF_VER environment variable and preprocessor define, esp_get_idf_version function
  • Simplifed WiFi, Bluetooth, Ethernet config options
  • Removed KEEP from RAM-resident sections of linker script, which saves some RAM
  • Removed FLAGS_XXX variable option in the build system, replace with per-target overrides
  • New 'make size' build target
  • New 'make monitor' build target
  • Dependency make rules are generated for assembler source files as well
  • Support for default sdkconfig values via sdkconfig.defaults file
  • Esptool updated to 2.0-rc

Bootloader, FreeRTOS, and SoC functions

  • Bootloader sets CPU frequency to 80MHz
  • Bootloader checks if DRAM segments are going to collide with stack
  • Dual core mode is enabled by default
  • Replaced backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portTICK_PERIOD_MS
  • Interrupt allocation APIs with interrupt sharing support
  • Support for interrupt handlers outside of IRAM
  • Support for allocation of memory from IRAM pool
  • APIs for deep sleep wake up using ULP, EXT0, EXT1 sources
  • API to control power down of RTC peripherals in deep sleep
  • Improved stack overflow detection and reporting
  • Panic handler prints backtrace
  • On abort(), panic handler prints the PC address where abort() was called
  • Support for generation of core dumps and core dump analysis tools
  • Fix crash if cross-core interrupt sent with flash cache disabled
  • Fix issue where lower priority task can preempt other core
  • New xPortInIsrContext() function to check if CPU is in ISR
  • FreeRTOS timer task stack size increased to 2048 bytes
  • Fix location of ISR stack for CPU1

WiFi and BT

  • Correctly enable/disable PHY when WiFi and/or BT are enabled/disabled
  • New menuconfig options to set WiFi, BT and Ethernet MAC addresses
  • Support Long Range Rate mode along with bgn mode to support long range WiFi communication.
  • Set DTIM sleep mode as default
  • WiFi throughput optimization
  • WiFi buffer size configurable
  • Support full packet receive in sniffer mode
  • phy_init no longer re-writes already valid calibration data
  • BLE Host support
  • BLE Host BQB qualified
  • Add BLE BLUFI profile with security for WiFi configuration
  • Add BLE APIs to use table to create GATT server service
  • Enable BLE advertising channel 39
  • Enable AP A-MPDU RX interface
  • Ethernet support Flow control
  • New WPA2 APIs to set/clear identity
  • WiFi RX performance improvements
  • Fix bugs in WiFi connection
  • Fix bugs in DTIM Sleep mode
  • Fix WiFi sniffer behaviour
  • Fix Esptouch exceptions
  • Fix bugs in BLE mode:
    • Advertising in ADV_TYPE_DIRECT_IND_LOW mode doesn't work
    • Advertising stop doesn't work sometimes
    • Bluedroid init/deinit/enable/disable memory leak
    • GATT client can not receive notify or indicate
    • Errors caused by calling bluedroid APIs before init/enable
    • GATT server can not be connected in sometimes
    • BT/BTLE RF power unstable
    • BLE advertising data no longer truncated after 31st octet
    • Allow Blufi to work with small MTU size
    • Blufi correctly resets security mode on state reset
    • HCI task stack overflow bug fixed
    • Multiple BLE GATT and GATT table fixes
    • other minor bugs

Ethernet

  • Disable flow control in L2 to L3 copy mode
  • Example documentation, add GPIO for PHY power control to example

New drivers

  • I2C
  • I2S
  • SPI master
  • Sigma-delta Modulation
  • RTC peripherals: touch pad, ADC, DAC, RTC IO
  • SDMMC host

C standard library

  • Optional (opt-out) support for 64-bit integer and C99 formats in newlib stdio functions
  • Support for console redirection to other UART
  • Support for non-blocking reading from UART via stdin

Network

  • New LwIP menuconfig options to set SO_RCVBUF, TCP_MAXRTX, TCP_SYNMAXRTX, IP_FRAGMENT, IP_REASSEMBLY
  • DHCP client reliability improvements
  • OpenSSL layer fixes for large writes, debugging output
  • Allow to set different hostname for each interface in tcpip_adapter
  • mDNS library added
  • libcoap library added

ULP coprocessor

  • Initial support for generation of ULP coprocessor code

Storage

  • Support for flash encryption and secure boot
  • Option for app & partition table signing to happen outside build system
  • Honour "encrypted" flag in partition table
  • Fix issue with stale cache reads when flash encryption is enabled
  • fopen() works in append mode
  • Fix spi_flash operation crashes in single core mode
  • Fix MMAP for SPI_FLASH_MMAP_INST
  • sdmmc: Can set slot width when configuring slot
  • Add directory APIs to VFS layer and corresponding POSIX functions
  • Add FATFS library with SDMMC and VFS support
  • Removed alignment requirements from spi_flash_{read,write}

OTA

  • Fix OTA when flash encryption is enabled
  • OTA falls back to factory if the ota data partition is invalid
  • OTA verifies new app image before switching sources

Encoding/decoding

  • Floating point format support in cJSON

Documentation and examples

  • Moved examples to new folders / categories
  • READMEs for examples which did not have them
  • OTA example
  • WPA2 enterprise example
  • mDNS example
  • I2C example
  • I2S example
  • LEDC example
  • GPIO example
  • UART example
  • SPI master example
  • Sigma-delta modulation example
  • SD card / FATFS example
  • Unit testing documentation

Important changes

  • Toolchain version has been updated to use GCC 5.2.0. Building projects with GCC 4.8.5 is no longer supported, and will trigger a warning in the build system.

  • Interrupt numbers are now assigned using interrupt allocation API. Applications should not use hardcoded interrupt numbers.

  • GPIO driver

    1. Modify the parameter of gpio_isr_register function.

      esp_err_t gpio_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, gpio_isr_handle_t *handle);
      
    2. Add GPIO interrupt service, so that we can hook different isr handler to each GPIO.

      esp_err_t gpio_isr_handler_add(gpio_num_t gpio_num, gpio_isr_t isr_handler, void* args);
      esp_err_t gpio_isr_handler_remove(gpio_num_t gpio_num);
      esp_err_t gpio_install_isr_service(int intr_alloc_flags);
      void gpio_uninstall_isr_service();
      
    3. Fix GPIO pull-up/down function, old macros should not be used any more. Use gpio_{pullup,pulldown}_{en,dis} functions instead.

      PIN_PULLUP_EN(GPIO_PIN_MUX_REG[x])   ->  gpio_pullup_en(x)
      PIN_PULLUP_DIS(GPIO_PIN_MUX_REG[x])  ->  gpio_pullup_dis(x)
      PIN_PULLDWN_EN(GPIO_PIN_MUX_REG[x])  ->  gpio_pulldown_en(x)
      PIN_PULLDWN_DIS(GPIO_PIN_MUX_REG[x]) ->  gpio_pulldown_dis(x)
      
  • UART driver

    1. Modify the parameters of uart_driver_install and uart_isr_register

      esp_err_t uart_driver_install(uart_port_t uart_num, int rx_buffer_size, int tx_buffer_size, int queue_size, QueueHandle_t *uart_queue, int intr_alloc_flags);
      esp_err_t uart_isr_register(uart_port_t uart_num, void (*fn)(void*), void * arg, int intr_alloc_flags,  uart_isr_handle_t *handle);
      
    2. Add API to get received data length in buffer.

      esp_err_t uart_get_buffered_data_len(uart_port_t uart_num, size_t* size);
      
    3. Add pattern detect feature.

      esp_err_t uart_disable_pattern_det_intr(uart_port_t uart_num);
      esp_err_t uart_enable_pattern_det_intr(uart_port_t uart_num, char pattern_chr, uint8_t chr_num, int chr_tout, int post_idle, int pre_idle);
      
  • LEDC driver

    1. Modify the parameters for ISR register APIs:

      esp_err_t ledc_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, ledc_isr_handle_t *handle);
      
    2. Add fade functions for LEDC:

      esp_err_t ledc_set_fade_with_step(ledc_mode_t speed_mode, ledc_channel_t channel, int target_duty, int scale, int cycle_num);
      esp_err_t ledc_set_fade_with_time(ledc_mode_t speed_mode, ledc_channel_t channel, int target_duty, int max_fade_time_ms);
      esp_err_t ledc_fade_func_install(int intr_alloc_flags);
      void ledc_fade_func_uninstall();
      esp_err_t ledc_fade_start(ledc_channel_t channel, ledc_fade_mode_t wait_done);
      
  • Modify parameters for ISR register API in PCNT driver

    esp_err_t pcnt_isr_register(void (*fun)(void*), void * arg, int intr_alloc_flags, pcnt_isr_handle_t *handle);
    
  • Modify parameters for ISR register API in RMT driver

    esp_err_t rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, int intr_alloc_flags);
    esp_err_t rmt_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, rmt_isr_handle_t *handle);
    
  • Modify parameters for ISR register API in timer group driver

    esp_err_t timer_isr_register(timer_group_t group_num, timer_idx_t timer_num, void (*fn)(void*), void * arg, int intr_alloc_flags, timer_isr_handle_t *handle);
    
  • Bluetooth APIs

    1. Add/modify API prefix for the following functions and types:

      bt_controller_init -> esp_bt_controller_init
      vhci_host_callback -> esp_vhci_host_callback
      API_vhci_host_check_send_available -> esp_vhci_host_check_send_available
      API_vhci_host_send_packet -> esp_vhci_host_send_packet
      API_vhci_host_register_callback -> esp_vhci_host_register_callback
      
    2. Modify function names of Bluetooth enable/disable APIs:
      esp_enable_bluetooth -> esp_bluedroid_enable esp_disable_bluetooth -> esp_bluedroid_disable esp_init_bluetooth -> esp_bluedroid_init esp_deinit_bluetooth -> esp_bluedroid_deinit

    3. Modify callback type of GAP API:

      esp_err_t esp_ble_gap_register_callback(esp_gap_ble...
      
Read more

ESP-IDF v2.0 Release Candidate 2

22 Mar 09:25
Compare
Choose a tag to compare
Pre-release

Changes since v2.0-rc1

Security

  • Fix bug where hardware RNG could be disabled following a soft reset
  • Fix stack overflows in mDNS component

Wifi and BT

  • phy_init no longer re-writes already valid calibration data
  • Correctly enable/disable PHY when WiFi and/or BT are enabled/disabled
  • New menuconfig options to set WiFi, BT and Ethernet MAC addresses
  • Enable BLE advertising channel 39
  • BLE advertising data no longer truncated after 31st octet
  • Multiple BLE GATT and GATT table fixes
  • Allow BT Blufi to work with small MTU size
  • BT Blufi correctly resets security mode on state reset
  • DHCP client reliability improvements
  • WiFi RX performance
  • Fix WiFi sniffer behaviour
  • Enable AP A-MPDU RX interface
  • General WiFi layer fixes & optimisations
  • OpenSSL layer fixes for large writes, debugging output

FreeRTOS

  • Fix crash if cross-core interrupt sent with flash cache disabled
  • Fix issue where lower priority task can preempt other core
  • New xPortInIsrContext() function to check if CPU is in ISR

Ethernet

  • Disable flow control in L2 to L3 copy mode
  • Example documentation, add GPIO for PHY power control to example

Deep Sleep

  • Restore correct deep sleep consumption, fix power regression in v2.0-rc1

Storage

  • Honour "encrypted" flag in partition table
  • Fix OTA when flash encryption is enabled
  • OTA falls back to factory if the ota data partition is invalid
  • OTA verifies new app image before switching sources
  • Fix issue with stale cache reads when flash encryption is enabled
  • fopen() works in append mode
  • Fix spi_flash operation crashes in single core mode
  • Fix MMAP for SPI_FLASH_MMAP_INST
  • sdmmc: Can set slot width when configuring slot

Tools

  • Partition table CSV can be an absolute path
  • Core dump documentation expanded, reliability fixes
  • menuconfig now works with gperf 3.1
  • Correct incremental builds when components added/removed

Obtaining v2.0-rc2

The source files attached to this release will not work due to our use of git submodules. To get this release, use the following commands:

git clone https://github.com/espressif/esp-idf.git esp-idf-v2.0-rc2
cd esp-idf-v2.0-rc2/
git checkout v2.0-rc2
git submodule update --init

ESP-IDF v2.0 Release Candidate 1

21 Jan 08:20
Compare
Choose a tag to compare
Pre-release

Build system and tools

  • Updated toolchain to use to GCC 5.2.0, which includes a fix for FP division bug (#96)
  • C++ and STL support in the build system and RTOS
  • Add IDF_VER environment variable and preprocessor define, esp_get_idf_version function
  • Simplifed WiFi, Bluetooth, Ethernet config options
  • Removed KEEP from RAM-resident sections of linker script, which saves some RAM
  • Removed FLAGS_XXX variable option in the build system, replace with per-target overrides
  • New 'make size' build target
  • New 'make monitor' build target
  • Dependency make rules are generated for assembler source files as well
  • Support for default sdkconfig values via sdkconfig.defaults file
  • Esptool updated to 2.0-rc

Bootloader, FreeRTOS, and SoC functions

  • Bootloader sets CPU frequency to 80MHz
  • Bootloader checks if DRAM segments are going to collide with stack
  • Dual core mode is enabled by default
  • Replaced backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portTICK_PERIOD_MS
  • Interrupt allocation APIs with interrupt sharing support
  • Support for interrupt handlers outside of IRAM
  • Support for allocation of memory from IRAM pool
  • APIs for deep sleep wake up using ULP, EXT0, EXT1 sources
  • API to control power down of RTC peripherals in deep sleep
  • Improved stack overflow detection and reporting
  • Panic handler prints backtrace
  • On abort(), panic handler prints the PC address where abort() was called
  • Support for generation of core dumps and core dump analysis tools

WiFi and BT

  • Support Long Range Rate mode along with bgn mode to support long range WiFi communication.
  • Set DTIM sleep mode as default
  • WiFi throughput optimization
  • WiFi buffer size configurable
  • Support full packet receive in sniffer mode
  • BLE Host support
  • BLE Host BQB qualified
  • Add BLE BLUFI profile with security for WiFi configuration
  • Add BLE APIs to use table to create GATT server service
  • Ethernet support Flow control
  • New WPA2 APIs to set/clear identity
  • Fix bugs in WiFi connection
  • Fix bugs in DTIM Sleep mode
  • Fix bugs in BLE mode:
    • Advertising in ADV_TYPE_DIRECT_IND_LOW mode doesn't work
    • Advertising stop doesn't work sometimes
    • Bluedroid init/deinit/enable/disable memory leak
    • GATT client can not receive notify or indicate
    • Errors caused by calling bluedroid APIs before init/enable
    • GATT server can not be connected in sometimes
    • BT/BTLE RF power unstable
    • other minor bugs

New drivers

  • I2C
  • I2S
  • SPI master
  • Sigma-delta Modulation
  • RTC peripherals: touch pad, ADC, DAC, RTC IO
  • SDMMC host

Other components

  • Optional (opt-out) support for 64-bit integer and C99 formats in newlib stdio functions
  • Support for console redirection to other UART
  • Support for non-blocking reading from UART via stdin
  • Initial support for generation of ULP coprocessor code
  • Initial support for flash encryption and secure boot
  • Option for app & partition table signing to happen outside build system
  • New LwIP menuconfig options to set SO_RCVBUF, TCP_MAXRTX, TCP_SYNMAXRTX, IP_FRAGMENT, IP_REASSEMBLY
  • Allow to set different hostname for each interface in tcpip_adapter
  • mDNS library added
  • libcoap library added
  • Add directory APIs to VFS layer and corresponding POSIX functions
  • Add FATFS library with SDMMC and VFS support
  • Removed alignment requirements from spi_flash_{read,write}
  • Floating point format support in cJSON

Documentation and examples

  • Moved examples to new folders / categories
  • READMEs for examples which did not have them
  • OTA example
  • WPA2 enterprise example
  • mDNS example
  • I2C example
  • I2S example
  • LEDC example
  • GPIO example
  • UART example
  • SPI master example
  • Sigma-delta modulation example
  • SD card / FATFS example
  • Unit testing documentation

Important changes

  • Toolchain version has been updated to use GCC 5.2.0. Building projects with GCC 4.8.5 is no longer supported, and will trigger a warning in the build system.

  • Interrupt numbers are now assigned using interrupt allocation API. Applications should not use hardcoded interrupt numbers.

  • GPIO driver

    1. Modify the parameter of gpio_isr_register function.

      esp_err_t gpio_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, gpio_isr_handle_t *handle);
      
    2. Add GPIO interrupt service, so that we can hook different isr handler to each GPIO.

      esp_err_t gpio_isr_handler_add(gpio_num_t gpio_num, gpio_isr_t isr_handler, void* args);
      esp_err_t gpio_isr_handler_remove(gpio_num_t gpio_num);
      esp_err_t gpio_install_isr_service(int intr_alloc_flags);
      void gpio_uninstall_isr_service();
      
    3. Fix GPIO pull-up/down function, old macros should not be used any more. Use gpio_{pullup,pulldown}_{en,dis} functions instead.

      PIN_PULLUP_EN(GPIO_PIN_MUX_REG[x])   ->  gpio_pullup_en(x)
      PIN_PULLUP_DIS(GPIO_PIN_MUX_REG[x])  ->  gpio_pullup_dis(x)
      PIN_PULLDWN_EN(GPIO_PIN_MUX_REG[x])  ->  gpio_pulldown_en(x)
      PIN_PULLDWN_DIS(GPIO_PIN_MUX_REG[x]) ->  gpio_pulldown_dis(x)
      
  • UART driver

    1. Modify the parameters of uart_driver_install and uart_isr_register

      esp_err_t uart_driver_install(uart_port_t uart_num, int rx_buffer_size, int tx_buffer_size, int queue_size, QueueHandle_t *uart_queue, int intr_alloc_flags);
      esp_err_t uart_isr_register(uart_port_t uart_num, void (*fn)(void*), void * arg, int intr_alloc_flags,  uart_isr_handle_t *handle);
      
    2. Add API to get received data length in buffer.

      esp_err_t uart_get_buffered_data_len(uart_port_t uart_num, size_t* size);
      
    3. Add pattern detect feature.

      esp_err_t uart_disable_pattern_det_intr(uart_port_t uart_num);
      esp_err_t uart_enable_pattern_det_intr(uart_port_t uart_num, char pattern_chr, uint8_t chr_num, int chr_tout, int post_idle, int pre_idle);
      
  • LEDC driver

    1. Modify the parameters for ISR register APIs:

      esp_err_t ledc_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, ledc_isr_handle_t *handle);
      
    2. Add fade functions for LEDC:

      esp_err_t ledc_set_fade_with_step(ledc_mode_t speed_mode, ledc_channel_t channel, int target_duty, int scale, int cycle_num);
      esp_err_t ledc_set_fade_with_time(ledc_mode_t speed_mode, ledc_channel_t channel, int target_duty, int max_fade_time_ms);
      esp_err_t ledc_fade_func_install(int intr_alloc_flags);
      void ledc_fade_func_uninstall();
      esp_err_t ledc_fade_start(ledc_channel_t channel, ledc_fade_mode_t wait_done);
      
  • Modify parameters for ISR register API in PCNT driver

    esp_err_t pcnt_isr_register(void (*fun)(void*), void * arg, int intr_alloc_flags, pcnt_isr_handle_t *handle);
    
  • Modify parameters for ISR register API in RMT driver

    esp_err_t rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, int intr_alloc_flags);
    esp_err_t rmt_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, rmt_isr_handle_t *handle);
    
  • Modify parameters for ISR register API in timer group driver

    esp_err_t timer_isr_register(timer_group_t group_num, timer_idx_t timer_num, void (*fn)(void*), void * arg, int intr_alloc_flags, timer_isr_handle_t *handle);
    
  • Bluetooth APIs

    1. Add/modify API prefix for the following functions and types:

      bt_controller_init -> esp_bt_controller_init
      vhci_host_callback -> esp_vhci_host_callback
      API_vhci_host_check_send_available -> esp_vhci_host_check_send_available
      API_vhci_host_send_packet -> esp_vhci_host_send_packet
      API_vhci_host_register_callback -> esp_vhci_host_register_callback
      
    2. Modify function names of Bluetooth enable/disable APIs:
      esp_enable_bluetooth -> esp_bluedroid_enable esp_disable_bluetooth -> esp_bluedroid_disable esp_init_bluetooth -> esp_bluedroid_init esp_deinit_bluetooth -> esp_bluedroid_deinit

    3. Modify callback type of GAP API:

      esp_err_t esp_ble_gap_register_callback(esp_gap_ble_cb_t callback);
      
    4. Separate gattc_if from conn_id in GATT client and server APIs, changed callback type in the following functions:

      esp_ble_gattc_register_callback
      esp_ble_gattc_close
      esp_ble_gattc_config_mtu
      esp_ble_gattc_search_service
      esp_ble_gattc_get_characteristic
      esp_ble_gattc_get_descriptor
      esp_ble_gattc_get_included_service
      esp_ble_gattc_read_char
      esp_ble_gattc_read_char_descr
      esp_ble_gattc_write_char
      esp_ble_gattc_write_char_descr
      esp_ble_gattc_execute_write
      esp_ble_gattc_register_for_notify
      esp_ble_gattc_unregister_for_notify
      esp_ble_gatts_register_callback
      esp_ble_gatts_create_service
      esp_ble_gatts_add_char
      esp_ble_gatts_add_char_descr
      esp_ble_gatts_send_indicate
      esp_ble_gatts_send_response
      esp_ble_gatts_set_attr_value
      esp_ble_gatts_open
      esp_ble_gatts_close
      

Known issues and missing features

WiFi and BT

  • Some bugs when WiFi Stack is used in dual-core FreeRTOS system
  • WiFi DTIM sleep is not supported in WiFi/BLE coexistence mode
  • WiFi DTIM sleep doesn't reduce the CPU Frequency
  • WiFi throughput need more optimization
  • ESP-NOW is not supported
  • Classic BT host is not supported
  • Need more documents for WiFi and BT

Other resolved issues

Issues reported on GitHub and resolved in this release.

Obtaining v2.0-rc1

The source files attached to this release will not work due to our use of git submodules. To get this release, use the following commands:

git clone https://github.com/espressif/esp-idf.git esp-idf-v2.0-rc1
cd esp-idf-v2.0-rc1/
git checkout v2.0-rc1
git submodule update --init