Skip to content

Commit 7d45d21

Browse files
me-no-devRaienryu97
authored andcommitted
Update IDF libs to 969f1bb (skip BT commits)
This update also increases BT stack size and enables reboot on exception
1 parent e939638 commit 7d45d21

Some content is hidden

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

60 files changed

+947
-13
lines changed

tools/sdk/bin/bootloader.bin

-704 Bytes
Binary file not shown.

tools/sdk/bin/bootloader_qio.bin

-704 Bytes
Binary file not shown.

tools/sdk/include/app_trace/esp_ota_ops.h

+6
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ esp_err_t esp_ota_set_boot_partition(const esp_partition_t* partition);
129129
* If esp_ota_set_boot_partition() has not been called, the result is
130130
* equivalent to esp_ota_get_running_partition().
131131
*
132+
* Note that there is no guarantee the returned partition is a valid app. Use esp_image_load(ESP_IMAGE_VERIFY, ...) to verify if the
133+
* partition contains a bootable image.
134+
*
132135
* @return Pointer to info for partition structure, or NULL if no partition is found or flash read operation failed. Returned pointer is valid for the lifetime of the application.
133136
*/
134137
const esp_partition_t* esp_ota_get_boot_partition(void);
@@ -142,6 +145,9 @@ const esp_partition_t* esp_ota_get_boot_partition(void);
142145
* esp_ota_set_boot_partition(). Only the app whose code is currently
143146
* running will have its partition information returned.
144147
*
148+
* The partition returned by this function may also differ from esp_ota_get_boot_partition() if the configured boot
149+
* partition is somehow invalid, and the bootloader fell back to a different app partition at boot.
150+
*
145151
* @return Pointer to info for partition structure, or NULL if no partition is found or flash read operation failed. Returned pointer is valid for the lifetime of the application.
146152
*/
147153
const esp_partition_t* esp_ota_get_running_partition(void);

tools/sdk/include/app_update/esp_ota_ops.h

+6
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ esp_err_t esp_ota_set_boot_partition(const esp_partition_t* partition);
129129
* If esp_ota_set_boot_partition() has not been called, the result is
130130
* equivalent to esp_ota_get_running_partition().
131131
*
132+
* Note that there is no guarantee the returned partition is a valid app. Use esp_image_load(ESP_IMAGE_VERIFY, ...) to verify if the
133+
* partition contains a bootable image.
134+
*
132135
* @return Pointer to info for partition structure, or NULL if no partition is found or flash read operation failed. Returned pointer is valid for the lifetime of the application.
133136
*/
134137
const esp_partition_t* esp_ota_get_boot_partition(void);
@@ -142,6 +145,9 @@ const esp_partition_t* esp_ota_get_boot_partition(void);
142145
* esp_ota_set_boot_partition(). Only the app whose code is currently
143146
* running will have its partition information returned.
144147
*
148+
* The partition returned by this function may also differ from esp_ota_get_boot_partition() if the configured boot
149+
* partition is somehow invalid, and the bootloader fell back to a different app partition at boot.
150+
*
145151
* @return Pointer to info for partition structure, or NULL if no partition is found or flash read operation failed. Returned pointer is valid for the lifetime of the application.
146152
*/
147153
const esp_partition_t* esp_ota_get_running_partition(void);

tools/sdk/include/bootloader_support/esp_flash_partitions.h

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
/* Pre-partition table fixed flash offsets */
2222
#define ESP_BOOTLOADER_DIGEST_OFFSET 0x0
2323
#define ESP_BOOTLOADER_OFFSET 0x1000 /* Offset of bootloader image. Has matching value in bootloader KConfig.projbuild file. */
24+
#define ESP_BOOTLOADER_SIZE (ESP_PARTITION_TABLE_OFFSET - ESP_BOOTLOADER_OFFSET)
2425
#define ESP_PARTITION_TABLE_OFFSET 0x8000 /* Offset of partition table. Has matching value in partition_table Kconfig.projbuild file. */
2526

2627
#define ESP_PARTITION_TABLE_MAX_LEN 0xC00 /* Maximum length of partition table data */

tools/sdk/include/bootloader_support/esp_image_format.h

