Skip to content

Commit 56ef31f

Browse files
authored
Update IDF to version 3cad00f (espressif#310)
1 parent fd81fd0 commit 56ef31f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+14136
-12212
lines changed

platform.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ compiler.warning_flags.all=-Wall -Werror=all -Wextra
2121

2222
compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
2323
compiler.sdk.path={runtime.platform.path}/tools/sdk
24-
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/bluedroid" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mbedtls_port" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/lwip"
24+
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/bluedroid" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mbedtls_port" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/lwip"
2525

2626
compiler.c.cmd=xtensa-esp32-elf-gcc
2727
compiler.c.flags=-std=gnu99 -Os -g3 -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wpointer-arith {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -MMD -c
@@ -34,7 +34,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
3434

3535
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
3636
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority
37-
compiler.c.elf.libs=-lgcc -lstdc++ -lapp_update -lbootloader_support -lbt -lbtdm_app -lc -lc_nano -lcoap -lcoexist -lcore -lcxx -ldriver -lesp32 -lethernet -lexpat -lfatfs -lfreertos -lhal -ljsmn -ljson -llog -llwip -lm -lmbedtls -lmdns -lmicro-ecc -lnet80211 -lnewlib -lnghttp -lnvs_flash -lopenssl -lphy -lpp -lrtc -lrtc_clk -lrtc_pm -lsdmmc -lsmartconfig -lspi_flash -ltcpip_adapter -lulp -lvfs -lwpa -lwpa2 -lwpa_supplicant -lwps -lxtensa-debug-module
37+
compiler.c.elf.libs=-lgcc -lstdc++ -lapp_update -lbootloader_support -lbt -lbtdm_app -lc -lc_nano -lcoap -lcoexist -lcore -lcxx -ldriver -lesp32 -lethernet -lexpat -lfatfs -lfreertos -lhal -ljsmn -ljson -llog -llwip -lm -lmbedtls -lmdns -lmicro-ecc -lnet80211 -lnewlib -lnghttp -lnvs_flash -lopenssl -lphy -lpp -lrtc -lsdmmc -lsmartconfig -lsoc -lspi_flash -ltcpip_adapter -lulp -lvfs -lwpa -lwpa2 -lwpa_supplicant -lwps -lxtensa-debug-module
3838

3939
compiler.as.cmd=xtensa-esp32-elf-as
4040

tools/platformio-build.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
join(FRAMEWORK_DIR, "tools", "sdk", "include", "newlib"),
6868
join(FRAMEWORK_DIR, "tools", "sdk", "include", "nvs_flash"),
6969
join(FRAMEWORK_DIR, "tools", "sdk", "include", "openssl"),
70+
join(FRAMEWORK_DIR, "tools", "sdk", "include", "soc"),
7071
join(FRAMEWORK_DIR, "tools", "sdk", "include", "spi_flash"),
7172
join(FRAMEWORK_DIR, "tools", "sdk", "include", "sdmmc"),
7273
join(FRAMEWORK_DIR, "tools", "sdk", "include", "tcpip_adapter"),
@@ -89,7 +90,7 @@
8990
],
9091

9192
LIBS=[
92-
"gcc", "stdc++", "app_update", "bootloader_support", "bt", "btdm_app", "c", "c_nano", "coap", "coexist", "core", "cxx", "driver", "esp32", "ethernet", "expat", "fatfs", "freertos", "hal", "jsmn", "json", "log", "lwip", "m", "mbedtls", "mdns", "micro-ecc", "net80211", "newlib", "nghttp", "nvs_flash", "openssl", "phy", "pp", "rtc", "rtc_clk", "rtc_pm", "sdmmc", "smartconfig", "spi_flash", "tcpip_adapter", "ulp", "vfs", "wpa", "wpa2", "wpa_supplicant", "wps", "xtensa-debug-module"
93+
"gcc", "stdc++", "app_update", "bootloader_support", "bt", "btdm_app", "c", "c_nano", "coap", "coexist", "core", "cxx", "driver", "esp32", "ethernet", "expat", "fatfs", "freertos", "hal", "jsmn", "json", "log", "lwip", "m", "mbedtls", "mdns", "micro-ecc", "net80211", "newlib", "nghttp", "nvs_flash", "openssl", "phy", "pp", "rtc", "sdmmc", "smartconfig", "soc", "spi_flash", "tcpip_adapter", "ulp", "vfs", "wpa", "wpa2", "wpa_supplicant", "wps", "xtensa-debug-module"
9394
],
9495

9596
UPLOADERFLAGS=[

tools/sdk/bin/bootloader.bin

1.17 KB
Binary file not shown.

tools/sdk/include/bluedroid/alarm.h

+3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ typedef struct alarm_t {
3535
void *cb_data;
3636
} osi_alarm_t;
3737

38+
int osi_alarm_create_mux(void);
39+
int osi_alarm_delete_mux(void);
3840
void osi_alarm_init(void);
41+
void osi_alarm_deinit(void);
3942

4043
// Creates a new alarm object. The returned object must be freed by calling
4144
// |alarm_free|. Returns NULL on failure.

tools/sdk/include/bluedroid/bta_api.h

+2
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,8 @@ typedef struct {
10031003
tBTM_BLE_EVT_TYPE ble_evt_type;
10041004
tBT_DEVICE_TYPE device_type;
10051005
UINT8 flag;
1006+
UINT8 adv_data_len;
1007+
UINT8 scan_rsp_len;
10061008
#endif
10071009

10081010
} tBTA_DM_INQ_RES;

tools/sdk/include/bluedroid/btm_api.h

+2
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,8 @@ typedef struct {
611611
UINT8 ble_addr_type;
612612
tBTM_BLE_EVT_TYPE ble_evt_type;
613613
UINT8 flag;
614+
UINT8 adv_data_len;
615+
UINT8 scan_rsp_len;
614616
#endif
615617
} tBTM_INQ_RESULTS;
616618

tools/sdk/include/bluedroid/esp_gap_ble_api.h

+2
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ typedef union {
273273
uint8_t ble_adv[ESP_BLE_ADV_DATA_LEN_MAX + ESP_BLE_SCAN_RSP_DATA_LEN_MAX]; /*!< Received EIR */
274274
int flag; /*!< Advertising data flag bit */
275275
int num_resps; /*!< Scan result number */
276+
uint8_t adv_data_len; /*!< Adv data length */
277+
uint8_t scan_rsp_len; /*!< Scan response length */
276278
} scan_rst; /*!< Event parameter of ESP_GAP_BLE_SCAN_RESULT_EVT */
277279
/**
278280
* @brief ESP_GAP_BLE_ADV_DATA_RAW_SET_COMPLETE_EVT

tools/sdk/include/bluedroid/thread.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,24 @@ enum {
4444
};
4545

4646
#define HCI_HOST_TASK_STACK_SIZE (2048 + BT_TASK_EXTRA_STACK_SIZE)
47-
#define HCI_HOST_TASK_PRIO (configMAX_PRIORITIES - 2)
47+
#define HCI_HOST_TASK_PRIO (configMAX_PRIORITIES - 3)
4848
#define HCI_HOST_TASK_NAME "hciHostT"
4949
#define HCI_HOST_QUEUE_NUM 40
5050

5151
#define HCI_H4_TASK_STACK_SIZE (2048 + BT_TASK_EXTRA_STACK_SIZE)
52-
#define HCI_H4_TASK_PRIO (configMAX_PRIORITIES - 3)
52+
#define HCI_H4_TASK_PRIO (configMAX_PRIORITIES - 4)
5353
#define HCI_H4_TASK_NAME "hciH4T"
5454
#define HCI_H4_QUEUE_NUM 60
5555

5656
#define BTU_TASK_STACK_SIZE (3584 + BT_TASK_EXTRA_STACK_SIZE)
57-
#define BTU_TASK_PRIO (configMAX_PRIORITIES - 4)
57+
#define BTU_TASK_PRIO (configMAX_PRIORITIES - 5)
5858
#define BTU_TASK_NAME "btuT"
5959
#define BTU_QUEUE_NUM 50
6060

6161
#define BTC_TASK_STACK_SIZE (CONFIG_BTC_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE) //by menuconfig
6262
#define BTC_TASK_NAME "btcT"
63-
#define BTC_TASK_PRIO (configMAX_PRIORITIES - 5)
64-
#define BTC_TASK_QUEUE_NUM 20
63+
#define BTC_TASK_PRIO (configMAX_PRIORITIES - 6)
64+
#define BTC_TASK_QUEUE_NUM 60
6565

6666
void btu_task_post(uint32_t sig);
6767
void hci_host_task_post(void);

tools/sdk/include/bt/bt.h

+36-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,44 @@
1818
#include <stdint.h>
1919
#include <stdbool.h>
2020
#include "esp_err.h"
21+
#include "sdkconfig.h"
2122

2223
#ifdef __cplusplus
2324
extern "C" {
2425
#endif
2526

27+
/**
28+
* @brief Controller config options, depend on config mask.
29+
* Config mask indicate which functions enabled, this means
30+
* some options or parameters of some functions enabled by config mask.
31+
*/
32+
typedef struct {
33+
uint8_t hci_uart_no; /*!< If use UART1/2 as HCI IO interface, indicate UART number */
34+
uint32_t hci_uart_baudrate; /*!< If use UART1/2 as HCI IO interface, indicate UART baudrate */
35+
} esp_bt_controller_config_t;
36+
37+
#ifdef CONFIG_BT_ENABLED
38+
39+
#ifdef CONFIG_BT_HCI_UART_NO
40+
#define BT_HCI_UART_NO_DEFAULT CONFIG_BT_HCI_UART_NO
41+
#else
42+
#define BT_HCI_UART_NO_DEFAULT 1
43+
#endif /* BT_HCI_UART_NO_DEFAULT */
44+
45+
#ifdef CONFIG_BT_HCI_UART_BAUDRATE
46+
#define BT_HCI_UART_BAUDRATE_DEFAULT CONFIG_BT_HCI_UART_BAUDRATE
47+
#else
48+
#define BT_HCI_UART_BAUDRATE_DEFAULT 921600
49+
#endif /* BT_HCI_UART_BAUDRATE_DEFAULT */
50+
51+
#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() { \
52+
.hci_uart_no = BT_HCI_UART_NO_DEFAULT,\
53+
.hci_uart_baudrate = BT_HCI_UART_BAUDRATE_DEFAULT,\
54+
};
55+
#else
56+
#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() {0}; _Static_assert(0, "please enable bluetooth in menuconfig to use bt.h");
57+
#endif
58+
2659
/**
2760
* @brief Bluetooth mode for controller enable/disable
2861
*/
@@ -45,10 +78,11 @@ typedef enum {
4578

4679
/**
4780
* @brief Initialize BT controller to allocate task and other resource.
48-
*
81+
* @param cfg: Initial configuration of BT controller.
4982
* This function should be called only once, before any other BT functions are called.
83+
* @return ESP_OK - success, other - failed
5084
*/
51-
void esp_bt_controller_init(void);
85+
esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg);
5286

5387
/**
5488
* @brief De-initialize BT controller to free resource and delete task.

tools/sdk/include/config/sdkconfig.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#define CONFIG_LOG_DEFAULT_LEVEL_ERROR 1
4747
#define CONFIG_MBEDTLS_MPI_USE_INTERRUPT 1
4848
#define CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE 1
49+
#define CONFIG_BTDM_CONTROLLER_RUN_CPU 0
4950
#define CONFIG_FATFS_CODEPAGE_850 1
5051
#define CONFIG_TASK_WDT 1
5152
#define CONFIG_MAIN_TASK_STACK_SIZE 4096
@@ -74,7 +75,7 @@
7475
#define CONFIG_FLASHMODE_QIO 1
7576
#define CONFIG_ESPTOOLPY_FLASHFREQ_80M 1
7677
#define CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE 2048
77-
#define CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY 0
78+
#define CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY 1000
7879
#define CONFIG_PHY_DATA_OFFSET 0xf000
7980
#define CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET 0x10000
8081
#define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM 32
@@ -110,6 +111,7 @@
110111
#define CONFIG_ESPTOOLPY_BAUD_921600B 1
111112
#define CONFIG_APP_OFFSET 0x10000
112113
#define CONFIG_MEMMAP_SMP 1
114+
#define CONFIG_SPI_FLASH_ROM_DRIVER_PATCH 1
113115
#define CONFIG_LWIP_SO_RCVBUF 1
114116
#define CONFIG_MBEDTLS_HARDWARE_MPI 1
115117
#define CONFIG_MONITOR_BAUD_OTHER_VAL 115200

tools/sdk/include/driver/driver/rmt.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ esp_err_t rmt_set_pin(rmt_channel_t channel, rmt_mode_t mode, gpio_num_t gpio_nu
564564
* - ESP_ERR_INVALID_ARG Parameter error
565565
* - ESP_OK Success
566566
*/
567-
esp_err_t rmt_config(rmt_config_t* rmt_param);
567+
esp_err_t rmt_config(const rmt_config_t* rmt_param);
568568

569569
/**
570570
* @brief register RMT interrupt handler, the handler is an ISR.
@@ -612,7 +612,7 @@ esp_err_t rmt_isr_deregister(rmt_isr_handle_t handle);
612612
* - ESP_ERR_INVALID_ARG Parameter error
613613
* - ESP_OK Success
614614
*/
615-
esp_err_t rmt_fill_tx_items(rmt_channel_t channel, rmt_item32_t* item, uint16_t item_num, uint16_t mem_offset);
615+
esp_err_t rmt_fill_tx_items(rmt_channel_t channel, const rmt_item32_t* item, uint16_t item_num, uint16_t mem_offset);
616616

617617
/**
618618
* @brief Initialize RMT driver
@@ -670,7 +670,7 @@ esp_err_t rmt_driver_uninstall(rmt_channel_t channel);
670670
* - ESP_ERR_INVALID_ARG Parameter error
671671
* - ESP_OK Success
672672
*/
673-
esp_err_t rmt_write_items(rmt_channel_t channel, rmt_item32_t* rmt_item, int item_num, bool wait_tx_done);
673+
esp_err_t rmt_write_items(rmt_channel_t channel, const rmt_item32_t* rmt_item, int item_num, bool wait_tx_done);
674674

675675
/**
676676
* @brief Wait RMT TX finished.

tools/sdk/include/esp32/esp_err.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ void _esp_error_check_failed(esp_err_t rc, const char *file, int line, const cha
6161
* Disabled if assertions are disabled.
6262
*/
6363
#ifdef NDEBUG
64-
#define ESP_ERROR_CHECK(x) do { (x); } while (0)
64+
#define ESP_ERROR_CHECK(x) do { \
65+
esp_err_t rc = (x); \
66+
(void) sizeof(rc); \
67+
} while(0);
6568
#else
6669
#define ESP_ERROR_CHECK(x) do { \
6770
esp_err_t rc = (x); \

