Skip to content

ESP-IDF Pre-release 3.0-rc1

Pre-release
Pre-release
Compare
Choose a tag to compare
@igrr igrr released this 19 Apr 03:19
· 36809 commits to master since this 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
  • Fix possible lock-up when switching to higher CPU frequency
  • Fix possible race condition while stalling other CPU during esp_restart
  • Fix copy-paste error in HOLD_FORCE field name for GPIO26

System Library Features

New Functionality

  • pthreads API support for most pthreads functions
  • pthreads API support for pthread condition variables
  • libstdc++ threading support
  • libstdc++ concurrency support (std::condition_variable, std::mutex, etc)
  • C++ exception support (configurable), including support in libstdc++ (#681, plus follow-up work)
  • New High Resolution Timer functions for high precision timer management (documentation
  • Add strptime() support in libc
  • Enable timeradd, timersub, etc macros in libc (#867)
  • New heap memory implementation - better performance, reduced heap fragmentation
  • New heap memory debugging and leak/usage tracing features (documentation)
  • fsync() support added to VFS interface, implemented for fatfs
  • New esp_console library for writing text console-style interfaces.
  • Logging: New functions to log a buffer of data
  • stdio: Add support for using UART driver to implement vfs uart functions

Bug Fixes

  • Fix logging timestamps during early boot in dual core mode
  • Fix ESP_ERROR_CHECK macro potential name clash (#1109)
  • Fix fcntl() support for VFS interface (#1070)

Non-Volatile Storage

  • Support for multiple distinct NVS partitions
  • Add missing CRC check of items on full pages

Drivers

  • LEDC driver fields bit_num and div_num have new recommended alternative names.
  • LEDC driver parameter value checks
  • LEDC duty cycle parameters are now unsigned
  • GPIO: Allow disabling pin via gpio_set_direction()
  • GPIO: Add API to read/write pad drive capability
  • GPIO: Disable GPIO matrix output when setting pin as input
  • SPI master: Fix issue using GPIO0 as CS pin
  • SPI master: Changes to command API
  • SPI master: Address field is now placed at the high bits of the address & slv_wr_status registers
  • SPI master: Fix bug when changing between HSPI and VSPI
  • SPI DMA: Multiple fixes for DMA operations
  • SPI DMA: Fix invalid arguments allowed in full duplex mode
  • SPI DMA: Will now allocate temporary internal DMA buffer if necessary (#551)
  • Touch pad: New APIs to modify ISR, get filtered values, modify filter parameters
  • Touch pad: Fix swapped touch sensor numbers 8 & 9
  • UART: Workaround hardware issue with FIFO reset signal (#1219 & #1202)
  • UART: Set default TX idle interval (#703 & #917)
  • UART: Support REF_TICK as clock source
  • UART: New function to enable/disable software (XON/XOFF) flow control (#890)
  • UART: Fix off-by-one when setting 5MBaud
  • UART: Fix spinlock bug calling uart_set_rts & uart_set_dtr (#649)
  • UART: Fix signal glitch when enabling TX pin
  • ADC: Support for calibration lookup tables, voltage reference correction, new API with readings in mV
  • ADC: Support for using ADC2 when WiFi is disabled
  • I2C: Add hardware reset to recover from hardware FSM becoming stuck (#680 & #922)
  • I2C: Add API to set timeout value (#680 & #922)
  • I2S: Fix BCK polarity when using PLL clock (#1119)
  • I2S: Support APLL clock source
  • I2S: Fix disabling I2S if DAC_CHANNEL_0 used for output
  • I2S: Fix memory leak (#838)
  • RMT: Fix issue with transmit interrupt threshold (#1011)
  • RMT: rmt_get_ringbuf_handler renamed to rmt_get_ringbuf_handle (#274)
  • SDMMC: Support for SD over SPI
  • SDMMC: Enable internal pullups on SD card pins
  • SDMMC: Allow command timeouts to be configured
  • SDMMC: Add support for High Speed (HS) Mode (for native SDMMC only, not SD over SPI)
  • SDMMC: Bug fixes for some unexpected SDMMC state transitions causing failures/lockups.
  • SDMMC: Fix writes to/from unaligned buffers
  • TIMER: Fix clock divider parameter validation

TCP/IP

New Functionality

  • Support socket options for IPV6 multicast group membership (RFC2133)
  • Support socket option IPV6_ONLY for UDP sockets
  • Allow configuring DHCP server lease time parameters (#1206)
  • Expose a number of TCP/IP tuning parameters (MSS, MSL, Window Size, active socket limit, task mailbox size, etc) in configuration
  • New options to configure DHCP domain name server option (#162 & #705)
  • Add APIs to get/set DNS servers (tcpip_adapter_get_dns_info, tcpip_adapter_set_dns_info)
  • Refactor ICMP ping functionality
  • tcpip_adapter API is now thread-safe
  • New SYSTEM_EVENT_STA_LOST_IP event which is generated when WiFi station is disconnected from the AP for certain amount of time

Bug Fixes

  • Socket operations (currently except select()) are now routed via the VFS layer, same as filesystem I/O. Fixes namespace conflicts.
  • Fix memory leak when calling netconn_delete() (#784)
  • Rebind UDP/TCP connection blocks to a valid IP address if the device IP changes
  • Fix some crashes after closing sockets which have work outstanding in another task
  • Fix rare stack overflow in TCP/IP task when "nano" printf formatting is disabled
  • UDP socket close() would always return an error (#1094)
  • TCP socket close() bug fixes - avoid crashes if IP address changes
  • Clean up TCP sockets left in TCP_FIN_WAIT_1 for too long
  • Socket port randomisation now uses hardware RNG
  • Select Broadcast IP route based on source address
  • Fix LwIP timer period calculation

openssl wrapper

  • CN hostname verification support (#980)

mbedTLS

New Functionality

Bug Fixes

  • Fix hardware MPI losing sign when multiplying by -1 (#1181)
  • Fix memory leak in ECDH key exchange if malloc fails due to out of memory
  • Including "mbedtls/config.h" directly in a program no longer leads to config mismatch (#711)
  • Disable 3DES, Camellia, Blowfish, RC4, RIPEMD160, SSLv3, TLS-PSK modes, DTLS by default (default code size 40KB smaller)
  • Additional configuration options to disable unnecessary features (further code size savings)

WiFi

New Functionality

  • ESPNOW support for point-to-point connectionless 802.11 data transfer
  • New API to get/set maximum transmit power
  • WiFi functionality is no longer enabled or disabled via app configuration ("menuconfig"). WiFi library functions will only be linked in to the final app binary if these APIs are called by the app.
  • BlockAck window size can be set in menuconfig
  • Allow enabling AMPDU for TX or TX only
  • Option to allocate some WiFi & LWIP memory buffers in SPI PSRAM if available
  • Support for WiFi country codes, regional regulatory restrictions
  • wpa_supplicant now has plug-in internal crypto functions, to make use of hardware accelerators when available
  • Support for all-channel scan, which can find best AP out of APs with same SSID
  • More options for scan, such as channel dwell time, can be configured
  • Scan obtains more information (AP's protocol mode, cipher type, etc)

Bug Fixes

  • Fixes for WiFi vulnerabilities in CERT VU#228519 (aka KRACK)
  • Fix PHY calibration excess power consumption during full calibration
  • WiFi/Bluetooth coexistence fixes
  • Const-ify some WiFi API parameters
  • DHCP server fixes in station+ap mode
  • WPA2 memory leak fixes

Performance Improvements

  • UDP RX/TX performance improved to 60/60Mbpbs (in shielded box)
  • TCP RX/TX performance improved to 35/50Mbpbs (in shielded box)
  • Modem sleep time increased from 55%~70% to 65%~90%.

BLE

GATT Server

  • Fix bugs about getting local attribute value
  • Add callbacks for sending notifications or indications

GATT Client

  • Add support of calling GATTC commands continuously
  • Add support of getting service discovery database at once
  • Use handles instead of UUIDs as identifiers in GATTC operations
  • Modify APIs of getting remote device’s characteristics, descriptors and services
  • Add support of multiple-read operation
  • Fix bugs while processing packets of read by type request

GATT Common

  • Add API to set maximum MTU for server and client

GAP

GAP Central Role Scan Mode

  • Fix a bug that scan failed in case of long scan time
  • Fix a bug that scan parameters are reset to default after restarting scanning
  • Fix a bug that bonded device can’t be scanned if it uses public address

GAP Central Role Master Mode

  • Add support of setting connection parameters before it is established

GAP Peripheral Role Advertising Mode

  • Optimize advertising start and stop completed event

Other GAP Changes

  • Add support of scan and advertising simultaneously
  • Add APIs to add, get and delete white-list devices
  • Add API to read RSSI value
  • Add callback for setting local privacy
  • Fix bugs while calling connection parameter update APIs
  • Add connected and disconnected events
  • Fix some multi-connection bugs

SMP

  • Add APIs to remove, clear and get bonded devices and keys
  • Add support of NVS storage of SMP keys
  • Fix some SMP bugs

L2CAP

  • Add support of creating new BLE L2CAP COC (Connection Oriented Channel)
  • Add support of BLE L2CAP COC security

Performance optimization

  • Improve connection performance
  • Smart phone compatibility optimization
  • Improve RX performance

Bluetooth Common

  • Fix some memory leak bugs
  • Fix some crash bugs
  • Remove fixed queue from BTU layer in Bluedroid
  • Remove all GKI reference
  • Add APIs to add .bss/.data/hw memory of the controller to heap dynamically

Classic BT

  • A2DP: Implement AVRCP metadata and notification register commands (#1078)
  • SDP server: Fix for CVE-2017-0785 ("BlueBorne")
  • Fix a bug for HCI controller to host ACL data flow control
  • Disable ROLE SWITCH link policy in bluedroid to workaround the issue of master-slave role switch for classic BT
  • Refactor WIFI_CLK_EN register setting during bluetooth controller start up
  • Modify implementation of bluedroid alarm module to use high priority timer instead of FreeRTOS timer
  • Increase programming delay for event arbiter in controller to resolve assertions when there is heavy workload

Ethernet

New Functionality

  • Support for internal (APLL-generated) ethernet MAC clock (#1127)
  • Ethernet functionality is no longer enabled or disabled via app configuration ("menuconfig"). Ethernet library functions will only be linked in to the final app binary if these APIs are called by the app.

Bug Fixes

  • Bugfix to allow setting a static IP for ethernet interface (#657)

Ultra Low Power Processor

Bug Fixes

  • Disable GPIO15 by default (reduces current in ULP) (#1108)

mDNS

Bug Fixes

  • Fix message compression detection (#1171)
  • Fix memory leak (#838)

External Libraries

New Functionality

  • New SPIFFS component (from v0.3.8 development, commit f5e26c4)
  • fatfs new configuration options for per-file caches, locking.
  • fatfs updated to R0.13a (use CP437 instead of ASCII-only configuration, add dynamic code page configuration)
  • libsodium: Add option to use mbedTLS SHA256 & SHA512 implementations to reduce code size, only available if hardware accelerator is disabled (incompatible API) (#1044)
  • nghttp2: Update to 1.24.0
  • aws_iot: Expose more SDK configuration options (#637)

Documentation

  • Getting Started guides are now included in ESP-IDF docs instead of separate PDFs.
  • Added information about new ESP32-WROVER and ESP32-PICO-D4 hardware
  • New WiFi documentation describing APIs driver, state machine, event mechanism.
  • Improve description of driver APIs
  • Edited majority of API Reference sections for clarity
  • Improved Getting Started guides
  • Replace all http:// URLs with https:// where possible (#622)
  • New documentation section for configuration items (link)
  • Inter-Processor Call (IPC) functionality now documented

Examples

New Examples

  • HTTP/2 client example
  • Asynchronous UART example
  • ESP-NOW example
  • Sigma-Delta Modulation example
  • iperf examples for measuring WiFi performance
  • WiFi scan example
  • BLE SPP-Like client example
  • BLE SPP-Like server example
  • Security Client example
  • Multi-Connection example
  • iBeacon example
  • Eddystone example

Bug Fixes

  • Timer example: don't perform floating point arithmetic in ISR
  • BLUFI example: fix HW accelerated AES encryption usage error

Obtaining v3.0-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-v3.0-rc1
cd esp-idf-v3.0-rc1/
git checkout v3.0-rc1
git submodule update --init --recursive

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

Download an archive with submodules included

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