ESP-IDF Pre-release v2.1-rc1
Pre-releaseChanges 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 newesp_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 receiveESP_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:
- 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:
- SPI master driver:
- 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 cache reads issue when Flash MMU is reconfigured
Third party libraries
- Add libsodium cryptography library component (v1.0.12)
- Add Amazon IoT SDK component, plus two examples derived from their Linux samples.
- nghttp module: Update to v1.22, use submodule instead of in-tree source
LwIP
- Fix DHCP server crash issue
- Modify TCP TX window from 2 to 4 to keep RX/TX window same size
- Enable experimental/unsupported PPP over Serial driver (#272)
- Give the AP and STA netifs different names for ease of debugging (#456)
- Implement LwIP critical session with mutex
- Increase max number of open sockets to 32
mDNS
- Use AFL Fuzzer for testing of parser stability
- Add simple DNS-SD meta query support (#340)
- Fix a series of security issues with MDNS (reported via BBP):
- STACK-SMASH: the sprintf was not limited, could be executed as many times as required, allowing arbitrary long data being written into stack.
- PACKET-OF-DEATH: the compare allows equal, and thus jumping back to it self infinite recursion -> guaranteed crash.
- TXT-SMASH: the loop did not check on reaching a->txt maximum size (1024), resulting in stack overflow.
mbedTLS
- Fix detection of EWOULDBLOCK/EAGAIN with non-blocking sockets (#425, #511)
- Use two MPI multiplications when multiply operands are too large. Allows RSA4096 via hardware crypto operations.
Debugging features
- Add apptrace module which allows arbitrary data to be sent between host and JTAG
- Initial implementation of printf-like logging to host via JTAG
- Add dumping of debug info from traceport upon reset by any WDT
- Add detection of cache invalid access and trigger panic handler when invalid access interrupt is raised
- Extra sanity checks when doing core dump to flash
- RWDT is used to reboot system in case of panic handler crash
- Improve core dump script robustness
Unit tests
- Fix incorrect CR+LF sequence in unit-test-app
- look for TEST_COMPONENTS in all component directories (#354)
- Fix unit test app to print tests in the same order they are given in test file
Documentation
- Getting Started guides are now part of ESP-IDF documentation
- Automatically generate API reference list / Doxygen directives
- Revise windows setup installation script to fix various issues, use latest toolchain.
- Add description of dev boards and modules offered by Espressif
Miscellaneous
- Add API to get chip info
- Support loading of custom MAC address from EFUSE or from application-specific storage
- Support ESP32-D2WD with integrated flash in ESP-IDF.
- Fix issues with HTTP[S] request examples (#500)
- Standardise naming of files, symbols, etc. in examples
- Fix warnings generated by ESP_ERROR_CHECK(variable) in release builds (#497)
Obtaining v2.1-rc1
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-v2.1-rc1
cd esp-idf-v2.1-rc1/
git checkout v2.1-rc1
git submodule update --init --recursive
This is the recommended way of obtaining v2.1-rc1 of ESP-IDF.
Download an archive with submodules included
Attached to this release is an esp-idf-v2.1-rc1.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.