tools/sdk/include/esp32/esp_panic.h

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ esp_err_t esp_set_watchpoint(int no, void *adr, int size, int flags);
6161
void esp_clear_watchpoint(int no);
6262

6363

64+
/**
65+
* @brief Stops panic WDT
66+
*/
67+
void esp_panic_wdt_stop(void);
68+
6469
#endif
6570

6671
#ifdef __cplusplus

tools/sdk/include/esp32/esp_task.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
/* Bt contoller Task */
3535
/* controller */
36-
#define ESP_TASK_BT_CONTROLLER_PRIO (ESP_TASK_PRIO_MAX - 1)
36+
#define ESP_TASK_BT_CONTROLLER_PRIO (ESP_TASK_PRIO_MAX - 2)
3737
#ifdef CONFIG_NEWLIB_NANO_FORMAT
3838
#define BT_TASK_EXTRA_STACK_SIZE (0)
3939
#else

tools/sdk/include/esp32/rom/rtc.h

+3
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@ extern "C" {
6161
* RTC_CNTL_STORE7_REG FAST_RTC_MEMORY_CRC
6262
*************************************************************************************
6363
*/
64+
6465
#define RTC_BOOT_TIME_LOW_REG RTC_CNTL_STORE2_REG
6566
#define RTC_BOOT_TIME_HIGH_REG RTC_CNTL_STORE3_REG
67+
#define RTC_XTAL_FREQ_REG RTC_CNTL_STORE4_REG
68+
#define RTC_APB_FREQ_REG RTC_CNTL_STORE5_REG
6669
#define RTC_ENTRY_ADDR_REG RTC_CNTL_STORE6_REG
6770
#define RTC_MEMORY_CRC_REG RTC_CNTL_STORE7_REG
6871

0 commit comments

Comments
 (0)