-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ esp_err_t esp_image_load(esp_image_load_mode_t mode, const esp_partition_pos_t *
142142
*/
143143
esp_err_t esp_image_verify_bootloader(uint32_t *length);
144144

145-
146145
typedef struct {
147146
uint32_t drom_addr;
148147
uint32_t drom_load_addr;

tools/sdk/include/config/sdkconfig.h

+9-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define CONFIG_SW_COEXIST_ENABLE 1
1616
#define CONFIG_ESPTOOLPY_FLASHSIZE_4MB 1
1717
#define CONFIG_IPC_TASK_STACK_SIZE 1024
18-
#define CONFIG_ESPTOOLPY_FLASHFREQ "80m"
18+
#define CONFIG_ESPTOOLPY_FLASHFREQ "40m"
1919
#define CONFIG_NEWLIB_STDOUT_ADDCR 1
2020
#define CONFIG_UDP_RECVMBOX_SIZE 6
2121
#define CONFIG_TASK_WDT_CHECK_IDLE_TASK 1
@@ -26,9 +26,11 @@
2626
#define CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE 1
2727
#define CONFIG_INT_WDT 1
2828
#define CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL 1
29+
#define CONFIG_ESPTOOLPY_FLASHFREQ_40M 1
2930
#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1
3031
#define CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM 10
3132
#define CONFIG_BT_RESERVE_DRAM 0x10000
33+
#define CONFIG_ESP32_PANIC_PRINT_REBOOT 1
3234
#define CONFIG_CONSOLE_UART_BAUDRATE 115200
3335
#define CONFIG_LWIP_MAX_SOCKETS 10
3436
#define CONFIG_EMAC_TASK_PRIORITY 20
@@ -38,13 +40,15 @@
3840
#define CONFIG_ULP_COPROC_RESERVE_MEM 512
3941
#define CONFIG_ESPTOOLPY_BAUD 921600
4042
#define CONFIG_INT_WDT_CHECK_CPU1 1
43+
#define CONFIG_FLASHMODE_DIO 1
4144
#define CONFIG_ESPTOOLPY_AFTER_RESET 1
4245
#define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED 1
4346
#define CONFIG_TOOLPREFIX "xtensa-esp32-elf-"
4447
#define CONFIG_FREERTOS_IDLE_TASK_STACKSIZE 1024
4548
#define CONFIG_FATFS_LFN_STACK 1
4649
#define CONFIG_ESP32_WIFI_AMPDU_ENABLED 1
4750
#define CONFIG_CONSOLE_UART_NUM 0
51+
#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE 1
4852
#define CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC 1
4953
#define CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX 0
5054
#define CONFIG_TCP_OVERSIZE_MSS 1
@@ -63,13 +67,12 @@
6367
#define CONFIG_MAIN_TASK_STACK_SIZE 4096
6468
#define CONFIG_TASK_WDT_TIMEOUT_S 5
6569
#define CONFIG_INT_WDT_TIMEOUT_MS 300
66-
#define CONFIG_ESPTOOLPY_FLASHMODE "dout"
67-
#define CONFIG_BTC_TASK_STACK_SIZE 2048
70+
#define CONFIG_ESPTOOLPY_FLASHMODE "dio"
71+
#define CONFIG_BTC_TASK_STACK_SIZE 8192
6872
#define CONFIG_BLUEDROID_ENABLED 1
6973
#define CONFIG_ESPTOOLPY_BEFORE "default_reset"
7074
#define CONFIG_LOG_DEFAULT_LEVEL 1
7175
#define CONFIG_TIMER_QUEUE_LENGTH 10
72-
#define CONFIG_FLASHMODE_DOUT 1
7376
#define CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM 0
7477
#define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER 20
7578
#define CONFIG_ESP32_RTC_CLK_CAL_CYCLES 1024
@@ -87,7 +90,6 @@
8790
#define CONFIG_PARTITION_TABLE_SINGLE_APP 1
8891
#define CONFIG_ESP32_WIFI_RX_BA_WIN 6
8992
#define CONFIG_WIFI_ENABLED 1
90-
#define CONFIG_ESPTOOLPY_FLASHFREQ_80M 1
9193
#define CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE 2048
9294
#define CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY 2000
9395
#define CONFIG_BROWNOUT_DET_LVL 0
@@ -113,6 +115,7 @@
113115
#define CONFIG_ESPTOOLPY_AFTER "hard_reset"
114116
#define CONFIG_LWIP_SO_REUSE 1
115117
#define CONFIG_DMA_TX_BUF_NUM 10
118+
#define CONFIG_WL_SECTOR_SIZE 4096
116119
#define CONFIG_TIMER_TASK_PRIORITY 1
117120
#define CONFIG_BT_ENABLED 1
118121
#define CONFIG_MONITOR_BAUD 115200
@@ -126,6 +129,7 @@
126129
#define CONFIG_CLASSIC_BT_ENABLED 1
127130
#define CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK 1
128131
#define CONFIG_OPENSSL_ASSERT_DO_NOTHING 1
132+
#define CONFIG_WL_SECTOR_SIZE_4096 1
129133
#define CONFIG_OPTIMIZATION_LEVEL_DEBUG 1
130134
#define CONFIG_SYSTEM_EVENT_QUEUE_SIZE 32
131135
#define CONFIG_BT_ACL_CONNECTIONS 4
@@ -138,5 +142,4 @@
138142
#define CONFIG_LWIP_SO_RCVBUF 1
139143
#define CONFIG_MONITOR_BAUD_OTHER_VAL 115200
140144
#define CONFIG_ESPTOOLPY_PORT "/dev/cu.usbserial-DO00EAB0"
141-
#define CONFIG_ESP32_PANIC_PRINT_HALT 1
142145
#define CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR 1

tools/sdk/include/driver/driver/gpio.h

+31
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,14 @@ typedef enum {
219219
GPIO_FLOATING, /*!< Pad floating */
220220
} gpio_pull_mode_t;
221221

222+
typedef enum {
223+
GPIO_DRIVE_CAP_0 = 0, /*!< Pad drive capability: weak */
224+
GPIO_DRIVE_CAP_1 = 1, /*!< Pad drive capability: stronger */
225+
GPIO_DRIVE_CAP_2 = 2, /*!< Pad drive capability: default value */
226+
GPIO_DRIVE_CAP_DEFAULT = 2, /*!< Pad drive capability: default value */
227+
GPIO_DRIVE_CAP_3 = 3, /*!< Pad drive capability: strongest */
228+
GPIO_DRIVE_CAP_MAX,
229+
} gpio_drive_cap_t;
222230

223231
typedef void (*gpio_isr_t)(void*);
224232
typedef intr_handle_t gpio_isr_handle_t;
@@ -481,6 +489,29 @@ esp_err_t gpio_isr_handler_add(gpio_num_t gpio_num, gpio_isr_t isr_handler, void
481489
*/
482490
esp_err_t gpio_isr_handler_remove(gpio_num_t gpio_num);
483491

492+
/**
493+
* @brief Set GPIO pad drive capability
494+
*
495+
* @param gpio_num GPIO number, only support output GPIOs
496+
* @param strength Drive capability of the pad
497+
*
498+
* @return
499+
* - ESP_OK Success
500+
* - ESP_ERR_INVALID_ARG Parameter error
501+
*/
502+
esp_err_t gpio_set_drive_capability(gpio_num_t gpio_num, gpio_drive_cap_t strength);
503+
504+
/**
505+
* @brief Get GPIO pad drive capability
506+
*
507+
* @param gpio_num GPIO number, only support output GPIOs
508+
* @param strength Pointer to accept drive capability of the pad
509+
*
510+
* @return
511+
* - ESP_OK Success
512+
* - ESP_ERR_INVALID_ARG Parameter error
513+
*/
514+
esp_err_t gpio_get_drive_capability(gpio_num_t gpio_num, gpio_drive_cap_t* strength);
484515

485516
#ifdef __cplusplus
486517
}

tools/sdk/include/driver/driver/rtc_io.h

+25
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ typedef struct {
4040
uint32_t slpie; /*!< Mask of input enable in sleep mode */
4141
uint32_t hold; /*!< Mask of hold enable */
4242
uint32_t hold_force;/*!< Mask of hold_force bit for RTC IO in RTC_CNTL_HOLD_FORCE_REG */
43+
uint32_t drv_v; /*!< Mask of drive capability */
44+
uint32_t drv_s; /*!< Offset of drive capability */
4345
int rtc_num; /*!< RTC IO number, or -1 if not an RTC GPIO */
4446
} rtc_gpio_desc_t;
4547

@@ -232,6 +234,29 @@ esp_err_t rtc_gpio_hold_dis(gpio_num_t gpio_num);
232234
*/
233235
void rtc_gpio_force_hold_dis_all();
234236

237+
/**
238+
* @brief Set RTC GPIO pad drive capability
239+
*
240+
* @param gpio_num GPIO number, only support output GPIOs
241+
* @param strength Drive capability of the pad
242+
*
243+
* @return
244+
* - ESP_OK Success
245+
* - ESP_ERR_INVALID_ARG Parameter error
246+
*/
247+
esp_err_t rtc_gpio_set_drive_capability(gpio_num_t gpio_num, gpio_drive_cap_t strength);
248+
249+
/**
250+
* @brief Get RTC GPIO pad drive capability
251+
*
252+
* @param gpio_num GPIO number, only support output GPIOs
253+
* @param strength Pointer to accept drive capability of the pad
254+
*
255+
* @return
256+
* - ESP_OK Success
257+
* - ESP_ERR_INVALID_ARG Parameter error
258+
*/
259+
esp_err_t rtc_gpio_get_drive_capability(gpio_num_t gpio_num, gpio_drive_cap_t* strength);
235260

236261
#ifdef __cplusplus
237262
}

tools/sdk/include/driver/driver/sdmmc_host.h

+4
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,17 @@ esp_err_t sdmmc_host_set_card_clk(int slot, uint32_t freq_khz);
142142
* can call sdmmc_host_do_transaction as long as other sdmmc_host_*
143143
* functions are not called.
144144
*
145+
* @attention Data buffer passed in cmdinfo->data must be in DMA capable memory
146+
*
145147
* @param slot slot number (SDMMC_HOST_SLOT_0 or SDMMC_HOST_SLOT_1)
146148
* @param cmdinfo pointer to structure describing command and data to transfer
147149
* @return
148150
* - ESP_OK on success
149151
* - ESP_ERR_TIMEOUT if response or data transfer has timed out
150152
* - ESP_ERR_INVALID_CRC if response or data transfer CRC check has failed
151153
* - ESP_ERR_INVALID_RESPONSE if the card has sent an invalid response
154+
* - ESP_ERR_INVALID_SIZE if the size of data transfer is not valid in SD protocol
155+
* - ESP_ERR_INVALID_ARG if the data buffer is not in DMA capable memory
152156
*/
153157
esp_err_t sdmmc_host_do_transaction(int slot, sdmmc_command_t* cmdinfo);
154158

tools/sdk/include/esp32/esp_wifi.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
#include "sdkconfig.h"
6666
#include "esp_err.h"
6767
#include "esp_wifi_types.h"
68+
#include "esp_wifi_crypto_types.h"
6869
#include "esp_event.h"
6970

7071
#ifdef __cplusplus
@@ -96,6 +97,7 @@ extern "C" {
9697
*/
9798
typedef struct {
9899
system_event_handler_t event_handler; /**< WiFi event handler */
100+
wpa_crypto_funcs_t wpa_crypto_funcs; /**< WiFi station crypto functions when connect */
99101
int static_rx_buf_num; /**< WiFi static RX buffer number */
100102
int dynamic_rx_buf_num; /**< WiFi dynamic RX buffer number */
101103
int tx_buf_type; /**< WiFi TX buffer type */
@@ -138,11 +140,14 @@ typedef struct {
138140
#else
139141
#define WIFI_NANO_FORMAT_ENABLED 0
140142
#endif
141-
143+
144+
extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
145+
142146
#define WIFI_INIT_CONFIG_MAGIC 0x1F2F3F4F
143147
#ifdef CONFIG_WIFI_ENABLED
144148
#define WIFI_INIT_CONFIG_DEFAULT() { \
145149
.event_handler = &esp_event_send, \
150+
.wpa_crypto_funcs = g_wifi_default_wpa_crypto_funcs, \
146151
.static_rx_buf_num = CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM,\
147152
.dynamic_rx_buf_num = CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM,\
148153
.tx_buf_type = CONFIG_ESP32_WIFI_TX_BUFFER_TYPE,\

0 commit comments

Comments
 (0)