Compare commits

...

2611 Commits

Author SHA1 Message Date
ac5d805d0e versions: Update version to 4.4.5 2023-06-08 10:16:36 +08:00
fd5e03b221 Merge branch 'bugfix/fix_some_esp32c3_s3_ble_bugs_230422_4.4' into 'release/v4.4'
Fixed some ESP32C3/S3 BLE bugs 23-04-22(backport v4.4)

See merge request espressif/esp-idf!23354
2023-05-26 11:15:27 +08:00
1c2e8f41f3 fix blufi doc error 2023-05-25 10:46:12 +00:00
c76c6508a1 Fixed battery profile wrong condition 2023-05-25 10:46:12 +00:00
zwj
ecc2cc1be0 Fixed no error report when own address type is rpa_random and no random address setting 2023-05-25 10:46:12 +00:00
31166e0884 Update bt lib for ESP32-C3 and ESP32-S3
- Fixed remote mic error during encryption procedure
2023-05-25 10:46:12 +00:00
1ddc3a1d5c Update bt lib for ESP32-C3 and ESP32-S3
- Fixed ble hopping selection for connection when disabled 5.0 feature
2023-05-25 10:46:12 +00:00
f886e3c057 Disable controller 5.0 feature bits if host 5.0 feature is not enabled 2023-05-25 10:46:12 +00:00
zwj
509fedeed0 improve scan performance when scan and sync coexist on ESP32-C3 and ESP32-S3 2023-05-25 10:46:12 +00:00
bd77f3d436 Update bt lib for ESP32-C3 and ESP32-S3
- Fixed non-connectable and non-scannable directed adv can't be scanned
2023-05-25 10:46:12 +00:00
c25d92074e Merge branch 'bugfix/update_test_dl_esp_cert_v4.4' into 'release/v4.4'
tests: update Root certificate for the test endpoints (v4.4)

See merge request espressif/esp-idf!23799
2023-05-18 19:32:43 +08:00
1071b13c9e Merge branch 'bugfix/fix_iphone_disconnects_immediately_after_connecting_when_BLE_wifi_coexist_v4.4' into 'release/v4.4'
Fix the bug that the iPhone disconnects immediately after connecting when BLE and wifi coexist (backport v4.4)

See merge request espressif/esp-idf!23802
2023-05-18 15:18:09 +08:00
239d74be65 Fix the bug that the iPhone disconnects immediately after connecting when BLE and wifi coexist 2023-05-17 18:05:49 +08:00
1d61e300ac tests: update Root certificate for the test endpoints
Use Root certificate (`DigiCert Global Root G2`) for the
`dl.espressif.com` and `espressif.com` test endpoints.

This fixes the test failure introduced due to renewal of
the intermediate certificate.
2023-05-17 15:28:46 +05:30
7641c8ef4f Merge branch 'bugfix/constraint_urllib3_v44' into 'release/v4.4'
requirements: Pin urllib3 to <2

See merge request espressif/esp-idf!23608
2023-05-07 00:40:21 +08:00
743d6a12c4 requirements: Pin urllib3 to <2 2023-05-05 13:17:12 +02:00
3cec3a0026 Merge branch 'bugfix/fix_some_wifi_bugs_230420_v4.4' into 'release/v4.4'
esp_wifi: fix some wifi bugs 230420(Backport v4.4)

See merge request espressif/esp-idf!23300
2023-04-21 11:53:42 +08:00
9516e80f61 Merge branch 'bugfix/wakeup_io_hold_unhold_in_sleep_v4.4' into 'release/v4.4'
gpio: Fix deep sleep wakeup IOs unable to unhold after wakeup (v4.4)

See merge request espressif/esp-idf!22670
2023-04-21 10:51:05 +08:00
2951d6e2f7 Merge branch 'bugfix/mdns_no_task_notifiers' into 'release/v4.4'
mdns: use semaphore instead of task notification bits (v4.4)

See merge request espressif/esp-idf!22920
2023-04-21 09:32:10 +08:00
f31b5c3bd2 Merge branch 'bugfix/fix_some_ble_bug_v4.4' into 'release/v4.4'
Fixed some BLE bugs (backport v4.4)

See merge request espressif/esp-idf!23301
2023-04-21 02:00:20 +08:00
62a9966181 Merge branch 'bugfix/block9_can_not_be_used_for_fe_v4.4' into 'release/v4.4'
efuse: Prevent burning XTS_AES and ECDSA keys into BLOCK9 (BLOCK_KEY5) (v4.4)

See merge request espressif/esp-idf!23292
2023-04-20 23:03:51 +08:00
3f08fd4400 Merge branch 'contrib/github_pr_11163_v4.4' into 'release/v4.4'
Make custom bootloader message match actual output (GitHub PR) (v4.4)

See merge request espressif/esp-idf!23140
2023-04-20 19:45:06 +08:00
4232e24b0f Merge branch 'bugfix/adds_iram_attr_for_some_esp_timer_apis_v4.4' into 'release/v4.4'
esp_timer: Adds IRAM_ATTR for esp_timer_restart and esp_timer_is_active (v4.4)

See merge request espressif/esp-idf!23308
2023-04-20 19:41:39 +08:00
39afb1eb1f Merge branch 'contrib/github_pr_7754_v4.0' into 'release/v4.4'
Fix infinite recursion in FLAG_ATTR operator (GitHub PR) (backport v4.4)

See merge request espressif/esp-idf!23235
2023-04-20 19:37:13 +08:00
8f3f635e8c bluedroid: report status after clearing the BLE white list 2023-04-20 15:59:07 +08:00
908c5e1fd2 bluedroid: fix GATTC cache address save 2023-04-20 15:59:07 +08:00
e2a307bd8f bluedroid: fix adv and scan state conflict 2023-04-20 15:59:07 +08:00
814bcf4021 bluedroid: support get bluetooth device name 2023-04-20 15:59:07 +08:00
e34f0638c8 Merge branch 'bugfix/fix_deep_sleep_crash_when_psram_high_freq_4.4' into 'release/v4.4'
mspi: turn down freq to fix crash when sleep (v4.4)

See merge request espressif/esp-idf!22750
2023-04-20 14:54:46 +08:00
745cac7a04 esp_timer: Adds IRAM_ATTR for esp_timer_restart and esp_timer_is_active
Closes https://github.com/espressif/esp-idf/issues/10522
Closes https://github.com/espressif/esp-idf/issues/10859
2023-04-20 14:53:38 +08:00
363c21891c esptool: Update esptool
Prevent burning XTS_AES and ECDSA keys into BLOCK9 (BLOCK_KEY5)
2023-04-20 13:58:51 +08:00
9e6e5ba0ef docs: add a note regarding EFuse Block9 key purpose quirk for some chips 2023-04-20 13:58:51 +08:00
89d11be4a9 efuse: Prevent burning XTS_AES and ECDSA keys into BLOCK9 (BLOCK_KEY5)
eFuse module has a hardware bug.
It is related to ESP32-C3, C6, S3, H2 chips:
    - BLOCK9 (BLOCK_KEY5) can not be used by XTS_AES keys.
For H2 chips, the BLOCK9 (BLOCK_KEY5) can not be used by ECDSA keys.
S2 does not have such a hardware bug.
2023-04-20 13:58:51 +08:00
c49e8d3611 Merge branch 'bugfix/i2c_timing_wrong_v4.4' into 'release/v4.4'
i2c: fix a bug in sda sample timing (backport v4.4)

See merge request espressif/esp-idf!23227
2023-04-20 13:11:18 +08:00
bd9c48acdb esp_wifi: fix some wifi bugs 230420
1. fix softap qos null issue
2. fix set inactive time crash issue
2023-04-20 11:26:05 +08:00
2dc6c95859 Merge branch 'bugfix/usb_serial_driver_block_v4.4' into 'release/v4.4'
usb_serial_jtag: Fix bug of blocking TX xfer when using driver (backport v4.4)

See merge request espressif/esp-idf!22831
2023-04-20 11:01:01 +08:00
2b4797703f Merge branch 'bugfix/spi_lcd_max_trans_size_v4.4' into 'release/v4.4'
spi_lcd: maximum transfer size should respect bus configuration (v4.4)

See merge request espressif/esp-idf!23231
2023-04-20 10:28:21 +08:00
6f4799a49b Merge branch 'feature/support_ble_write_and_notify_throughput_test_at_the_same_time_v4.4' into 'release/v4.4'
support ble notify and write throughput test at the same time(backport v4.4)

See merge request espressif/esp-idf!23234
2023-04-19 21:10:53 +08:00
5999775329 Merge branch 'bugfix/softap_beacon_process_v4.4' into 'release/v4.4'
esp_wifi: validate softAP interface when sending beacon and add sta_connected callback (Backport v4.4)

See merge request espressif/esp-idf!23255
2023-04-19 20:19:52 +08:00
f87bdd4a9f Merge branch 'bugfix/fixed_sdmmc_high_speed_ddr_timing_issue_on_esp32s3_v4.4' into 'release/v4.4'
sdmmc: fixed incorrect clock phase settings on esp32s3 (v4.4)

See merge request espressif/esp-idf!23261
2023-04-19 17:42:45 +08:00
34475c13cb Merge branch 'feature/add_menuconfig_of_calibration_mode_v4.4' into 'release/v4.4'
Feature/add menuconfig of calibration mode v4.4(Backport v4.4)

See merge request espressif/esp-idf!23262
2023-04-19 17:02:56 +08:00
749a07bdce Merge branch 'fix/esp32s3_ununsed_dcache_as_dram_v4.4' into 'release/v4.4'
esp_hw_support: Update the memory ptr location/property checks to include the unused DCACHE added to DRAM (v4.4)

See merge request espressif/esp-idf!23269
2023-04-19 16:38:13 +08:00
9baec826ac esp_wifi: fix some wifi bugs
1. Move wpa_supplicant WIFI_EVENT_STA_CONNECTED and WIFI_EVENT_STA_DISCONNECTED event handlers into callbacks
2. Validate softAP interface when sending beacon frame
2023-04-19 12:13:52 +05:30
aac8bc9a71 soc/esp32s3: Fix the SOC_MEM_INTERNAL_HIGH value
- As per the memory block diagram for ESP32-S3, the
  internal memory address ranges as follows:
  DRAM: 0x3FC88000 (== SOC_MEM_INTERNAL_LOW) <-> 0x3FCF0000
  IRAM: 0x40378000 <-> 0x403E0000 (== SOC_MEM_INTERNAL_HIGH)
2023-04-19 10:35:58 +05:30
a2580b3f36 esp_hw_support: Update memory ptr location/property checks
- to acknowledge the unused DCACHE added to DRAM for ESP32-S3

- For ESP32-S3, when the DCACHE size is set to 16 kB, the unused 48 kB is added to
  the heap in 2 blocks of 32 kB (from 0x3FCF0000) and 16 kB (from 0x3C000000).
- But, if we try allocating memory from the 16 kB block and run an `esp_ptr_internal`
  check on that memory pointer, it fails as the address block from 0x3C000000
  corresponds to the external memory symbols SOC_DROM_LOW and SOC_EXTRAM_DATA_LOW.
  (E.g. freertos - If the IDLE task stack buffer gets allocated from this region,
  the firmware will abort due to this failure).
- Thus, the checks `esp_ptr_internal`, `esp_ptr_in_drom` and `esp_ptr_byte_accessible`
  have been updated to acknowledge this memory as a part of the DRAM.

Co-authored-by: Mahavir Jain <mahavir@espressif.com>
2023-04-19 10:35:57 +05:30
0426873a43 esp_phy: add menuconfig of phy calibration mode 2023-04-18 20:18:42 +08:00
b91d25e575 disable reduce PHY TX power when brownout reset 2023-04-18 20:17:20 +08:00
fb6d9cd741 sdmmc: I/O phase adjustments
1. Fix incorrect meaning of SDMMC.clock bits, synchronize the names
   with the TRM.
2. Choose input and output phases to satisfy typical timing
   requirements.
3. Move use_hold_reg setting into the host driver, since it is related
   to timing.

Closes https://github.com/espressif/esp-idf/issues/8521
Related to https://github.com/espressif/esp-idf/issues/8257
2023-04-18 20:07:32 +08:00
23f0e7385b spi_lcd: test spi lcd io can transfer color data to a fixed window region
also test the io tx_param and tx_color can skip the command phase
2023-04-18 13:38:56 +08:00
7225068256 spi_lcd: maximum transfer size should respect bus configuration
Also this commit added the SPI_TRANS_CS_KEEP_ACTIVE flag for io_tx_color
2023-04-18 10:36:39 +08:00
10f500ddfe bugfix (esp_common): remove infinite recursion in FLAG_ATTR operator
Closes https://github.com/espressif/esp-idf/pull/7754

Signed-off-by: Jakob Hasse <jakob.hasse@espressif.com>
2023-04-17 18:19:45 +08:00
51602a7f10 support ble notify and write throughput test at the same time 2023-04-17 17:48:24 +08:00
7eba5f8002 Merge branch 'bugfix/bt_diable_enbale_crash_v4.4' into 'release/v4.4'
bt:Fixed esp32 controller bug(v4.4)

See merge request espressif/esp-idf!23151
2023-04-17 16:16:23 +08:00
6022afc980 i2c: fix a bug in sda sample timing
* Closes https://github.com/espressif/esp-idf/issues/9777

This bug prevented SCL line to work properly after a NACK was received in master mode.
2023-04-17 16:03:34 +08:00
0e9c393d1b Merge branch 'bugfix/fix_systimer_stall_issue_in_lightsleep_v4.4' into 'release/v4.4'
esp_wifi: allow connectionless ps with mesh, fix failed to sleep after scan;...

See merge request espressif/esp-idf!23200
2023-04-17 15:32:31 +08:00
424ddb34af Merge branch 'bugfix/ble_mesh_fix_heartbeat_set_v4.4' into 'release/v4.4'
ble_mesh: stack: Update the heartbeat filter entry add/remove handling (v4.4)

See merge request espressif/esp-idf!23164
2023-04-14 19:14:47 +08:00
zwj
b69ec22cb9 Fixed duplicate scan refresh cycle is not accurate after restarting scan on ESP32 2023-04-14 12:10:38 +08:00
081b8ffb18 esp_wifi: allow connectionless ps with mesh, fix failed to sleep after scan; coex: fix esp32 wifi interrupted by ble act (d51ef5c0) 2023-04-14 12:00:51 +08:00
dce377bcfd rtc_sleep: workaround systimer stall issue during lightsleep on ESP32C3 2023-04-14 11:59:42 +08:00
e5a41d97a1 Merge branch 'bugfix/espnow_config_channel_v4.4' into 'release/v4.4'
esp_wifi: fix espnow example add peer fail when config channel(v4.4)

See merge request espressif/esp-idf!23178
2023-04-13 16:14:43 +08:00
89cede3895 esp_wifi: fix espnow example add peer fail when config channel
Closes https://github.com/espressif/esp-idf/issues/9592
2023-04-13 10:53:31 +08:00
7a7090a46a bt: added coex adapter operation to get version of coexist module to ESP32 Bluetooth Controller 2023-04-13 10:24:01 +08:00
ab48bfb5b7 ble_mesh: stack: Update the heartbeat filter entry add/remove handling 2023-04-12 15:03:07 +08:00
f9bfdd0b1e bt:Fixed esp32 controller bug
1. Fixed crash after controller disable and re-enable
2. Fixed the crash caused by processing the HCI_Read_Remote_Extented_Features command in the non-connected state
3. Fixed disconnection due to not handling lmp_unsniff_req in LC_WAIT_SNIFF_SUB_RSP state
4. Fixed crash caused by supervision timeout greater than sniff interval

Closes https://github.com/espressif/esp-idf/issues/11164
Closes https://github.com/espressif/esp-idf/issues/10835
2023-04-12 09:15:49 +08:00
7534dac3f8 Merge branch 'mesh/bugfix_fix_heap_corrupt_issue_v4.4' into 'release/v4.4'
esp_wifi: fix bugs in LR and mesh (backport v4.4)

See merge request espressif/esp-idf!23127
2023-04-11 21:18:56 +08:00
37ff6b2ac9 Update the ESP-NOW frame length in docs 2023-04-11 14:21:43 +08:00
fc7b5673f7 esp_wifi:
1. wifi_mesh: fix the heap corrupt issue in MTXON task
2. Update tx rate when phymode change from LR to 11N

https://github.com/espressif/esp-idf/issues/11006
2023-04-11 14:21:08 +08:00
e2a59b8bf4 Make custom bootloader message match actual output
Fixes the custom bootloader README.md so that the example output matches
what will actually be output by default in the custom bootloader.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2023-04-11 13:41:40 +08:00
8e559452d9 Merge branch 'bugfix/delete_node_during_list_traverse_4.4' into 'release/v4.4'
bugfix: Fixed the crash of LoadProhibited caused by invalid operation on list node in handling hci_hardware_error event (v4.4)

See merge request espressif/esp-idf!23118
2023-04-11 11:37:03 +08:00
43a38fc13e Merge branch 'bugfix/fix_some_wifi_bugs_230403_v4.4' into 'release/v4.4'
esp_wifi: fix some wifi bugs 230403(Backport v4.4)

See merge request espressif/esp-idf!23049
2023-04-10 20:35:22 +08:00
4b3ff10c5d esp_wifi: fix some wifi bugs 230403
1. fix sta auth failed but softap shows it connected issue
2. fix ftm procedure with peer failed status 4 issue
3. send ftm frames immediately
4. send null data when state change from association to run
5. docs: add some details for wifi scan description
2023-04-10 15:08:02 +08:00
b7ddd82ad6 Merge branch 'bugfix/nvs_save_for_new_config_v4.4' into 'release/v4.4'
esp_wifi: Add nvs code for new config params

See merge request espressif/esp-idf!23084
2023-04-10 14:39:05 +08:00
3a361bc62f fixed the crash of LoadProhibited caused by taht
the nodes are deleted during the traversal of the linked list
2023-04-08 11:30:35 +08:00
a9c36f277f Merge branch 'bugfix/fix_i2s_mono_stereo_test_failure_v4.4' into 'release/v4.4'
i2s: fixed I2S_mono_stereo_loopback_test (v4.4)

See merge request espressif/esp-idf!23093
2023-04-07 17:26:16 +08:00
e383d14cd0 Merge branch 'bugfix/himem_map_range_block_v4.4' into 'release/v4.4'
himem: fixed incorrect out_ptr when range_offset is given non-zero. (v4.4)

See merge request espressif/esp-idf!23082
2023-04-07 17:14:43 +08:00
d98b6c640f i2s: fixed I2S_mono_stereo_loopback_test (v4.4) 2023-04-07 11:17:07 +08:00
a6c7d78906 Merge branch 'feature/i80_lcd_allow_skip_command_phase_v4.4' into 'release/v4.4'
i80_lcd: allow skip command phase (v4.4)

See merge request espressif/esp-idf!23092
2023-04-06 19:09:54 +08:00
f373bea201 i80_lcd: support skip command phase
Closes https://github.com/espressif/esp-idf/issues/10794
2023-04-06 14:47:11 +08:00
173676ea8d Merge branch 'bugfix/psram_newlib_time_rom' into 'release/v4.4'
rom: fix newlib time ROM functions being regardless of CONFIG_SPIRAM_CACHE_WORKAROUND (v4.4)

See merge request espressif/esp-idf!23003
2023-04-06 11:24:36 +08:00
6f340bc902 esp_wifi: Add nvs code for new config params 2023-04-06 07:59:38 +05:30
4dca4bdc3e himem: Fixed incorrect out_ptr when calling esp_himem_map range_offset non-zero
Closes: https://github.com/espressif/esp-idf/issues/5639
2023-04-06 02:02:05 +08:00
599bc24483 Merge branch 'feature/update_mbedtls_v2.28.3' into 'release/v4.4'
mbedtls: Update to release v2.28.3 (v4.4)

See merge request espressif/esp-idf!23040
2023-04-04 15:18:58 +08:00
534ec69996 Merge branch 'bugfix/stop_dhcps_before_set_dns_4.4' into 'release/v4.4'
Fixed bug for stop dhcps before set dns for 4.4

See merge request espressif/esp-idf!23048
2023-04-04 13:50:12 +08:00
6852aaa07e Merge branch 'bugfix/lcd_spi_acquire_bus_v4.4' into 'release/v4.4'
spi_lcd: don't release bus if acquire failed (v4.4)

See merge request espressif/esp-idf!23038
2023-04-04 12:10:58 +08:00
d337d9dc0b Merge branch 'bugfix/fixed_incorrect_i2s_channel_format_v4.4' into 'release/v4.4'
i2s: fixed incorrect channel format on ESP32

See merge request espressif/esp-idf!22853
2023-04-04 12:10:37 +08:00
8df9bbd5f4 Merge branch 'bugfix/wifi_config_fixes_v4.4' into 'release/v4.4'
Add APIs to get Assoc id and negotiated phymode.(v4.4)

See merge request espressif/esp-idf!22972
2023-04-04 12:10:23 +08:00
c0efc25049 Merge branch 'bugfix/fix_hw_ralunderrun_assert_v4.4' into 'release/v4.4'
Fixed BLE HW RAL_UNDERRUN asser and backport some bug fix 23-03-30 (back port v4.4)

See merge request espressif/esp-idf!23004
2023-04-04 10:50:25 +08:00
73ca054b80 i2s: fixed incorrect channel format on ESP32
Closes: https://github.com/espressif/esp-idf/issues/9635
2023-04-04 10:00:05 +08:00
dc33626566 esp_wifi: Add APIs to get Assoc id and negotiated phymode. 2023-04-03 18:27:02 +05:30
2549b9fe36 Fixed bug for stop dhcps before set dns
Closes https://github.com/espressif/esp-idf/issues/10762
2023-04-03 20:12:56 +08:00
ea51ee1130 Merge branch 'feature/vfs_serial_fcntl_get_rd_wr_state_v4.4' into 'release/v4.4'
vfs: uart/cdcacm/usb_serial_jtag fcntl return read/write state(v4.4)

See merge request espressif/esp-idf!19335
2023-04-03 19:15:15 +08:00
617d935b44 mbedtls: Update to release v2.28.3
- Release Notes: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.3
2023-04-03 14:28:12 +05:30
1a6118193c spi_lcd: don't release bus if acquire failed
Closes https://github.com/espressif/esp-idf/issues/10952
2023-04-03 13:17:11 +08:00
4c7d97e2bd Merge branch 'bugfix/sta_sa_query_process_v4.4' into 'release/v4.4'
esp_wifi: Improve station SA query procedure handling and other bugfixes (Backport v4.4)

See merge request espressif/esp-idf!22901
2023-04-03 11:15:54 +08:00
9c38441916 Merge branch 'bugfix/fix_sc_send_failure_and_exit_issue_v4.4' into 'release/v4.4'
smartconfig: fix the issue of sending failure and exit (Backport v4.4)

See merge request espressif/esp-idf!23025
2023-04-03 11:05:02 +08:00
4b404115e8 Merge branch 'feature/fix_load_efuses_from_flash_when_real_fe_is_on_v4.4' into 'release/v4.4'
efuse(virtual mode): Fix load_efuses_from_flash when FE is on (v4.4)

See merge request espressif/esp-idf!22969
2023-03-31 20:13:27 +08:00
52b940bed5 esp_wifi: Improve station SA query procedure handling and other bugfixes
1. Disable SA query timers when station disconnect and other SA query related improvements
2. Send appropriate reason code in 4 way handshake failure
3. Send deauth while going from assoc state to init, if reason is assoc timeout
2023-03-31 16:26:15 +05:30
d52d1fc443 smartconfig: fix the issue of sending failure and exit 2023-03-31 17:26:05 +08:00
60c57ade1d Merge branch 'bugfix/tx_desc_fragment_v4.4' into 'release/v4.4'
esp_wifi: fix potential issue when tx fragment pkt(v4.4)

See merge request espressif/esp-idf!22961
2023-03-31 15:30:59 +08:00
df8c0f2191 Merge branch 'doc/update_doc_of_esp_bt_gap_set_cod_v4.4' into 'release/v4.4'
bt: Optimized the document for GAP API: esp_bt_gap_set_cod (v4.4)

See merge request espressif/esp-idf!22995
2023-03-31 13:59:45 +08:00
f67cb1d129 Merge branch 'bugfix/IDFGH-9552_v4.4' into 'release/v4.4'
NimBLE : Added configurable option for resolving peer address in bleprph example. (v4.4)

See merge request espressif/esp-idf!22992
2023-03-31 13:59:15 +08:00
fa3c3a8b46 Merge branch 'bugfix/update_wps_api_documentation_v4.4' into 'release/v4.4'
wpa_supplicant: Update WPS API documentation (v4.4)

See merge request espressif/esp-idf!23014
2023-03-31 13:58:42 +08:00
4531322dd9 Merge branch 'bugfix/improve_tx_robust_v4.4' into 'release/v4.4'
esp_wifi: improve tx robust for c3/s3(v4.4)

See merge request espressif/esp-idf!23009
2023-03-31 11:02:59 +08:00
5c642f98c7 wpa_supplicant: Update WPS API documentation 2023-03-30 20:05:06 +05:30
e0e4649c7e esp_wifi: improve tx robust for c3/s3 2023-03-30 21:48:53 +08:00
db3e673053 Fixed vulnerability attacks that could cause heap overflow in fragmented Blufi packet processing 2023-03-30 17:50:20 +08:00
zwj
0ab020fef0 Fixed BLE HW RAL_UNDERRUN assert on ESP32C3 and ESP32S3 2023-03-30 17:07:19 +08:00
zwj
bd8d473006 If it is not esp32 chips, hide the configuration item: BT_BLE_RPA_SUPPORTED 2023-03-30 17:00:56 +08:00
9acf0aaee1 rom: fix newlib time ROM functions being regardless of CONFIG_SPIRAM_CACHE_WORKAROUND
On ESP32 ROM functions are not compatible with CONFIG_SPIRAM_CACHE_WORKAROUND.
This were handled correctly in cmake, but not in make.
2023-03-30 16:19:38 +08:00
e7fd58d77a set BT_CTRL_BLE_MAX_ACT default value to 6 2023-03-30 16:14:18 +08:00
49691b6a9e Fixed ATT Ignore wrong response error 2023-03-30 16:13:32 +08:00
zwj
b475798ad6 - Support ESP32C3 and ESP32S3 new BLE lib
- Disable controller 5.0 feature bits if host 5.0 feature is not enabled
- Fixed extend ADV parameters check for ADV_DIRECT_HI
2023-03-30 16:10:42 +08:00
zwj
50163578bf Merge ESP32C3 and ESP32S3 BLE bt.c files to one 2023-03-30 15:54:37 +08:00
8daf85b32a Optimized the document for GAP API:
`esp_bt_gap_set_cod`
2023-03-30 14:17:17 +08:00
b594199917 NimBLE: Added configurable option for resolving peer address in bleprph example
Closes IDFGH-9552
2023-03-30 11:00:48 +05:30
647cc43f44 Merge branch 'bugfix/usb_host_enumeration_delay_v4.4' into 'release/v4.4'
USB Host: SetAddress recovery interval + menuconfig configuration (backport v4.4)

See merge request espressif/esp-idf!22703
2023-03-30 12:03:01 +08:00
3b54c90e0d Merge branch 'bugfix/IDFGH_9535_v4.4' into 'release/v4.4'
wifi_prov_mgr : Fixed return value of characteristic read operation in nimble (v4.4)

See merge request espressif/esp-idf!22673
2023-03-29 19:18:22 +08:00
81b59071fd gpio: Fix IO hold function related problems
1. Fix deep sleep wakeup IOs can not be unhold issue
2. Correct hold related APIs' description
3. Fix gpio_force_hold_all API

docs: Add GPIO wakeup source to sleep_modes doc for ESP32C3
2023-03-29 17:21:50 +08:00
ef648dfdf6 examples: system/deep_sleep
1. Fix EXT0 wakeup pin error on ESP32: GPIO3 is not a RTC IO, change to use GPIO25.
2. Add ESP_ERROR_CHECK to explicitly show the runtime error
3. Improve example README
2023-03-29 17:21:50 +08:00
5552c29b3e rtcio: Add a test case to test RTCIO's hold ability after deep sleep wakeup 2023-03-29 17:21:50 +08:00
b19d685406 efuse: Fix load_efuses_from_flash when FE is on
esp_efuse_utility_load_efuses_from_flash() read emul_efuse
as an encrypted partition, but that is not correct,
this partition was never encrypted.
Need to read it as not encrypted partition.

Fxed the case: If FE is already on then EFUSE VIRT mode can work with it.

Closes https://github.com/espressif/esp-idf/issues/10929
2023-03-29 16:18:54 +08:00
4fb8c6f220 Merge branch 'docs/ledc_datasheet_v4.4' into 'release/v4.4'
docs: update readme links to ledstrip datasheet (v4.4)

See merge request espressif/esp-idf!22959
2023-03-29 14:45:10 +08:00
9071843f2b docs: update readme links to ledstrip datasheet 2023-03-29 11:09:05 +08:00
d7de64691b esp_wifi: fix potential issue when tx fragment pkt 2023-03-29 11:08:35 +08:00
3c25ecb92e Merge branch 'feature/ble_mesh_console_stack_update_v4.4' into 'release/v4.4'
ble_mesh: stack: Miscellaneous fixes and updates(v4.4)

See merge request espressif/esp-idf!22924
2023-03-28 15:57:44 +08:00
lly
18a5b07607 ble_mesh: stack: Minor fix for provisioner provisioning timeout 2023-03-28 04:29:57 +00:00
6c55c9c800 ble_mesh: add BQB LOG 2023-03-28 04:29:57 +00:00
0ec64df258 ble_mesh: stack: forward rfu dst for the case NODE/RLY/BV-01 2023-03-28 04:29:57 +00:00
8f5c5a3972 ble_mesh: stack: add send transaction ack befor provisioner send prov failed msg 2023-03-28 04:29:57 +00:00
34841a97a5 ble_mesh: stack: for the case MESH/PVNR/PBADV/BV-01, add the close link reason before reset link 2023-03-28 04:29:57 +00:00
9b4ccdc911 Merge branch 'bugfix/increase_nmea_example_default_stack_v4.4' into 'release/v4.4'
uart: increase default stack size for nmea example (v4.4)

See merge request espressif/esp-idf!22916
2023-03-27 17:16:47 +08:00
e9e1f8e001 Merge branch 'docs/extra_component_dirs_v4.4' into 'release/v4.4'
docs: fixed EXTRA_COMPONENT_DIRS being mispelled as EXTRA_COMPONENTS_DIRS in build-system guide (v4.4)

See merge request espressif/esp-idf!22801
2023-03-27 17:02:58 +08:00
c707cdd344 Merge branch 'feature/ble_mesh_add_bqb_log_test_macro_v4.4' into 'release/v4.4'
ble_mesh: stack: Add macros for BQB test to enable some internal function or log (v4.4)

See merge request espressif/esp-idf!22923
2023-03-27 16:43:07 +08:00
dad6588e3d ble_mesh: stack: bug fix in bqb 2023-03-24 17:13:11 +08:00
1a412555cd ble_mesh: stack: add description of internal BQB Test 2023-03-24 17:12:57 +08:00
lly
4737b4865d ble_mesh: stack: Minor updates for BQB test log 2023-03-24 17:12:47 +08:00
14d90c4534 ble_mesh: stack: Add a BQB macro for BQB test to enable some internal function or log 2023-03-24 17:12:23 +08:00
0050fa940c components/mdns: use semaphore instead of task notification bits (IDFGH-9380)
Component should not alter the task notification bits of the calling task.
2023-03-24 09:03:35 +01:00
40a92dbfab uart: increase default stack size for nmea example
With the old value of 2048 bytes we are right on the stack border when running on S3.

Closes https://github.com/espressif/esp-idf/issues/11044
2023-03-24 12:21:33 +08:00
90d6e45d9f Merge branch 'mesh/bugfix_fix_bugs_for_mesh_network_v4.4' into 'release/v4.4'
wifi_mesh: fix bugs for mesh network (backport v4.4)

See merge request espressif/esp-idf!22899
2023-03-24 10:58:36 +08:00
2222ca49d6 Merge branch 'docs/update_link_to_esp_product_selector' into 'release/v4.4'
update link to ESP product selector

See merge request espressif/esp-idf!22890
2023-03-23 18:28:33 +08:00
42c73548a1 update link to ESP product selector 2023-03-23 18:28:32 +08:00
2a052f09f2 Merge branch 'bugfix/fix_uart_tx_done_hardware_concurrency_v4.4' into 'release/v4.4'
uart: Fix TX side concurrency issues (v4.4)

See merge request espressif/esp-idf!22596
2023-03-23 16:46:49 +08:00
b7ea6e44b2 vfs: uart/cdcacm/usb_serial_jtag fcntl return read/write state 2023-03-23 08:22:56 +00:00
794905b0e1 wifi_mesh: update mesh doc 2023-03-23 16:10:34 +08:00
b10a36d0e2 wifi_mesh: Fix several bugs on mesh network 2023-03-23 16:10:11 +08:00
f3fc6f7435 Merge branch 'bugfix/add_unregister_wpa3_cb_v4.4' into 'release/v4.4'
wpa_supplicant : Add support for unregistering wifi wpa3 callbacks.

See merge request espressif/esp-idf!22556
2023-03-23 15:22:36 +08:00
7894f032f6 Merge branch 'bugfix/hfp_ag_cannot_init_conn_v4.4' into 'release/v4.4'
bt: Fixed the index out of bounds of hfp_ag BTC control block (v4.4)

See merge request espressif/esp-idf!22873
2023-03-23 10:50:57 +08:00
a3f285d744 Merge branch 'bugfix/dm9051_rcv_mcast_v4.4' into 'release/v4.4'
esp_eth: allowed DM9051 to receive multicast packets (v4.4)

See merge request espressif/esp-idf!22865
2023-03-23 10:44:49 +08:00
4ffc7c666c Merge branch 'bugfix/lwip_core_locking_v4.4' into 'release/v4.4'
esp_netif/lwip: Fix core-locking config (v4.4)

See merge request espressif/esp-idf!22466
2023-03-23 10:39:57 +08:00
c8a3237309 Fixed the index out of bounds of hfp_ag BTC control block 2023-03-22 15:49:56 +08:00
88a2afc034 esp_eth: DM9051 stop/start issue fixed 2023-03-21 16:32:46 +00:00
fc09ea7b19 esp_eth: allowed DM9051 to receive multicast packets
Removed extra PHY status link checks from DM9051 MAC layer
2023-03-21 16:28:51 +00:00
8cea38360f Merge branch 'bugfix/fix_examples_sdmmc_card_init_failure_esp32s3_v4.4' into 'release/v4.4'
SDMMC example: Fix for 'sdmmc_card_init failed for ESP32S3' (v4.4)

See merge request espressif/esp-idf!22653
2023-03-21 18:57:10 +08:00
35eeb04829 lwip: Add missing esp_sntp_enabled() 2023-03-21 10:31:25 +01:00
079611dd16 lwip/sntp: Fix esp_sntp_ API races (v4.4)
Some of the esp_sntp_...() APIs that wrap lwip's SNTP
module use tcpip_callback() to execute the lwip functionality
in the correct state (either with locked TCP/IP core,
or within the TCP/IP thread).
tcpip_callback() however doesn't wait for completion of the callback,
which doesn't prevent from using the stack variables after destroy
if used as a parameter.
Introduced in a71fa82.
Fixed by using of tcpip_api_call() instead of the tcpip_callback().

Closes https://github.com/espressif/esp-idf/issues/10611
2023-03-21 10:31:25 +01:00
29b8a00c0a esp_netif/lwip: Fix core-locking config (v4.4)
* Fix thread safety issues in non-core locking
* Add option to verify thread safety issues in lwip (core-lock assertion)
* Make esp_sntp.h thread safe API
* Fix sntp example
(v4.4 - fixes minor merge issue that duplicated
DHCP_DEFINE_CUSTOM_TIMEOUTS and DHCP_REQUEST_TIMEOUT_SEQUENCE)

Closes https://github.com/espressif/esp-idf/issues/9908
Closes https://github.com/espressif/esp-idf/issues/10502
Closes https://github.com/espressif/esp-idf/issues/10466
2023-03-21 10:31:20 +01:00
897082dbe5 usb_serial_jtag: Fix bug of blocking TX xfer when using driver,
Merges https://github.com/espressif/esp-idf/pull/10208
2023-03-20 14:39:35 +08:00
d91efe9f8e SDMMC example: Fix for 'sdmmc_card_init failed for ESP32S3' (v4.4)
Closes https://github.com/espressif/esp-idf/issues/10855
2023-03-20 11:50:45 +05:30
6cf1d8ea40 [USB Serial/JTAG Driver] use time-limited blocking for TX 2023-03-20 14:20:40 +08:00
48b3f236d3 Merge branch 'contrib/github_pr_10402_v4.4' into 'release/v4.4'
ledc: move callback to IRAM as it's called from an ISR (GitHub PR) (v4.4)

See merge request espressif/esp-idf!22593
2023-03-20 14:06:23 +08:00
3c8bc2213c Merge branch 'feature/esp32c3_uart_add_wakeup_event_v4.4' into 'release/v4.4'
UART: add uart wakeup event for esp32c3 and esp32s3 (v4.4)

See merge request espressif/esp-idf!22647
2023-03-20 14:05:42 +08:00
188bb8df22 Merge branch 'bugfix/add_debug_check_v4.4' into 'release/v4.4'
Nimble: Added debug relate flag around debug code_v4.4

See merge request espressif/esp-idf!22783
2023-03-20 14:04:54 +08:00
c5e4b7d7d4 Merge branch 'bugfix/close_rf_in_deep_sleep_backport_v4.4' into 'release/v4.4'
deep sleep: further optimize sleep current if RF is enabled (backport v4.4)

See merge request espressif/esp-idf!22737
2023-03-20 14:04:36 +08:00
e47aaa7088 Merge branch 'contrib/github_pr_10935_v4.4' into 'release/v4.4'
export: avoid error on unbound variable (GitHub PR) (v4.4)

See merge request espressif/esp-idf!22821
2023-03-18 15:38:58 +08:00
e619c17871 Merge branch 'feature/export_fish_exit_code_success_v4.4' into 'release/v4.4'
Tools: export.fish exit with success exit code (v4.4)

See merge request espressif/esp-idf!22819
2023-03-18 15:37:15 +08:00
2a3cdb090f export: avoid error on unbound variable
I the shell has `set -u` (to abort on unbound variable), sourcing
export.sh currently fails when IDF_EXPORT_QUIET or IDF_PATH is not set:
> /path/to/esp-idf/export.sh:16: IDF_EXPORT_QUIET: unbound variable

This commit sets a default empty value to those variable, as done
in 16731833fb (which forgot IDF_PATH as it's usually set, the other
variable landed later in the file).
2023-03-17 18:46:42 +01:00
3ed0f1665f Make export.fish exit with SUCCESS exit code
The export.fish script exits with an exit code of 4. Thus, any shell checks that make sure the source command exits successfully always failed. This was due to the last line trying to erase the __main function. In fish, you can't erase a function using the `set` command, you can only erase variables. By removing that line the script now exits with an exit code of 0 instead of 4.

Erase __main function at the end of export.fish

Closes https://github.com/espressif/esp-idf/pull/10828
2023-03-17 18:08:41 +01:00
7cfc1a747f Merge branch 'docs/update_esp_hid_device_v4.4' into 'release/v4.4'
docs: fixed missing API-reference documents for Bluetooth HID device(backport v4.4)

See merge request espressif/esp-idf!19582
2023-03-17 19:40:43 +08:00
61521da8d0 Merge branch 'test/add_spi_slave_freq_test_v4.4' into 'release/v4.4'
spi_slave: fix io re-config issue (v4.4)

See merge request espressif/esp-idf!22591
2023-03-17 19:25:07 +08:00
012b5006c0 Merge branch 'bugfix/more_data_bit_issue_v4.4' into 'release/v4.4'
esp_wifi: fix more data bit cause not go to modem sleep(v4.4)

See merge request espressif/esp-idf!22791
2023-03-17 13:52:48 +08:00
11e20bbf7b Merge branch 'bugfix/avrcp_psth_cmd_rsp_v4.4' into 'release/v4.4'
bt:Added a parameter to tell the user the result of the pass through command implementation(v4.4)

See merge request espressif/esp-idf!22789
2023-03-17 13:52:39 +08:00
874371c382 docs: fixed EXTRA_COMPONENT_DIRS being mispelled as EXTRA_COMPONENTS_DIRS in build-system guide 2023-03-17 11:51:25 +08:00
4ceb928831 Merge branch 'feature/gatt_server_improvements_v4.4' into 'release/v4.4'
NimBLE: Added custom GATT Server functionality and encryption (v4.4)

See merge request espressif/esp-idf!22741
2023-03-17 10:53:01 +08:00
bf92b0dda8 esp_wifi: fix more data bit cause not go to modem sleep
Closes AUD-4173
2023-03-16 15:45:21 +08:00
0c0d7bb1a3 Merge branch 'bufix/Backport_some_lwip_bugs_for_4.4_0315' into 'release/v4.4'
bugfix/Backport_some_lwip_bugs_for_4.4_0315

See merge request espressif/esp-idf!22762
2023-03-16 10:31:13 +08:00
4b40662fad Nimble: Added debug relate flag around debug code 2023-03-15 16:49:25 +05:30
207e7e6692 Merge branch 'docs/broken_links_2_v4.4' into 'release/v4.4'
docs: fix broken links (v4.4)

See merge request espressif/esp-idf!22749
2023-03-15 14:16:30 +08:00
3fda8f942c mspi: turn down freq to fix crash when sleep 2023-03-15 11:33:07 +08:00
8331ae8586 lwip: solve some routers do not forward multicast packet issue 2023-03-14 19:03:23 +08:00
9403854bed tcp_in/ooseq: Fix incorrect segment trim when FIN moved
* Update submodule: git log --oneline a7abf28e02282b32479f4bbaf2d90f09d2a60f4c..6bb132e3797d5449a923804c75c57d458920f8ac

Detailed description of the changes:
  - tcp_in/ooseq: Fix incorrect segment trim when FIN moved (esp-lwip@6bb132e3)
  - api_msg: fix tcp_abort thread safety (esp-lwip@53a6e019)
2023-03-14 18:46:00 +08:00
109eec4033 dhcp server:bugfix softap excedes the range of subnet 2023-03-14 18:45:43 +08:00
0ac35d3f09 bt:Added a parameter to tell the user the result of the pass through command implementation 2023-03-14 16:44:10 +08:00
6d09159974 Merge branch 'docs/format_temp_sensor' into 'release/v4.4'
format temp_sensor.rst

See merge request espressif/esp-idf!22475
2023-03-14 14:15:30 +08:00
e357de5406 deep sleep: close rf to optimize sleep current 2023-03-14 14:05:15 +08:00
aac827ede7 format temp_sensor.rst 2023-03-14 13:04:34 +08:00
a13f65206c examples/Bluetooth/bt_hid_mouse_device: improved the exmaple README 2023-03-14 12:13:48 +08:00
b419830cb0 examples/bluetooth/bt_hid_mouse_device: fixed code format, added more comments to improve code readability 2023-03-14 12:13:48 +08:00
67cc93b1d5 bt: fix the documentations for Bluetooth HID device APIs 2023-03-14 12:13:48 +08:00
a91d53f04f docs: fixed missing API-reference documents for Bluetooth HID device
# Conflicts:
#	docs/docs_not_updated/esp32c2.txt
#	docs/doxygen/Doxyfile
2023-03-14 12:13:48 +08:00
f262f1c361 docs: fix broken links 2023-03-14 10:26:37 +08:00
1c4a48bd11 NimBLE: Added custom GATT Server functionality and encryption (v4.4) 2023-03-13 19:46:38 +05:30
63f78a82f0 Merge branch 'bugfix/ulp_docs_incorrect_jump_desc_v4.4' into 'release/v4.4'
docs: Updated incorrect description for ULP FSM JUMPR and JUMPS instructions (v4.4)

See merge request espressif/esp-idf!22732
2023-03-13 21:29:27 +08:00
91b9483987 Revert "optimize deep sleep current in wifi softap mode"
This reverts commit 344ec80fad.
2023-03-13 20:41:16 +08:00
c1ca9222fa docs: Updated incorrect description for ULP FSM JUMPR and JUMPS instructions
This commit updates the incorrect description for the JUMPR and JUMPS
instructions for ULP FSM on esp32/s2/s3.

Closes https://github.com/espressif/esp-idf/issues/10923
2023-03-13 11:04:30 +01:00
82f10149c2 Merge branch 'feature/docker_add_ruby_bsd_4.4' into 'release/v4.4'
feat (cmock): add ruby and libbsd-dev to docker image (backport v4.4)

See merge request espressif/esp-idf!22705
2023-03-13 15:37:22 +08:00
9f8f60ddb8 Merge branch 'bugfix/fix_hidh_connection_bug_v4.4' into 'release/v4.4'
Bugfix/Fix HID Host bug when handling the two consecutive connection request[backport 4.4]

See merge request espressif/esp-idf!22722
2023-03-13 15:07:11 +08:00
d56a3b5dd3 Merge branch 'bugfix/wifi_enterprise_example_typo_v4.4' into 'release/v4.4'
esp_wifi: fix typo in wifi_enterprise example README (Backport v4.4)

See merge request espressif/esp-idf!22651
2023-03-13 14:06:24 +08:00
f0394b03bc fix HID Host bug when handling the two consecutive connection request
Closes https://github.com/espressif/esp-idf/issues/10504
2023-03-13 10:22:28 +08:00
2b9053fe97 feat (cmock): add ruby and libbsd-dev to docker image
Closes https://github.com/espressif/esp-idf/issues/9342
2023-03-10 17:54:33 +08:00
fee50c208a Merge branch 'bugfix/modbus_remove_manifest_from_subrepo' into 'release/v4.4'
freemodbus: remove component manifest file from freemodbus subrepo

See merge request espressif/esp-idf!22693
2023-03-10 17:23:32 +08:00
67b3b263db freemodbus: remove component manifest file from freemodbus subrepo 2023-03-10 17:23:32 +08:00
712f6cb95c Merge branch 'bugfix/spp_server_doc_v4.4' into 'release/v4.4'
SPP server documentation fix (v4.4)

See merge request espressif/esp-idf!22679
2023-03-10 17:22:19 +08:00
8232f23f65 Merge branch 'feature/apply_new_version_logic_v4.4' into 'release/v4.4'
all: Apply new version logic (major * 100 + minor) (v4.4)

See merge request espressif/esp-idf!22481
2023-03-10 14:52:18 +08:00
0f47fad650 usb_host: add recovering interval after SetAddress(). Possibility to change constant delay value via menuconfig.
Closes https://github.com/espressif/esp-idf/issues/10444
Closes https://github.com/espressif/esp-idf/issues/10718
2023-03-10 07:07:38 +01:00
1500d703a1 Merge branch 'bugfix/spram_and_virt_efuse_can_work_v4.4' into 'release/v4.4'
esp_psram: Use efuse_ll instead of efuse API (v4.4)

See merge request espressif/esp-idf!22642
2023-03-09 22:19:12 +08:00
e0aa158399 Doc : SPP server documentation fix
Closes https://github.com/espressif/esp-idf/issues/10930
2023-03-09 11:59:00 +05:30
6e950ad679 Merge branch 'bugfix/adc2_legacy_oneshot_clk_gating_issue' into 'release/v4.4'
adc: fix legacy oneshot driver clock gating issue on c3 (v4.4)

See merge request espressif/esp-idf!22609
2023-03-09 13:29:40 +08:00
7d727fffdd Merge branch 'bugfix/return_error_when_fail_detect_oct_psram_v4.4' into 'release/v4.4'
esp_psram: return error when fail to detect oct psram (v4.4)

See merge request espressif/esp-idf!22613
2023-03-09 13:28:58 +08:00
4b498e8bce Merge branch 'bugfix/fix_btld_app_overlap_c2_v4.4' into 'release/v4.4'
ld: fixed bootloader and app potential overlap issue (v4.4)

See merge request espressif/esp-idf!22570
2023-03-09 13:28:36 +08:00
028f48369c Merge branch 'bugfix/no_more_public_adc2_dma_on_c3_s3_v4.4' into 'release/v4.4'
adc: no longer support adc2 continuous mode on esp32c3 and esp32s3 (v4.4)

See merge request espressif/esp-idf!21649
2023-03-09 13:27:25 +08:00
c134171e80 wifi_prov_mgr : Fixed return value of characteristic read operation 2023-03-09 10:44:54 +05:30
38ec6aafc6 Merge branch 'optimization/lwip_dhcp_coarse_timer_4.4' into 'release/v4.4'
lwip:optimization dhcp coarse timer for 4.4

See merge request espressif/esp-idf!22425
2023-03-09 11:07:25 +08:00
91930c4a6e Merge branch 'bugfix/modbus_debug_message_v4.4' into 'release/v4.4'
esp-modbus: fix debug message being printed for all builds

See merge request espressif/esp-idf!22523
2023-03-09 09:48:29 +08:00
6a2e2d99a7 esp_wifi: fix typo in wifi_enterprise example README
Closes https://github.com/espressif/esp-idf/issues/10042
2023-03-08 13:23:54 +05:30
ac67d5dd35 uart: support light sleep on esp32s3 2023-03-08 11:10:43 +08:00
1d31a493e4 debug: esp32c3 uart1 wakeup 2023-03-08 10:30:46 +08:00
ea837e3a5e simple test for uart wakeup 2023-03-08 10:02:32 +08:00
176f44c15f uart: add wakeup event for esp32c3 2023-03-08 10:02:23 +08:00
9e0a8e2dca esp_psram: Use efuse_ll instead of efuse API
When the virt efuse mode is on and psram is on as well
then efuse buffer is not filled by efuses (it is filled by 0).
So the psram init func gets wrong pkg_ver = 0.

Closes https://github.com/espressif/esp-idf/issues/10925
Close IDFGH-9576
2023-03-08 01:47:06 +08:00
eab3534c90 adc: no longer support adc2 oneshot mode on esp32c3
Due to HW limitation, we don't support this anymore. On c3, ADC2 under oneshot mode is not stable.

However, you can enable CONFIG_ADC_ONESHOT_FORCE_USE_ADC2_ON_C3 to force use
ADC2.

Refer to errata to know more details:
https://www.espressif.com/sites/default/files/documentation/esp32-c3_errata_en.pdf
2023-03-07 11:58:27 +08:00
5fa6b2879c ld: fixed bootloader and app potential overlap issue 2023-03-07 02:39:56 +00:00
cf9cb577ce esp_psram: return error when fail to detect oct psram 2023-03-07 02:39:44 +00:00
f0af48b585 adc: fix legacy oneshot driver clock gating issue on c3 2023-03-07 02:39:11 +00:00
2d41f6fe31 esp-modbus: fix debug message being printed for all builds 2023-03-07 02:29:00 +00:00
60b90c5144 Merge branch 'feature/memprot_test_app_v4.4' into 'release/v4.4'
memprot: Fix incorrect faulting address reported for esp32c3 (v4.4)

See merge request espressif/esp-idf!22583
2023-03-06 20:27:21 +08:00
ffb2db586a adc: no longer support adc2 continuous mode on esp32c3 and esp32s3
Due to HW limitation, we don't support this anymore. On s3 and c3, ADC2 under continuous  mode is not stable.

However, you can enable CONFIG_ADC_CONTINUOUS_FORCE_USE_ADC2_ON_C3_S3 to force use
ADC2.

Refer to errata to know more details:
https://www.espressif.com/sites/default/files/documentation/esp32-s3_errata_en.pdf
https://www.espressif.com/sites/default/files/documentation/esp32-c3_errata_en.pdf
2023-03-06 18:57:58 +08:00
f311bbdcf9 adc: added a soc macro indicating digital controller supported unit 2023-03-06 18:57:58 +08:00
c3172de254 Merge branch 'contrib/github_pr_10640_v4.4' into 'release/v4.4'
hal/uart_ll.h: Fix compile with C++ (ESP32-S3/H2) (GitHub PR) (v4.4)

See merge request espressif/esp-idf!22589
2023-03-06 15:36:02 +08:00
0cd02c044c Merge branch 'refactor/move_rom_test_to_fpga_only_v4.4' into 'release/v4.4'
esp_rom: miniz test only on FPGA (backport 4.4)

See merge request espressif/esp-idf!22602
2023-03-06 09:15:24 +08:00
a6473f13ec Merge branch 'contrib/github_pr_10334_v4.4' into 'release/v4.4'
Set errno in adjtime (GitHub PR) (v4.4)

See merge request espressif/esp-idf!22599
2023-03-05 21:38:00 +08:00
df09f8670a version: Fix missed version checks 2023-03-05 18:25:50 +08:00
4227dcc4a4 Merge branch 'bugfix/fix_psram_kconfig_help_v4.4' into 'release/v4.4'
psram: removed deprecated statement about coredump and external BSS (backport v4.4)

See merge request espressif/esp-idf!22563
2023-03-04 21:59:49 +08:00
2c46d5442f kconfigs: Fix config issues raised by gen_kconfig_doc.py 2023-03-03 22:26:39 +00:00
a786554530 esptool: Adds support major&minor chip versions + min&max chip revision options 2023-03-03 22:26:39 +00:00
8ca1779931 app: Updates the chip version format (vX.Y) 2023-03-03 22:26:39 +00:00
1027c02aa1 bootloader_support: Fix iram_loader_seg overflow for ESP32-S2 when -O0 2023-03-03 22:26:39 +00:00
fde8517956 chip_version: Updates for Make build system 2023-03-03 22:26:39 +00:00
a86c80e3ec all: Apply new version logic (major * 100 + minor) 2023-03-03 22:26:39 +00:00
bff43a1b6f Merge branch 'bugfix/default_components_for_component_manager_v4.4' into 'release/v4.4'
build & config: Don't include common components on early expansion (v4.4)

See merge request espressif/esp-idf!22371
2023-03-04 06:25:22 +08:00
5a32b53431 docs: udpate CN translation for build-system 2023-03-03 20:02:50 +01:00
bb272d1b0a build & config: Check requirements of managed components of main and add interface versioning 2023-03-03 20:02:49 +01:00
732ce674f0 refactor(esp_rom): miniz test only on FPGA now 2023-03-03 18:19:16 +08:00
6802299ef4 Set errno in adjtime if delta is too large
errno should be set to EINVAL in this case according to adjtime's man
page.
2023-03-03 18:15:52 +08:00
7ccacc7385 Set errno in adjtime if newlib time funcs are not implemented
Other time functions (e.g. settimeofday) set errno to ENOSYS if
IMPL_NEWLIB_TIME_FUNCS is not set.
adjtime should probably do the same.
2023-03-03 18:15:51 +08:00
093eaae4e5 uart: Fix two TX concurrency issues
1. Concurrency might cause ESP_ERR_TIMEOUT when calling uart_wait_tx_done
2. Concurrency might cause RTS line being de-assreted during tx transmission for rs485 mode
2023-03-03 18:01:46 +08:00
022a697ed8 ledc: Add check for whether the registered callback is in iram in ledc_cb_register 2023-03-03 17:35:35 +08:00
86fd4b983f spi_slave: fix io re-config issue 2023-03-03 17:28:54 +08:00
9fa8e2df41 ledc: move callback to IRAM, it's called from an ISR 2023-03-03 17:22:07 +08:00
f5d94ef432 hal/uart_ll.h: Fix compile issue with C++
Merges https://github.com/espressif/esp-idf/pull/10640
2023-03-03 17:01:41 +08:00
6f2bf5f856 memprot: Fix incorrect faulting address reported for esp32c3
Co-authored-by: Mahavir Jain <mahavir@espressif.com>
2023-03-03 10:18:54 +05:30
4186c9a0fc lwip:optimization dhcp coarse timer 2023-03-02 08:44:07 +00:00
35fec3a2ef psram: removed deprecated statement about coredump and external BSS 2023-03-01 19:06:30 +08:00
af9e99759a Merge branch 'docs/fix_errors_in_esp32-c3-devkitm-1_pin_list_v4.4_' into 'release/v4.4'
Docs/Fix Errors in ESP32-C3-DevKitM-1 Pin List (v4.4)

See merge request espressif/esp-idf!22495
2023-03-01 18:41:59 +08:00
cb217ace1e Docs/Fix Errors in ESP32-C3-DevKitM-1 Pin List (v4.4) 2023-03-01 18:41:59 +08:00
fde6be3d6a wpa_supplicant : Add validations for 192-bit Suite B test cases.
Add validations for group data cipher, pairwise cipher and AKM Suites to
ensure correct ciphers are supported by AP during 192-bit Enterprise
connections.
2023-03-01 10:43:07 +05:30
cb2f801ae7 wpa_supplicant : Add deinitialization of Enterprise config_methods.
Add deinitialization of config_methods as it prevents correct reinitialization of sta in eap_peer_config_init() during reassoc.
2023-03-01 10:42:13 +05:30
176dbaf4a7 wpa_supplicant : Add support for unregistering wifi wpa3 callbacks.
Unregister wifi callbacks allows for disabling support for wpa3 functions when not required.
2023-03-01 10:40:06 +05:30
20e5bc7ce0 Merge branch 'bugfix/nvs_cxx_example_v4.4' into 'release/v4.4'
nvs_flash: fixed wrong error check after open_nvs_handle in example (v4.4)

See merge request espressif/esp-idf!22304
2023-02-28 21:38:38 +08:00
4b6ecea959 Merge branch 'fix/efuse-function-declaration_v4.4' into 'release/v4.4'
efuse: fix esp_efuse_utility_write_reg() declaration (v4.4)

See merge request espressif/esp-idf!22087
2023-02-28 19:54:43 +08:00
f8c2f62db4 Merge branch 'bugfix/flash_large_memory_size_v4.4' into 'release/v4.4'
spi_flash: Fix issue that cannot get accurate flash size when encounter large size memory(backport v4.4)

See merge request espressif/esp-idf!21534
2023-02-28 19:53:25 +08:00
b60d5960a7 Merge branch 'docs/update-esp-rom-elfs-link_v4.4' into 'release/v4.4'
docs: update link for ESP ROM ELF releases (v4.4)

See merge request espressif/esp-idf!22262
2023-02-28 19:52:08 +08:00
97c23f2e79 Merge branch 'bugfix/twai_listen_only_errata_v4.4' into 'release/v4.4'
twai: Add errata workaround for listen only mode (v4.4)

See merge request espressif/esp-idf!22515
2023-02-28 19:51:17 +08:00
2540cee253 build & config: Don't include common components on early expansion 2023-02-27 10:06:31 +01:00
b8b3dfc366 CI: update mypy for pre-commit 2023-02-27 10:06:10 +01:00
ec3f345c8e Merge branch 'bugfix/freertos_stream_buffer_test_v4.4' into 'release/v4.4'
FreeRTOS: Fix stream buffer send-receive test (v4.4)

See merge request espressif/esp-idf!22508
2023-02-27 13:46:50 +08:00
17a0cdae49 Merge branch 'bugfix/fix_some_ble_bug_v4.4' into 'release/v4.4'
Fixed some BLE bugs (backport v4.4)

See merge request espressif/esp-idf!22364
2023-02-26 16:13:07 +08:00
f89eedd2dc Merge branch 'bugfix/blufi_notify_v4.4' into 'release/v4.4'
BluFi : Fixed hdr getting free twice (v4.4)

See merge request espressif/esp-idf!22449
2023-02-26 16:11:22 +08:00
778b806483 Merge branch 'bugfix/bluedroid_le_coc_compile_error_v4.4' into 'release/v4.4'
bt: fix Bluedroid compile errors after enable CONFIG_ESP_SYSTEM_USE_EH_FRAME on RISC-V SoCs(backport v4.4)

See merge request espressif/esp-idf!22493
2023-02-26 16:11:01 +08:00
e857d63def Merge branch 'bugfix/set_generic_len_for_rsnxe_v4.4' into 'release/v4.4'
esp_wifi: bugfix RSNXE related changes

See merge request espressif/esp-idf!22421
2023-02-26 15:56:26 +08:00
3819d22e93 twai: Add errata workaround for listen only mode
This commit adds a workaround for the TWAI listen only mode errata which is
present on the ESP32, ESP32-S2, ESP32-S3, and ESP32-C3. twai_get_status_info()
has also been updated to account for the fact that TEC/REC are frozen in
listen only mode.

Errata Description:

When the TWAI controller is put into listen only mode, it should not influence
the TWAI bus in any way (i.e., should never send a dominant bit). However,
on the targets listed above, the TWAI controller will send dominant bits in an
error frame (i.e., active error frame), even if the controller is set to listen
only mode.

Workaround:

We can force the TWAI controller into the error passive state on startup (by
setting the REC to >= 128). Since the TEC/REC are frozen in listen only mode,
the TWAI controller will remain error passive and only send recessive bits
(i.e., passive error frames), thus will not influence the TWAI bus.

Closes https://github.com/espressif/esp-idf/issues/9157
2023-02-24 20:26:53 +08:00
5d5a5f8758 Merge branch 'bugfix/correct_ext_mem_defs_for_internal_ram_v4.4' into 'release/v4.4'
soc: update iram/dram addr range in ext_mem_defs.h (v4.4)

See merge request espressif/esp-idf!22490
2023-02-24 18:36:07 +08:00
5479da3191 Merge branch 'ci/test_example_connect_ap_timeout_4.4' into 'release/v4.4'
test: fix ethernet iperf and https_server_simple test (4.4)

See merge request espressif/esp-idf!22388
2023-02-24 16:46:43 +08:00
241dbcaa9c freertos: Fix stream buffer send-receive test
The stream buffer send-receive test preivously contained the following bugs:

- "sender" task would send 101 bytes instead of 100
- The main task would return before "sender" task sends its 101st item. Thus
  the sender task would cause memory corruption when accessing "tc" structure
  allocated on the main task's stack

This commit fixes and simplifies the stream buffer test.
2023-02-24 16:28:13 +08:00
66bc1293aa Merge branch 'fix/heap-get-allocated-size_v4.4' into 'release/v4.4'
heap: Fix erroneous value returned by heap_caps_get_allocated_size() when poisoning is enabled (backport v4.4)

See merge request espressif/esp-idf!22189
2023-02-24 11:05:16 +08:00
50015c6047 bt: fix Bluedroid compile errors after enable CONFIG_ESP_SYSTEM_USE_EH_FRAME on RISC-V SoCs
This root cause is incorrect source code separation by conditonal MACROs for BLE L2CAP COC related functions
2023-02-23 14:21:08 +08:00
f46e42bc1f soc: update iram/dram addr range in ext_mem_defs.h 2023-02-23 12:51:04 +08:00
f4ab9a440a heap: Fix erroneous value returned by heap_caps_get_allocated_size() when poisoning is enabled
When light (or comprehensive) poisoning is enabled, the size requested by the user for allocation
is extended by a few bytes to store the canary header and footer. heap_caps_get_allocated_size() should
return the original size asked by the user (without the additional canary bytes).

test_malloc.c extended with a new test assuring that  heap_caps_get_allocated_size() returns the proper size
regardless of the degree of poisoning.
2023-02-22 07:32:49 +01:00
0ff5b1f8e8 add time delay after create tcp server on PC 2023-02-21 15:30:34 +08:00
8486207ac1 BluFi : Fixed hdr getting free twice
Closes IDFGH-9378
2023-02-21 11:45:26 +05:30
4199164ca1 Merge branch 'feature/add_bootloader_sector_pad_option_v4.4' into 'release/v4.4'
esptool_py: Added a --pad-to-size flag to align the bootloader image (v4.4)

See merge request espressif/esp-idf!22327
2023-02-20 19:43:45 +08:00
896d16b1fd Merge branch 'bugfix/newlib_tz_env_mutex_v4.4' into 'release/v4.4'
newlib: Use correct recursive mutex for env and regular mutex for tz (v4.4)

See merge request espressif/esp-idf!22294
2023-02-20 14:38:57 +08:00
4a466ca518 Merge branch 'docs/elm_chan_broken_link_v4.4' into 'release/v4.4'
docs: fix broken link in fatfs doc (v4.4)

See merge request espressif/esp-idf!22298
2023-02-20 14:17:38 +08:00
213a16b712 Merge branch 'feature/remove_80m_ddr_warning_v4.4' into 'release/v4.4'
mspi: remove mspi 80m ddr mode warning regarding to timing tuning (v4.4)

See merge request espressif/esp-idf!21905
2023-02-20 13:30:17 +08:00
edd800e897 Merge branch 'docs/fix_broken_link_format_v4.4' into 'release/v4.4'
docs: fix rst external links with wrong format (v4.4)

See merge request espressif/esp-idf!22337
2023-02-20 13:12:16 +08:00
c6b2eedc74 esp_wifi: bugfix RSNXE related changes
1. Set AP rsnxe len generic
2. Set transition_disable value in wifi get config
2023-02-20 02:56:09 +05:30
4c2afac355 Merge branch 'bugfix/fix_ignoring_provided_corefiles_in_espcoredump' into 'release/v4.4'
tools: fix the missing chip type in esp-coredump when the board is not connected

See merge request espressif/esp-idf!22079
2023-02-17 23:40:15 +08:00
a73ba529ac Merge branch 'bugfix/extram_stack_coredump_v4.4' into 'release/v4.4'
coredump: add support for stacks in external RAM (backport v4.4)

See merge request espressif/esp-idf!22391
2023-02-16 22:58:21 +08:00
ae77cd6587 Merge branch 'bugfix/usb_host_hub_enumeration_string_handling_v4.4' into 'release/v4.4'
USB Host: Fix string descriptor handling by the hub driver during enumeration (backport v4.4)

See merge request espressif/esp-idf!22326
2023-02-16 13:10:57 +08:00
ecbf28e252 esptool_py: Added a sector-pad option for bootloader image
When SECURE BOOT V2 is enabled and CONFIG_SECURE_BOOT_SIGNED_BINARIES
is not set, sector-pad the bootloader image, which is required for an
external PKCS#11 interface to generate a signature.

esptool_py: Update submodule to release/v3 (4bc311767b7c6df41def6f95a50f87b1c9406cbd)
2023-02-15 16:01:26 +05:30
2ef2271afd coredump: add support for stacks in external RAM
Tasks having their stacks in SPIRAM can now be part of the coredump written to flash
2023-02-15 17:46:54 +08:00
e62eceba34 Merge branch 'feat/verbose-alloc-failure-abort_v4.4' into 'release/v4.4'
heap: print size and caps when malloc fails before calling system abort (backport v4.4)

See merge request espressif/esp-idf!22346
2023-02-15 16:54:42 +08:00
109faee736 test: fix test_examples_protocol_https_server_simple 2023-02-15 15:42:58 +08:00
7b41d6c68d Merge branch 'bugfix/rmt_force_inline_LL_functions_v4.4' into 'release/v4.4'
rmt: force inline LL functions (v4.4)

See merge request espressif/esp-idf!22370
2023-02-15 08:50:28 +08:00
b78d5763ac Merge branch 'bugfix/optimize_protocol_socket_cases_4.4' into 'release/v4.4'
CI: optimize example protocol test cases (4.4)

See merge request espressif/esp-idf!22311
2023-02-14 18:01:22 +08:00
a43e796f60 rmt: force inline LL functions
Closes https://github.com/espressif/esp-idf/issues/9487
2023-02-14 15:11:35 +08:00
71ed13c31f examples: fix ble address type of adv and scan params 2023-02-14 11:14:11 +08:00
f986abd482 bluedroid: support ble privacy by controller 2023-02-14 11:13:56 +08:00
f953320c96 bluedroid: add params in GATT connect event 2023-02-14 11:13:27 +08:00
293c4d9f71 update bt-lib for ESP32
fix ble disconnect due to channel map update instant passed
2023-02-14 11:11:36 +08:00
db5bee5c16 example: fix got ip error in protocol tests 2023-02-14 11:03:37 +08:00
a75a62431a Merge branch 'bugfix/fix_gpio_wakeup_related_issues_in_ssc_sleep_test_backport_v4.4' into 'release/v4.4'
sleep: fix gpio wakeup related issues(backport v4.4)

See merge request espressif/esp-idf!22333
2023-02-14 10:36:51 +08:00
23ec5e1944 Merge branch 'bugfix/build_err_with_ssr_enabled_v4.4' into 'release/v4.4'
bt: Fixed build errors when sniff subrating is enabled (v4.4)

See merge request espressif/esp-idf!22351
2023-02-14 10:36:41 +08:00
f90ccf9613 usb_host: Hub driver skips fetching string descriptors if their index is 0
When a USB does not support a particular string dsecriptor (e.g.,
manufacturer, product, and serial number), the string descriptors corresponding
index will be set to 0 in the device descriptor (e.g., iManufacturer, iProduct,
iString).

Previously, the Hub driver would always attempt to fetch the all three string
descriptors, thus leading an error in CHECK_SHORT_SER_STR_DESC if the device
did not support the descriptor.

This commit fixes the Hub drvier by skipping the enumeration stages of a
particular descriptor if its index is 0 (i.e., not supported by the device).
2023-02-13 18:15:36 +05:30
fd663b4ab1 usb_host: Fix error when fetching LANGID table
USB devices may support string descriptors in multiple languages. The supported
languages are stored in a LANGID table, which itself is a string descriptor at
index 0.

When fetching the LANGID table itself, the USB 2.0 specification does not
specify what LANGID to use, thus the Hub driver would use the default LANGID
"ENUM_LANGID". However, this would cause some devices to stall.

This commit fixes the issue by always requesting the LANGID table itself using
a LANGID of 0.
2023-02-13 18:15:16 +05:30
74f479151b usb_host: Fix interface descriptor parsing
Previously the USB host driver did not accept interface number greater or equal bNumInterfaces, even though these are valid interface numbers
2023-02-13 18:02:35 +05:30
123b6f132b Fixed build errors when sniff subrating is enabled. 2023-02-13 17:27:24 +08:00
a971c13447 Merge branch 'bugfix/secure_boot_v2_part_size_check_v4.4' into 'release/v4.4'
gen_esp32part: allow secure boot v2 based app partition size 4K aligned (v4.4)

See merge request espressif/esp-idf!22286
2023-02-13 16:37:50 +08:00
c8e469b78d heap: Fix priority in shex() bit shift 2023-02-13 09:10:06 +01:00
62d57edbc9 [Logs] print size and caps when malloc fails 2023-02-13 09:10:03 +01:00
62340efd94 Merge branch 'bugfix/fix_return_value_in_httpd_socket_apis_v4.4' into 'release/v4.4'
esp_http_server: fix return values for `httpd_socket_send()` and `httpd_socket_recv()` APIs (v4.4)

See merge request espressif/esp-idf!22308
2023-02-13 14:07:35 +08:00
d9393d3b47 docs: fix rst external links with wrong format 2023-02-13 12:15:31 +08:00
379d9034eb partition_table: fix make build for new "--secure [v1/v2]" argument 2023-02-12 21:29:39 +05:30
5002ccd9c3 partition_table: add tests for checking secure boot part size 2023-02-12 18:58:47 +05:30
51a61fb41c gen_esp32part: allow secure boot v2 based app partition size 4K aligned
For Secure Boot v2 case, unsigned image is first padded to next 64K
aligned boundary and then a signature block of 4K gets appended. Thus
an app partition whose size is 4K aligned should be allowed here.

For Secure Boot v1 case, app partition size must be 64K aligned as the
signature block lies at the very end of 64K boundary.

Relevant:
57b601ab7f
2023-02-12 18:58:21 +05:30
1871825d7b CI: optimize example protocol test cases 2023-02-10 15:30:44 +08:00
f7f11cfa51 esp_http_server: fix return values for httpd_socket_send() and httpd_socket_recv() APIs
Closes https://github.com/espressif/esp-idf/issues/10658
2023-02-10 10:57:22 +05:30
1bf3ac5349 bugfix(nvs_flash): fixed wrong error check after open_nvs_handle
Closes https://github.com/espressif/esp-idf/issues/10240
2023-02-10 10:00:13 +08:00
8c491be452 sleep: fix gpio wakeup not working properly in some cases
Before this fix, when we call esp_pm_configure after gpio_wakeup_enable,
the configuration of GPIO in sleep state in gpio_wakeup_enable will be
overwritten by esp_pm_configure.
2023-02-09 17:58:40 +08:00
200dcce535 soc_caps: remove SOC_GPIO_SUPPORT_SLP_SWITCH
all esp chips support this feature
2023-02-09 17:52:49 +08:00
4c335b8dae docs: fix broken link in fatfs doc 2023-02-09 16:11:08 +08:00
614b06341f Use correct recursive mutex for env and regular mutex for tz 2023-02-09 16:03:02 +08:00
cb2fde3e3f Merge branch 'feature/seperate_ble_wifi_test_environment_v4.4' into 'release/v4.4'
seperate ble wifi environment (backport v4.4)

See merge request espressif/esp-idf!20083
2023-02-09 15:45:31 +08:00
39a4ec2045 Merge branch 'refactor/nvs_allocatable_objects_v4.4' into 'release/v4.4'
refactor(nvs): custom allocator for all objects allocated in NVS (v4.4)

See merge request espressif/esp-idf!21793
2023-02-08 18:01:10 +08:00
a83c40eaf0 Merge branch 'feature/mac_crc_v4.4' into 'release/v4.4'
esp_hw_support(esp32): If the MAC_FACTORY CRC check fails, then INVALID_CRC instead of abort (v4.4)

See merge request espressif/esp-idf!22115
2023-02-08 17:04:30 +08:00
9160670a4a Merge branch 'docs/make_s3_octal_flash_error_handling_clearer_v4.4' into 'release/v4.4'
docs: make s3 octal flash error handling clearer (v4.4)

See merge request espressif/esp-idf!22271
2023-02-08 15:47:02 +08:00
dfe505cbb3 docs: make s3 octal flash error handling clearer 2023-02-08 12:17:45 +08:00
d3eb5b2346 tools: fix the missing chip type in esp-coredump when the board is not connected
Closes https://github.com/espressif/esp-idf/issues/10400
2023-02-08 10:07:15 +08:00
a1fd8065bd seperate ble wifi environment 2023-02-08 10:05:31 +08:00
7b04075676 docs: update link for ESP ROM ELF releases 2023-02-07 18:01:48 +07:00
80d81c6c8f Merge branch 'bugfix/ulp_riscv_i2c_example_crashes_on_s2_v4.4' into 'release/v4.4'
ulp-riscv: ULP RISC-V I2C example gets stuck on esp32s2 (v4.4)

See merge request espressif/esp-idf!21861
2023-02-07 17:55:58 +08:00
3cf24d8685 Merge branch 'feature/usb_host_feature_and_refactor_backports_v4.4' into 'release/v4.4'
USB Host: Backport multiple bugfixes/refactors to v4.4

See merge request espressif/esp-idf!21583
2023-02-07 17:54:35 +08:00
2dec69fa82 Merge branch 'feature/lower-iram-utilization-of-heap-component_v4.4' into 'release/v4.4'
heap: lower the utilization of IRAM by the heap component binary (backport v4.4)

See merge request espressif/esp-idf!21237
2023-02-07 16:54:58 +08:00
dab3f38f0f Merge branch 'ci/fix/isort_incompatible_with_py37_v4.4' into 'release/v4.4'
ci: fix isort py37 incompatible issue (v4.4)

See merge request espressif/esp-idf!22226
2023-02-07 09:12:10 +08:00
57528b8d17 Merge branch 'bugfix/fix_mdns_example_v4.4_' into 'release/v4.4'
mDNS: Fix example test in CI (v4.4)

See merge request espressif/esp-idf!20815
2023-02-07 00:02:00 +08:00
4a4227a3b8 Merge branch 'bugfix/optimize_abnormal_beacon_log_4.4' into 'release/v4.4'
esp_wifi:bugfix for optimize abnormal beacon log 4.4

See merge request espressif/esp-idf!22211
2023-02-06 22:02:10 +08:00
f73a2cd0f9 esp_wifi:bugfix for optimize abnormal beacon log 2023-02-06 14:52:46 +08:00
0c8dd57d2a Merge branch 'bugfix/bdsa_security_issues_v4.4' into 'release/v4.4'
wpa_supplicant:BDSA related patch updates v4.4

See merge request espressif/esp-idf!21605
2023-02-06 12:12:09 +08:00
e1e9e10d3b Merge branch 'bugfix/rtc_8md256_deepsleep_time_esp32_v4.4' into 'release/v4.4'
pm: Fixed sleep time inaccurate bug when select 8MD256 as rtc slow clock on ESP32 (v4.4)

See merge request espressif/esp-idf!21822
2023-02-06 11:13:52 +08:00
3ecf906721 Merge branch 'bugfix/fix_mspi_timing_tuning_psram_timing_issue_v4.4' into 'release/v4.4'
mspi_tuning: fix psram timing tuning bug (v4.4)

See merge request espressif/esp-idf!21625
2023-02-06 11:11:07 +08:00
43b9f6d4ac Merge branch 'feature/do_not_disable_cache_when_xip_from_psram_v4.4' into 'release/v4.4'
system: do not disable cache when xip from psram (v4.4)

See merge request espressif/esp-idf!21651
2023-02-06 11:10:14 +08:00
d6682ce9c4 Merge branch 'bugfix/minor_syntax_changes_v4.4' into 'release/v4.4'
wpa_supplicant: Fixing a collection of issues encountered during application testing.

See merge request espressif/esp-idf!22098
2023-02-06 10:37:17 +08:00
43ad48e43f Merge branch 'bugfix/env_var_SDKCONFIG_DEFAULTS_fail_with_bootloader_subproject_v4.4' into 'release/v4.4'
build_system: stop looking for env var `SDKCONFIG_DEFAULTS` in bootloader subproject (v4.4)

See merge request espressif/esp-idf!21975
2023-02-06 10:36:56 +08:00
2684850a13 ci: fix isort py37 incompatible issue 2023-02-06 10:32:38 +08:00
bd5af4d879 Merge branch 'bugfix/add_nimble_fail_case_kownissues' into 'release/v4.4'
add NIMBLE_GAP_17021 to kownIssues (4.4)

See merge request espressif/esp-idf!21475
2023-02-03 16:26:06 +08:00
54fea8f9b3 add NIMBLE_GAP_17021 to kownIssues (4.4) 2023-02-03 16:26:06 +08:00
e4c5d21106 wpa_supplicant:BDSA related patch updates 2023-02-03 06:46:30 +00:00
0e2db09744 Merge branch 'bugfix/fix_windows_path_case_sensitivity_v4.4' into 'release/v4.4'
bugfix: Fix windows path case sensitivity (v4.4)

See merge request espressif/esp-idf!22076
2023-02-03 14:40:32 +08:00
3e1f704d5b Merge branch 'fix/tools_click_envvar_v4.4' into 'release/v4.4'
Tools: Improve idf.py error message when the argument value collides with the environment variable (v4.4)

See merge request espressif/esp-idf!21886
2023-02-03 14:37:45 +08:00
dd2c7f8a59 Merge branch 'bugfix/support_coredump_stack_xtensa_v4.4' into 'release/v4.4'
coredump: custom core dump stack is now supported on Xtensa targets (backport v4.4)

See merge request espressif/esp-idf!21805
2023-02-03 14:37:16 +08:00
ff86fa0260 Merge branch 'bugfix/fix_esp32s3_diram_calculation_v4.4' into 'release/v4.4'
Tools: Fix diram size calculation (v4.4)

See merge request espressif/esp-idf!21671
2023-02-03 14:36:13 +08:00
bd54673f81 Merge branch 'doc/update_nimble_mesh_example_information_v4.4' into 'release/v4.4'
Nimble: Update Mesh example documentation (v4.4)

See merge request espressif/esp-idf!21579
2023-02-03 13:53:29 +08:00
bf4a710c23 Merge branch 'doc/update_wifi_amsdu_docs_v4.4' into 'release/v4.4'
doc: update wifi amsdu docs(Backport v4.4)

See merge request espressif/esp-idf!21750
2023-02-03 13:52:59 +08:00
c97db9189e Merge branch 'bugfix/wps_start_state_issue_v4.4' into 'release/v4.4'
esp_wifi: Add check for wps start state (v4.4)

See merge request espressif/esp-idf!22027
2023-02-03 13:52:39 +08:00
5360833e0b Merge branch 'bugfix/peer_dev_rec_add_and_clear_issue_v4.4' into 'release/v4.4'
NimBLE: Fix incomplete clearing of peer_dev_rec (v4.4)

See merge request espressif/esp-idf!22012
2023-02-03 13:51:55 +08:00
808fcf8b44 Merge branch 'bugfix/precommit_isort_deprecation_v4.4' into 'release/v4.4'
ci: Fix pre-commit hook per isort deps deprecation (v4.4)

See merge request espressif/esp-idf!22207
2023-02-03 13:51:38 +08:00
f46b03fd91 Merge branch 'bugfix/a2dp_error_code_v4.4' into 'release/v4.4'
bt:Fixed the use of invalid configuration when the peer device configures the stream, and returned an incorrect error code(v4.4)

See merge request espressif/esp-idf!21623
2023-02-03 13:51:10 +08:00
a60b89bb49 Merge branch 'bugfix/coex_enable_disable_not_in_pairs_v4.4' into 'release/v4.4'
bluetooth: fix that functions "coex_enable" and "coex_disable" are not used in pairs(backport v4.4)

See merge request espressif/esp-idf!22095
2023-02-03 13:50:53 +08:00
56083a12fc Merge branch 'example/opt_a2dp_gatts_coex_example_v4.4' into 'release/v4.4'
rebase a2dp_gatts_coex to latest a2dp_sink (v4.4)

See merge request espressif/esp-idf!22004
2023-02-03 13:50:41 +08:00
320894986d Merge branch 'bugfix/fix_ble_some_bugs_20221219_v4.4' into 'release/v4.4'
backport some BLE bugs 20221219 (backport v4.4)

See merge request espressif/esp-idf!21709
2023-02-03 13:50:26 +08:00
b818abb0d7 Merge branch 'bugfix/fix_some_ble_bugs_by_cjh_v4.4' into 'release/v4.4'
Fixed some BLE bugs (backport v4.4)

See merge request espressif/esp-idf!21691
2023-02-03 13:50:12 +08:00
202e1c1fb8 Merge branch 'feature/report_acl_conn_cmp_stat_to_app_v4.4' into 'release/v4.4'
feature/report ACL link related events to application (v4.4)

See merge request espressif/esp-idf!21525
2023-02-03 13:49:59 +08:00
cdb87a514f Merge branch 'bugfix/remove_sha384_hash_for_bigger_certs_v4.4' into 'release/v4.4'
esp_wifi: remove sha384 hash for cert size > 2k (v4.4)

See merge request espressif/esp-idf!21964
2023-02-03 13:49:46 +08:00
0c8ec2a066 Merge branch 'fix/long_assoc_comeback_time_v4.4' into 'release/v4.4'
esp_wifi: reject AP when assoc comeback time given is greater than 5 seconds (Backport v4.4)

See merge request espressif/esp-idf!21842
2023-02-03 12:23:16 +08:00
d708ee2e92 Merge branch 'bugfix/fix_httpd_req_cleanup_v4.4' into 'release/v4.4'
esp_http_server: fix wrong context pointer in httpd_req_cleanup function (v4.4)

See merge request espressif/esp-idf!21732
2023-02-02 22:28:36 +08:00
637dc39e8a Merge branch 'bugfix/esp_tls_timeout_v4.4' into 'release/v4.4'
esp_tls: Fix issue when timeout is not explicitly given in esp_tls_cfg_t (v4.4)

See merge request espressif/esp-idf!21744
2023-02-02 22:28:18 +08:00
2a1ede3f9d Merge branch 'update_v4.4/mbedtls_v2.28.2' into 'release/v4.4'
mbedtls: Update to release v2.28.2 (v4.4)

See merge request espressif/esp-idf!21896
2023-02-02 22:27:22 +08:00
0e4c086a35 Merge branch 'fix/mbedtls_port_sanity_checks_and_return_values_v4.4' into 'release/v4.4'
mbedtls/port: refactor sanity checks and their return values (v4.4)

See merge request espressif/esp-idf!22128
2023-02-02 22:26:50 +08:00
11277bfdc5 Merge branch 'bugfix/remove_s3_dis_boot_remap_efuse_bit_v4.4' into 'release/v4.4'
docs: remove mention of DIS_BOOT_REMAP for chips other than ESP32-S2 (v4.4)

See merge request espressif/esp-idf!21810
2023-02-02 22:26:07 +08:00
79239605fe Merge branch 'fix/stack-dram-memory-protection_v4.4' into 'release/v4.4'
heap: Modify the memory type of the memory used as startup stack when memory protection is enabled (backport v4.4)

See merge request espressif/esp-idf!22171
2023-02-02 22:24:43 +08:00
969569dec0 Merge branch 'bugfix/i2s_update_regs_before_start_v4.4' into 'release/v4.4'
i2s: fixed rx update stuck bug (v4.4)

See merge request espressif/esp-idf!21777
2023-02-02 21:40:37 +08:00
b58d463fdd Merge branch 'bugfix/fix_micro_error_SPI_HOST_MAX_v4.4' into 'release/v4.4'
spi: fix micro SPI_HOST_MAX error (v4.4)

See merge request espressif/esp-idf!22148
2023-02-02 21:40:14 +08:00
854c55c61e Merge branch 'feature/_spi_slave_reset_trans_queue_api_v4.4' into 'release/v4.4'
spi: limit esp32 dma workaround only on esp32(v4.4)

See merge request espressif/esp-idf!21382
2023-02-02 21:39:51 +08:00
cc423c3d44 Merge branch 'bugfix/gdma_uhci_id_4.4' into 'release/v4.4'
gdma: correct the dma trigger of UHCI  && fix async memcpy conflict with peripheral DMA (v4.4)

See merge request espressif/esp-idf!22007
2023-02-02 21:30:20 +08:00
ae8195e9df Merge branch 'bugfix/change_position_of_vendor_model_and_gen_onoff_model_callback_forv4.4' into 'release/v4.4'
ble_mesh:example:change position of vendor model and generic onoff model callback(v4.4)

See merge request espressif/esp-idf!21799
2023-02-02 20:48:52 +08:00
97ab485bdf ble_mesh:example:change position of vendor model and generic onoff model callback(v4.4) 2023-02-02 20:48:52 +08:00
b94278a594 Merge branch 'update/version_4_4_4' into 'release/v4.4'
Update version to 4.4.4

See merge request espressif/esp-idf!22093
2023-02-02 20:04:56 +08:00
9e307b1114 ci: Fix pre-commit hook per isort deps deprecation
isorts dependecy became deprecated. Fixed to use 5.12.0 version of isort pre-commit
2023-02-02 10:07:32 +01:00
922cbc0cb4 wpa_supplicant : Prevent h2e config overwrite
Current esp_wifi_get_config doesn't return correct value of h2e config which will cause h2e config to be overwritten in Station connected handler.
Add one preventative condition to take care of this.
2023-02-01 12:49:25 +05:30
d23c21bd2a wpa_supplicant : Fix invalid de-init of last_scan_res_used
During the wifi deinit last_scan_res_used pointer is not set to 0 which will cause it be used directly after reinit.

Added changes which will set it to 0 during init and deinit.
2023-02-01 12:44:55 +05:30
4b77473982 wpa_supplicant : Correct scan results for GCMP RSN
Fixed a typo which was causing scan results for GCMP not showing correctly
2023-02-01 12:43:01 +05:30
46b66530ce gdma: prevent mutli-channels connect to the same peripheral
1. add check in the gdma driver, to prevent multiple channels connecting
   to the same peripheral
2. memory copy DMA ID will occupy the peripheral's DMA ID on some ESP
   targets (e.g. esp32c3/s3). We should search for a free one when
install async memcpy driver.

Closes https://github.com/espressif/esp-idf/issues/10575
2023-02-01 11:10:26 +08:00
2a9759ea24 gdma: correct the dma trigger of uart
GDMA trigger actually is not assigned to UART controller, but for UHCI
controller
2023-02-01 10:56:01 +08:00
85193654f0 heap: Modify the memory type of the memory used as startup stack when memory protection is enabled
If memory protection is enabled on esp32c3 and esp32s3, we don't want to the heap component to see
the startup stack memory as D/IRAM but as DRAM only. Introduce a new type to make this possible in
the same fashion the regular D/IRAM regions are handled.
2023-01-31 07:57:02 +01:00
d6cf435f2d spi_flash: fix flash function arg_check with spi host_id 2023-01-30 10:35:07 +08:00
9526b100a4 spi: fix micro SPI_HOST_MAX error
Closes https://github.com/espressif/esp-idf/issues/10349
2023-01-29 16:32:45 +08:00
a4e9c56403 esp_wifi: Update wifi libs
Update wifi libs with below changes -
1. reject AP when assoc comeback time given is greater than 5 seconds
2023-01-28 11:29:01 +05:30
ecdd202285 mbedtls/port: added stream_block parameter sanity check 2023-01-25 15:38:28 +05:30
734724ba79 mbedtls: fix esp_aes_crypt_ctr writing to null stream block 2023-01-25 15:38:28 +05:30
865a72eb8f mbedtls: added SOC_AES_SUPPORT_AES_192 check in esp_aes_gcm_setkey() 2023-01-25 15:38:28 +05:30
c1ea06443a esp_hw_support(esp32): If the MAC_FACTORY CRC check fails, then esp_efuse_mac_get_default returns INVALID_CRC instead of abort
Closes https://github.com/espressif/esp-idf/issues/10401
2023-01-23 20:05:53 +08:00
86b2779adc bluetooth: fix that functions "coex_enable" and "coex_disable" are not used in pairs on ESP32-C3 and ESP32-S3 2023-01-20 10:53:52 +08:00
e8bdaf9198 versions: Update version to 4.4.4 2023-01-20 02:12:49 +08:00
3e978d1d8a efuse: fix esp_efuse_utility_write_reg() declaration 2023-01-19 14:29:36 +07:00
e2815b3d04 bugfix: Fix windows path case sensitivity
This commit fixes an issue where paths on Windows are case insensitive, for instance when setting the build folder its name would be converted to lowercase.

The culprit is our realpath() function, that was calling os.path.normcase() internally, since we are removing that call it makes sense to just remove the function entirely and call os.path.realpath() wherever necessary.

Closes https://github.com/espressif/esp-idf/issues/10282
2023-01-18 22:41:41 +01:00
a645015dee esp_flash: correct veriable 'size' description 2023-01-17 14:35:04 +08:00
c07c9083c1 spi_flash: Fix issue that cannot get accurate flash size when encounter large size memory,
Closes https://github.com/espressif/esp-idf/pull/9566
2023-01-17 14:35:03 +08:00
800dec96e9 Merge branch 'bugfix/clear_pmk_cache_for_missing_reason_codes' into 'release/v4.4'
Fix missing disconnected callback (Backport v4.4)

See merge request espressif/esp-idf!22036
2023-01-14 01:01:20 +08:00
850ac23d14 esp_wifi: Fix missing disconnected callback 2023-01-13 11:38:28 +05:30
d4080633f9 Merge branch 'feature/efuse_rev_major_minor_v4.4' into 'release/v4.4'
efuse: Adds major and minor versions (v4.4)

See merge request espressif/esp-idf!19541
2023-01-12 16:24:59 +08:00
18f5c3e2fc esp_wifi: Add check for wps start state 2023-01-12 11:55:59 +05:30
2a4fd41d9a NimBLE: Fix incomplete clearing of peer_dev_rec 2023-01-11 16:24:50 +05:30
ee9594aa04 rebase a2dp_gatts_coex to latest a2dp_sink 2023-01-11 14:40:22 +08:00
552beab8a9 Merge branch 'bugfix/sae_auth_and_pmk_issues_v4.4' into 'release/v4.4'
Fix SAE open auth and pmk issues (Backport v4.4)

See merge request espressif/esp-idf!21911
2023-01-10 17:19:01 +08:00
53f390fb62 build_system: stop looking for sdkconfig file specified by env var SDKCONFIG_DEFAULTS in bootloader subproject 2023-01-10 09:49:23 +08:00
7321307f6e Removed sha384 hash for certs > 2k 2023-01-09 15:58:13 +05:30
79807ec6ab wpa_supplicant: Set PMK from PMKSA incase of caching 2023-01-06 19:19:36 +05:30
de6fdfbd27 esp_wifi: Fix open auth issue after commit message exchange 2023-01-06 10:50:18 +05:30
c476c5e403 mspi: remove mspi 80m ddr mode warning regarding to timing tuning 2023-01-05 11:53:40 +08:00
c95db84365 docs: update cn trans for flash-encryptions 2023-01-04 21:33:40 +05:30
aa027bd1f6 docs: remove mention of DIS_BOOT_REMAP for chips other than ESP32-S2
Relevant: https://esp32.com/viewtopic.php?f=13&t=31188
2023-01-04 21:31:04 +05:30
0f46f0cfa4 mbedtls: Update config options as per v2.28.2 release 2023-01-04 15:36:24 +05:30
e7fb0dbdaa mbedtls: Update to v2.28.2
- Release notes: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.2
2023-01-04 14:05:56 +05:30
a901900533 Added ACL link related events handler in A2DP sink GAP callback 2023-01-04 11:48:57 +08:00
48212875f8 Added reporting for ACL link related events to application 2023-01-04 11:48:51 +08:00
1bac78fbc3 Tools: Improve idf.py error message when the argument value collides with the environment variable
Closes https://github.com/espressif/esp-idf/issues/10475
2023-01-03 19:01:14 +01:00
96b152a01f ulp-riscv: ULP RISC-V I2C example gets stuck on esp32s2
This commit fixes an issue where in the ULP RISC-V I2C example causes
a spurious wakeup of the main CPU because of a Trap signal when the ULP
core does not meet the wakeup threshold values. This was due to the fact
that the RTC_CNTL_COCPU_DONE signal was being set before the
RTC_CNTL_COCPU_SHUT_RESET_EN signal which was causing the the ULP RISC-V
core to not reset properly on each cycle.

Closes https://github.com/espressif/esp-idf/issues/10301
2023-01-02 14:24:16 +01:00
74721f524b mDNS: Fix example test in CI using multiple retries 2023-01-01 19:58:19 +00:00
42888d2919 doc: update wifi amsdu docs 2022-12-29 10:38:56 +08:00
cje
5998130eb9 sleep: fix sleep time inaccurate bug when select 8MD256 as rtc slow clock on ESP32
Related to: https://github.com/espressif/esp-idf/issues/6687
2022-12-28 15:33:57 +08:00
7d0cd23531 coredump: custom core dump stack is now supported on Xtensa targets 2022-12-26 12:24:26 +01:00
8e47edb731 refactor(nvs): custom allocator for all objects allocated in NVS 2022-12-26 15:06:38 +08:00
85392e3ec9 i2s: fixed rx update stuck bug 2022-12-23 10:53:03 +08:00
9ee3c8337d Merge branch 'bugfix/avoid_ftm_initiator_mode_on_softap_v4.4' into 'release/v4.4'
Avoid ftm initiator mode on softap (Backport v4.4)

See merge request espressif/esp-idf!21757
2022-12-23 10:39:38 +08:00
221df10ced Merge branch 'bugfix/change_the_level_of_nimble_log_forv4.4' into 'release/v4.4'
ble_mesh:example:change the level of nimble host log(v4.4)

See merge request espressif/esp-idf!21629
2022-12-22 19:42:11 +08:00
cfeccaa685 Merge branch 'bugfix/correct_the_default_SR_mode_v4.4' into 'release/v4.4'
bugfix/correct the SR_mode selection when konw nothing about Peripheral's SR_mode (v4.4)

See merge request espressif/esp-idf!21520
2022-12-22 19:37:27 +08:00
2ac433e1ae Merge branch 'feature/nimble_support_ble_max_conn_num_v4.4' into 'release/v4.4'
Nimble:  Support maximum number of connections to 9 on ESP32-C3 and ESP32-S3 (v4.4)

See merge request espressif/esp-idf!21551
2022-12-22 19:37:06 +08:00
90b5993867 Merge branch 'doc/opt_esp32_eco3_v4.4' into 'release/v4.4'
docs: mention that increasing ESP32_REV_MIN can reduce IRAM size (v4.4)

See merge request espressif/esp-idf!21702
2022-12-22 19:29:41 +08:00
aa21184a03 Merge branch 'doc/cpu_breakpoint_watchpoint_num_v4.4' into 'release/v4.4'
docs: fix the number of breakpoints and watchpoints for RISC-V chips (v4.4)

See merge request espressif/esp-idf!21704
2022-12-22 19:29:06 +08:00
2497798036 Merge branch 'contrib/github_pr_10199_v4.4' into 'release/v4.4'
Removed the 'configASSERT( xInheritanceOccurred == pdFALSE )' assertion from xQueueSemaphoreTake (GitHub PR)(v4.4)

See merge request espressif/esp-idf!21501
2022-12-22 19:28:20 +08:00
a744595440 esp_wifi:Update wifi libs
1. Avoid ftm initiator mode on softap
2. Fix home channel issue in ftm for apsta mode
3. Fix int overflow for T1-T4 counter variable
2022-12-22 15:03:40 +05:30
6d80c334f7 Merge branch 'bugfix/update_docs_for_secure_dl_mode_v4.4' into 'release/v4.4'
docs: Fix Secure DL mode documentation about flash read being unsupported (v4.4)

See merge request espressif/esp-idf!21654
2022-12-22 17:15:59 +08:00
1d5fd5587e Merge branch 'feature/modbus_remove_component_v44' into 'release/v4.4'
freemodbus: remove component files from esp-idf (backport v4.4)

See merge request espressif/esp-idf!18763
2022-12-22 17:05:56 +08:00
ea646a9c22 freemodbus: remove component files from esp-idf (backport v4.4) 2022-12-22 17:05:55 +08:00
800d11c48f Merge branch 'contrib/github_pr_10106_v4.4' into 'release/v4.4'
hal/uart_ll.h: Fix compile with C++ (GitHub PR) (v4.4)

See merge request espressif/esp-idf!21455
2022-12-22 17:01:14 +08:00
78e9a38ef4 Merge branch 'bugfix/fix_max_conn_num_issue_v4.4' into 'release/v4.4'
esp_wifi: change max connection num on ESP32C3 and ESP32S3 (Backport v4.4)

See merge request espressif/esp-idf!21753
2022-12-22 15:36:02 +08:00
3353d8404a esp_http_server: fix wrong context pointer in httpd_req_cleanup function
Added example which fails without the fix

Closes https://github.com/espressif/esp-idf/issues/10265
2022-12-22 10:14:34 +05:30
8abcacd25e esp_wifi: change max connection num on ESP32C3 and ESP32S3
Closes WIFI-5134
2022-12-22 11:45:50 +08:00
3d6e33e9a4 Merge branch 'fix/clear_cur_pmksa_v4.4' into 'release/v4.4'
Clear current pmksa before generating RSN IE (Backport v4.4)

See merge request espressif/esp-idf!21687
2022-12-22 09:37:40 +08:00
c88d8829cf Merge branch 'bugfix/unstall_other_cpu_on_core_reset_v4.4' into 'release/v4.4'
bugfix: unstall other cpu on core reset (backport v4.4)

See merge request espressif/esp-idf!21496
2022-12-21 19:55:01 +08:00
1d4f6af1bc Merge branch 'refactor/freertos_remove_gpl_license_text' into 'release/v4.4'
freertos: Remove GPL license text from port files

See merge request espressif/esp-idf!21588
2022-12-21 19:54:06 +08:00
8c7b0c191e esp_tls: Fix issue when timeout is not explicitly given in esp_tls_cfg_t
- If internet connectivity weakened or disappeared suddenly while we were
  in the TLS handshake stage, the app got stuck at that point indefinitely.
- This was because when timeout was not explicitly specified in esp_tls_cfg_t,
  the default timeout was set at the wrong place. This causes the sockets to be
  setup with zero timeout, hence the indefinite wait.
2022-12-21 14:42:44 +05:30
e59269efa0 esp_hw_support: Fix version in esp_chip_info for C3 and H2 2022-12-20 21:14:36 +08:00
a5964c442f esp32s3: fixed bug chip v0.0 detected as vX.Y
A typical value is 2.8.

Previous commit 32ef2b321a doesn't fix the issue cleanly. The MSB of wafer_minor also has this problem.
2022-12-20 21:14:36 +08:00
aba1eb81ea wpa_supplicant: Clear current pmksa before generating RSN IE
Also update wifi libs with below changes -
  - Fix reason codes for Invalid PMKID
  - Fix handling of Assoc Resp status codes for Station
2022-12-20 17:35:40 +05:30
9e87d53fed esp32s3: fixed bug chip v0.0 detected as vX.0
A typical value is 2.0.
2022-12-20 16:30:13 +08:00
26960f1734 efuse: Adds major and minor versions and others 2022-12-20 16:30:13 +08:00
7dde97d2d6 test_app: xip_psram test app 2022-12-20 14:00:49 +08:00
zwj
046a5b145d Update bt lib for ESP32
- Add config to set duplicate scan list refresh period
- overwrite the oldest device infor if the list is full
- Fixed duplicate scan period is not accurate
2022-12-20 11:40:34 +08:00
zwj
4cb0e30b08 Update bt lib for ESP32-C3 and ESP32-S3
- Add config to set duplicate scan list refresh period
- overwrite the oldest device infor if the list is full
- Fixed duplicate scan period is not accurate
2022-12-20 11:39:35 +08:00
41c643909e update bt lib for ESP32-C3 and ESP32-S3
1 fixed privacy error for directed adv
2 fixed multi periodic adv sync failed in air
2022-12-20 11:38:22 +08:00
zwj
c32c9d8833 Fixed some memory was not released after bluetooth controller initialization failed on ESP32-C3 and ESP32-S3 2022-12-20 11:36:58 +08:00
bdfc1426ac update bt-lib for ESP32
1 change default TX power to 9 dBm
2 fixed disconnect reason 0x1f (unspecified error)
3 fixed connection timeout due to terminate ind has not been acknowledged
2022-12-20 11:34:43 +08:00
zwj
13493a6137 Fixed some memory was not released after bluetooth controller initialization failed on ESP32 2022-12-20 11:29:33 +08:00
78af134110 docs: fix the number of breakpoints and watchpoints for RISC-V chips 2022-12-19 14:37:15 +01:00
2ae52901bd idf_size.py: Fix issue where diram size was halved in cases where iram was not fully filled with cache
This fixes an attempted fix for diram size calculation where it was counted twice, however the fix did not account for cases where iram was not fully filled with cache and therefore was of non 0 size.
Now the calculation should be correct regardless of the cache size.

Closes https://github.com/espressif/esp-idf/issues/9960

Fix expected output
2022-12-19 14:22:00 +01:00
e1d01a9032 docs: mention that increasing ESP32_REV_MIN can reduce IRAM size 2022-12-19 14:07:32 +01:00
56efeb2c76 Merge branch 'bugfix/fix_multicast_issue_v4.4' into 'release/v4.4'
esp_wifi: fix multicast pkts drop issue for some AP when DTIM period > 1 (V4.4)

See merge request espressif/esp-idf!21599
2022-12-19 20:21:24 +08:00
f44f3d13bc bluedroid: fix ble connection update with same params 2022-12-19 19:10:26 +08:00
5d6dfd139f examples: fix ble hid led output report 2022-12-19 19:01:13 +08:00
b59cefbfc0 ut: add test config for xip_from_psram 2022-12-19 18:49:50 +08:00
8cf14e42ba bluedroid: fix encrypt keysize of GATT characteristic permission 2022-12-19 17:42:08 +08:00
0cb30a3da0 bluedroid: correct the length of att read by type pdu 2022-12-19 17:41:45 +08:00
7a8fe58dd6 docs: Fix Secure DL mode documentation about flash read being unsupported
Simple flash read command is not supported if Secure DL mode is enabled on the target.
Remove reference of this from the relevant docs part.

Related: https://github.com/espressif/esptool/issues/810
Related: ESPTOOL-567
Closes IDF-6468
2022-12-16 11:52:54 +05:30
2e5307b247 system: don't disable cache if Flash .text and .rodata are moved to PSRAM 2022-12-16 12:59:06 +08:00
b1d22143a5 ble_mesh:example:change the level of nimble host log 2022-12-15 18:00:25 +08:00
bb79980093 mspi_tuning: fix psram timing tuning bug 2022-12-15 17:08:03 +08:00
d1ce1f9586 bt:Fixed the use of invalid configuration when the peer device configures the stream, and returned an incorrect error code 2022-12-15 17:01:32 +08:00
dd249a9ecd esp_system: fix placement of __stack_chk_fail from flash to RAM
When stack check is enabled, certain functions (sometimes placed in RAM)
are being decorated with stack guards and a call to __stask_chk_fail() in
case ofr stack corruption. For this reason, __stack_chk_fail() must be
placed in RAM too.

Add stack check config in heap tests on all targets to find eventual flash to RAM
calls due to stack checks when running callgraph_check.py
2022-12-14 12:57:08 +01:00
43ba878870 heap: fix linker issues and remove spi flash dependencies 2022-12-14 12:57:08 +01:00
b78193700a feat: remove tlsf_fls and tlsf_ffs from linker as they are inlined. 2022-12-14 12:57:08 +01:00
e0c92b3e04 tools: update list of references to not include symbold used by __assert_func calls
On xtensa architecture, the call to __assert_func uses a reference to __func__ that can
sometimes be placed in flash. Since the __asert_func can be called from functions in IRAM
the check_callgraph script can report an error when checking for invalid calls from IRAM
to flash sections. However, the __asert_func prevents this scenario at runtime so the
check_callgraph script reports a 'flas positive' situation. For this reasson, all references
to __func__$x found prior to a call to __assert_func are droped in the parsing of the rtl files.
2022-12-14 12:57:08 +01:00
9ec87993c8 heap: add check for usage of flash content from iram
this commits:
- adds build-time test to check that no call to flash regions are done from IRAM functions

- resolves problems related to IRAM function using content in flash memory

- update heap_caps_alloc_failed to use a default function name in DRAM
  when necessary instead of creating a function name variable in DRAM for
  each call of heap_caps_alloc_failed. This allows to save some extra bytes
  in RAM.
2022-12-14 12:57:08 +01:00
125609963e heap: add documentation about the function placement in IRAM and its usage in ISR
This commits adds a internal.md file in the heap directory to clarify the idea behind
which functions is placed in IRAM or in flash.

A section in mem_alloc.rst documentation is added to specify which functions from the
heap component API can be used in interrupt handlers.
2022-12-14 12:57:08 +01:00
6141600b61 heap: add selective placement of function in IRAM
This commit aims to place in the IRAM section only the functions that
are relevent for performance instead of placing the entire content of
multi_heap.c, mullti_heap_poisoning.c and tlsf.c in the IRAM.
2022-12-14 12:57:08 +01:00
d13e431341 esp_wifi: fix multicast pkts drop issue for some AP when DTIM period > 1 2022-12-14 17:19:27 +08:00
3eef9e7598 usb: Fix incorrect bmRequestType direction flag in USB Host Library
usb_host_transfer_submit_control() uses the incorrect bmRequestType direction
flag. Therefore, when doing a transfer check, all transfers were mistakenly
treated as OUT transfers (only affects transfer check and not actual transfer).
2022-12-13 22:28:02 +08:00
974b955cff hal: Fix USB DWC HAL host channel halt race condition
This commit fixes a race condtion bug with usb_dwc_hal_chan_request_halt()
where a channel the channel is halted if it has just completed a transfer
(i.e., finished processing a QTD with the "HOC" flag set) but the channel is
still pending interrupt handling. In this case...

- usb_dwc_hal_chan_request_halt() would simply read the channel's underlying
register, determine it is not active, not set the "halt_requested" flag, and
simply return true.
- The caller assumes of usb_dwc_hal_chan_request_halt() will assume that the
channel has halted, and may proceed to reconfigure the pipe/port
- When usb_dwc_hal_chan_decode_intr() comes to process the pending interrupt
it will simply return USB_DWC_HAL_CHAN_EVENT_CPLT not knowing a halt has been
requested.

This commit updates the implementation of usb_dwc_hal_chan_request_halt() so
that a halt is properly requested even if the underlying channel has already
physically halted.
2022-12-13 22:27:54 +08:00
5842aca69c usb: Refactor USB Host tests
* Error messages improved
* Configurable for different mock devices

Note: Backport 645592e157 to v4.4 without
migrating to pytest.
2022-12-13 22:26:47 +08:00
7295933f5f usb_host: Rename struct/ll/hal symbols to use "usb_dwc" prefix
Following the file renaming to use the "usb_dwc" prefix, this commit
updates the symbol names of those files to use the "usb_dwc" as well.

Some LL functions were also renamed so that the register name is
mentioned.
2022-12-13 21:36:00 +08:00
c06346da35 usb_host: Rename struct/ll/hal files to use "usb_dwc" prefix
This commit updates the DWC_OTG based struct/ll/hal file names to
use the prefix "usb_dwc". This naming scheme reduces ambiguity if
another USB controller implementation is added.

As a result, "hcd.c" has been renamed to "hcd_dwc.c"
2022-12-13 21:36:00 +08:00
d33e551f47 freertos: Remove GPL license text from port files
This commit removes the GPL license text from various FreeRTOS port files as it
no longer matches the licensing of FreeRTOS v10.4.3 which is distributed under
the MIT license.
2022-12-13 19:29:24 +08:00
b116cff94f Queue Send fix
Fixes rare deadlock on heavy loaded multicore-systems.
2022-12-13 17:23:29 +08:00
9f3c0b1e38 usb_host: Fix incorrect memset() usage in HCD
This commit fixes incorrect usage of memset() in the HCD's various
_buffer_parse_...() functions. The memset was not clearing the qtd lists, and
were simply setting the first qtd to a non zero value (i.e., the length of
the QTD list).

However, no bug occurred as the subsequent _buffer_fill_...() functions would
overwrite the QTD list anyways.
2022-12-13 16:57:56 +08:00
f1ee4f551d Nimble: Update documentation to include distinction between upstream
mesh example and ESP-BLE-MESH
2022-12-13 12:56:17 +05:30
7c75d88da5 Nimble: Support maximum number of connections to 9 on ESP32-C3 and ESP32-S3 2022-12-11 18:17:25 +05:30
43aa501f18 esp_flash_encrypt: If it is supported then Enable secure download mode in release mode instead of disabling it completely. 2022-12-11 18:16:56 +05:30
efcef1a400 correct the SR_mode selection when konw nothing about Peripheral 2022-12-09 10:28:06 +08:00
e86181704a Merge branch 'fix/fix_behaviour_of_api_to_set_fe_release_mode_v4.4' into 'release/v4.4'
esp_flash_encrypt: If it is supported then Enable secure download mode in... (v4.4)

See merge request espressif/esp-idf!21494
2022-12-08 16:01:18 +08:00
e2b299660e bugfix: unstall other cpu on core reset
- Closes https://github.com/espressif/esp-idf/issues/10320
2022-12-08 15:38:01 +08:00
0a83ebcded esp_flash_encrypt: If it is supported then Enable secure download mode in release mode instead of disabling it completely. 2022-12-08 10:28:48 +05:30
9e46c9b894 Merge branch 'bugfix/fix_esp_https_server_initialize_v4.4' into 'release/v4.4'
esp_https_server: Fix initializers missing in esp_https_server (backport v4.4)

See merge request espressif/esp-idf!21482
2022-12-08 12:19:16 +08:00
e72afc771f Merge branch 'bugfix/fix_slave_gpio_cs_mixed_with_iomux_bus_v4.4' into 'release/v4.4'
spi_slave: fix slave can't use iomux bus mixed with gpio cs_pin (v4.4)

See merge request espressif/esp-idf!21375
2022-12-08 10:58:08 +08:00
4500ddf2f0 Merge branch 'bugfix/modify_wifi_max_conn_num_v4.4' into 'release/v4.4'
esp_wifi: update wifi lib

See merge request espressif/esp-idf!21479
2022-12-08 09:49:20 +08:00
6da4c6b513 Merge branch 'bugfix/fix_long_time_to_get_ip_v4.4' into 'release/v4.4'
lwip: fix the bug that long time to get IP (backport v4.4)

See merge request espressif/esp-idf!21462
2022-12-07 21:49:28 +08:00
a34a4a91fb esp_wifi: update wifi lib
1. Modify wifi max connection num
2. Fix the ESPNOW senf fail after changing opmode
3.Add wifi station config for enabling transition_disbale feature
2022-12-07 18:14:36 +08:00
43f93678ce reduce the max connection number to 15 2022-12-07 18:04:46 +08:00
e943143e0f esp_wifi: fix esp32c3 connect fail
Closes IDFCI-1524
2022-12-07 18:04:46 +08:00
a82a530387 Merge branch 'staging/esp_static_assert_v4.4' into 'release/v4.4'
C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT  (v4.4)

See merge request espressif/esp-idf!21439
2022-12-07 16:58:01 +08:00
12252773b9 esp_https_server: Fix initializers missing in esp_https_server 2022-12-07 15:10:03 +08:00
17db9540d6 Merge branch 'fix/usb/error_handling_bacport_v4.4' into 'release/v4.4'
USB Host: Invalid pointer hotfix (backport v4.4)

See merge request espressif/esp-idf!21367
2022-12-07 14:00:01 +08:00
2bbd3ac583 esp_wifi:Add wifi station config for enabling transition_disbale feature 2022-12-07 11:44:28 +08:00
3823a991db update doc for espnow max encryped connection 2022-12-07 11:37:06 +08:00
5c1ff3d70b Modify maximum softap conn num and espnow encryption peer num 2022-12-07 11:33:00 +08:00
77b37716a3 Merge branch 'bugfix/reduce_BTU_TASK_stack_consumption_v4.4' into 'release/v4.4'
Reduce the stack consumption of BTU_TASK (backport v4.4)

See merge request espressif/esp-idf!21435
2022-12-07 11:29:48 +08:00
85bf17d7e2 lwip: fix the bug that long time to get IP 2022-12-07 11:24:13 +08:00
e83289fb7c Merge branch 'docs/remote_signing_of_images_cmd_fix_v4.4' into 'release/v4.4'
docs: fix secure boot "Remote Signing of Images" section command (v4.4)

See merge request espressif/esp-idf!21471
2022-12-07 11:11:41 +08:00
56342a6057 Merge branch 'feature/support_rotating_lcd_ssd1306_v4.4' into 'release/v4.4'
Support rotation on SSD1306 (backport v4.4)

See merge request espressif/esp-idf!21469
2022-12-07 10:55:55 +08:00
1d52944fda Merge branch 'bufix/Backport_some_wifi_lwip_bugs_for_4.4_1205' into 'release/v4.4'
lwip:optimization dns ipv4 ipv6 timer

See merge request espressif/esp-idf!21447
2022-12-07 10:37:19 +08:00
1c0d0e505d Merge branch 'bugfix/multiple_wifi_fixes_v4.4' into 'release/v4.4'
esp_wifi: backport some wifi bugfixes to v4.4

See merge request espressif/esp-idf!21449
2022-12-07 10:28:57 +08:00
0062349955 docs: fix secure boot "Remote Signing of Images" section command 2022-12-06 23:46:46 +05:30
68178540f0 lcd: Support rotation SSD1306 and fix mirror y. 2022-12-06 15:43:17 +01:00
4e083d8214 Merge branch 'bugfix/spp_vfs_memory_leak_v4.4' into 'release/v4.4'
Component_bt/fix esp_spp_vfs_register memory leak(v4.4)

See merge request espressif/esp-idf!21440
2022-12-06 20:40:33 +08:00
622fb9e906 CI: check_public_headers script will detect the use of static asserts in headers
When a public header contains _Static_assert or static_assert, check_public_headers.py script will detect it and report it as an issue.
Indeed, public headers shall now use ESP_STATIC_ASSERT.
2022-12-06 19:28:51 +08:00
2e17ad62b8 lwip:optimization dns ipv4 ipv6 timer
* Update submodule: git log --oneline * Update submodule: git log --oneline 6132c9755a43d4e04de4457f1558ced415756e4d..79182163e9e77547e58a6aa34db94902b9812cb3
Detailed description of the changes:
  - dhcp: optimization fine timer when dhcp start(esp-lwip@79182163)
  - ip6 timer: optimization lwip ip6 reassembly timer (esp-lwip@c943fc5a)
  - ip4 timer: optimization lwip ip4 reassembly timer (esp-lwip@17f41c9f)
  - dns timer: optimization lwip dns timer (esp-lwip@7f5ab42c)
2022-12-06 17:30:47 +08:00
1d13716d28 Merge branch 'bugfix/freertos_port_miss_header_v4.4' into 'release/v4.4'
freertos: add missing header include for esp_chip_info.h to port.c (v4.4)

See merge request espressif/esp-idf!21459
2022-12-06 14:32:36 +08:00
52ba3f1ee0 Merge branch 'bugfix/Fix_exceptional_list_params_check_v4.4' into 'release/v4.4'
ble_mesh: stack: Fix exceptional list parameters check issue(v4.4)

See merge request espressif/esp-idf!21442
2022-12-06 14:13:20 +08:00
e0b8f83253 Merge branch 'bugfix/reattempt_crash_v4.4' into 'release/v4.4'
NimBLE: Fixed going for reattempt connection code (v4.4)

See merge request espressif/esp-idf!21176
2022-12-06 14:02:25 +08:00
8246d6bec6 Assert when malloc user_data fail 2022-12-06 06:02:01 +00:00
854a31feda Modified spp vfs example 2022-12-06 06:02:01 +00:00
cdbdb31d6d Fixed memory leak when SPP initialization failed 2022-12-06 06:02:01 +00:00
67341a31b7 Added esp_spp_vfs_unregister() to free memory allocated by esp_spp_vfs_register() 2022-12-06 06:02:01 +00:00
da03bab573 small fixes 2022-12-06 13:12:17 +08:00
9e66eb4c9f freertos: add missing header include for esp_chip_info.h to port.c
Closes https://github.com/espressif/esp-idf/issues/10310
2022-12-06 12:18:20 +08:00
5d4edd8218 Merge branch 'bugfix/mcpwm_example_support_usj_v4.4' into 'release/v4.4'
mcpwm: bdc control example also support usb serial jtag console

See merge request espressif/esp-idf!21432
2022-12-06 11:38:57 +08:00
d78c08587d Merge branch 'contrib/github_pr_9529_v4.4' into 'release/v4.4'
component_bt: Fixed memory leak due to not freeing memory if posting a message to a thread fails(v4.4)

See merge request espressif/esp-idf!21446
2022-12-06 10:51:53 +08:00
e5b0abcc57 Merge branch 'bugfix/backport_wifi_fixes_v4.4' into 'release/v4.4'
backported some wifi fixes (backport v4.4)

See merge request espressif/esp-idf!21448
2022-12-06 10:25:02 +08:00
731486ad33 hal/uart_ll.h: Fix compile with C++
I'm including <hal/uart_ll.h> in my C++ application because I need to
bypass the uart driver. The inline functions in the header file fail to
compile as C++.

All of the enums need explicit casts for conversion to/from integers.

Merges https://github.com/espressif/esp-idf/pull/10106
2022-12-06 10:18:32 +08:00
c71071b36c esp_wifi: Add changes to skip SAE handshake during WPS connection 2022-12-05 21:35:11 +05:30
c34ba085ba esp_wifi: Flush PMK caching if bss akm has changed 2022-12-05 21:35:05 +05:30
9e4b31e0f2 Correct SSID copy length during WPS scan 2022-12-05 21:34:46 +05:30
99b4b5fbb2 Merge branch 'bugfix/allow_bypass_lcd_cmd_v4.4' into 'release/v4.4'
spi_lcd: panel_io_spi_tx_color without cmd (v4.4)

See merge request espressif/esp-idf!21428
2022-12-05 22:47:22 +08:00
9acf90f5e4 esp_wifi: backport some bugfixes to v4.4
1.Bugfix for  clear bss info when wifi stop
2.Bugfix for  add clear ap list interface
3.Modify wifi scan return value.
4.Change the log level of some logs to avoid misunderstanding.
5.Fix connect fail return wrong error code issue.
6.Fix WAPI issue on gtk compability and referrence to broadcast arp pkts.
7.Support WiFi tx fragment in the crypto mode of gcmp.
8.Fix tx fragment issue that pn code is less than msdu after pn code add two for tx fragment.
9.Fixed some issues on Soft-AP power save.
10.fix invalid child issue
11.fix WIFI_EVENT_AP_STADISCONNECTED event error
12.Fix SoftAP memory leak issue.
13.Fixed sta get ap info does not return connected ssid issue.
14.Fix SoftAP recv ps-poll not update inactive timer issue.
2022-12-05 22:38:33 +08:00
d8362cce90 esp_wifi: fix wapi gtk id compability issue and adapt tx frag pn sequently. 2022-12-05 21:48:36 +08:00
082ff4e441 Apply suggestions to 2 files 2022-12-05 21:44:06 +08:00
d404e429ec esp_wifi: Modify wifi scan return value.
1. Modify wifi scan return value same to docs.
2. Change some logs' log level wo avoid misunderstanding.
3. Fix connect fail return wrong error code issue
2022-12-05 21:42:57 +08:00
df9fba9d22 update doc for set channel 2022-12-05 21:41:39 +08:00
c227cbea3f update wifi reason code 2022-12-05 21:40:44 +08:00
cf3e45deef esp_wifi:add clear ap list interface 2022-12-05 20:57:00 +08:00
91983ad0cf bt: Fixed incorrect parameters in switching to BTC context 2022-12-05 20:49:18 +08:00
5c14b6eed1 bt:Modify the member variable *arg in struct btc_msg to arg[0] 2022-12-05 20:48:16 +08:00
9ec06ba4ac bt: Fixed memory leak due to not freeing memory if posting a message to a thread fails 2022-12-05 20:48:04 +08:00
4aa7b2a837 ble_mesh: stack: Fix exceptional list parameters check issue 2022-12-05 20:25:07 +08:00
049d21bb12 C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT
Closes https://github.com/espressif/esp-idf/issues/9938
2022-12-05 18:16:08 +08:00
d927830b81 NimBLE: Fixed going for reattempt connection code 2022-12-05 14:36:48 +05:30
c529135c71 Merge branch 'bugfix/share_intr_v4.4' into 'release/v4.4'
intr_alloc: fixed freed interrupt sources not being able to be allocated again with different flags (v4.4)

See merge request espressif/esp-idf!21286
2022-12-05 16:38:09 +08:00
cb4fccb38a mcpwm: bdc control example also support usb serial jtag 2022-12-05 16:19:45 +08:00
zwj
b07e7d7c3f Reduce the stack consumption of BTU_TASK 2022-12-05 15:50:09 +08:00
694bc6bf47 Merge branch 'feature/backport_blufi_coexist_phy_init_flag_v4.4' into 'release/v4.4'
esp_wifi: backport coexist fix, connectionless ps fix, blufi feature

See merge request espressif/esp-idf!21411
2022-12-05 15:04:43 +08:00
628af15b5a Merge branch 'bugfix/xtensa_freertos_16B_aligned_v4.4' into 'release/v4.4'
FreeRTOS: Make the default stack alignment 16 for Xtensa

See merge request espressif/esp-idf!21405
2022-12-05 15:00:55 +08:00
ca6a427a81 spi_lcd: panel_io_spi_tx_color without cmd
Closes https://github.com/espressif/esp-idf/issues/10302
2022-12-05 14:27:34 +08:00
6672ec0692 Merge branch 'feature/support_ble_max_conn_num_to_9_v4.4' into 'release/v4.4'
Support bluedroid host maximum number of connections to 9 (backport v4.4)

See merge request espressif/esp-idf!21399
2022-12-05 12:16:55 +08:00
8b24bbd919 Merge branch 'bugfix/fix_c3_s3_ble_temperature_performance_v4.4' into 'release/v4.4'
Fixed bluetooth disconnection caused by HW temperature rise or fall(backport v4.4)

See merge request espressif/esp-idf!21371
2022-12-05 10:52:27 +08:00
78cef1b7d2 esp_wifi: update lib for backport 2022-12-02 20:02:07 +08:00
b6800c3e01 phy: only set phy_init_flag at power domain off, when all modems deinit 2022-12-02 19:54:58 +08:00
c9996c010d esp_wifi: fix some connectionless related issue 2022-12-02 19:53:35 +08:00
6a66453e94 docs: update BluFi documentation 2022-12-02 19:48:41 +08:00
2d2177b4ad blufi: update version to 1.3
record connecting status, got ip status, maximum retry, connection end info (reason code, rssi) and provide greater information to phone
2022-12-02 19:45:28 +08:00
de5156bb20 esp_wifi: report rssi info in wifi event 2022-12-02 19:43:24 +08:00
f90c12fc3c Merge branch 'bugfix/fix_hid_device_vup_without_connection_4.4' into 'release/v4.4'
Bugfix/Fix HID Device can not remove virtually cabled device without a connection[backport 4.4]

See merge request espressif/esp-idf!21366
2022-12-02 16:00:20 +08:00
3dcb9cf8ec Merge branch 'bugfix/sta_set_extra_ies_for_open_AP_v4.4' into 'release/v4.4'
esp_wifi: STA set extra IEs for open AP v4.4

See merge request espressif/esp-idf!21363
2022-12-02 16:00:31 +08:00
b2ddedb941 FreeRTOS: Make the default stack alignment 16 for Xtensa 2022-12-02 15:20:09 +08:00
7ae5ec946d Merge branch 'bugfix/rtc_retain_mem_always_erased_v4.4' into 'release/v4.4'
Bootloader: retained memory can now be kept after reboot when custom data enabled (backport v4.4)

See merge request espressif/esp-idf!21233
2022-12-02 13:49:59 +08:00
ee867ec16b Merge branch 'bugfix/i2c_func_iram_v4.4' into 'release/v4.4'
I2C: put some interrupt used functions into IRAM

See merge request espressif/esp-idf!20991
2022-12-02 12:43:40 +08:00
zwj
417dff3a1e update BLE lib for ESP32-C3 and ESP32-S3
- Fixed lld_con.c line 3048 assert
- Fixed crash sometimes when connected as a slave by 8th device
2022-12-02 12:01:04 +08:00
6e1eb4af26 bluedroid host supports the maximum number of connections to 9 2022-12-02 12:00:53 +08:00
2c41b01771 Merge branch 'bugfix/fix_bt_sleep_hangs_when_enable_light_sleep_backport_v4.4' into 'release/v4.4'
bt: fix bt sleep flow hangs in btdm_sleep_clock_sync(backport v4.4)

See merge request espressif/esp-idf!21383
2022-12-02 11:27:12 +08:00
f9488e59a7 Merge branch 'bugfix/check_ies_in_match_security_v4.4' into 'release/v4.4'
Adding check for ies in match security (Backport v4.4)

See merge request espressif/esp-idf!20790
2022-12-02 10:37:39 +08:00
d688fc3542 eps-wifi: update wifi lib
1. Adding check for ies in match security
2. Set AP rsnxe while connecting to a AP
3. Restores station status to connected when no other AP is found for roam
4. Add config option for AP retry count
5. Fix unprotected SA Query issue
2022-12-01 19:35:30 +05:30
b23a2b0a75 spi: limit esp32 dma workaround only on esp32 2022-12-01 20:57:09 +08:00
458f7190f1 bt: fix bt sleep flow hangs in btdm_sleep_clock_sync
Bluetooth low power related logic and regs have separate power domain from MAC and BB,
and do not power down during light sleep. If reset when power up MAC and BB in sleep
flow, it may destroy the state of bt low power part.
2022-12-01 20:53:02 +08:00
cd08ea1f31 spi_slave: fix slave can't use iomux bus mixed with gpio cs_pin 2022-12-01 20:15:21 +08:00
3f42a81447 Fixed CI esp32s3.default_2_s3.Test failed 2022-12-01 19:45:04 +08:00
2902766706 - update phy lib
- Enable BLE pll track to fix bluetooth disconnection caused by temperature rise or fall on ESP32C3 and ESP32S3
- call pll track in controller task
2022-12-01 19:43:55 +08:00
465577dd28 Bootloader: retained memory can now be kept after reboot when custom data enabled
User's custom data are not taken into account during the CRC calculation anymore.
Which means taht the retained mem structure is not systematically erased
on each reboot anymore.
2022-12-01 16:34:59 +08:00
9a6a28734b I2C: put some interrupt used functions into IRAM,
closes https://github.com/espressif/esp-idf/issues/10079
2022-12-01 16:20:56 +08:00
2c89caab9b usb: Don't access uninit pointer if usbh_install fails 2022-12-01 08:37:01 +01:00
7ba36f4d47 fix HID device can not remove virtually cabled device without a connection
Closes https://github.com/espressif/esp-idf/issues/10107
2022-12-01 15:18:19 +08:00
7252d678a0 esp_wifi: STA set extra IEs for open AP 2022-12-01 12:19:33 +05:30
00396a9d49 Merge branch 'bufix/a2dp_fail_connect_again_after_disconnect_v4.4' into 'release/v4.4'
component_bt: Fixed a2dp failing to connect again after disconnect(v4.4)

See merge request espressif/esp-idf!21343
2022-12-01 10:34:45 +08:00
db7c50b373 Merge branch 'bugfix/security_params_overwrite_v4.4' into 'release/v4.4'
Add changes to prevent security params overwritten in full scan (backport v4.4)

See merge request espressif/esp-idf!21301
2022-11-30 22:53:32 +08:00
a2e8c6f95c Fixed a2dp failing to connect again after disconnect 2022-11-30 19:11:27 +08:00
7c1dd9025f Merge branch 'feature/update_expat_2_5_0' into 'release/v4.4'
expat: Upgrade version to release v2.5.0

See merge request espressif/esp-idf!21294
2022-11-30 16:43:15 +08:00
cdf8810f63 Merge branch 'bugfix/disable_prov_encryption_v4.4' into 'release/v4.4'
Wifi Prov: Disabled the default support for BLE Encrpytion on characteristics read /write (v4.4)

See merge request espressif/esp-idf!21264
2022-11-30 12:06:08 +08:00
99e2722aab Merge branch 'fix/gdbgui_v4.4' into 'release/v4.4'
Tools: gdbgui is not supported on Python 3.11

See merge request espressif/esp-idf!21054
2022-11-29 18:07:03 +08:00
89bb0c0759 Merge branch 'bt/opt_audio_datapath_v4.4' into 'release/v4.4'
bt/optimized a2dp_sink audio datapath (v4.4)

See merge request espressif/esp-idf!21223
2022-11-29 17:58:26 +08:00
359762c84a Merge branch 'bugfix/optimize_hidh_disconnection_4.4' into 'release/v4.4'
Bugfix/Fix HID Host improper handle of freeing resource in esp_hid component[backport 4.4]

See merge request espressif/esp-idf!21249
2022-11-29 17:56:12 +08:00
3974be7fec Tools: gdbgui is not supported on Python 3.11
Closes https://github.com/espressif/esp-idf/issues/10116
2022-11-28 10:29:34 +00:00
7a77109e0d ci: lift restriction on pygdbmi in panic test
Backport of 01f1aba2d0
2022-11-28 10:29:34 +00:00
e963447276 ci: lift the restriction on pygdbmi in ttfw_idf 2022-11-28 10:29:34 +00:00
5bcd438a45 Add changes to prevent security params overwritten in full scan (backport v4.4) 2022-11-28 14:52:43 +05:30
7ad67bf462 expat: Upgrade version to release v2.5.0 2022-11-28 13:55:21 +05:30
932b6699ac Merge branch 'fix/secure_boot_v2_fix_warning_message_v4.4' into 'release/v4.4'
Fix/secure boot v2 fix warning message (v4.4)

See merge request espressif/esp-idf!21275
2022-11-28 11:37:16 +08:00
e5999ea4fb intr_alloc: fixed freed interrupt sources not being able to be allocated again with different flags
Mark the vector descriptor source as freed.
2022-11-28 10:45:27 +08:00
1c82aa5369 Merge branch 'bugfix/serial_reader_linux_writes_correctly_4.4' into 'release/v4.4'
bugfix(tools): idf.py monitor now reads correctly on Linux (backport 4.4)

See merge request espressif/esp-idf!21271
2022-11-25 23:24:31 +08:00
98430b2f94 secure_boot_v2: Fix warning message 2022-11-25 18:34:31 +05:30
0c374689ff Merge branch 'bugfix/secure_boot_v2_bootloader_reflash_note_v4.4' into 'release/v4.4'
docs: secure-boot-v2: remove incorrect note about bootloader re-flash (v4.4)

See merge request espressif/esp-idf!21266
2022-11-25 20:23:08 +08:00
56b2ae504f Merge branch 'feature/mqtt_cmakefile_cleanup_v4.4' into 'release/v4.4'
[MQTT] Simplifies MQTT CMakeLists file(v4.4)

See merge request espressif/esp-idf!20483
2022-11-25 19:27:08 +08:00
dcf87b10b6 bugfix(tools): idf.py monitor now reads correctly on Linux
A missing flush in the serial reader implementation for
Linux target was causing input to idf.py monitor to not
be forwarded to the application. This is fixed now.
2022-11-25 11:41:24 +01:00
5e436add7a docs: secure-boot-v2: remove incorrect note about bootloader re-flash
In secure-boot-v2 scheme, one can always regenerate signature using
secure boot signing key and re-flash either bootloader or application.
2022-11-25 14:23:24 +05:30
d86afd82c1 Wifi Prov: Disabled the default support for BLE Encrpytion on characteristics read /write
By default, disabled the BLE Encrpyption requirement for provisioning characteristic.
With this flag enabled, when remote attempts to read and if the ACL link is not encrypted,
ESP device will return Insufficient Authentication. It is remote device responsibility to go
for link encryption which may result in pairing.

Some devices do not proceed for any pairing and just show failure pop-up. Also, user needs
to remove bonding on remote phone manually and then try again. This is causing bad user experience.

End user can enable it as per their use case.
2022-11-25 14:18:15 +05:30
c2c6457fbf Merge branch 'bugfix/mqtt_start_stop_timer_fixes_v4.4' into 'release/v4.4'
mqtt: Fix keepalive with esp-timer; clean close SM (v4.4)

See merge request espressif/esp-idf!20816
2022-11-25 15:25:24 +08:00
54c5e28c80 optimize HID Host disconnection procedure 2022-11-25 09:34:12 +08:00
c273e132ff [MQTT] Simplifies MQTT CMakeLists file
- Removes mocks creation
- Adds tcp_transport explicitly as dependency

Closes https://github.com/espressif/esp-idf/issues/9630
2022-11-24 15:03:23 +00:00
39189e7522 Merge branch 'bugfix/fixed_HIDH_connection_failure_v4.4' into 'release/v4.4'
bugfix/fixed connection failure and build errors of HID host (v4.4)

See merge request espressif/esp-idf!21210
2022-11-24 19:12:13 +08:00
f2777e994d Merge branch 'ci/iram_overflow_build_ssc_and_test_apps_4.4' into 'release/v4.4'
CI: build ssc and test apps iram overflow (4.4)

See merge request espressif/esp-idf!21217
2022-11-24 18:45:02 +08:00
a1b4ef2806 Increase BtI2STask stack depth to avoid stack overflow 2022-11-24 12:14:15 +08:00
2c38701f68 optimized a2dp_sink audio datapath
1. removed audio cache in BTC layer of Bluedroid
2. added flow control for audio data in application layer

Closes https://github.com/espressif/esp-idf/issues/9622
2022-11-24 12:14:08 +08:00
8eb55c84a8 test_apps: fix IRAM overflow in build test apps 2022-11-24 11:33:59 +08:00
2d220b5c3f 1. changed pin_type of Legacy Paring from FIXED to VARIABLE to avoid authentication failure
2. provide compatibilities with devices that do not support Secure Simple Paring

Closes https://github.com/espressif/esp-idf/issues/10069
Closes https://github.com/espressif/esp-idf/issues/10005
2022-11-23 20:53:41 +08:00
11ab4404ff fixed build errors with Secure Simple Paring disabled 2022-11-23 20:52:09 +08:00
2302651311 Merge branch 'mesh/bugfix_fix_memory_leak_issue_v4.4' into 'release/v4.4'
esp_mesh: fix the memeory leak issue when call esp_mesh_start/stop (backport v4.4)

See merge request espressif/esp-idf!21133
2022-11-23 11:42:25 +08:00
832ba7dba2 Merge branch 'bugfix/legacy_rmt_resource_leak_v4.4' into 'release/v4.4'
rmt: fix memory leak in the legacy driver (v4.4)

See merge request espressif/esp-idf!21167
2022-11-23 11:29:17 +08:00
4f3f8ebb3d Merge branch 'bugfix/fix_hfp_clcc_parser_bug_4.4' into 'release/v4.4'
Bugfix/Fix HFP client parse CLCC command response bug[backport 4.4]

See merge request espressif/esp-idf!21157
2022-11-23 11:09:41 +08:00
2b4b59e635 Merge branch 'bugfix/a2dp_source_memory_access_out_of_bounds_v4.4' into 'release/v4.4'
Fixed the issue memory access out of bounds in a2dp_source example (v4.4)

See merge request espressif/esp-idf!21145
2022-11-23 10:32:16 +08:00
b781bb3134 Merge branch 'bugfix/change_log_print_forv4.4' into 'release/v4.4'
ble_mesh:example:Add command to test the function of duplicate exceptional list(v4.4)

See merge request espressif/esp-idf!21121
2022-11-23 10:25:47 +08:00
e591c290ad ble_mesh:example:Add command to test the function of duplicate exceptional list(v4.4) 2022-11-23 10:25:45 +08:00
76d805f15a Merge branch 'feature/support_ble_memory_release_on_esp32c3_and_esp32s3_v4.4' into 'release/v4.4'
support BLE memory release on ESP32C3 and ESP32S3 (backport v4.4)

See merge request espressif/esp-idf!21168
2022-11-22 14:38:03 +08:00
00402bef5f Merge branch 'fix/bitstring_4_v4.4' into 'release/v4.4'
Tools: Use bitstring package compatible with supported Python versions

See merge request espressif/esp-idf!21165
2022-11-21 22:12:45 +08:00
345a12c1f9 Merge branch 'feature/tlsf-dynamic-control-size_v4.4' into 'release/v4.4'
heap: Update to the new tlsf implementation of dynamic metadata size (backport v4.4)

See merge request espressif/esp-idf!20797
2022-11-21 19:02:35 +08:00
zwj
8e50c5acb2 support BLE memory release on ESP32C3 and ESP32S3 2022-11-21 10:46:30 +08:00
1cece7eef0 rmt: fix memory leak in the legacy driver
Closes https://github.com/espressif/esp-idf/issues/10173
2022-11-21 10:00:24 +08:00
7f732720f0 Tools: Use bitstring package compatible with supported Python versions
Bitstring>=4 supports Python 3.7+ only. See:
https://github.com/scott-griffiths/bitstring/releases/tag/bitstring-4.0.1
2022-11-20 17:35:34 +01:00
1f63dc70b8 Merge branch 'bugfix/fix_iram_end_redefined_backportv4.4' into 'release/v4.4'
bugfix: fix redefined _iram_end (backport v4.4)

See merge request espressif/esp-idf!21159
2022-11-20 18:30:09 +08:00
cf0c0d98ee bugfix: fix redefined _iram_end 2022-11-18 19:51:23 +08:00
a96c1fc7c6 fix HFP client parse CLCC command response bug 2022-11-18 19:41:41 +08:00
e3ec58043f Fixed the issue memory access out of bounds in a2dp_source example 2022-11-18 16:40:03 +08:00
be9d294718 Merge branch 'contrib/github_pr_10027_v4.4' into 'release/v4.4'
[Panic] also print to secondary USB Serial/JTAG Console (GitHub PR) (v4.4)

See merge request espressif/esp-idf!21022
2022-11-18 11:52:06 +08:00
da943339ad Merge branch 'bugfix/change_default_tx_power_on_c3_and_s3_v4.4' into 'release/v4.4'
Change BLE default TX power on ESP32C3 and ESP32S3(backport v4.4)

See merge request espressif/esp-idf!21102
2022-11-18 10:46:33 +08:00
4d6cce4b3b esp_mesh: fix the memeory leak issue when call esp_mesh_start/stop 2022-11-17 17:30:52 +08:00
a54467fcfb Merge branch 'contrib/github_pr_7144_v4.4' into 'release/v4.4'
Update i2c.c to consider two I2C buses for clear bus counter (GitHub PR) (backport v4.4)

See merge request espressif/esp-idf!20505
2022-11-17 16:35:50 +08:00
58979bee59 cleanup bluetooth sdkconfig.defaults 2022-11-17 03:46:02 +00:00
zwj
b6f3bfaa13 Update bt lib for ESP32C3 and ESP32S3
- Added config to disable scan backoff
- Fixed llm_scan.c assert at line 1485 during controller deinit if duplicate scan is not stopped
- Call pll track in controller task
2022-11-17 03:46:02 +00:00
269c02f391 Fixed ble_compatibility_test example NVS init error 2022-11-17 03:46:02 +00:00
zwj
80078b6192 Fixed errors reported by CI clang_tidy_check 2022-11-17 03:46:02 +00:00
zwj
d6e3d887c1 Fixed sometimes BTU task overflow when doing read and write performance test 2022-11-17 03:46:02 +00:00
zwj
485f3a4ce1 change default tx power from 3dBm to 9dBm 2022-11-17 03:46:02 +00:00
54dcccc1f6 Merge branch 'bugfix/flake8_precommit_v4.4' into 'release/v4.4'
precommit: update flake8 repo url to use github (v4.4)

See merge request espressif/esp-idf!21096
2022-11-17 09:13:52 +08:00
43a411d452 precommit: update flake8 repo url to use github
Gitlab mirror repo has been deprecated.
2022-11-15 16:21:13 +08:00
36dde93b57 Merge branch 'feature/remove_psram_cs_clk_pin_settings_config_s2_s3_v4.4' into 'release/v4.4'
psram: remove CS/CLK pin settings in kconfig on ESP32S2/S3 (v4.4)

See merge request espressif/esp-idf!21045
2022-11-15 10:53:23 +08:00
f902b64f40 Merge branch 'bugfix/a2dp_can_not_connect_after_ble_connected_v4.4' into 'release/v4.4'
fixed the issue iOS devices cannot initiate connection (v4.4)

See merge request espressif/esp-idf!21062
2022-11-14 15:41:14 +08:00
ca8d88a8f5 Merge branch 'bugfix/wpa_enterprise_reauth_v4.4' into 'release/v4.4'
esp_wifi: Fix WiFi Enterprise Reauthentication issue (v4.4)

See merge request espressif/esp-idf!21072
2022-11-14 15:24:37 +08:00
24efd4a505 esp_wifi: Bugfix WPA Enterprise Reauthentication issue 2022-11-14 11:12:22 +05:30
c01e186442 Merge branch 'bugfix/esp32s3_rom_has_ets_printf_issue_v4.4' into 'release/v4.4'
esp_rom: fix esp32s3 rom ets_printf bug (backport to v4.4)

See merge request espressif/esp-idf!20795
2022-11-14 10:59:02 +08:00
c3439e040a Merge branch 'bugfix/fixing_memory_leak_wps_scan_v4.4' into 'release/v4.4'
(wpa_supplicant) : Fixed a memory leak issue created when parsing scan results

See merge request espressif/esp-idf!20988
2022-11-14 10:46:31 +08:00
07518cf467 fixed the issue iOS devices cannot initiate connection
to ESP32 while there is a BLE connection to this ESP32

Closes https://github.com/espressif/esp-idf/issues/6557
2022-11-14 09:48:13 +08:00
76caa64286 Merge branch 'docs/fix-typo-touch-pad-esp32s2-esp32s3_v4.4' into 'release/v4.4'
docs:fix a typo in touch_sensor.h of esp32s2 and esp32s3 (v4.4)

See merge request espressif/esp-idf!21044
2022-11-12 00:08:05 +08:00
cb0ce135a5 (wpa_supplicant) : Fixed a memory leak issue created when parsing scan results. 2022-11-11 17:11:00 +05:30
3fb3600ee0 psram: remove CS/CLK pin settings in kconfig on ESP32S2/S3 2022-11-11 17:45:03 +08:00
d6ffcfdae8 docs:fix a typo in touch_sensor.h of esp32s2 and esp32s3 2022-11-11 17:40:18 +08:00
c6e5bee48a esp_rom: add rom api esp_rom_uart_set_as_console for riscv chips 2022-11-11 17:08:42 +08:00
1411de54b4 Merge branch 'feature/support_hpm_on_flash_4.4' into 'release/v4.4'
spi_flash: Building a framework to enable HPM when flash works under high speed mode, take GD as an example.(backport v4.4)

See merge request espressif/esp-idf!17758
2022-11-11 16:47:26 +08:00
86d29d566b Merge branch 'bugfix/fix_current_leakage_when_hold_digital_io_during_deep_sleep_backport_v4.4' into 'release/v4.4'
esp_hw_support/sleep: fix current leakage when hold digital io during deep sleep(backport v4.4)

See merge request espressif/esp-idf!20945
2022-11-11 16:33:43 +08:00
538cd8f0ae Merge branch 'feature/oocd_ver_upgrade_v4.4' into 'release/v4.4'
tools: Updates OpenOCD version to 'v0.11.0-esp32-20221026' (v4.4)

See merge request espressif/esp-idf!21005
2022-11-11 15:50:44 +08:00
2e1deb55c0 Merge branch 'bugfix/bt_bss_wrong_address_v4.4' into 'release/v4.4'
Bluetooth: fix BSS placement in the linker script generated by ldgen (backport v4.4)

See merge request espressif/esp-idf!20978
2022-11-11 12:14:51 +08:00
2d9d9e52bf Merge branch 'feature/upgrade_argtable_3_2_2_files_v4.4' into 'release/v4.4'
console: argtable3: upgrade to v3.2.2 (v4.4)

See merge request espressif/esp-idf!21015
2022-11-11 11:36:40 +08:00
fd5aec2d6a Merge branch 'bugfix/fix_part_of_modem_not_reset_when_power_on_backport_v4.4' into 'release/v4.4'
Coexistence: fix part of modem module not reset when power up(backport v4.4)

See merge request espressif/esp-idf!20808
2022-11-11 10:50:56 +08:00
960ed3ff26 esp_rom: remove ESP_ROM_SUPPORT_MULTIPLE_UART 2022-11-11 10:28:50 +08:00
a1e6f1dada esp_rom: fix esp32s3 rom ets_printf bug 2022-11-11 10:27:48 +08:00
4830bcc777 Merge branch 'feature/esp_lcd_register_io_callback_v4.4' into 'release/v4.4'
esp_lcd: Add function for register on color done callback (backport v4.4)

See merge request espressif/esp-idf!21032
2022-11-11 10:11:51 +08:00
6a2cffe84d Merge branch 'doc/explain_ledc_callback_return_value_v4.4' into 'release/v4.4'
ledc: explain the callback return value (v4.4)

See merge request espressif/esp-idf!20967
2022-11-11 10:10:13 +08:00
7280f9c7a5 esp_lcd: Add function for register on color done callback.
(cherry picked from commit 747c5993a8)
2022-11-10 12:13:00 +01:00
8cba2f2ddf ledc: explain the callback return value
Closes https://github.com/espressif/esp-idf/issues/10093
2022-11-10 18:49:51 +08:00
e2cdc7f007 console: argtable3: upgrade to v3.2.2
Closes https://github.com/espressif/esp-idf/issues/9907
Closes https://github.com/espressif/esp-idf/pull/10016
2022-11-10 11:05:24 +01:00
3e524fc18e docs: update copyrights list for argtable3 2022-11-10 11:05:24 +01:00
2ca65b9aef console: argtable3: sync arg_end argument name
...between declaration and definition, to silence clang-tidy warnings
2022-11-10 11:05:24 +01:00
5a8faed3dc console: argtable3: fix -Wwrite-strings warnings
Re-apply commit 744c2dcdd9
2022-11-10 11:05:24 +01:00
499dbc2152 console: argtable3: re-introduce arg_print_formatted function 2022-11-10 11:05:24 +01:00
5d13a0b544 console: argtable3: use newlib getopt, disable logs
Opted for changing the source code to avoid adding one extra flag to
component public CPPFLAGS.
2022-11-10 11:05:24 +01:00
85db9731e8 console: argtable3: update build system for v3.2.1 2022-11-10 11:05:23 +01:00
869ce022bd console: argtable3: add SPDX copyright headers 2022-11-10 11:05:23 +01:00
2c66721c3a console: argtable3: upgrade to v3.2.1
Source code taken from release archives in
https://github.com/argtable/argtable3/releases/tag/v3.2.1.52f24e5

Applied dos2unix to all files.
Removed trailing whitespace with the pre-commit hook.

Resolves some of the static analysis issues reported in
https://github.com/espressif/esp-idf/issues/6440
(mallocs are replaced by xmalloc wrapper which panics on failed
allocations)
2022-11-10 11:05:23 +01:00
7b8ce7a3a6 Merge branch 'bugfix/esp_timer_isr_dispatch_test_fail_v4.4' into 'release/v4.4'
esp_timer: fix ESP_TIMER_ISR dispatch method due to off by one error (v4.4)

See merge request espressif/esp-idf!21027
2022-11-10 16:44:50 +08:00
fbf7261531 wifi/bt: fix part of modem module not reset when power up 2022-11-10 16:00:02 +08:00
478ffa077c esp_timer: fix ESP_TIMER_ISR dispatch method due to off by one error 2022-11-10 15:03:15 +08:00
dde4ba5362 Merge branch 'bufix/Backport_some_wifi_lwip_bugs_for_4.4_1025' into 'release/v4.4'
Bufix/backport some wifi lwip bugs for 4.4 1025

See merge request espressif/esp-idf!20781
2022-11-10 10:59:10 +08:00
12c64be392 Merge branch 'bugfix/ble_mesh_console_memory_leak_test_forv4.4' into 'release/v4.4'
ble_mesh:example:fix memory leak(v4.4)

See merge request espressif/esp-idf!20038
2022-11-10 10:45:12 +08:00
7bd454188d Merge branch 'bugfix/remove_get_modle_and_get_comp_api_forv4.4' into 'release/v4.4'
ble_mesh:example:change the method of get model(for v4.4)

See merge request espressif/esp-idf!20393
2022-11-10 10:44:52 +08:00
35d0d68bbd Merge branch 'bugfix/use_nonblocking_coex_callback_v4.4' into 'release/v4.4'
bluetooth: use non-blocking coexistence callback functions so that Wi-Fi task is not blocked by Bluetooth(backport v4.4)

See merge request espressif/esp-idf!20779
2022-11-10 10:43:00 +08:00
de7c64bcd3 Merge branch 'bugfix/rtc_periph_ulp_touch_v4.4' into 'release/v4.4'
sleep_modes: allow using touch/ULP with RTC_PERIPH domain (including EXT0 wakeup source) (v4.4)

See merge request espressif/esp-idf!19768
2022-11-10 10:19:16 +08:00
3ec5041255 I2C: Fix the reset counter 2022-11-10 02:07:21 +00:00
647dbdbcaf Update i2c.c
Fix issue with single bus clear counter but two I2C buses (I2C0, I2C1). The previously implemented single (static) counter would impact the second bus either if one bus has counter expiry.
Merges https://github.com/espressif/esp-idf/pull/7144
2022-11-10 02:07:21 +00:00
2a719f245d Merge branch 'bugfix/i2s_tx_auto_clear_not_totally_clean_the_buf_v4.4' into 'release/v4.4'
i2s: fix tx incomplete auto clear (v4.4)

See merge request espressif/esp-idf!20571
2022-11-10 10:05:52 +08:00
193d0d6b6e Merge branch 'bugfix/fix_rtc8m_calibration_fail_after_cpu_core_reset_v4.4' into 'release/v4.4'
rtc_clk: Fix rtc8m calibration failure after cpu/core reset (backport v4.4)

See merge request espressif/esp-idf!20553
2022-11-10 10:04:35 +08:00
7a82764c49 Merge branch 'bugfix/rtc_function_needs_disable_usj_pads_esp32s3_v4.4' into 'release/v4.4'
rtcio: Disable USB Serial JTAG pad when setting pins 19 and 20 as RTC function on ESP32S3 (backport v4.4)

See merge request espressif/esp-idf!20551
2022-11-10 10:03:46 +08:00
142fa78ce4 [Panic] also print to secondary USB Serial/JTAG Console 2022-11-09 23:54:44 +01:00
79727b3a93 Merge branch 'bugfix/mcpwm_wrong_return_value_v4.4' into 'release/v4.4'
mcpwm: fix wrong return value in the legacy MCPWM driver (4.4)

See merge request espressif/esp-idf!20695
2022-11-09 22:49:42 +08:00
b2c7f7689c bt: use non-blocking coexistence callback functions so that Wi-Fi task is not blocked by Bluetooth on ESP32 2022-11-09 19:32:01 +08:00
25719db1a9 Merge branch 'refactor/esp_lcd_panel_disp_on_off' into 'release/v4.4'
lcd: alias esp_lcd_panel_disp_on_off to esp_lcd_panel_disp_off (v4.4)

See merge request espressif/esp-idf!20949
2022-11-09 18:41:17 +08:00
f48264c68d Merge branch 'feature/usb_host_inflight_transfer_check_v4.4' into 'release/v4.4'
USB Host: Fix usbh_dev_open(), Fix usbh_ep_alloc(), Add USB Host Library check to prevent resubmitting inflight transfers (v4.4)

See merge request espressif/esp-idf!20954
2022-11-09 18:40:12 +08:00
2b0de33816 Merge branch 'bugfix/freertos_fpu_isr_pins_task_v4.4' into 'release/v4.4'
FreeRTOS: Fix bug where FPU usage in ISR pins the interrupted task (v4.4)

See merge request espressif/esp-idf!20627
2022-11-09 18:39:28 +08:00
f3c51c086c Merge branch 'bugfix/add_missing_ifdef_to_static_structs_v4.4' into 'release/v4.4'
freertos: Add missing ESP_PLATFORM preprocessor directive for FreeRTOS static data structs (v4.4)

See merge request espressif/esp-idf!20742
2022-11-09 18:38:19 +08:00
c86b6ed334 Merge branch 'contrib/github_pr_10087_v4.4' into 'release/v4.4'
fixed url to console component (GitHub PR) (v4.4)

See merge request espressif/esp-idf!20901
2022-11-09 18:34:47 +08:00
08135d4ea6 Merge branch 'bugfix/time_jump_after_reboot_v4.4' into 'release/v4.4'
esp_hw_support: Fix time jump after reboot (v4.4)

See merge request espressif/esp-idf!20907
2022-11-09 18:34:05 +08:00
bdb8b487d2 Merge branch 'bugfix/http_cached_data_in_redirection_v4.4' into 'release/v4.4'
esp_http_client: free cached data in case connection gets closed for redirection (v4.4)

See merge request espressif/esp-idf!20792
2022-11-09 18:19:17 +08:00
d7ba7c3b19 Merge branch 'bugfix/fix_esprv_intc_int_set_type_err_parameter_backportv4.4' into 'release/v4.4'
bugfix: esprv_intc_int_set_type should not use bitmap parameter(backport v4.4)

See merge request espressif/esp-idf!20609
2022-11-09 18:03:25 +08:00
8ba0098492 Merge branch 'bugfix/fix_xtal_related_rtc_params_for_esp32_backport_v4.4' into 'release/v4.4'
esp32/rtc: fix xtal unstable in some cases when sleep(backport v4.4)

See merge request espressif/esp-idf!20803
2022-11-09 18:02:05 +08:00
1a06484dac Merge branch 'feature/nimble_port_init_deinit_v4.4' into 'release/v4.4'
NimBLE : Init deinit nimble stack in a loop

See merge request espressif/esp-idf!20689
2022-11-09 18:01:46 +08:00
6b5f53dcc2 Merge branch 'bugfix/esp_periph_uart_clk_gate_issues' into 'release/v4.4'
esp_system: use ESP_CONSOLE_UART_NUM instead of CONSOLE_UART_NUM

See merge request espressif/esp-idf!20942
2022-11-09 17:59:07 +08:00
770b787072 Merge branch 'bugfix/add_protection_for_mac_rst_v4.4' into 'release/v4.4'
esp_wifi: add protection for mac reset (backport 4.4)

See merge request espressif/esp-idf!20970
2022-11-09 17:58:48 +08:00
a3379e3405 Merge branch 'bugfix/fix_fast_interval_prov_adv_v4.4' into 'release/v4.4'
ble_mesh: stack: Fix send fast interval prov_adv failed(v4.4)

See merge request espressif/esp-idf!20640
2022-11-09 17:58:12 +08:00
3f3e9744ef Merge branch 'feature/Add_IVI_recovery_option_v4.4' into 'release/v4.4'
ble_mesh: stack: Add IV index recovery option when device missed the whole IV update(v4.4)

See merge request espressif/esp-idf!20642
2022-11-09 17:57:52 +08:00
6ea8717373 Merge branch 'bugfix/esp_spp_write_len_0_v4.4' into 'release/v4.4'
bt: Fixed esp_spp_write() crash when len is 0 (v4.4)

See merge request espressif/esp-idf!20705
2022-11-09 17:57:10 +08:00
f57a4e51ce Merge branch 'bugfix/update_ctrl_init_config_macro_v4.4' into 'release/v4.4'
Bugfix/update ctrl init config macro (v4.4)

See merge request espressif/esp-idf!20712
2022-11-09 17:56:42 +08:00
339e26eddd Merge branch 'bugfix/crash_in_i2s_when_reconnect_to_a2dp_v4.4' into 'release/v4.4'
fixed crash in I2S when reconnect to a2dp sink (v4.4)

See merge request espressif/esp-idf!20719
2022-11-09 17:56:14 +08:00
b07b2d529b Merge branch 'bugfix/handle_issue_of_malloc_fail_v4.4' into 'release/v4.4'
bugfix/avoid unexpected free when malloc failed (v4.4)

See merge request espressif/esp-idf!20727
2022-11-09 17:55:57 +08:00
fa83153105 Merge branch 'bugfix/fix_trans_optional_info_using_group_addr_v4.4' into 'release/v4.4'
ble_mesh: stack: Fix can't trans optional info to group address(v4.4)

See merge request espressif/esp-idf!20959
2022-11-09 17:55:27 +08:00
e55a640da4 Merge branch 'bugfix/add_security_patches_v4.4' into 'release/v4.4'
Adding security patch for SAE side channel attacks (Backport v4.4)

See merge request espressif/esp-idf!20649
2022-11-09 17:53:39 +08:00
879102ab1f Merge branch 'bugfix/reason_code_pmk_flush_v4.4' into 'release/v4.4'
Prevent pmk flush for unspecified reasoncode (v4.4)

See merge request espressif/esp-idf!20583
2022-11-09 17:53:05 +08:00
9e9f0592f8 Merge branch 'bugfix/fix_esp32_esp32c3_some_bugs' into 'release/v4.4'
Fixed BLE lld_per_adv.c line 401 assert on ESP32C3 and ESP32S3 (backport v4.4)

See merge request espressif/esp-idf!20757
2022-11-09 17:52:42 +08:00
85cc471e8e Merge branch 'bugfix/fix_esp_hid_auth_fail_crash_v4.4' into 'release/v4.4'
Fix esp hid crash when auth failed (backport v4.4)

See merge request espressif/esp-idf!20612
2022-11-09 17:51:24 +08:00
d2403441a4 tools: Updates OpenOCD version to 'v0.11.0-esp32-20221026' 2022-11-09 12:51:18 +03:00
aac7947003 Merge branch 'backport/cjh_v4.4' into 'release/v4.4'
Fixed some BLE bugs on bluedroid (backport v4.4)

See merge request espressif/esp-idf!20509
2022-11-09 17:50:54 +08:00
85dfebd0cc Merge branch 'bugfix/fix_mbedlts_ds_memory_leak_v4.4' into 'release/v4.4'
esp-tls: Fix memory leak in mbedtls ds peripheral when MBEDTLS_THREADING_C enabled (backport v4.4)

See merge request espressif/esp-idf!20596
2022-11-09 17:45:14 +08:00
72e365bede Merge branch 'bugfix/fix_wifi_retry_v4.4' into 'release/v4.4'
wifi_provisioning: fix error codes for wifi connect retry (v4.4)

See merge request espressif/esp-idf!20717
2022-11-09 17:44:25 +08:00
f7b1e32cb4 Merge branch 'bugfix/update_duty_on_tez_tep_v4.4' into 'release/v4.4'
mcpwm: update compare value on both tep and tez (v4.4)

See merge request espressif/esp-idf!20767
2022-11-09 17:41:36 +08:00
70bb00afac Merge branch 'examples/fix_examples_spi_master_esp32cx_v4.4' into 'release/v4.4'
examples: fix spi master examples on esp32cxx (v4.4)

See merge request espressif/esp-idf!20663
2022-11-09 17:40:59 +08:00
ac8376c225 Merge branch 'bugfix/upgrade_i2s_es8311_version' into 'release/v4.4'
es8311: upgrade to 1.0.0 on release v4.4

See merge request espressif/esp-idf!20809
2022-11-09 17:39:51 +08:00
9f6b0d1531 Merge branch 'bugfix/confgen_depr_header_non_vis_v4.4' into 'release/v4.4'
kconfig: fixed non-visible deprecated configs missing from sdkconfig.h (v4.4)

See merge request espressif/esp-idf!20948
2022-11-09 17:34:35 +08:00
628bc99ff5 Merge branch 'bugfix/s3_ulp_riscv_cocpu_trap_v4.4' into 'release/v4.4'
ulp-riscv: always force COCPU clock on S3 (v4.4)

See merge request espressif/esp-idf!20769
2022-11-09 17:34:22 +08:00
1c71560f35 Merge branch 'bugfix/user_loop_example_stack' into 'release/v4.4'
esp_event: increase default stack size in user_event_loop example (v4.4)

See merge request espressif/esp-idf!20682
2022-11-09 17:33:21 +08:00
fea51e16fc Merge branch 'docs/i2c_spec_url_v4.4' into 'release/v4.4'
docs: remove link to i2c specs (v4.4)

See merge request espressif/esp-idf!20860
2022-11-09 17:33:00 +08:00
9d2aac1daa Merge branch 'feature/upgrade-gdb' into 'release/v4.4'
tools: add GDB version '11.2_20220823' as a tool

See merge request espressif/esp-idf!20494
2022-11-09 17:32:32 +08:00
0ba41b598d Merge branch 'bugfix/2nd_bootloader_uart1_baudrate_issues_v4.4' into 'release/v4.4'
esp_rom: fix 2nd bootloader custom uart1 baudrate issue (backport to v4.4)

See merge request espressif/esp-idf!20654
2022-11-09 17:32:02 +08:00
dd9e7a8b15 Merge branch 'fix/virtualenv_dir_v4.4' into 'release/v4.4'
Tools: Keep making virtual environments with python in the bin directory

See merge request espressif/esp-idf!20589
2022-11-09 17:31:24 +08:00
cc5640aef3 Merge branch 'update/version_4_4_3' into 'release/v4.4'
Update version to 4.4.3

See merge request espressif/esp-idf!21003
2022-11-09 17:29:57 +08:00
6407ecb3f8 versions: Update version to 4.4.3 2022-11-08 16:22:14 +01:00
a4df6776b6 Bluetooth: fix BSS placement in the linker script generated by ldgen 2022-11-08 14:02:31 +08:00
25abb74284 esp_wifi: add protection for mac reset (backport 4.4) 2022-11-08 11:01:51 +08:00
2d3582403e ble_mesh: stack: Fix can't trans optional info to group address 2022-11-07 15:48:10 +08:00
d6c783d02d esp_system: use ESP_CONSOLE_UART_NUM instead of CONSOLE_UART_NUM 2022-11-07 15:02:52 +08:00
0d1bc3b2b6 usb_host: Test host library inflight transfer resubmission check
This commit updates the USB Host Library unit tests to test that resubmitting
an inflight transfer will return an error.
2022-11-07 13:52:05 +08:00
1f5dc0f5a1 usb_host: Add check to prevent submitting already inflight transfers
This commit adds a simple flag/check in the USB Host Library that prevents
users from submitting a transfer that is already inflight.

- A transfer is considered inflight as soon as it is submitted by calling
usb_host_transfer_submit() or usb_host_transfer_submit_control()
- An inflight transfer remains inflight up until right before its callback
is called by one of the USB Host Library handler functions.

Closes https://github.com/espressif/esp-idf/issues/8748
2022-11-07 13:50:59 +08:00
87c415b11a usb_host: Fixed incorrect opening devices from multiple clients
1. During USBH device open both queues (idle and pending) must be checked.
2. Don't overwrite already allocated endpoints
2022-11-07 13:50:33 +08:00
270480ff81 lcd: better name esp_lcd_panel_disp_on_off 2022-11-07 13:11:44 +08:00
60c07e02ad kconfig: fixed non-visible deprecated configs missing from sdkconfig.h
Non-visible configs would previously not appear in the deprecated section of the sdkconfig.h,
but non-visable configs are used in IDF (and user code) and should therefor be present.
2022-11-07 10:40:41 +08:00
ced9c9eeb6 esp_hw_support/sleep: remove redundant spinlock protection for deep sleep 2022-11-05 17:51:13 +08:00
6e7c8f18b9 hal/gpio_ll: fix digital gpio can not enable hold during deep sleep when force_unhold set(32/s2/s3) 2022-11-05 17:51:13 +08:00
87ad0e8c97 hal/gpio_ll: fix digital gpio can not disable hold during deep sleep 2022-11-05 17:51:13 +08:00
4b71ebbe49 esp_hw_support/sleep: fix current leakage when hold digital io during deep sleep 2022-11-05 17:51:08 +08:00
be904e4ae9 esp_hw_support: Fix time jump after reboot
Closes https://github.com/espressif/esp-idf/issues/9448
2022-11-02 18:54:37 +08:00
b32fbb9a61 doc: redirect console page
Previous the console doc is moved from api-guide to api-reference, which
broken the URL as well, this commit added a redirect link to ensure the
old URL can still work.
2022-11-02 16:08:07 +08:00
78021c0937 esp_wifi:bugfix sniffer mode can not capture control packet 2022-11-01 10:46:15 +08:00
a165866372 Lwip:add TCP Fin2 timeout configuration
* Update submodule: git log --oneline 76303df2386902e0d7873be4217f1d9d1b50f982..6132c9755a43d4e04de4457f1558ced415756e4d

Detailed description of the changes:
  - napt: Fix clean compilation  (espressif/esp-lwip@6132c975)
  - Lwip:add TCP Fin2 timeout configuration (espressif/esp-lwip@15b4400e)
  - napt: Fix IP forwarding when forward netif enable NAPT (espressif/esp-lwip@c950063f)
  - napt/stats: Move some napt counters to stats module (espressif/esp-lwip@475d658a)
  - ip_napt_maint: Fix timestamp overflow handling (espressif/esp-lwip@2e904508)
  - napt: Fixes and improvements (espressif/esp-lwip@fb1f3552)
2022-11-01 10:46:15 +08:00
8ddc482f28 lwip:bugfix for increase ping task stack size 2022-11-01 10:46:09 +08:00
07253938a6 Update components/esp_hw_support/include/esp_sleep.h 2022-10-31 16:06:44 +08:00
37cd376957 sleep_modes: allow using touch/ULP with RTC_PERIPH domain (including EXT0 wakeup source) 2022-10-31 16:06:43 +08:00
9099608602 docs: remove link to i2c specs 2022-10-31 11:56:25 +08:00
af35a6adbb es8311: upgrade to 1.0.0 2022-10-27 17:21:32 +08:00
75e1c4d0fb heap: Update host tests after incorporation of the new TLSF implementation 2022-10-27 09:36:17 +02:00
d4de73cd2c heap: update the calculation of fl index max and use bitfield in control_t
The calculation of fl index max is changed to always be the smallest
number that includes the size of the registered memory.

The control_construct() function now checks for minimum size as the control structure
parameters are calculated.

There is no longer a minimum configuration for fl index max so the tlsf_config
enum is striped down to remove unecessary compile time values.

the tlsf_size() function will fail if no tlsf pointer is passed as parameter since there
is no way to calculate a default tlsf size anymore.

bitfields are now used in control_t when possible which reduces the size of the structure
from 56 bytes to 36 bytes.
2022-10-27 09:36:17 +02:00
1459711ef8 mqtt: Fix keepalive with esp-timer; clean close SM (v4.4)
* Fixes keepalive calculation to use esp-timer (previously used system
timer that might get updated by  NTP sync and failing keepalive
mechanism)
* Fixes start() -> stop() -> start() client's transitions, due to
wrong state of stopped client (could endup in WAIT_RECONNECT state and
thus never allowed to be started again)
* Update submodule: git log --oneline 60983d1dd54196b1e3f399c6f928d77256ec742a..bb9c8af9d552b608dd3aabf9617bde757a538ebe

Detailed description of the changes:
* Backport Moves state change when stopping the client
  - See merge request espressif/esp-mqtt!151
  - Closes https://github.com/espressif/esp-mqtt/issues/239
  - Moves state change when stopping the client (espressif/esp-mqtt@af58f5f)
* fix: MQTT tick not starting on connect and switch to esp_timer
  - See merge request espressif/esp-mqtt!146
  - Closes https://github.com/espressif/esp-idf/issues/9492
  - See commit https://github.com/espressif/esp-mqtt/commit/166741f
* ci: Fix CI build using public IDF images
  - See merge request espressif/esp-mqtt!148
  - See commit https://github.com/espressif/esp-mqtt/commit/530fe3a

Closes https://github.com/espressif/esp-idf/issues/9492
2022-10-26 19:37:21 +02:00
c4fd19c144 bt: Fixed SPP VFS mode not being able to send data 2022-10-26 16:43:49 +08:00
83fe7a5a59 esp_hw_support/sleep: fix light sleep wakeup flag
light sleep wakeup flag is true to indicate the most recent successful wakeup from light sleep,
which means the most recent light sleep occurred successfully and then wakes up by wakeup source
2022-10-26 16:33:43 +08:00
77ba6c38ec esp32/rtc: fix xtal unstable in some cases when sleep
1. add xtal buf wait to fix high temperature restart issue
2. add min sleep value to fix xtal stop due to too short sleep time issue
2022-10-26 16:31:04 +08:00
62884dae3a esp_http_client: free cached data in case connection gets closed for redirection
In case of `esp_http_client_read` based workflow, we cache data that is received
during fetch header stage. In case, there is URL redirection and we have to close
the connection on URL, port change then we must discard earlier cached data.

Closes AUD-4158
2022-10-26 10:11:33 +05:30
4acfe1a91a ulp-riscv: always force COCPU clock on S3
The coprocessor cpu trap signal doesnt have a stable reset value,
force ULP-RISC-V clock on to stop RTC_COCPU_TRAP_TRIG_EN from waking the CPU
2022-10-25 13:51:04 +08:00
79ee98e229 mcpwm: update compare value on both tep and tez
Closes https://github.com/espressif/esp-idf/issues/9904
2022-10-25 13:20:41 +08:00
zwj
290a6c8ade allow bluedroid host to report adv_ind separately 2022-10-24 19:28:23 +08:00
zwj
94c74bd866 Fixed BLE lld_per_adv.c line 401 assert 2022-10-24 19:27:56 +08:00
zwj
d2ebe4e7bb Fixed ESP32 BLE assert(32 0) 2022-10-24 19:27:32 +08:00
06cad10ec0 freertos: Add missing ESP_PLATFORM preprocessor directive for FreeRTOS static data structs (v4.4)
This commit adds the missing ESP_PLATFORM preprocessor directive to
static data structures to wrap the extra variable added for SMP locks.

Closes https://github.com/espressif/esp-idf/issues/9785
2022-10-21 11:25:23 +02:00
dc059fe2ee [bt] fix if allocation fails
If osi_malloc fails for work_queues or osi_work_queue_create fails, osi_work_queue_delete in _err may release unallocated memory.
2022-10-21 14:45:25 +08:00
e59ec7e597 fixed crash in I2S when reconnect to a2dp sink 2022-10-21 14:11:27 +08:00
04e24078d9 wifi_provisioning: fix error codes for wifi connect retry
Closes: https://github.com/espressif/esp-idf/issues/9399
2022-10-21 11:33:12 +05:30
1f2e831ad2 Update #define BT_CONTROLLER_INIT_CONFIG_DEFAULT().
Corrects header names in string from "bt.h" to "esp_bt.h".
2022-10-21 12:02:51 +08:00
b35c2f9794 bt: Fixed esp_spp_write() crash when len is 0
Closes https://github.com/espressif/esp-idf/issues/9977
2022-10-21 11:18:25 +08:00
8b352e1da9 mcpwm: fix wrong return value in the legacy driver
For APIs that not return esp_err_t value, we can't use macros like
ESP_RETURN_ON_xxx
2022-10-20 18:24:58 +08:00
755ce1077d Merge branch 'bugfix/backup_dma_stall_when_sw_rst_v4.4' into 'release/v4.4'
backport v4.4: force clear reset signal to fix the backup dma operation failure...

See merge request espressif/esp-idf!20634
2022-10-20 17:06:58 +08:00
51023425d2 NimBLE : Init deinit nimble stack in a loop 2022-10-19 23:13:27 +05:30
126ae145ec esp_event: increase default stack size in user_event_loop example
Example would trigger a stack overflow on S3.

Closes https://github.com/espressif/esp-idf/issues/10008
2022-10-19 18:01:11 +08:00
e4aaf10ff0 examples: support spi master lcd examples on esp32s3 2022-10-19 17:03:54 +08:00
ee882708f8 Merge branch 'bugfix/fix_ignore_rx_sub_ampdu_int_issue_v4.4' into 'release/v4.4'
esp_wifi: fix ignore rx sub ampdu interrupt issue(Backport v4.4)

See merge request espressif/esp-idf!20604
2022-10-18 15:52:55 +08:00
ca5ee54424 esp_rom: fix 2nd bootloader custom uart1 baudrate issue 2022-10-18 14:01:31 +08:00
d61715ab9a freertos: Backport FPU tests from master to v4.4
This commit combines and backports the FPU unit tests updates of the following
commits:

423fb361e7
d69361779e
2022-10-17 23:31:18 +08:00
f08c4b823f freertos: Fix FPU ISR core pinning bug
This commit fixes a bug where if an unpinned task is interrupted by a level 1
ISR that users the FPU, the FPU usage will cause the interrupted task to
become pinned to the current core.

Note: This bug was already fixed in SMP FreeRTOS in commit
d6936177. This commit simply backports the fix to IDF FreeRTOS.
2022-10-17 23:31:18 +08:00
aceeff0b09 wpa_supplicant: Update security patches from upstream
1. Adding security patch for SAE side channel attacks
2. Adding confirm message validation in error cases
3. Adding y coordinate for PWE in SAE
2022-10-17 17:57:14 +05:30
c2af28ddce wpa_supplicant: Move SAE modules into dragonfly files 2022-10-17 17:54:02 +05:30
3047225a9f Merge branch 'bugfix/fix_c3_dig_dibas_limit_bug_to_v4.4' into 'release/v4.4'
C3: Fix system not stable bug when dbias storing in efuse is bigger than 27 (v4.4)

See merge request espressif/esp-idf!20498
2022-10-17 17:58:38 +08:00
f1e7252d4d ble_mesh: stack: Add IV index recovery option when device missed the whole IV update 2022-10-17 16:52:53 +08:00
45a3ec7983 ble_mesh: stack: Fix send fast interval prov_adv failed when PB-ADV and PB-GATT enable simultaneously 2022-10-17 16:39:16 +08:00
fc82b36847 ble_mesh:example:change the method of get model 2022-10-17 03:54:17 +00:00
dbf1241ae2 backup dma: force clear reset signal to fix the backup dma operation failure caused by RTC_SW_CPU_RST 2022-10-17 11:07:51 +08:00
2fc0bb7b2a Merge branch 'bugfix/close_stack_callback_during_ble_stop_v4.4' into 'release/v4.4'
Nimble: Added check to deregister stack callback with controller during stack deinit(v4.4)

See merge request espressif/esp-idf!20450
2022-10-14 17:52:07 +08:00
d62b9505e3 fix esp hid crash when auth failed 2022-10-14 15:57:52 +08:00
0fd3824f91 bugfix: esprv_intc_int_set_type should not use bitmap parameter 2022-10-14 15:33:53 +08:00
4391e369d2 esp_wifi: fix ignore rx sub ampdu interrupt issue 2022-10-14 14:29:38 +08:00
8f10a7ad8c Tools: Keep making virtual environments with python in the bin directory
On Ubuntu 22.04 virtualenv with the latest setuptools produces
environments with Python in "local/bin" instead of "bin" (see
https://github.com/pypa/virtualenv/issues/2350).

Closes https://github.com/espressif/esp-idf/issues/9931
2022-10-13 15:10:53 +02:00
1cb47a2f3b esp-tls: Fix memory leak in mbedtls ds peripheral when MBEDTLS_THREADING_C enabled 2022-10-13 19:37:18 +08:00
f2a9d457e0 Remove unnecessary code from disconnect handler 2022-10-13 12:14:20 +05:30
722ed6cbc6 wpa_supplicant: Prevent pmk flush for unspecified reasoncode 2022-10-13 12:14:20 +05:30
488c79a003 Merge branch 'bugfix/fix_connect_fail_when_enable_SPIRAM_v4.4' into 'release/v4.4'
esp_wifi: fix connect fail when enable SPIRAM and ESPNOW send (backport v4.4)

See merge request espressif/esp-idf!20445
2022-10-13 14:20:11 +08:00
4853d6319e i2s: fix tx incomplete auto clear
Closes: https://github.com/espressif/esp-idf/issues/9882
2022-10-12 19:53:58 +08:00
883e54aa71 rtc_clk: Fix rtc8m calibration failure after cpu/core reset
Explicitly guarantee 8md256 clk is enabled before calibration
2022-10-12 12:33:47 +08:00
5f5ce49ff6 rtcio: Disable USB Serial JTAG pad when setting pins 19 and 20 as RTC function on ESP32S3
Similar to the fix in gpio lower layers, USB Serial JTAG pad should be disabled when the DM and DP pins want to be used as rtcio pins.

(cherry picked from commit de0401047c)
2022-10-12 12:00:05 +08:00
a5a4543faf tools: add GDB version '11.2_20220823' as a tool
GDB now is standalone tool separated from toolchain due to frequent updates.

Added installation tests for the new tool.

Coredump tests are changed because they were wrong, see explanation:
esp32 objdump:
    40084290 <esp_crosscore_int_send_yield>:
    ......
    /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
    4008429c:    000090            retw

With previous GDB backtrace was:
    #0  0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144

This commit fixes the backtrace with the right line number:
    #0  0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145

Other tests changes have the same cause of fixing.

Closes https://github.com/espressif/esp-idf/issues/6334
2022-10-10 18:43:27 +04:00
ab3238ec0e esp_wifi: fix connect fail when enable SPIRAM 2022-10-10 17:30:24 +08:00
cd92bad84a bluedroid: configurable max gattc cache characteristic count 2022-10-09 16:27:54 +08:00
bec6de98c4 fix ble adv tx power map 2022-10-09 16:27:06 +08:00
38d1250788 bluedroid: fix ble rpa generate and update by host 2022-10-09 16:25:17 +08:00
cfc85ac1c6 Revert "component/bt: add local irk to controller"
This reverts commit 95c35288bc.
2022-10-09 16:23:24 +08:00
f943f37927 Revert "Fixed ESP32 BLE can't resolve the peer address when enable white list"
This reverts commit 1cc0f6aac5.
2022-10-09 16:16:59 +08:00
83c9d18309 Bluedroid: Configurable option to modify max gatt service attributes count 2022-10-09 16:13:20 +08:00
cje
c34e900969 fix C3 system not stable bug when dbias storing in efuse is bigger than 27 2022-10-08 11:55:26 +08:00
e7db4ff5ec Nimble: Added check to deregister stack callback with controller during
stack deinit
2022-10-06 09:44:45 +05:30
b601dd3b24 re-enable some dummy based HPM flash chips 2022-09-30 11:29:43 +08:00
f28f75a46b spi_flash: Add several flash chips HPM(120M) support 2022-09-30 11:15:34 +08:00
9269a536ac Merge branch 'bugfix/fix_deinit_return_ok_when_wifi_no_longer_initialized_issue_v4.4' into 'release/v4.4'
esp_wifi: fix fail to scan after recv disassoc/deauth for esp32s2(Backport v4.4)

See merge request espressif/esp-idf!20410
2022-09-29 19:20:48 +08:00
b0c38d5392 spi_flash: fix hpm dummy error when using 80m flash and psram 2022-09-29 17:17:38 +08:00
b0ceb22bef spi_flash: remove xmc hpm support, because there is some compatible issue with ROM,
Closes https://github.com/espressif/esp-idf/issues/8560
2022-09-29 16:37:29 +08:00
4074221540 spi_flash: Fix bug that in bootloader dummy is 0 when mosi is 0 2022-09-29 16:37:29 +08:00
0347d96124 spi_flash: Add documents for flash optional features 2022-09-29 16:37:29 +08:00
6c9c1f72bd spi_flash: Building a framework to enable HPM when flash works under high speed mode 2022-09-29 16:37:29 +08:00
e85c5822a2 Merge branch 'bugfix/add_so_linger_to_httpd_config_v4.4' into 'release/v4.4'
esp_http_server: Add struct linger in httpd_config_t (v4.4)

See merge request espressif/esp-idf!20359
2022-09-29 16:04:06 +08:00
d7bad4ac1d Merge branch 'bugfix/esptool_secure_boot_signing_key_path_v4.4' into 'release/v4.4'
esptool: (re)populate the secure boot signing key path (v4.4)

See merge request espressif/esp-idf!20423
2022-09-29 15:15:32 +08:00
b62b197cd3 esptool: (re)populate the secure boot signing key path
For project with reduced component list, secure boot signing key
path was not getting correctly. This change sets the secure boot
signing key path explicitly based on the relevant config option.

Closes https://github.com/espressif/esp-idf/issues/9578
Close IDFGH-8075
2022-09-29 10:09:32 +05:30
3911a1b8e7 Merge branch 'feature/support_7.2.8_soc/pvt_dig_v4.4' into 'release/v4.4'
ESP32S3:support auto adjust LDO voltage based on pvt-dig(backport 4.4)

See merge request espressif/esp-idf!20249
2022-09-29 11:07:55 +08:00
zlq
b44530f188 1.add ldo parameters in efuse table; 2.set ldo based on pvt-efuse; 3.ldo voltage is changed based on cpu freq 2022-09-29 03:16:49 +08:00
7f2d6e96b4 esp_wifi: fix deinit return wrong value
1. Deinit does not return ESP_ERR_WIFI_NOT_INIT if the wifi driver is no longer initialized.
2. Fix get wrong channel value use esp_wifi_get_config.
3. Fix bug of missing unlock when wifi stop.
4. Fix annotation error of api esp_wifi_connect.
2022-09-28 18:09:56 +08:00
2c8f83ec72 esp_wifi: fix fail to scan after recv disassoc/deauth for esp32s2
esp_wifi: sync peripheral device reg base
2022-09-28 18:09:03 +08:00
268718b7b4 Merge branch 'bugfix/fix_uart_fake_tx_done_v4.4' into 'release/v4.4'
uart: Fix unwanted processing of TX_DONE interrupt immediately after calling uart_wait_tx_done() (backport v4.4)

See merge request espressif/esp-idf!20314
2022-09-28 16:45:03 +08:00
cc841ae9c0 Merge branch 'bugfix/fast_scan_profile_issue_v4.4' into 'release/v4.4'
Fix repeated scans causing bss overwrite in connect process (Backport v4.4)

See merge request espressif/esp-idf!19858
2022-09-28 16:35:39 +08:00
e53ea6c776 Merge branch 'bugfix/acl_buf_ocf_and_conn_fail_v4.4' into 'release/v4.4'
bugfix/fixed the exhaustion of ACL buffer and duplicated connection requests (v4.4)

See merge request espressif/esp-idf!20384
2022-09-28 16:31:38 +08:00
12ee73b16a Merge branch 'bugfix/fix_ble_disconnect_due_to_channel_map_instant_passed_v4.4' into 'release/v4.4'
Fixed BLE disconnection issue when channel map update failed due to bad channels(backport v4.4)

See merge request espressif/esp-idf!20376
2022-09-28 16:24:58 +08:00
5eadda3a35 Merge branch 'feature/optimize_rgb_lcd_draw_bitmap_v4.4' into 'release/v4.4'
rgb_lcd: optimise rgb_panel_draw_bitmap (v4.4)

See merge request espressif/esp-idf!20361
2022-09-28 14:55:50 +08:00
5e2c14b40b Merge branch 'bugfix/wifi_prov_device_name_v4.4' into 'release/v4.4'
wifi_provisioning : Increased 1 byte of BLE advertising device name to store '\0' (v4.4)

See merge request espressif/esp-idf!20374
2022-09-28 13:42:24 +08:00
cc27c90b8c ble_mesh:example:fix memory leak 2022-09-28 03:51:33 +00:00
b992d3b4f8 Merge branch 'doc/usj_sw_reset_alive_bbpll_doc_v4.4' into 'release/v4.4'
usb_serial_jtag: fixed the docs that we can use usj in sleep modes (v4.4)

See merge request espressif/esp-idf!20288
2022-09-28 11:49:47 +08:00
339eca61ad fixed the exhaustion of ACL buffer
fixed the duplication of connection request from the same device
2022-09-28 10:12:29 +08:00
403bff2a2b fix err using rpa for confirmation calculation 2022-09-27 19:32:26 +08:00
b063151c4b fix on data len change cmd malfunction 2022-09-27 19:32:11 +08:00
zwj
358a03e844 Fixed extend adv tx power range error 2022-09-27 19:30:06 +08:00
zwj
cac46cb107 update BLE lib for ESP32C3 and ESP32S3
Fixed BLE disconnection issue when channel map update failed due to bad channels
2022-09-27 19:24:58 +08:00
b86e91ac55 Merge branch 'fix/ci_macos_idf_env_json_v4.4' into 'release/v4.4'
CI: Clean-up idf-env.json which might not compatible with newer versions (v4.4)

See merge request espressif/esp-idf!20367
2022-09-27 19:00:57 +08:00
113b558006 Merge branch 'refactor/editorconfig_remove_freertos_tabs_4.4' into 'release/v4.4'
editorconfig: Removed FreeRTOS tab rule (backport 4.4)

See merge request espressif/esp-idf!20369
2022-09-27 18:54:58 +08:00
a78a36e7b9 wifi_provisioning : Increased 1 byte of BLE advertising device name to store '\0', at the end, to ensure we adhere to the max name length as per spec. 2022-09-27 16:09:11 +05:30
2dd6a166b9 Merge branch 'feat/essl_extra_component_v4.4' into 'release/v4.4'
sdio/example: fixed the essl return value issue (v4.4)

See merge request espressif/esp-idf!20345
2022-09-27 18:33:06 +08:00
4445da6232 refactor(editorconfig): Removed FreeRTOS tab rule
FreeRTOS used tabs before, but changed to spaces now.
This hasn't been reflected in the editorconfig file
and is fixed now.
2022-09-27 11:49:29 +02:00
4e5a8942a1 CI: Clean-up idf-env.json which might not compatible with newer versions 2022-09-27 16:21:14 +07:00
6f87740bbe Merge branch 'bugfix/fixed_gap_in_i2s_adc_dac_output' into 'release/v4.4'
i2s_example: fixed i2s_adc_dac output gap (v4.4)

See merge request espressif/esp-idf!20320
2022-09-27 15:49:17 +08:00
c8ce38e60c Merge branch 'bugfix/missing_idfSelectedId' into 'release/v4.4'
Tools: bugfix wrong format of idf-env.json, KeyError: 'idfSelectedId'

See merge request espressif/esp-idf!20327
2022-09-27 15:22:36 +08:00
741d35d528 rgb_lcd: added yuv converter LL driver 2022-09-27 13:42:56 +08:00
e66a72b452 rgb_lcd: workaround pclk polarity bug by setting mo>=2 2022-09-27 13:22:18 +08:00
72a25862a1 rgb_lcd: support PLL240MHz clock source 2022-09-27 13:20:51 +08:00
efed5ee33f esp_http_server: Add linger in httpd_config_t
Closes: https://github.com/espressif/esp-idf/issues/9514
2022-09-27 10:10:16 +05:30
30ab6a9246 rgb_lcd: optimise rgb_panel_draw_bitmap
by using memcpy instead of coping in a nested for loop
2022-09-27 10:36:41 +08:00
3a6831b1b4 rgb_lcd: support fractional clock divisor 2022-09-27 10:27:36 +08:00
cc74a9bf39 Merge branch 'bugfix/fix_socket_leak_v4.4' into 'release/v4.4'
esp-tls: socket will be set to -1 and will not be closed (backport v4.4)

See merge request espressif/esp-idf!20351
2022-09-26 22:28:51 +08:00
eb5f70b6fb esp_wifi: Update wifi libs
Fix scan causing bss overwrite in connect process
2022-09-26 18:52:57 +05:30
5514cee480 sdio/example: fixed the essl return type issue 2022-09-26 19:40:37 +08:00
640f1c844b Tools: bugfix wrong format of idf-env.json, KeyError: 'idfSelectedId'
Closes https://github.com/espressif/esp-idf/issues/9837
2022-09-26 13:36:16 +02:00
c1429bbeeb esp-tls: socket will be set to -1 and will not be closed 2022-09-26 19:23:32 +08:00
ae263f1bc8 Merge branch 'feature/sink_support_mono_v4.4' into 'release/v4.4'
bt: Fixed sink not being able to output mono audio because it can only decode dual channel audio data(v4.4)

See merge request espressif/esp-idf!20077
2022-09-26 17:47:31 +08:00
d1113747e7 Merge branch 'bugfix/fix_set_country_code_before_wifi_start_issue_v4.4' into 'release/v4.4'
Bugfix/fix set country code before wifi start issue v4.4(Backport v4.4)

See merge request espressif/esp-idf!20095
2022-09-23 17:49:55 +08:00
3427867e70 i2s_example: fixed i2s_adc_dac output gap
Closes: https://github.com/espressif/esp-idf/issues/9389
2022-09-23 17:31:20 +08:00
5a969b91a8 uart: Fix unwanted processing of TX_DONE interrupt immediately after calling uart_wait_tx_done()
In previous transmission(s), the TX_DONE interrupt raw bit may be raised, but never been cleared.
TX_DONE interrrupt status bit should be cleared before enabling it to check the new transmission.

Introduced in 4e09d147b11ed8a094b5858642c9f60d658ef656
2022-09-23 16:10:53 +08:00
60d6ad326e Merge branch 'bugfix/spi2_add_device_cs_more_than_3_v4.4' into 'release/v4.4'
spi_master:fix error when use `spi_bus_add_device` more than 3 device(v4.4)

See merge request espressif/esp-idf!20126
2022-09-23 11:20:17 +08:00
e833fb0c30 Merge branch 'bugfix/tinyusb_corrected_typo_naming_of_acm_v4.4' into 'release/v4.4'
tinyusb: fix typo naming of ACM (backport v4.4)

See merge request espressif/esp-idf!20299
2022-09-23 09:30:45 +08:00
7d4b99984d Merge branch 'bugfix/twai_isr_iram_v4.4' into 'release/v4.4'
hal: fix CONFIG_TWAI_ISR_IN_IRAM for C3, hide TWAI menu for C2 (v4.4)

See merge request espressif/esp-idf!20092
2022-09-23 02:25:26 +08:00
9aa7c83e19 Merge branch 'bugfix/mqtt_enqueue' into 'release/v4.4'
[mqtt] Fix esp_mqtt_client_enqueue for len=0 (v4.4)

See merge request espressif/esp-idf!20230
2022-09-22 21:49:46 +08:00
8d53799e2e Merge branch 'feature/update_esptool_v3' into 'release/v4.4'
feat(esptool): Update to v3.3.2 in IDF v4.4

See merge request espressif/esp-idf!20257
2022-09-22 21:37:12 +08:00
36d973a5e5 tinyusb: fix typo naming of ACM 2022-09-22 20:33:31 +08:00
f40364e2f3 feat(esptool): Update to v3.3.2 2022-09-22 10:26:09 +02:00
06a52bf770 usb_serial_jtag: fixed the docs that we can use usj in sleep modes
Related to: https://github.com/espressif/esp-idf/issues/8507, https://github.com/espressif/esp-idf/issues/8884
2022-09-22 15:37:32 +08:00
c407e69246 Merge branch 'refactor/add_description_to_touch_pad_set_meas_time_v4.4' into 'release/v4.4'
touch_sensor: add description to distinguish the API on different target (v4.4)

See merge request espressif/esp-idf!20242
2022-09-22 14:51:41 +08:00
3ea96f0e22 Merge branch 'bugfix/relay_friend_cred_message_v4.4' into 'release/v4.4'
ble_mesh: stack: Fix friend relay lpn message when relay disable(v4.4)

See merge request espressif/esp-idf!20204
2022-09-22 14:17:25 +08:00
ac0ef933ff Merge branch 'ci/optimize_ats_ci_flow_v4.4' into 'release/v4.4'
CI: optimize ATS ci flow (v4.4)

See merge request espressif/esp-idf!20175
2022-09-22 14:11:56 +08:00
3247fa9374 Merge branch 'bugfix/fix_spi_bus_lock_concurrency_issue_v4.4' into 'release/v4.4'
spi_bus_lock: fix a concurrency issue (v4.4)

See merge request espressif/esp-idf!20138
2022-09-22 13:33:31 +08:00
5c57f9c884 touch_sensor: add description to distinguish the API on different target
Closes https://github.com/espressif/esp-idf/issues/9067
2022-09-22 10:31:08 +08:00
08fa67fe92 Merge branch 'bugfix/i2s_receive_data_lost_v4.4' into 'release/v4.4'
i2s: fix message queue overflow condition (v4.4)

See merge request espressif/esp-idf!20209
2022-09-21 22:01:12 +08:00
2f23432c00 [mqtt] Fix esp_mqtt_client_enqueue for len=0
Detailed description of the changes:
* [Backport] mqtt_client: fix esp_mqtt_client_enqueue for len=0
  - See merge request espressif/esp-mqtt!144
  - mqtt_client: fix esp_mqtt_client_enqueue for len=0
    (espressif/esp-mqtt@e918742)

Closes https://github.com/espressif/esp-idf/issues/9719
2022-09-21 13:42:32 +02:00
1b70a08cc9 Merge branch 'bugfix/fix_xtal32k_error_detect_backport_v4.4' into 'release/v4.4'
esp_hw_support/clk_cali: fix xtal32k error detect(backport v4.4)

See merge request espressif/esp-idf!20276
2022-09-21 19:11:14 +08:00
17214c2db6 hal: fix CONFIG_TWAI_ISR_IN_IRAM not taking effect for C3/H2 2022-09-21 08:35:54 +00:00
c6fd8752b0 Merge branch 'examples/tls_removed_deprecated_version_v4.4' into 'release/v4.4'
test_apps: removed verification of TLS v1.1 (v4.4)

See merge request espressif/esp-idf!19290
2022-09-21 16:35:40 +08:00
9a61a07fd8 esp_hw_support/clk_cali: remove redundant check for cali value 2022-09-21 15:13:22 +08:00
13984c0a79 esp_hw_support/clk_cali: fix xtal32k error detect 2022-09-21 15:11:04 +08:00
7d4d75c507 Merge branch 'doc/support_micro_def' into 'release/v4.4'
Support of Micro definition in header file

See merge request espressif/esp-idf!20071
2022-09-21 13:53:53 +08:00
d805d2ad5a Merge branch 'bugfix/clobbering_freertos_base_priority_v4.4' into 'release/v4.4'
spi_flash: fix issue linked with raising of task priority while priority is already raised (v4.4)

See merge request espressif/esp-idf!20026
2022-09-21 13:11:35 +08:00
0f630acf43 Merge branch 'bugfix/spi_hd_quad_issue_4.4' into 'release/v4.4'
SPI : fix wrong dummy cycle on quad mode and put get-command function in spi_ll.h(backport v4.4)

See merge request espressif/esp-idf!19816
2022-09-21 12:06:40 +08:00
af62cfc8a2 Merge branch 'bugfix/fix_ledc_timer_update_usage_v4.4' into 'release/v4.4'
ledc: Fix the usage of ledc_ls_timer_update and ledc_timer_rst (backport v4.4)

See merge request espressif/esp-idf!20241
2022-09-21 11:40:27 +08:00
bf9b44f7fc ble_mesh: stack: Fix friend relay lpn message when relay disable. 2022-09-21 03:39:56 +00:00
4b8915d7af Merge branch 'bugfix/lpn_not_recv_message_to_all_node_4.4' into 'release/v4.4'
ble_mesh: stack: Add option for lpn auto sub all-nodes(v4.4)

See merge request espressif/esp-idf!20264
2022-09-21 11:31:55 +08:00
7cedbfabdf Merge branch 'bugfix/gpio_usb_pin_pupd_v4.4' into 'release/v4.4'
gpio: fix USB D+ pin cannot disable pullup (backport v4.4)

See merge request espressif/esp-idf!20251
2022-09-21 11:28:36 +08:00
b9bd4df2d6 Merge branch 'support/readme_esp32s3_bluedroid_examples_v4.4' into 'release/v4.4'
Added ESP32-S3 in README Bluedroid examples (v4.4)

See merge request espressif/esp-idf!20224
2022-09-21 10:39:44 +08:00
e4df3e2ad7 ble_mesh: stack: Add option for lpn auto sub all-nodes. 2022-09-20 20:30:08 +08:00
3531585522 Merge branch 'feature/update-GCC-Toolchain-to-esp-2021r2-patch5-8.4.0' into 'release/v4.4'
tools: update GCC-Toolchain version to 'esp-2021r2-patch5-8.4.0' for IDF-v4.4

See merge request espressif/esp-idf!20186
2022-09-20 20:25:02 +08:00
4bee8a84e2 gpio: fix USB D+ pin cannot disable pullup
Internally, disable usb serial jtag DP pin's pullup when calling gpio_ll_pullup_dis and rtcio_ll_pullup_disable
At usb serial jtag setup/install, re-enable DP pin's pullup

Closes https://github.com/espressif/esp-idf/issues/9495
2022-09-20 15:23:01 +08:00
a1ca11551f Revert "tlsf control's structure should remain opaque"
This reverts commit 7010314c4a.
2022-09-20 08:58:04 +02:00
6dae07d137 add host test with multiple heap size 2022-09-20 07:55:24 +02:00
bb6f2ca740 Support of Micro defination in header file 2022-09-20 11:07:06 +05:30
9c830297b9 freertos: Adds new APIs to set/get and restore base priority
Closes https://github.com/espressif/esp-idf/issues/7580
2022-09-20 05:00:13 +00:00
c070c58ef3 Merge branch 'ci/app_type_elf_reduce_ram_v4.4' into 'release/v4.4'
CI: reduce memory footprint for "Loadable ELF build" (v4.4)

See merge request espressif/esp-idf!20227
2022-09-20 12:57:53 +08:00
9bd20fc2ca ledc: Fix the usage of ledc_ls_timer_update and ledc_timer_rst
ledc_ls_timer_update is required only when CLK_DIV and DUTY_RES bits are changed.
Calling ledc_timer_rst while re-configure PWM frequency through ledc_set_freq can cause glitch in the signal
2022-09-20 11:52:57 +08:00
ffcc115e8b clarify parameter usage in tslf_create 2022-09-19 14:31:47 +02:00
7010314c4a tlsf control's structure should remain opaque 2022-09-19 14:31:05 +02:00
8325aff3c9 dynamic control block per heap 2022-09-19 14:28:11 +02:00
4f971a0cf5 CI: reduce memory footprint for "Loadable ELF build"
Build test was failing due to IRAM overflow, building with the recommended
options for reducing memory footprint should give us some breathing room.
2022-09-19 17:22:30 +08:00
1d9f539f22 Merge branch 'bugfix/light_sleep_deadlock_v4.4' into 'release/v4.4'
esp_hw_support: Fix light sleep deadlock (v4.4)

See merge request espressif/esp-idf!19516
2022-09-19 16:33:19 +08:00
cd5ffbf44b docs: update wifi country code docs. 2022-09-19 15:22:57 +08:00
2a72036337 esp_wifi: add small UT for country code 2022-09-19 15:22:57 +08:00
2dff79510d esp_wifi: fix disconnect after set country issue 2022-09-19 15:20:29 +08:00
8ae535cdc5 Added ESP32-S3 in README Bluedroid examples (v4.4) 2022-09-19 12:47:49 +05:30
b0a5b100ea test_apps: Removed verification of TLS v1.1 2022-09-19 09:13:42 +04:00
2da3035b52 doc: add application notes for i2s 2022-09-19 12:03:08 +08:00
2f929685fc Merge branch 'bugfix/fix_send_eapol_key_request_frame_when_wpa_group_handshake_issue_v4.4' into 'release/v4.4'
wpa_supplicant: try install gtk before send 2 of 2(Backport v4.4)

See merge request espressif/esp-idf!20201
2022-09-19 10:58:59 +08:00
190502bfec i2s: fix the wrong condition of event queue 2022-09-19 10:18:34 +08:00
7ce7c22140 tools: update GCC-Toolchain version to 'esp-2021r2-patch5-8.4.0'
Fix running GDB on macos-arm64
2022-09-18 18:27:54 +07:00
5b24356ab5 wpa_supplicant: try install gtk before send 2 of 2 2022-09-17 19:02:53 +08:00
25c968ec65 Merge branch 'bugfix/exclude_component_dirs_pacman_v4.4' into 'release/v4.4'
build: fix excluded components being passed to component manager (v4.4)

See merge request espressif/esp-idf!19623
2022-09-16 22:10:05 +08:00
5af9949289 Merge branch 'fix/idf_tools_download' into 'release/v4.4'
tools: fix idf_tools.py download command without --platform option

See merge request espressif/esp-idf!20170
2022-09-16 18:51:39 +08:00
baa28b54a2 esp_hw_support: Fix esp_light_sleep_start() deadlock
esp_light_sleep_start() will stall the other CPU via esp_ipc_isr_stall_other_cpu(). After stalling the other CPU,
will call esp_clk_... API which themselves take locks. If the other stalled CPU is holding those locks, this will
result in a deadlock.

This commit adds a workaround calling esp_clk_private_lock() to take the lock before stalling the other CPU.
2022-09-16 17:02:38 +08:00
9ea9192efb esp_hw_support: esp_clk should use spinlock instead of mutex
esp_clk used to be protected using _lock_t (i.e., a FreeRTOS Mutex). However, esp_clk API is current called from
from critical sections, thus mutex should not be used (as they can be blocking).

This commit updates esp_clk to use spinlocks for critical sections instead.

Note: Added a small fix to exclude esp_clk.c from bootloader builds in the
      legacy build system (this is already the case in CMake).
2022-09-16 17:02:38 +08:00
e80057035a Merge branch 'bugfix/adapt_new_btc_v4.4' into 'release/v4.4'
ble_mesh: stack: Corrected parameter size when the btc_transfer_context is used (v4.4)

See merge request espressif/esp-idf!20166
2022-09-16 10:53:55 +08:00
d6522044d3 Merge branch 'bugfix/change_log_level_for_print_v4.4' into 'release/v4.4'
Nimble : updated debug level for a print to avoid unwanted console log. (v4.4)

See merge request espressif/esp-idf!20111
2022-09-16 10:52:31 +08:00
ecf84354b2 Merge branch 'feature/ulp_binutils_multi_target_v4.4' into 'release/v4.4'
ulp: support the new multi-target ULP-FSM binutils (v4.4)

See merge request espressif/esp-idf!20147
2022-09-16 10:01:00 +08:00
a8e81f88f1 tools: update esp32ulp-elf to v2.35_20220830
Closes https://github.com/espressif/esp-idf/issues/6432
Closes https://github.com/espressif/binutils-esp32ulp/issues/23
2022-09-15 23:41:56 +04:00
4b46e85b0a Merge branch 'bugfix/transport_foundation_intialization_v4.4' into 'release/v4.4'
tcp_transport: Fix initialition of transport (v4.4)

See merge request espressif/esp-idf!20047
2022-09-16 00:13:48 +08:00
4ef57caf77 CI: optimize ATS ci flow 2022-09-15 22:59:13 +08:00
d4b4964088 Merge branch 'bugfix/gdbstub_test_fix_v4.4' into 'release/v4.4'
system: fix gdbstub panic tests after the truncated backtrace is fixed

See merge request espressif/esp-idf!20149
2022-09-15 19:06:10 +08:00
d2b1ea9ac1 Nimble : updated debug level for a print to avoid unwanted console log. 2022-09-15 15:24:53 +05:30
87921558fd ble_mesh: stack: added the judgment that the parameter is NULL but the parameter len is not zero to avoid btc_transfer_context failed 2022-09-15 09:14:39 +00:00
65da9400e8 tools: fix idf_tools.py download command without --platform option 2022-09-15 12:55:41 +04:00
69da6a3c23 system: fix gdbstub panic tests after the truncated backtrace is fixed
GDB has been updated in 0007754 to fix the abort backtrace issue.
This commit updates the test case to match the new (correct) behavior.
2022-09-15 10:36:46 +02:00
481d00be93 Merge branch 'bugfix/fix_memory_corruption_in_recon_code_v4.4' into 'release/v4.4'
Nimble: Fixed memory corruption introduced in reconnection attempt code (v4.4)

See merge request espressif/esp-idf!19745
2022-09-14 16:34:22 +08:00
440f9e138c Merge branch 'bugfix/enable_ans_svc_by_default_v4.4' into 'release/v4.4'
Nimble: Enable ANS service by default in nimble peripheral example (v4.4)

See merge request espressif/esp-idf!20022
2022-09-14 16:17:20 +08:00
163a4b6b02 SPI_BUS_LOCK: fix a concurrency issue
define: lock_bits = (lock->status & LOCK_MASK) >> LOCK_SHIFT;  This `lock_bits` is the Bit 29-20 of the lock->status

1. spi_hdl_1:
   acquire_end_core():
   uint32_t status = lock_status_clear(lock, dev_handle->mask & LOCK_MASK);
   Becuase this is the first `spi_hdl_1`, so after this , lock_bits == 0`b0. status == 0

2. spi_hdl_2:
   acquire_core:
   uint32_t status = lock_status_fetch_set(lock, dev_handle->mask & LOCK_MASK);
   Then here status is 0`b0, but lock_bits == 0`b10. Because this is the `spi_hdl_2`

3. spi_hdl_2:
   `acquire_core` return true, because status == 0. `spi_bus_lock_acquire_start(spi_hdl_2)` then won't block.

4. spi_hdl_2:
   spi_device_polling_end(spi_hdl_2).

5. spi_hdl_1:
   acquire_end_core:
   status is 0, so it cleas the lock->acquiring_dev

6. spi_hdl_2:
   spi_device_polling_end:
   assert(handle == get_acquiring_dev(host)); Fail

Closes https://github.com/espressif/esp-idf/issues/8179
2022-09-14 12:11:29 +08:00
27470afb7c spi_master:fix error when use spi_bus_add_device more than 3 device
update gpio_sig at `spics_out` array in each spi_periph.c of chips later than s2
then `spi_bus_add_device` can correctly distribute gpio_signals for cs_signal

Closes https://github.com/espressif/esp-idf/issues/8876
2022-09-14 11:20:47 +08:00
0b7532c097 Merge branch 'bugfix/idf_tools_update_bundled_cert_v4.4' into 'release/v4.4'
tools: update bundled root certificate in idf_tools.py (v4.4)

See merge request espressif/esp-idf!20114
2022-09-13 21:34:31 +08:00
6c3267e8a9 Merge branch 'feature/s2_s3_support_ext_mem_stack_v4.4' into 'release/v4.4'
soc: support placing task stacks in external memory for S2 and S3 (v4.4)

See merge request espressif/esp-idf!20001
2022-09-13 21:24:02 +08:00
a29f770c7a Merge branch 'feature/mem-corruption-check-when-comprehensif-poisoning-v4.4' into 'release/v4.4'
heap: Provide memory corruption check when poisoning is active (V4.4)

See merge request espressif/esp-idf!19778
2022-09-13 20:41:48 +08:00
5224045d17 Merge branch 'doc/nvs_max_num_namespaces_4.4' into 'release/v4.4'
doc (nvs): added note about maximum possible namespaces (backport 4.4)

See merge request espressif/esp-idf!19980
2022-09-13 17:33:19 +08:00
1be5e5eae5 ci: fix incorrect paths in the build system test
The working directory when the test runs is not $IDF_PATH, it is
the directory of the template project.
2022-09-13 10:23:07 +02:00
0e8c7284ce build: fix excluded components being passed to component manager
`__COMPONENT_TARGETS` is evaluated very early when components and
component directories are added to the build, which means that all
components (including the ones which are in EXCLUDE_COMPONENTS) have
a build system target defined. The component manager was given the
list of all known components (derived from the list of targets), not
the list of components after EXCLUDE_COMPONENTS were processed.
Because of that, EXCLUDE_COMPONENTS didn't effectively exclude the
component from the consideration of the component manager.
2022-09-13 10:05:59 +02:00
3b03bee2a4 Merge branch 'test/add_adc_wifi_test_thresh_on_v4.4' into 'release/v4.4'
test: added adc wifi test thresh for esp32, s2, c3, s3 on v4.4

See merge request espressif/esp-idf!20116
2022-09-13 14:50:00 +08:00
2488281d17 test: added adc wifi test thresh for esp32, s2, c3, s3 on v4.4
Due to unit test, we can't specify runners, for adc related tests.
Whereas adc tests are easily influenced by board hw condition, e.g.
pullup/down value.
This commit increases the thresh to 200mV.
2022-09-13 11:56:37 +08:00
95b4553026 Merge branch 'docs/update_ulp_shift_ops_description_v4.4' into 'release/v4.4'
docs: Updated description of ULP FSM shift operations (v4.4)

See merge request espressif/esp-idf!20101
2022-09-13 09:20:40 +08:00
3301606cdf tools: update bundled root certificate in idf_tools.py
dl.espressif.com is now using the same root certificate as github.com.
This commit replaces the previously-used ISRG X1 root certificate
with the DigiCert Root CA certificate.
As a result, even if the certificates are not installed (as it happens
on macOS with python.org installers, if the user forgets to run
'Install Certificates.command'), the download is successful.

Related to https://github.com/espressif/esp-idf/issues/4081
2022-09-12 18:09:24 +02:00
c5a2315f5a Merge branch 'feature/update-gcc-toolchain-to-esp-2021r2-patch4-8.4.0' into 'release/v4.4'
tools: update GCC-toolchain version to esp-2021r2-patch4 for IDF-v4.4

See merge request espressif/esp-idf!20051
2022-09-12 21:52:01 +08:00
00077545bf tools: Update GCC toolchain to esp-2021r2-patch4 version. Includes GCC 8.4.0, Newlib 3.3.0
Closes https://github.com/espressif/esp-idf/issues/7857
Closes https://github.com/espressif/esp-idf/issues/6004
Closes https://github.com/espressif/esp-idf/issues/6124
Closes https://github.com/espressif/esp-idf/issues/9396
2022-09-12 19:28:37 +07:00
da0cfb806a system: add missing header
Because we got rid of the including core-isa.h in newlib's config.h (8a3197a2a9a42dd99605cf8cc1e0f2d3c976c58c)
2022-09-12 19:26:42 +07:00
faa368a612 [tcp_transport] Fix initialition of transport
- Foundation was initialized only for SSL.
- Removed base from list.
- Changed SSL and TCP initialition.
- Clean of state data structures.
2022-09-12 11:49:25 +02:00
320f17550a docs: Updated description of ULP FSM shift operations
This commit updates the documentation for ULP FSM LSH and RSH
operations.

Closes https://github.com/espressif/esp-idf/issues/8831
2022-09-12 10:33:20 +02:00
12369a5faf Merge branch 'bugfix/reserve_dma_ram_in_segments_v4.4' into 'release/v4.4'
psram: reserve dma pool in the step of heap max block (v4.4)

See merge request espressif/esp-idf!18858
2022-09-11 02:49:39 +08:00
f9a630b967 Merge branch 'bugfix/calib_i2c_clk_v4.4' into 'release/v4.4'
I2C: Make I2C clock frequency accurate(backport v4.4)

See merge request espressif/esp-idf!19069
2022-09-11 02:44:26 +08:00
224871784b Merge branch 'bugfix/fix_ble_get_cur_pkt_num_crash_sometimes_when_bluetooth_is_disconnecting_v4.4' into 'release/v4.4'
Fixed calling esp_ble_get_cur_sendable_packets_num() sometimes crashes when bluetooth is disconnecting (backport v4.4)

See merge request espressif/esp-idf!20042
2022-09-09 21:05:52 +08:00
8e6af17ee5 Merge branch 'bugfix/fix_some_ble_bugs_on_esp32c3_and_esp32s3_v4.4' into 'release/v4.4'
Fixed some BLE controller bugs on ESP32-C3 and ESP32-S3 (backport v4.4)

See merge request espressif/esp-idf!19988
2022-09-09 19:39:57 +08:00
ef5a87ea20 Merge branch 'bugfix/mdns_add_service_fail_if_nohostname' into 'release/v4.4'
mdns: Fix add_service() to report error if no-hostname

See merge request espressif/esp-idf!19679
2022-09-09 18:38:31 +08:00
742c7f9672 Merge branch 'fix/DOC_3566_v4.4' into 'release/v4.4'
Updating doc for the issue doc_3566 (v4.4)

See merge request espressif/esp-idf!20061
2022-09-09 17:43:57 +08:00
4c4799ac49 bt:Fixed sink not being able to output mono audio because it can only decode dual channel audio data 2022-09-09 17:31:04 +08:00
a44071ab14 updating doc for the issue doc_3566 2022-09-09 10:40:44 +05:30
28d7eb44b9 Merge branch 'feature/update_tool_version_with_checksum_file_v4.4' into 'release/v4.4'
tools: Add tool's versions update with checksum file (v4.4)

See merge request espressif/esp-idf!19956
2022-09-09 00:34:07 +08:00
964fcc7062 Merge branch 'bugfix/test_ethernet_throughput_basic_v4.4' into 'release/v4.4'
Bugfix/test ethernet throughput basic (v4.4)

See merge request espressif/esp-idf!19563
2022-09-08 20:50:41 +08:00
6ece53adaa Merge branch 'bugfix/iperf_py_script_upt_v4.4' into 'release/v4.4'
ci iperf: fixed condition for waiting to iperf server is up in DUT (v4.4)

See merge request espressif/esp-idf!19815
2022-09-08 19:56:21 +08:00
c0c1485dc4 Add QA test Functions 2022-09-08 17:55:54 +08:00
zwj
4bf2eb3f48 fix calling esp_ble_get_cur_sendable_packets_num() sometimes crashes when bluetooth is disconnecting 2022-09-08 17:54:43 +08:00
67ff43c2c7 Merge branch 'bugfix/wrong_bpp_for_rgb666_v4.4' into 'release/v4.4'
lcd: fix wrong bpp size of rgb666 format (v4.4)

See merge request espressif/esp-idf!20032
2022-09-08 17:34:40 +08:00
de1e58118d Merge branch 'bugfix/fix_init_memory_leak_issue_v4.4' into 'release/v4.4'
esp_wifi: done beacon monitor timer when call pm deattach.(Backport v4.4)

See merge request espressif/esp-idf!19937
2022-09-08 17:02:33 +08:00
151b957238 lcd: fix wrong bpp size of rgb666 format
Closes https://github.com/espressif/esp-idf/issues/9729
2022-09-08 13:22:16 +08:00
722282e30b tools: add standard triplets for macos 2022-09-08 11:17:02 +07:00
1edf376060 Tools: fix architecture armhf/armel detection 2022-09-08 11:17:02 +07:00
7d010d36c8 tools: Add tool's versions update with checksum file
'idf_tools.py add-version' has new options:
--override            Override tool versions with new data
--checksum-file       URL or path to local file with checksum/size for artifacts

Usage e.g.:
CHECKSUM_URL=https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/crosstool-NG-esp-2021r2-checksum.sha256
idf_tools.py add-version --tool xtensa-esp32-elf --version esp-2021r2 --override --checksum-file $CHECKSUM_URL

Positional argument 'files' moved to optional argument '--artifact-file'

Add tests for add-version logic
2022-09-08 11:17:02 +07:00
ec78f2546f Tools: idf_tools.py prints URL before starting the download
This helps users with poor Internet connection to be able to cancel the
download and download it in another way.

Closes https://github.com/espressif/esp-idf/issues/8625
2022-09-08 11:17:02 +07:00
a3ab8da720 tools: just extract download() method 2022-09-08 10:34:17 +07:00
89c55f954a Merge branch 'fix/test_app_ide_integration_v4.4' into 'release/v4.4'
Tools: Increase the delay before producing exception in the Monitor IDE test app (v4.4)

See merge request espressif/esp-idf!20013
2022-09-07 22:22:35 +08:00
fcfef95fa7 Nimble: Enable ANS service by default in nimble examples 2022-09-07 17:22:37 +05:30
ce1e8350b4 SPI: Fixed Quad SPI wrong dummy cycle issue on ESP32C3/ESP32S3 and put get-command/dummy-bits functions in spi_ll.h 2022-09-07 18:55:38 +08:00
194d3c665d Tools: Increase the delay before producing exception in the Monitor IDE test app 2022-09-07 12:04:39 +02:00
zwj
c1e54ac0fa Update ESP32-C3 and ESP32-S3 BLE lib
- Fixed the performance issue of BLE sync scan in coexistence scenario when PLL track is enabledFixed the usage of PLL track related baseband IRQs
 - Fixed connect failed due to error sync found signal
 - Fixed BLE disconnect failed due to terminate_ind have sent but no ACK is received
 - Added ADV mode error check in ADV rx isr handler function
 - Fixed BLE RAL_UNDERRUN and TX_CRYPT_ERR assert
 - Disable scan continue
 - Fixed scan forever if scan continue is disable
2022-09-07 12:33:33 +08:00
6e6c8135d5 Merge branch 'bugfix/remove_bt_dft_init_semicolon_v4.4' into 'release/v4.4'
bt: Remove trailing semicolon from bt dft initializer(v4.4)

See merge request espressif/esp-idf!19914
2022-09-07 12:00:32 +08:00
2c8d6a4954 Merge branch 'bugfix/deadlock_after_call_esp_bluedroid_disable_v4.4' into 'release/v4.4'
bt:Fixed deadlock due to wrong parameter when calling btc_transfer_context() after calling esp_bluedroid_disable()(v4.4)

See merge request espressif/esp-idf!19951
2022-09-07 11:55:15 +08:00
16459d0d42 soc: support placing task stacks in external memory for S2 and S3 2022-09-07 11:46:56 +08:00
6c4400132e Merge branch 'update_expat_R_2_4_8' into 'release/v4.4'
expat: Update expat library to R_2_4_8 release

See merge request espressif/esp-idf!19962
2022-09-06 22:50:06 +08:00
e3c1fde6c4 Merge branch 'bugfix/driver_rs485_fix_test_sync_issues_v44' into 'release/v4.4'
driver: uart rs485 fix test sync issues and fail threshold (backport v4.4)

See merge request espressif/esp-idf!19610
2022-09-06 17:23:46 +08:00
7d8636ce0a driver: uart rs485 fix test sync issues and fail threshold (backport v4.4) 2022-09-06 17:23:46 +08:00
bb0a13944f expat: Update expat library to R_2_4_8 release
Detailed changelog: https://github.com/libexpat/libexpat/blob/R_2_4_8/expat/Changes
2022-09-06 14:00:01 +05:30
1d51f93473 Docs: Update CN trans for nvs_flash.rst 2022-09-06 10:17:58 +02:00
87ff108235 doc (nvs): added note about maximum possible namespaces 2022-09-06 10:17:58 +02:00
78d7844b01 system: fix SET_STACK macro crashing in windowoverflow8 exception
If a windowoverflow8 happened after changing the SP, the exception handler would look for
the extra save area by looking at the previous frame's SP. This SP would be a garbage value
and could cause the windowoverflow exception to write to invalid memory ares.
2022-09-06 15:54:57 +08:00
6d7877fcb8 Merge branch 'bugfix/remove_redef_s3_cpu_macro' into 'release/v4.4'
soc: delete obsolete soc/cpu.h for S3 (v4.4)

See merge request espressif/esp-idf!19900
2022-09-05 16:26:33 +08:00
a825bfdebb Merge branch 'docs/reorder_mem_alloc_content_v4.4' into 'release/v4.4'
docs: reorder content in mem_alloc section (v4.4)

See merge request espressif/esp-idf!19949
2022-09-05 16:04:30 +08:00
55039da3e5 Merge branch 'bugfix/bootloader_assert_v4.4' into 'release/v4.4'
bootloader: dont print assert msg if CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is set (v4.4)

See merge request espressif/esp-idf!19943
2022-09-05 15:47:15 +08:00
d0c19a0e74 Fixed deadlock due to wrong parameter when calling btc_transfer_context() after calling esp_bluedroid_disable()
Closes https://github.com/espressif/esp-idf/issues/9672
2022-09-05 14:23:16 +08:00
22b13112b6 docs: reorder content in mem_alloc section
We should avoid hiding sections between long lists of API documentation.
2022-09-05 13:46:08 +08:00
2b706909e1 Merge branch 'bugfix/s3_gpio48_hold_v4.4' into 'release/v4.4'
gpio: Fix ESP32S3 GPIO48 does not support hold function bug (backport v4.4)

See merge request espressif/esp-idf!19933
2022-09-05 13:32:07 +08:00
518af54ded bootloader: dont print assert msg if CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is set
Closes https://github.com/espressif/esp-idf/pull/7518
2022-09-05 12:31:31 +08:00
9c7046375f gpio: Fix ESP32S3 GPIO48 does not support hold function bug
GPIO_HOLD_MASK array was missing the last item
2022-09-05 03:47:43 +00:00
db00e4a8c2 esp_wifi: done beacon monitor timer when call pm deattach.
1. done beacon monitor timer when call pm deattach.
2. fix pairwise cipher tkip pmf compability issue.
2022-09-03 21:10:46 +08:00
ed5aea2955 Merge branch 'bugfix/fix_calling_cb_func_before_perform_v4.4' into 'release/v4.4'
esp_https_ota: fix bug where `http_client_init_cb` is called after esp_http_client_perform() (v4.4)

See merge request espressif/esp-idf!19931
2022-09-03 01:07:51 +08:00
42756f7eff esp_https_ota: fix bug where http_client_init_cb is called after esp_http_client_perform() instead of before.
Closes https://github.com/espressif/esp-idf/issues/9581
2022-09-02 16:15:50 +05:30
f6a7962a06 Merge branch 'bugfix/temp_sensor_value' into 'release/v4.4'
temperature_sensor: Fix issue that value is not accurate on ESP32-S3(v4.4)

See merge request espressif/esp-idf!19922
2022-09-02 17:56:49 +08:00
f2ac141ebf temperature_sensor: Fix issue that value is not accurate on ESP32-S3 2022-09-02 16:03:39 +08:00
d0ba3fd63e Merge branch 'bugfix/propogate_isr_allocation_failure_v4.4' into 'release/v4.4'
Fix MCPWM multiplication overflow (v4.4)

See merge request espressif/esp-idf!19891
2022-09-02 10:00:00 +08:00
c16eb81c5f Merge branch 'bugfix/miniz_header_doc_v4.4' into 'release/v4.4'
esp-rom: fixed error in miniz header documention for tdefl_init (v4.4)

See merge request espressif/esp-idf!19910
2022-09-02 09:54:24 +08:00
66dfcd72d2 Merge branch 'docs/malloc_header_v4.4' into 'release/v4.4'
heap: remove misleading info about malloc being equivalent to heap_caps_malloc(p, MALLOC_CAP_8BIT) (v4.4)

See merge request espressif/esp-idf!19896
2022-09-02 09:12:07 +08:00
a1e6041777 Remove trailing semicolon from bt dft initializer
Similar to espressif#6554
2022-09-01 20:33:36 +08:00
92d018f4f1 esp-rom: fixed error in miniz header documention for tdefl_init
Closes https://github.com/espressif/esp-idf/issues/8435
2022-09-01 18:14:24 +08:00
f8bea48cad soc: delete obsolete soc/cpu.h for S3
This file has been moved to esp_hw_support/, but it seems like we forgot to
delete the old one in soc/ for ESP32S3.
2022-09-01 15:09:16 +08:00
b6248014b9 heap: remove misleading info about malloc being equivalent to heap_caps_malloc(p, MALLOC_CAP_8BIT)
The actual memory allocated for malloc() depends on a lot of factors, see heap_caps_malloc_default()

Closes https://github.com/espressif/esp-idf/issues/7659
2022-09-01 14:33:03 +08:00
ca831bbd63 mcpwm: fix multiplication overflow in converting us to compare ticks
Closes https://github.com/espressif/esp-idf/issues/9648
2022-09-01 05:11:23 +00:00
645d5641dd timer: propagate isr register failure
Closes https://github.com/espressif/esp-idf/issues/9651
2022-09-01 05:11:23 +00:00
836f9875b1 Merge branch 'bugfix/ble_disconnect_enable_light_sleep_and_bb_pd_v4.4' into 'release/v4.4'
bt: Fixed bluetooth disconnection issue when light sleep and baseband power down are enabled (v4.4)

See merge request espressif/esp-idf!19803
2022-09-01 11:33:22 +08:00
b059440b83 Merge branch 'docs/update_jtag_select_efuse_desc_4.4' into 'release/v4.4'
Docs: update the JTAG select eFuse description in configure-other-jtag.rst (backport v4.4)

See merge request espressif/esp-idf!19801
2022-08-30 11:06:57 +08:00
7cb9629590 Docs: update the JTAG select eFuse description in configure-other-jtag.rst (backport v4.4) 2022-08-30 11:06:57 +08:00
a3da33c813 Merge branch 'contrib/github_pr_9563_v4.4' into 'release/v4.4'
Add git-lfs to docker container (GitHub PR) (v4.4)

See merge request espressif/esp-idf!19653
2022-08-29 22:48:36 +08:00
22b222b762 I2C: Make I2C clock frequency accurate 2022-08-29 09:07:30 +00:00
1fdfe449e3 Merge branch 'bugfix/fix_rtc_gpio_hold_v4.4' into 'release/v4.4'
gpio: Fix missing set hold bit in rtc gpio register (v4.4)

See merge request espressif/esp-idf!19821
2022-08-29 13:53:57 +08:00
bff89fd71b added missing call to set hold register bit
This commit fixes gpio_hold_en(pin) function for ESP32, where after wakeup from deep sleep, the pin gets reset to default state and stop holding the pin level.
2022-08-29 10:18:09 +08:00
526cd8c219 ci iperf: fixed condition for waiting to iperf server is up in DUT 2022-08-26 15:58:00 +02:00
5852e93eba Fix bluetooth disconnection issue when light sleep and baseband power down are enabled 2022-08-26 16:03:57 +08:00
55a2b55bdb heap: Add test to check that the corruption of free memory is detected
This commit extends the heap test set by adding a test to check corruption
detection in free memory block.

For each byte of the free block memory, the test changes the value of the byte,
call multi_heap_check(), make sure that the function returns 'corruption detected'
only when comprehensive poisoning is set, restore the good value of the byte, calls
multi_heap_check() again and make sure that it returns 'OK'.
2022-08-26 07:51:29 +02:00
6536e51a32 heap: Provide tlsf_check_hook() mechanism to check for memory corruption
Add a call to tlsf_check_hook() in tlsf_check() that calls
multi_heap_internal_check_block_poisoning() and check the memory
of every free blocks when heap poisoning is active.
2022-08-26 07:51:22 +02:00
e6fda46a02 Merge branch 's3_sysview_irq_names_v4.4' into 'release/v4.4'
Fix ESP32-S3 interrupt names used by SystemView (v4.4)

See merge request espressif/esp-idf!19676
2022-08-25 18:53:04 +08:00
2e26fbf56c Add git-lfs to docker container 2022-08-25 08:34:59 +00:00
41839b69bd Merge branch 'bugfix/fix_ble_sch_arb_assert_v4.4' into 'release/v4.4'
Fixed BLE sch_arb assert on ESP32-C3 and ESP32-S3(backport v4.4)

See merge request espressif/esp-idf!19733
2022-08-25 13:44:20 +08:00
696760668a Nimble: Fixed memory corruption introduced in reconnection attempt code 2022-08-25 04:54:02 +00:00
134170a6fc Merge branch 'contrib/github_pr_9529_mr_v4.4' into 'release/v4.4'
bt:No need to use local copy of btc_msg_t in btc_transfer_context, create it on heap and pass to osi_thread_post()(v4.4)

See merge request espressif/esp-idf!19692
2022-08-25 10:44:43 +08:00
5927bc2227 Merge branch 'bugfix/freertos_eventgroup_test_flakiness_v4.4' into 'release/v4.4'
freertos: Fix flakey event group unit tests (v4.4)

See merge request espressif/esp-idf!19528
2022-08-24 19:08:55 +08:00
5b1bedec2a Merge branch 'bugfix/remove_remaining_rom_time_t_dependencies_v4.4' into 'release/v4.4'
Newlib: Add workaround for ROM Newlib stdio functions using 32-bit time_t callpath (v4.4)

See merge request espressif/esp-idf!19684
2022-08-24 17:07:46 +08:00
72313054ad Merge branch 'bugfix/nvs_part_ptr_wrong_init_4.4' into 'release/v4.4'
bugfix (nvs_flash): Fix nvs_flash_init_partition_ptr (backport v4.4)

See merge request espressif/esp-idf!18672
2022-08-24 17:06:53 +08:00
954299a063 Merge branch 'bugfix/wps_connection_issue_v4.4' into 'release/v4.4'
wpa_supplicant: Fix WPS connection issue after WPS done (v4.4)

See merge request espressif/esp-idf!19720
2022-08-24 14:07:27 +08:00
ac043bfc91 Merge branch 'bugfix/gpio_wakeup_docs_v4.4' into 'release/v4.4'
docs: fix documentation wrongly stating ESP_SLEEP_WAKEUP_GPIO is light sleep only (v4.4)

See merge request espressif/esp-idf!19740
2022-08-24 13:25:55 +08:00
228737d978 docs: fix documentation wrongly stating ESP_SLEEP_WAKEUP_GPIO is light sleep only
ESP_SLEEP_WAKEUP_GPIO is also a valid deep sleep wakeup cause on targets
with SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP

Closes https://github.com/espressif/esp-idf/issues/9567
2022-08-24 10:50:59 +08:00
e87caa8d75 Merge branch 'bugfix/ble_mesh_console_support_nimble_host_for_v4.4' into 'release/v4.4'
ble_mesh:ble mesh console support nimble(v4.4)

See merge request espressif/esp-idf!19604
2022-08-24 10:27:13 +08:00
300a4a16a5 Merge branch 'bugfix/add_signature_in_image_len_v4.4' into 'release/v4.4'
bootloader_support: consider signature sector in image length validation (v4.4)

See merge request espressif/esp-idf!19484
2022-08-23 20:19:52 +08:00
zwj
ad510c5099 Update BLE lib for ESP32-C3 and ESP32-S3
- update ble tx power level mapping
- Fixed ble sch_arb assert
2022-08-23 19:49:50 +08:00
zwj
fc4ffd144a fix extend adv set remove failed 2022-08-23 19:49:40 +08:00
bfc927e258 Merge branch 'fix/fix_esp_rsa_sign_alt_modifying_input_params_v4.4' into 'release/v4.4'
esp_rsa_sign_alt: Fix esp_init_ds_data_ctx API to not modify user defined data... (v4.4)

See merge request espressif/esp-idf!19714
2022-08-23 19:05:22 +08:00
606ada809a esp_rsa_sign_alt: Fix esp_init_ds_data_ctx API to not modify user defined data when it is given directory from flash 2022-08-23 13:27:03 +05:30
4d9c4fd7e1 wpa_supplicant: Fix WPS connection issue after WPS done
esp_wifi_disconnect is needed to clear the wifi state and enable
station to connect to new SSID. Add changes to call it after
WPS is done.
2022-08-23 13:09:32 +05:30
23d5a582cb Merge branch 'bugfix/fix_rtc_clock_freq_value_macro_v4.4' into 'release/v4.4'
rtc_clk: Fix wrong RC_FAST and RC_SLOW clock frequency values on ESP32C3 and ESP32S3

See merge request espressif/esp-idf!19665
2022-08-22 15:54:32 +08:00
810667fc1e update code to use osi_free() 2022-08-22 15:40:48 +08:00
879466e0cb local copy of btc_msg_t
No need to use local copy of btc_msg_t in btc_transfer_context, create it on heap and pass to osi_thread_post().
2022-08-22 15:40:42 +08:00
a45fcce631 newlib: Add workaround for printf functions using 32-bit time_t on first call
sizeof(time_t) was previously switched from 4 to 8, ROM functions that use
time_t or dependent types (such as "struct stat") are no longer called due as
they still treat sizeof(time_t) as 4 (see commit
24c20d18).

However, there is a ROM callpath that was left out. If putchar is the first
stdio print related call, the call path will result in cantwrite() ->
__swsetup_r() -> __smakebuf_r() -> __swhatbuf_r() using the ROM "struct stat"
(where sizeof(time_t)==4).

Instead of removing all printf related ROM newlib functions (which will result
in increased binary size), this commit adds a workaround to setup the stdio
files before any print related calls occur.

This results in cantwrite() always returning false, thus the callpath described
above never being reached.

Closes https://github.com/espressif/esp-idf/issues/9269
2022-08-22 11:56:51 +08:00
2bce0a19f6 Merge branch 'bugfix/fix_esp32_psram_cs_hold_time_issue_when_under_80m_v4.4' into 'release/v4.4'
esp_psram: fix esp32 psram cs hold time issue when under 40m (v4.4)

See merge request espressif/esp-idf!19648
2022-08-21 15:10:57 +08:00
f3ddf105a4 Merge branch 'bugfix/fix_disassembler_interpreting_padding_v4.4' into 'release/v4.4'
(Xtensa) Build: add .xt.prop and .xt.lit to the compiled ELF file (backport v4.4)

See merge request espressif/esp-idf!19609
2022-08-20 03:49:58 +08:00
bd0ec74c2e mdns: Fix add_service() to report error if no-hostname 2022-08-19 18:41:38 +02:00
350dd3798e bugfix (nvs_flash): Fix nvs_flash_init_partition_ptr
Added unit test case.

Closes https://github.com/espressif/esp-idf/pull/8755

Signed-off-by: Jakob Hasse <jakob.hasse@espressif.com>
2022-08-19 16:13:10 +02:00
0b0ca31386 Merge branch 'contrib/github_pr_9497_v4.4' into 'release/v4.4'
Move xSemaphoreGive out of configASSERT (GitHub PR) (v4.4)

See merge request espressif/esp-idf!19536
2022-08-19 21:06:43 +08:00
eebbc181e8 Merge branch 'staging/add_idf_as_lib_to_ci_v4.4' into 'release/v4.4'
CI: idf_as_lib is now run on all suported targets (backport v4.4)

See merge request espressif/esp-idf!19618
2022-08-19 21:05:49 +08:00
4bb3ebd6e5 Merge branch 'bugfix/update-doc-freertos-task-header_v4.4' into 'release/v4.4'
freertos: Update the documentation of the ulBitsToClearOnEntry parameter (v4.4)

See merge request espressif/esp-idf!19661
2022-08-19 21:04:47 +08:00
0784fd086a esp32s3: fix interrupt names used by SystemView 2022-08-19 14:42:45 +02:00
5245c53d7a replace CAN with TWAI in the esp_isr_names table 2022-08-19 14:39:37 +02:00
4851e0b9ca Merge branch 'bugfix/hfp_examples_not_work_with_default_sdkconfig_v4.4' into 'release/v4.4'
bugfix/set default number of sco connection to 1 (v4.4)

See merge request espressif/esp-idf!19587
2022-08-19 20:32:56 +08:00
c6aa0928ab freertos: Update the docuementation of the ulBitsToClearOnEntry parameter in xTaskGenericNotifyWait() function.
Closes https://github.com/espressif/esp-idf/issues/7207

The description of how the xTaskGenericNotifyWait parameter is handled in the
xTaskGenericNotifyWait() function was inaccurate.

In this commit, the description was updated to match the implementation of xTaskGenericNotifyWait().
2022-08-19 08:04:12 +02:00
b2f4fc022a rtc_clk: Fix wrong RC_FAST and RC_SLOW clock frequency values on ESP32C3 and ESP32S3 2022-08-19 12:21:11 +08:00
d08be42a53 esp_psram: fixed 40mhz cs signal glitch issue 2022-08-18 20:33:12 +08:00
91e6b5de70 Merge branch 'feature/sae_sta_h2e_v4.4' into 'release/v4.4'
esp_wifi: WPA3 SAE H2E support for station (backport v4.4)

See merge request espressif/esp-idf!18634
2022-08-18 17:56:31 +08:00
b5d2ee7ed4 CI: idf_as_lib is now run on all suported targets 2022-08-18 12:07:19 +08:00
756b46ca96 esp_wifi: WPA3 SAE H2E support for station
Mandate sta threshold wpa3 for ssid after receiving transition disable
bit from AP
2022-08-18 02:55:51 +05:30
3154abc66e (Xtensa) Build: add .xt.prop and .xt.lit to the compiled ELF file
Adding prop and lit sections to the ELF will let the debugger and the disassembler
have more info about data bytes present in the middle of the Xtensa
instructions, usually used for padding.
2022-08-17 14:58:36 +08:00
d2eb652738 ble_mesh:ble mesh console support nimble 2022-08-17 14:34:04 +08:00
d88544fd05 Fixed the failure of 'connect audio' operation in HFP examples with default SDK configuration
Due to the lack of synchronized connections, the hf_client can not create audio_connection to
hf_ag. Set default number of synchronized connection to 1.

Closes https://github.com/espressif/esp-idf/issues/9537
2022-08-17 10:14:50 +08:00
4c550fd79f Merge branch 'fix/install.ps1.v4.4' into 'release/v4.4'
Tools: Remove undefined variable from install.ps1 (v4.4)

See merge request espressif/esp-idf!19583
2022-08-16 22:19:41 +08:00
a1f0381797 Tools: Remove undefined variable from install.ps1
Closes https://github.com/espressif/esp-idf/issues/9556
2022-08-16 12:14:43 +02:00
06ca9b6427 Merge branch 'bugfix/incorrect_base_addr_for_rtcio_on_esp32s3_v4.4' into 'release/v4.4'
rtci2c: Corrected the register base addr reference for RTC I2C on esp32s3 (v4.4)

See merge request espressif/esp-idf!19559
2022-08-16 10:51:06 +08:00
d9dda477b0 eth_iperf_test: improved regex to properly evaluate IP address 2022-08-15 16:07:33 +02:00
6dcb5bd1d3 rtci2c: Corrected the register base addr reference for RTC I2C on esp32s3
This commit corrects the register base address reference for RTC I2C on
esp32s3.
2022-08-15 14:50:14 +02:00
047d75eee5 rename xHoldSemaphore to result 2022-08-12 17:54:34 +08:00
d96121221d Move xSemaphoreGive out of configASSERT
xSemaphoreGive won't be executed in configASSERT and semaphore will stay locked if NDEBUG (idf v5) or CONFIG_FREERTOS_ASSERT_DISABLE (idf v3, v4) are defined.
2022-08-12 17:54:29 +08:00
b867b52770 freertos: Fix flakey event group unit tests
The event group unit tests would previously use a single call bit (the
"BIT_CALL" macro) to unblock all the test tasks. However, if one or more tasks
were delayed in calling xEventGroupWaitBits(), the other tasks would clear the
test bits, leading to the test deadlocking.

This commit updates the bits used so that each task gets their own CALL and
RESPONSE bits.
2022-08-12 16:54:59 +08:00
9d97b7ba50 Merge branch 'bugfix/bt_invalid_workqueue_num_v4.4' into 'release/v4.4'
Bluetooth:fixed the invalid workqueue number for BTU thread in Bluedroid(backport v4.4)

See merge request espressif/esp-idf!19510
2022-08-12 14:02:20 +08:00
34fbb676c7 Merge branch 'feature/optimize_chips_memory_allocation_backport_v4.4' into 'release/v4.4'
system: Optimize chips bootloader and heap memory allocation(backport v4.4)

See merge request espressif/esp-idf!19472
2022-08-12 11:19:06 +08:00
805b6af65d Merge branch 'bugfix/wifi_bt_use_same_clock_source_v4.4' into 'release/v4.4'
Fix Wi-Fi does not know that Bluetooth has modified the lpclk source(v4.4)

See merge request espressif/esp-idf!19408
2022-08-12 11:05:43 +08:00
59fed9597d Merge branch 'bugfix/remove_repeated_kconfig_for_h2' into 'release/v4.4'
esp32h2/kconfig: remove repeated kconfig

See merge request espressif/esp-idf!19507
2022-08-11 20:16:22 +08:00
48be2350a8 Merge branch 'bugfix/mesh_bqb_test_issues_v4.4' into 'release/v4.4'
ble_mesh: stack: Fix mesh v1.0 BQB test issues(v4.4)

See merge request espressif/esp-idf!19502
2022-08-11 20:10:05 +08:00
002581806a Merge branch 'ci/fix_nightly_run_build_jobs_v4.4' into 'release/v4.4'
ci: build all when has env var NIGHTLY_RUN (v4.4)

See merge request espressif/esp-idf!18947
2022-08-11 16:55:41 +08:00
9aa32bc499 components/bt: fixed the invalid workqueue number for BTU thread in Bluedroid
There should be only one workqueue for BTU task. The queue length for the second workqueue of BTU can be uninitialized and caused memory overflow and corruption.

Closes https://github.com/espressif/esp-idf/issues/9507
2022-08-11 16:17:17 +08:00
6368633102 esp32h2/kconfig: remove repeated kconfig 2022-08-11 15:05:12 +08:00
a426f4727d ble_mesh: stack: Fix kr from non-primary subnet shouldn't ignore
For case MESH/NODE/KR/BV-02-C
2022-08-11 14:14:02 +08:00
3413b3d469 ble_mesh: stack: Add a check if the appkey is bound to the model.
For case MESH/NODE/CFG/MP/BI-03-C
2022-08-11 14:13:56 +08:00
89bc1bc7e3 ble_mesh: stack: the count_log field should be set to 0 when HBS is sent.
For MESH/NODE/CFG/HBS/BV-02-C
2022-08-11 14:13:49 +08:00
246ed6232f ble_mesh: stack: The Heartbeat Publication Period Log value can set to 0x11, range: [0, 0x11] 2022-08-11 14:13:42 +08:00
104ce885cb ble_mesh: stack: The value of expect_ack_for will be rewrited after send_pub_key().
For case MESH/PVNR/PROV/BV-04-C
2022-08-11 14:13:35 +08:00
28e4ceb7e1 ble_mesh: stack: Fix ignore connectable PB-ADV PDU containing a Link Open message.
For case MESH/NODE/PBADV/BI-04-C
2022-08-11 14:13:27 +08:00
f12c79c3ca ble_mesh: stack: Fix PB-GATT not check invalid link flag
For case MESH/NODE/PROV/BI-03-C
2022-08-11 14:11:32 +08:00
d31337c095 ble_mesh: stack: Fix invalid provisioning pdu type check
For case MESH/NODE/PROV/BI-15-C
2022-08-11 14:11:16 +08:00
4bf8f462a2 Merge branch 'opt/bluedroid_adv_report_datapath_v4.4' into 'release/v4.4'
Bluetooth/Bluedroid: optimize BLE adv report datapath and adv report flow control mechanism(backport v4.4)

See merge request espressif/esp-idf!19381
2022-08-11 11:20:42 +08:00
32e7672926 Merge branch 'contrib/github_pr_9498_backport4_4' into 'release/v4.4'
Bluetooth/Bluedroid: fix member typo(backport v4.4)

See merge request espressif/esp-idf!19458
2022-08-11 10:54:45 +08:00
6c2afe05cf Merge branch 'bugfix/disable_rom_lgo_v4.4' into 'release/v4.4'
system: moved placement of disable rom log efuse in startup flow (v4.4)

See merge request espressif/esp-idf!19482
2022-08-11 09:18:50 +08:00
80d6e39edc Merge branch 'staging/fix_heap_fail_callback_v4.4' into 'release/v4.4'
Heap: heap_caps_*_prefer functions now properly call alloc_failed callback (backport v4.4)

See merge request espressif/esp-idf!19481
2022-08-11 06:28:03 +08:00
3a54a55a80 Merge branch 'feature/oocd_ver_upgrade_v4.4' into 'release/v4.4'
tools: Updates OpenOCD version to 'v0.11.0-esp32-20220706' (v4.4)

See merge request espressif/esp-idf!19490
2022-08-10 21:28:32 +08:00
46868ddbb5 tools: Updates OpenOCD version to 'v0.11.0-esp32-20220706' 2022-08-10 13:00:06 +03:00
4fb74a808b Merge branch 'bugfix/friend_and_lpn_issues_v4.4' into 'release/v4.4'
ble_mesh: stack: Fix friend and lpn issues(v4.4)

See merge request espressif/esp-idf!19475
2022-08-10 13:50:52 +08:00
58d93a89af bootloader_support: consider signature sector in image length validation
For secure boot enabled cases, bootloader and firmware images have signature
appended and size is variable based on scheme being used. This appended data
must be considered while verifying image length against allocated partition
size to avoid any possibilities of going beyond reserved size.

Closes IDF-5617
2022-08-10 10:38:15 +05:30
a421e30cf2 system: moved placement of disable rom log efuse in startup flow
Functions used for burning this efuse would log, but at this point
esp_log is not initialized. Moved to a later point in the startup process.

Closes https://github.com/espressif/esp-idf/issues/9457
2022-08-10 12:17:51 +08:00
6906c34319 heap: add a unit test for malloc(0) and slightly optimize heap_caps_malloc_prefer 2022-08-10 11:41:01 +08:00
b43e777e0a fix malloc(0) and heap_caps_alloc_failed()
Don't call heap_caps_alloc_failed() for malloc(0) and calloc(0), because it is not an error.
Improve handling of malloc(0) and calloc(0).

Merges https://github.com/espressif/esp-idf/pull/9517
2022-08-10 11:40:53 +08:00
05575cc246 Heap: heap_caps_*_prefer functions now properly call alloc_failed callback
heap_caps_*_prefer functions will now only call heaps_caps_alloc_failed
callback if all attempts to allocation memory fail (and not after each attempt
anymore).

* Closes https://github.com/espressif/esp-idf/issues/9086
2022-08-10 11:40:32 +08:00
56a89b920d Merge branch 'bugfix/i2s_slot_sequence_v4.4' into 'release/v4.4'
i2s: fixed pdm rx sample rate doubled issue

See merge request espressif/esp-idf!19415
2022-08-10 11:10:37 +08:00
719f43d286 ci: build all when has env var NIGHTLY_RUN 2022-08-10 00:24:18 +00:00
ed418eaf06 Merge branch 'fix/python_flake_warnings_4.4' into 'release/v4.4'
Tools: Fix Python style warnings

See merge request espressif/esp-idf!19471
2022-08-10 02:57:22 +08:00
2eb28028ed ble_mesh: stack: Fix add continuously secure update into friend queue.
For MESH/NODE/FRND/FN/BV-20-C
2022-08-09 21:48:37 +08:00
d21a87f60c ble_mesh: stack: Fix friend relay lpn message when relay feature is disable
For MESH/NODE/FRND/FN/BV-23-C
2022-08-09 21:48:22 +08:00
1fb1d6ecde bugfix: malloc retention buffer with MALLOC_CAP_RETENTION caps 2022-08-09 20:56:59 +08:00
e3979eb14b bugfix: DCache data memory is dma accessible but not retention dma accessible 2022-08-09 20:56:51 +08:00
decb47bb5d use enum and designated initializers in soc_memory_type define 2022-08-09 20:54:01 +08:00
103b952525 ci: fix ci 2022-08-09 20:34:25 +08:00
9b7bed2243 Clean IRAM and DRAM address space conversion macros 2022-08-09 20:33:26 +08:00
f935c17a95 Tools: Fix Python style warnings 2022-08-09 14:30:52 +02:00
41bbc39669 stack/dram is also IRAM0 accessible 2022-08-09 20:28:29 +08:00
45a79bc135 update bootloader.ld rom_boot ram usage info 2022-08-09 20:28:04 +08:00
62ac5364e0 Use the entire sharedbuffer space as the heap of the D/IRAM attribute 2022-08-09 20:27:38 +08:00
d8432af3ab update bootloader memory allocation 2022-08-09 20:02:46 +08:00
53a5d51aea i2s: fix PDM TX stereo mode for c3 and s3 2022-08-09 18:28:09 +08:00
76cdab5f42 i2s: fixed pdm rx sample rate doubled issue
Closes: https://github.com/espressif/esp-idf/issues/8660
2022-08-09 18:28:09 +08:00
482a37612d i2s: fix 16bit slot sequence on esp32 2022-08-09 18:28:09 +08:00
fdf7029078 Fixed union member access typo
Closes https://github.com/espressif/esp-idf/pull/9498
2022-08-09 15:25:44 +08:00
4c6d2e0da7 bt member typo
Terminate sec_event.cfm_req.bd_name string, not sec_event.pin_req.bd_name
2022-08-09 15:25:24 +08:00
f8729d905e Merge branch 'feature/ulp_riscv_adc_v4.4' into 'release/v4.4'
ulp-riscv: add support for using ADC as well as an example show-casing it. (v4.4)

See merge request espressif/esp-idf!19058
2022-08-09 15:00:50 +08:00
22b847fc5f Merge branch 'bugfix/memory_region_define_rtc_fast_v4.4' into 'release/v4.4'
backport v4.4: substract rtc_iram_seg memory region size from ESP_BOOTLOADER_RESERVE_RTC

See merge request espressif/esp-idf!19423
2022-08-09 14:38:40 +08:00
a968442603 Merge branch 'bugfix/ringbuf_iram_fix_v4.4' into 'release/v4.4'
esp_ringbuf: placement in flash is no longer controlled by... (v4.4)

See merge request espressif/esp-idf!19165
2022-08-09 11:01:52 +08:00
b65ec8c7c9 Merge branch 'bugfix/several_i2C_issues' into 'release/v4.4'
I2C: Fix I2C task wait too long on an event (backport 4.4)

See merge request espressif/esp-idf!18768
2022-08-09 10:29:32 +08:00
f8f93d936e ulp-riscv: add support for using ADC as well as an example show-casing it. 2022-08-09 09:21:15 +08:00
00215f3414 Merge branch 'bugfix/restore_missing_ble_mesh_videos_v4.4' into 'release/v4.4'
ble_mesh: doc: Restore missing ble mesh videos(v4.4)

See merge request espressif/esp-idf!19403
2022-08-08 17:12:01 +08:00
a940064748 esp_ringbuf: placement in flash is no longer controlled by CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH
esp-ringbuf funtion placement is now controlled by its own configs:
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH and CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH

Closes https://github.com/espressif/esp-idf/issues/9198
2022-08-08 07:15:00 +00:00
cb411a81a2 I2C: Fix a bug making the I2C task wait too long on an event
The I2C ISR will now notify the task waiting on an event. Thus, the task can stop waiting on the event queue as soon as possible.
2022-08-08 06:10:31 +00:00
12db32642c substract rtc_iram_seg memory region size from ESP_BOOTLOADER_RESERVE_RTC 2022-08-08 11:27:10 +08:00
11ac122c53 1. Wi-Fi: update tsf tick interval when lpclk is modified
2. Move register_lpclk_callback to coexistence
2022-08-05 12:57:47 +08:00
58811bec45 ble_mesh: doc: Restore missing ble mesh videos 2022-08-05 11:51:57 +08:00
970420a923 Power Management: fix the issue of sleeping time error beacause external 32kHz xtal does not exist 2022-08-05 11:30:36 +08:00
8f0c559c03 make bluetooth and wifi use the same low power clock 2022-08-05 11:22:22 +08:00
cf9309c8a2 ESP32S3:bluetooth support use main XTAL in light sleep mode 2022-08-05 11:21:59 +08:00
9332413407 ESP32C3:bluetooth support use main XTAL in light sleep mode 2022-08-05 11:21:58 +08:00
9fe854c4ca Merge branch 'bugfix/vendor_model_send_message_no_memory_forv4.4' into 'release/v4.4'
ble_mesh:example: free the memory of malloc (v4.4)

See merge request espressif/esp-idf!19185
2022-08-04 14:47:22 +08:00
d16797b447 Merge branch 'bugfix/further_fix_for_mspi_current_leakage_backport_v4.4' into 'release/v4.4'
system/sleep: further fix spi flash/ram current leakage(backport v4.4)

See merge request espressif/esp-idf!19212
2022-08-04 14:46:56 +08:00
d4507a380e Merge branch 'bugfix/corrected_typo_in_example_peripherals_usb_v4.4' into 'release/v4.4'
example: peripherals/usb: fix typo naming of local variables (backport v4.4)

See merge request espressif/esp-idf!19100
2022-08-04 14:46:44 +08:00
68dd89971e Merge branch 'bugfix/backtrace_formatting_add_missing_space_v4.4' into 'release/v4.4'
Reverts Backtrace: format to what it used to be (v4.4)

See merge request espressif/esp-idf!19123
2022-08-04 14:46:31 +08:00
46f5c59cc2 Merge branch 'bugfix/set_ipv6_dns_error_v4.4' into 'release/v4.4'
lw ip: Fixed that ipv6 dns cannot work (v4.4)

See merge request espressif/esp-idf!19062
2022-08-04 14:45:58 +08:00
905b3b1718 Merge branch 'bugfix/btdm_fix_some_bluedroid_issues_v4.4' into 'release/v4.4'
Fix some bluedroid issues(backport v4.4)

See merge request espressif/esp-idf!19130
2022-08-04 14:45:44 +08:00
0544069689 Merge branch 'bugfix/put_sempher_and_queue_used_in_isr_into_DRAM_v4.4' into 'release/v4.4'
Make sure semphr/queue used in interrupt is in DRAM

See merge request espressif/esp-idf!18988
2022-08-04 14:44:56 +08:00
d3eeebf8f8 Merge branch 'bugfix/fix_bluedroid_host_memory_overflow_v4.4' into 'release/v4.4'
Fixed bluedroid host memory overflow for v4.4

See merge request espressif/esp-idf!19060
2022-08-04 14:44:40 +08:00
869abf8a3f Merge branch 'bugfix/freertos_event_group_unblock_race_condition_v4.4' into 'release/v4.4'
FreeRTOS: Fix event group task list race condition (v4.4)

See merge request espressif/esp-idf!19103
2022-08-04 14:43:45 +08:00
9f9021a221 Merge branch 'bugfix/multiple_adc_bugfix_v4.4' into 'release/v4.4'
adc: fix multiple bugs (v4.4)

See merge request espressif/esp-idf!19142
2022-08-04 14:42:53 +08:00
bfb88338bb Merge branch 'bugfix/memory_debug_not_work_v4.4' into 'release/v4.4'
bugfix/fix the dependency error of macro for memory debug (v4.4)

See merge request espressif/esp-idf!19237
2022-08-04 14:42:12 +08:00
79a8ad665a Merge branch 'bugfix/memory_copy_bugs_in_bluedroid_4.4' into 'release/v4.4'
components_bt/bluedroid: Fix Memory Copy Build Err [backport v4.4]

See merge request espressif/esp-idf!19311
2022-08-04 14:41:58 +08:00
66a1de0843 Merge branch 'bugfix/fix_legacy_pair_not_send_link_key_host_v4.4' into 'release/v4.4'
component_bt: fix legacy pair controller does not send the link key to the host (v4.4)

See merge request espressif/esp-idf!19320
2022-08-04 14:41:45 +08:00
aa81e5bbbe Merge branch 'bugfix/fix_bt_sphinx_warnings_4.4' into 'release/v4.4'
components_bt: fix unstandard typedefs [backport v4.4]

See merge request espressif/esp-idf!19338
2022-08-04 14:41:28 +08:00
6770180781 Merge branch 'bugfix/fix_write_to_null_pointer_if_malloc_failed_issue_v4.4' into 'release/v4.4'
Bugfix/fix write to null pointer if malloc failed issue(Backport v4.4)

See merge request espressif/esp-idf!19352
2022-08-04 14:41:17 +08:00
40a8214314 Merge branch 'feature/esp_lcd_spi_rx_v4.4' into 'release/v4.4'
Add support SPI rx into LCD component (backport v4.4)

See merge request espressif/esp-idf!19122
2022-08-04 14:41:03 +08:00
824a5547b7 Merge branch 'feature/wifi_beacon_loss_optimize_v4.4' into 'release/v4.4'
backport v4.4: beacon loss and noise check timer optimize for wifi power save

See merge request espressif/esp-idf!19172
2022-08-04 14:23:14 +08:00
e4c5e5a701 sleep: beacon loss and noise check timer optimize for wifi power save 2022-08-04 12:11:39 +08:00
c0d04787ca Merge branch 'feature/rainmaker_BT_configurable_v4.4' into 'release/v4.4'
Wifi_prov_mgr: Made BT configurable after provisioning is completed (v4.4)

See merge request espressif/esp-idf!19263
2022-08-04 11:49:36 +08:00
6854841267 Merge branch 'contrib/github_pr_9446_v4.4' into 'release/v4.4'
Add missing comma (GitHub PR) (v4.4)

See merge request espressif/esp-idf!19307
2022-08-04 11:47:02 +08:00
b2770bd18e Merge branch 'tools/mfg_fix_blank_lines_csv_v4.4' into 'release/v4.4'
tools: Introduce support for blank lines in config and value files for mfg utility (v4.4)

See merge request espressif/esp-idf!19253
2022-08-03 22:49:14 +08:00
575d28e56c Merge branch 'contrib/github_pr_9408_v4.4' into 'release/v4.4'
nvs_partition_gen: Allow up to 4000 byte strings with NVS V2 (GitHub PR) (v4.4)

See merge request espressif/esp-idf!19306
2022-08-03 22:49:02 +08:00
8ed69bd03a Merge branch 'bugfix/s3_dfu_tool_v4.4' into 'release/v4.4'
dfu: add esp32s3 to supported DFU targets for idf.py (v4.4)

See merge request espressif/esp-idf!19166
2022-08-03 22:48:44 +08:00
e5a96aaca6 component/bt: use OSI utility "osi_event" for HCI downstream data processing 2022-08-03 21:55:08 +08:00
c6c4a23098 component/bt: consider to handle HCI LE Direct Advertising Report 2022-08-03 21:55:07 +08:00
6c0c837378 component/bt: allocate and use one static buffer for HCI adv flow control command 2022-08-03 21:55:06 +08:00
aaf1d3909d component/bt: use fixed_pkt_queue instead of fixed_queue for hci commands
some fixes after modifications:
  1. removed the use of waiting_command_t
  2. fix assert for HCI write_eir command
  3. fixed the crash upon handling command status event when trying to free to the HCI command buffer
  4. fixed the issue in transmitting HCI vendor specific commands
  5. fixed the lost command complete callbacks for HCI commands LE_RAND and LE_ENCRYPT
2022-08-03 21:55:05 +08:00
c3f5b85032 component/bt: add a timer to monitor the adv flow control credits downwards procedure 2022-08-03 21:55:04 +08:00
b735c46ba7 component/bt: fix adv report flow control logic, give ADV report credits every 10 packets 2022-08-03 21:55:03 +08:00
2ef0627c2c component/bt: add simple ADV flow control mechanism -- drop the packets when the adv report queues are considered full 2022-08-03 21:55:02 +08:00
dcf173c95a component/bt: use the OSI utility "osi_event" to handle adv report in btc_layer 2022-08-03 21:55:01 +08:00
c9ebba2ddf component/bt: use the OSI utility "pkt_queue" to store ADV report packet in btu layer
# Conflicts:
#	components/bt/host/bluedroid/hci/hci_hal_h4.c
2022-08-03 21:54:52 +08:00
71c072cc8c component/bt: use the OSI utility "osi_event" for hci_hal_h4 upstream data packets handling 2022-08-03 21:50:38 +08:00
88af2c548f component/bt: use the OSI utility "osi_event" to handle A2DP source data Tx processing 2022-08-03 21:50:37 +08:00
ceb4096287 component/bt: use the OSI utility "osi_event" to handle A2DP sink data Rx processing 2022-08-03 21:50:36 +08:00
93d4306aff component/bt: add new OSI utility "fixed_pkt_queue", which has same functionality with "fixed_queue" 2022-08-03 21:50:35 +08:00
96cbdee383 component/bt: add new OSI utility "pkt_queue" which acts as a mutex-protected linked list, to be used as data queue between tasks 2022-08-03 21:50:34 +08:00
6edcab3885 component/bt: add new OSI utility "osi_event" to support the scenario that event need only to be handle once. 2022-08-03 21:50:33 +08:00
1e06076c3c component/bt: make OSI thread workqueue length configurable through API
reduce the length of workqueue1 for BTC and HCI task

# Conflicts:
#	components/bt/common/osi/thread.c
2022-08-03 21:50:32 +08:00
d635d8f361 component/bt: modify the implementation of osi_thread using freeRTOS queue 2022-08-03 21:50:31 +08:00
ce1fde4b3b Merge branch 'update/version_4_4_2' into 'release/v4.4'
Update version to 4.4.2

See merge request espressif/esp-idf!19346
2022-08-03 20:45:40 +08:00
2c59eb0bca fix possible memory leak if report level not set 2022-08-02 20:42:44 +08:00
007381cf82 fix write to null pointer if malloc failed 2022-08-02 20:42:38 +08:00
1b16ef6cfc versions: Update version to 4.4.2 2022-08-02 14:06:15 +02:00
72fd3bc1e6 component_bt: Fix build doc errors of bt
1. bluedroid: use standard function pointer define.
   2. blufi: Change ESP_BD_ADDR_LEN into ESP_BLUFI_BD_ADDR_LEN
   3. doc/sphinx_known_warnings: Remove fixed parts.
2022-08-02 13:39:36 +08:00
c4491c352d fix legacy pair controller does not send the link key to the host
Closes https://github.com/espressif/esp-idf/issues/5850
2022-08-01 19:07:16 +08:00
5b648b8452 components_bt/bluedroid: Fix Memory&String Copy Build Err
1. When setting compilier into -O2 optimization, build for classic bt demo will get wrong
   2. Fix a memcpy bug that maybe get memory truncated

Closes https://github.com/espressif/esp-idf/issues/9398
2022-08-01 14:27:56 +08:00
dc626195f0 Add missing comma
Add missing comma when CONFIG_ESP32S3_DATA_CACHE_16KB is enabled
2022-08-01 09:17:40 +05:30
b765963c7c nvs_partition_gen: Allow up to 4000 byte strings with NVS V2
As documented, the limit for NVS format v2 is 4000 bytes for a string.
2022-08-01 09:12:39 +05:30
6d85d53cee Merge branch 'bugfix/qatest_spp_crash_v4.4' into 'release/v4.4'
bugfix/qatest spp crash (v4.4)

See merge request espressif/esp-idf!19238
2022-07-28 16:06:56 +08:00
e26a02d783 Merge branch 'bugfix/temp_fix_clk8m_and_cpu_cannot_pd_at_the_same_time_backport_v4.4' into 'release/v4.4'
esp_hw_support/sleep: fix cannot pd cpu and rc fast at the same time during light sleep(backport v4.4)

See merge request espressif/esp-idf!19266
2022-07-28 16:06:16 +08:00
236bd27134 further fix spi flash/ram current leakage
Currently, we pull up cs io for spi flash/ram to reduce current leakage during
light sleep. But some kind of spi flash/ram chip need all io pull up. Otherwise,
current leakage will still exist.
2022-07-28 13:11:55 +08:00
0d83001bd4 docs: fix docs of power down flash 2022-07-28 13:10:55 +08:00
5f2855882b kconfig: fix kconfig help of power down flash 2022-07-28 13:10:55 +08:00
6b6fa902ed ble_mesh:the memory requested by malloc has not benn released 2022-07-28 11:35:22 +08:00
23d934429c esp_hw_support/sleep: fix cannot pd cpu and rc fast at the same time during light sleep
Since cpu retention dma use rc fast as clk source, so rc_fast_digi
will be enabled when we config to pd cpu. And cpu retention does not
need rc fast keep on during light sleep. So, if we use rc_fast_digi
to determine whether rc fast can be powered down, then cpu and and
rc fast cannot pd at the same time.
2022-07-28 11:24:40 +08:00
92abac1fd8 psram: fixed heap pool reservation for DMA/internal usage fail issue
As heap block may be allocated into multiple non-continuous chunks, to
reserve enough memory for dma/internal usage, we do the malloc in the
step of max available block.
2022-07-28 10:12:17 +08:00
a066de7fec 1. add protect for bt_util_buf_env buffers when multi-access
2. ignore assert_err in em_bt_clkoff1_setf
2022-07-27 18:01:12 +08:00
eb490dc18e Merge branch 'feature/rainmaker_BT_configurable' into 'release/v4.4'
Doc: Made bluetooth configurable after wifi provisioning is completed

See merge request espressif/esp-idf!19263
2022-07-27 12:24:50 +05:30
b654c14d0e tools: Introduce support for blank lines in config and value files for mfg utility
Some users have requested this feature.

In order to avoid complete refactoring or introducing more code complexity, a design choice to create temporary files without blank lines is made.

Additionally, an extension check is added and there are multiple smaller code style and structure improvements.

Closes https://github.com/espressif/esp-idf/issues/8421
2022-07-26 23:17:33 +02:00
14903a46d1 Merge branch 'bugfix/optimize_beacon_timeout_issue_4.4' into 'release/v4.4'
esp_wifi:bugfix optimize beacon timeout issue(4.4)

See merge request espressif/esp-idf!19157
2022-07-25 15:48:57 +08:00
aadd18514c components/coex: Make sure sempher and queue used in isr is in DRAM
Closes https://github.com/espressif/esp-idf/issues/9032
Closes https://github.com/espressif/esp-idf/issues/8928
Closes https://github.com/espressif/esp-idf/issues/9129
2022-07-25 11:10:28 +08:00
c5db1591cf components/bt: Make sure sempher and queue used in isr is in DRAM 2022-07-25 11:08:13 +08:00
47b6a8c85a Merge branch 'bugfix/phy_init_failed_when_wifi_deinit_4.4' into 'release/v4.4'
esp_wifi:bugfix for phy init failed when wifi deinit(4.4)

See merge request espressif/esp-idf!19137
2022-07-25 10:52:28 +08:00
9892ce6a53 fix the dependency error of macro for memory debug 2022-07-22 16:17:14 +08:00
145c3cd000 Merge branch 'bugfix/wps_disable_disconnect_v4.4' into 'release/v4.4'
WiFi: Do not disconnect in WPS disable API incase WPS is done/scanning (v4.4)

See merge request espressif/esp-idf!19148
2022-07-22 15:13:54 +08:00
fbbcf5c5bc dfu: add esp32s3 to supported DFU targets for idf.py 2022-07-21 15:58:44 +08:00
d072873d5e esp_lcd: Add RX into SPI lcd panel. 2022-07-21 09:18:28 +02:00
91dc99a3ce esp_wifi:bugfix optimize beacon timeout issue 2022-07-21 10:57:20 +08:00
f42fd4236c WiFi: Do not disconnect in WPS disable incase WPS is done/scanning
Closes https://github.com/espressif/esp-idf/issues/9341
2022-07-20 18:17:45 +05:30
cb62457f6d adc: fix esp32 continuous mode sampling freq issue 2022-07-20 16:43:38 +08:00
ad8862fa19 adc: fix esp32s2 continuous mode converted bytes issue
When working in continuous mode, hardware will continuously trigger
ADC to do conversions. On esp32s2, 2 bytes will be generated per
conversion. Prior to this commit, driver assumes 4 bytes per conversion
(on s2). This commit fixed this issue.
2022-07-20 16:43:38 +08:00
1a17610895 bugfix for phy init failed when wifi deinit 2022-07-20 15:14:34 +08:00
ce465c0574 adc: fix esp32s3 continuous mode output bits issue
Prior to this change, esp32s3 ADC continuous mode output resolution is 13 bits.
This commit correct the `adc_digi_output_data_t` on esp32s3. Correct
output bits should be 12 bits. Corresponding definition in `soc_caps.h`
is also updated.
2022-07-20 15:01:57 +08:00
ffebc3d93f component/bt: Modify the bluetooth device name length limits 2022-07-20 09:22:47 +08:00
a840c77d4e component/bt: set ext adv param failed when stop ext adv 2022-07-20 09:09:17 +08:00
5728fe325e Reverts Backtrace: format to what it used to be
Was:  Backtrace: N:M N:M N:M ...
Now:  Backtrace:N:MN:M N:M ...

The problem with the new format is that it is hard to parse and
breaks the parser that is used by PlatformIO.  The old format
is much more reasonable.  I do not see how the pattern in IDFDUT.py
can work with the new format, due to the missing space after the :
2022-07-19 11:55:32 +02:00
28954a635d esp_lcd: Fix code style.
(cherry picked from commit 18f46959e4c83d6dd01db53d26388d5d3b4e3d99)
2022-07-19 09:40:01 +02:00
197f916383 fixed misaligned data transfer for ssd1306
(cherry picked from commit 46a2bf8ac9)
(cherry picked from commit b95304829af55174c0c8ac1b9c561e0319896d5b)
2022-07-19 09:39:50 +02:00
b1574fef2d freertos: Fix flakey event group unit test
The "FreeRTOS Event Groups" main task will only wait a single tick for the created
tasks to set their response bits. This short delay may not be sufficent if the tick
frequency is high.

This commit updates the test so that

- the main task waits indefinitely for all the response bits to be set.
- created tasks are cleand up by the main task
2022-07-19 12:03:04 +08:00
d465316f0b freertos: Fix event group task list race condition
FreeRTOS synchronization primitives (e.g., queues, eventgroups) use various event lists (i.e., task lists) to track what
tasks are blocked on a current primitive. Usually these event lists are accessed via one of the event lists functions
(such as vTask[PlaceOn|RemoveFrom]UnorderedEventList()), which in turn ensure that the global task list spinlock
(xTaskQueueMutex) is taken when accessing these lists.

However, some functions in event_groups.c manually traverse their event lists. Thus if a tick interrupt occurs on
another core during traversal and that tick interrupt unblocks a task on the event list being traversed, the event list
will be corrupted.

This commit modifies the following event_groups.c functions so that they take the global task list lock before
traversing their event list.

- xEventGroupSetBits()
- vEventGroupDelete()
2022-07-19 12:03:04 +08:00
02afbaccdd example: peripherals/usb: fix typo naming of local variables 2022-07-19 10:30:44 +08:00
f0a3ccc732 Merge branch 'ci/support_nightly_build_keyword_in_ttfw_v4.4' into 'release/v4.4'
ci: support keyword `nightly_run` in ttfw_idf decorator (v4.4)

See merge request espressif/esp-idf!18946
2022-07-18 21:20:28 +08:00
4bb12517f5 lwip: Fixed that ipv6 dns cannot work 2022-07-15 16:18:01 +08:00
85da506ec0 Fixed bluedroid host memory overflow 2022-07-15 14:47:28 +08:00
ee2029c38a Merge branch 'update_v4.4/mbedtls_v2.28.1' into 'release/v4.4'
mbedtls: Update to release v2.28.1 (v4.4)

See merge request espressif/esp-idf!19041
2022-07-14 22:51:26 +08:00
f69e6b3714 Merge branch 'bugfix/rgb_panel_set_gap_v4.4' into 'release/v4.4'
rgb_lcd: fix error in rgb_panel_set_gap

See merge request espressif/esp-idf!19051
2022-07-14 20:35:05 +08:00
c9119cbcef Merge branch 'docs/update_wifi_beacon_timeout_doc_v4.4' into 'release/v4.4'
docs: update wifi beacon timeout docs (v4.4)

See merge request espressif/esp-idf!19044
2022-07-14 18:10:12 +08:00
dee1bd1a24 rgb_lcd: fix error in rgb_panel_set_gap
Closes https://github.com/espressif/esp-idf/issues/9279
2022-07-14 16:52:55 +08:00
4b79600876 docs: add WIFI_EVENT_STA_BEACON_TIMEOUT event docs. 2022-07-14 15:38:33 +08:00
91a315f7c0 docs: update wifi beacon timeout docs 2022-07-14 15:38:33 +08:00
f7c20f3718 mbedtls: Update to release v2.28.1
- Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.1
2022-07-14 10:01:39 +05:30
d446c4a18f Merge branch 'bugfix/fix_beacon_timeout_timer_assert_issue_v4.4' into 'release/v4.4'
esp_wifi: fix sta reset beacon timeout timer issue(Backport v4.4)

See merge request espressif/esp-idf!19035
2022-07-14 11:25:14 +08:00
8dbe7582a9 Merge branch 'bugfix/print_ready_after_init_transaction_forv4.4' into 'release/v4.4'
ble_mesh:example:change the location of print ready(V4.4)

See merge request espressif/esp-idf!19028
2022-07-14 11:24:48 +08:00
c074da530b Merge branch 'feature/temp_sensor_v4.4' into 'release/v4.4'
temperature sensor: Add support on ESP32-S3 (backport v4.4)

See merge request espressif/esp-idf!18718
2022-07-14 10:51:43 +08:00
5744a18555 Merge branch 'docs/update_linker_script_generation_v4.4' into 'release/v4.4'
docs:update linker script generation (v4.4)

See merge request espressif/esp-idf!19039
2022-07-14 10:50:09 +08:00
5b816c8551 docs:update linker script generation 2022-07-14 10:27:49 +08:00
e33df4d5b5 Merge branch 'bugfix/flash_encryption_8l_psram_v4.4' into 'release/v4.4'
flash_encryption: Fix issue that flash encryption cannot work when 8-line psram enabled(backport v4.4)

See merge request espressif/esp-idf!19023
2022-07-13 23:33:06 +08:00
9f0532bdf3 esp_wifi: fix sta reset beacon timeout timer issue 2022-07-13 20:37:38 +08:00
c2fe9327f2 ble_mesh:change the location of print ready 2022-07-13 17:58:39 +08:00
daceb3516d temperature sensor: Add support on ESP32-S3,
Closes https://github.com/espressif/esp-idf/issues/8086
2022-07-13 17:22:59 +08:00
8538153616 flash_encryption: Fix issue that flash encryption cannot work when 8-line psram enabled,
Closes https://github.com/espressif/esp-idf/issues/9244,
                  Closes https://github.com/espressif/esp-idf/issues/9287
2022-07-13 17:20:38 +08:00
322a2240f1 Merge branch 'bugfix/eapol_drop_issue_v4.4' into 'release/v4.4'
esp_wifi: clear old keys before going for new connection(backport v4.4)

See merge request espressif/esp-idf!18996
2022-07-13 15:40:11 +08:00
b68fd2b88f Merge branch 'bugfix/fix_memory_leak_in_hidh_v4.4' into 'release/v4.4'
Fix memory leak in bt_hidh.c[backport 4.4]

See merge request espressif/esp-idf!19007
2022-07-13 14:03:32 +08:00
dfb75aa230 Merge branch 'feature/uart_get_free_tx_buffer_size_v4.4' into 'release/v4.4'
uart: Add a new API to get the free space size of tx buffer (backport v4.4)

See merge request espressif/esp-idf!18977
2022-07-13 10:56:44 +08:00
bd7269411a Merge branch 'bugfix/wifi_sta_and_ble_disconnect_BCI-303_v4.4' into 'release/v4.4'
component_bt: Fix wifi is initialized before bluetooth initialization, bluetooth can't stay connected(v4.4)

See merge request espressif/esp-idf!18999
2022-07-13 00:13:03 +08:00
327624b04c Merge branch 'bugfix/correct_blecmd_for_rf_path_v4.4' into 'release/v4.4'
Bluedroid: Fixed compilation error due to incorrect macro name (v4.4)

See merge request espressif/esp-idf!18994
2022-07-12 20:32:02 +08:00
692ba818fe Merge branch 'bugfix/fix_esp32_ke_mem_c_assert_v4.4' into 'release/v4.4'
fix esp32 BLE ke_mem.c assert for v4.4

See merge request espressif/esp-idf!19000
2022-07-12 20:30:32 +08:00
4e6f8b362d Merge branch 'bugfix/ble_50_sync_periodic_adv_lost_data_v4.4' into 'release/v4.4'
components/bt: Fix ble sync periodic adv report will lost data(backport release/v4.4)

See merge request espressif/esp-idf!18958
2022-07-12 17:30:04 +08:00
9f5b700c9a Merge branch 'bugfix/fix_esp32c3_s3_adv_report_duplicate_check_v4.4' into 'release/v4.4'
Fix esp32c3/s3 adv report duplicate check for v4.4

See merge request espressif/esp-idf!18962
2022-07-12 17:29:35 +08:00
c2f9a0ad87 fix memory leak in esp_bt_hidh_dev_report_write and esp_bt_hidh_dev_set_report in bt_hidh.c
Closes https://github.com/espressif/esp-idf/issues/9323
2022-07-12 15:57:23 +08:00
zwj
f39df9a9c0 fix esp32 BLE ke_mem.c assert 2022-07-12 14:40:21 +08:00
c85f71aee3 Fix wifi is initialized before bluetooth initialization, bluetooth can't stay connected 2022-07-12 14:35:32 +08:00
522e0a6b06 esp_wifi: clear old keys before going for new connection 2022-07-12 10:43:34 +05:30
b5522f5709 Bluedroid: Fixed compilation error due to incorrect macro name 2022-07-12 09:42:27 +05:30
68225b63de Merge branch 'docs/404_tips_backport_v4.4' into 'release/v4.4'
docs: update 404.rst (backport v4.4)

See merge request espressif/esp-idf!18975
2022-07-12 11:57:10 +08:00
724cbd4167 Merge branch 'bugfix/fix_spi_slave_example_sender_ccount_issue' into 'release/v4.4'
spi: fix spi slave example sender ccount issue (v4.4)

See merge request espressif/esp-idf!18423
2022-07-12 11:49:28 +08:00
cd13a62952 Merge branch 'bufix/Backport_some_wifi_lwip_bugs_for_4.4_0711' into 'release/v4.4'
Backport some wifi&lwip bugs for 4.4 0711

See merge request espressif/esp-idf!18984
2022-07-12 11:36:25 +08:00
2476d5d837 Merge branch 'fix/usb_cdc_reconnection' into 'release/v4.4'
tinyusb: Fix lost packet after reconnection

See merge request espressif/esp-idf!18952
2022-07-12 10:32:31 +08:00
b3e8d0f7bf Merge branch 'bugfix/tinyusb_prs_v4.4' into 'release/v4.4'
Fix tinyusb_driver_install (dangling pointer) and ESP32S3 USB external PHY pinout (backport v4.4)

See merge request espressif/esp-idf!18978
2022-07-12 10:31:14 +08:00
4b4289ebba tinyusb: Fix lost packet after reconnection 2022-07-11 17:06:33 +02:00
c3f077397a esp_wifi: reset beacon timeout timer when keep alive null works or hw drop beacon 2022-07-11 21:29:34 +08:00
f8a4504bc5 Icmp: get tos parameter in icmp reply
bugfix for add ttl for ping socket
2022-07-11 20:24:18 +08:00
101762718a add option to route LWIP logs through ESP_LOG interface
Signed-off-by: xueyunfei <xueyunfei@espressif.com>

Merges https://github.com/espressif/esp-idf/pull/8785
Closes https://github.com/espressif/esp-idf/issues/8361
2022-07-11 19:26:41 +08:00
3e7aefd9fe udp example:Optimization udp example with recv_msg 2022-07-11 19:16:30 +08:00
4a3875c4c7 wifi:bugfix for wrong configuration of static txbuf
wifi:bugfix fix qos null update ba ssn
2022-07-11 19:16:11 +08:00
88361bddf2 USB external PHY pinout set as in Reference Manual Figure 29-3.
(cherry picked from commit 9ceff23c6d)
2022-07-11 17:26:45 +08:00
41f78c1347 Fix tinyusb_driver_install (dangling pointer)
(cherry picked from commit db90b512a1)
2022-07-11 17:20:57 +08:00
f4d33d2739 uart: Add a new API to get the free space size of tx buffer
Closes https://github.com/espressif/esp-idf/issues/8932

Closes https://github.com/espressif/esp-idf/issues/3078

(cherry picked from commit 9d73475e44)
2022-07-11 17:04:11 +08:00
3838e3da4a components/bt: Fix ble sync periodic adv report lost data issue 2022-07-11 16:50:30 +08:00
b9a1020fcf Merge branch 'bugfix/reset_ble_hw_on_inititalization_v4.4' into 'release/v4.4'
[Bluetooth] Reset Bluetooth hardware during controller inititalization on ESP32-C3/ESP32-S3(release/v4.4)

See merge request espressif/esp-idf!18964
2022-07-11 16:28:53 +08:00
65becd2edf Merge branch 'bugfix/fix_osi_men_dbg_xxx_not_defined_when_enable_mem_dbg_v4.4' into 'release/v4.4'
bugfix/fix the issue of functions not defined when enable memory debug (v4.4)

See merge request espressif/esp-idf!18815
2022-07-11 16:28:27 +08:00
def63b6ec7 docs: update 404.rst 2022-07-11 16:18:34 +08:00
eb15c547f2 fix licence copyright for header file syscon_reg.h on ESP32C3 and ESP32S3 2022-07-11 11:09:06 +08:00
4d5aa82cea component/bt: reset Bluetooth hardware during controller inititalization on ESP32-C3/ESP32-S3
1. Rename MACROs SYSTEM_WIFI_RST_EN register bit fields to be more recognizable
2. reset Bluetooth baseband and MAC bits to fix the issue of task watchdog triggered during controller initialization due to invalid hardware state
2022-07-11 11:06:11 +08:00
1595e008f0 fix esp32c3/s3 adv report duplicate check 2022-07-11 10:53:53 +08:00
db8ef465a4 Merge branch 'ci/only_run_deploy_cases_on_master_backport4.4' into 'release/v4.4'
CI: Only deploy test cases on master (backport 4.4)

See merge request espressif/esp-idf!18955
2022-07-10 15:42:51 +08:00
3ab8c3fff4 Merge branch 'doc/ble_deinit_v4.4' into 'release/v4.4'
doc(bt): Add description for de-initialize bt controller(backport release/v4.4)

See merge request espressif/esp-idf!18928
2022-07-10 15:37:50 +08:00
e26594d8f4 Merge branch 'bugfix/fix_wrong_params_in_hidd_v4.4' into 'release/v4.4'
Fix wrong parameter of get_report_by_id_and_type in bt_hidd.c[backport 4.4]

See merge request espressif/esp-idf!18930
2022-07-10 15:36:28 +08:00
4a2a974257 Merge branch 'bugfix/main_task_on_cpu1_startup_failure_v4.4' into 'release/v4.4'
freertos: Fix issue with bootup failure in ESP_MAIN_TASK_AFFINITY_CPU1 config (v4.4)

See merge request espressif/esp-idf!18935
2022-07-10 15:36:05 +08:00
52dda7f100 Merge branch 'docs/update_wifi_csi_sub_carrier_index_doc_v4.4' into 'release/v4.4'
docs:update wifi sci subcarrier index docs (v4.4)

See merge request espressif/esp-idf!18941
2022-07-10 15:35:49 +08:00
e519e437fe Merge branch 'docs/add_chiptype_link_gpio_v4.4' into 'release/v4.4'
docs: Add chip target and link to gpio.h (v4.4)

See merge request espressif/esp-idf!18948
2022-07-10 15:35:31 +08:00
f54d484502 CI: Only deploy test cases on master (backport 4.4) 2022-07-08 23:38:37 +08:00
bc4338625c docs:add chiptype and link to gpio.h 2022-07-08 16:29:11 +08:00
1b0fe85245 ci: support keyword nightly_run in ttfw_idf decorator 2022-07-08 15:37:23 +08:00
f9d96d28bf docs: modify some Chinese expressions related to CSI 2022-07-08 14:42:12 +08:00
ef9eaae48c docs:update wifi sci subcarrier index docs 2022-07-08 14:34:46 +08:00
603be06120 Merge branch 'fix/tls-size-esp32c2_esp32c3_esp32h2_v4.4' into 'release/v4.4'
esp_system: Fix esp32c2/esp32c3/esp32h2 TLS size

See merge request espressif/esp-idf!18810
2022-07-08 11:14:34 +08:00
5ebc86354a freertos: Fix issue with bootup failure in ESP_MAIN_TASK_AFFINITY_CPU1 config
Idle tick hook that indicates completion of scheduler init must be launched
on other core than the one where main task runs. Earlier it was assumed that
main task shall always run on PRO cpu but that behavior can be changed with
ESP_MAIN_TASK_AFFINITY_CPU1 and hence this fix.

Closes https://github.com/espressif/esp-idf/issues/9247
Closes IDFGH-7705
2022-07-08 08:36:19 +05:30
875915a822 fix the issue of functions not defined when enable memory debug 2022-07-08 11:03:07 +08:00
fe1fb25078 doc(bt): Add description for de-initialize bt controller 2022-07-08 11:02:01 +08:00
7b305f9f56 fix wrong params of get_report_by_id_and_type in bt_hidd.c 2022-07-08 10:11:17 +08:00
f84d5de899 Merge branch 'docs/improve_docs_for_flash_power_down_backport_v4.4' into 'release/v4.4'
docs: improve docs about flash power-down(backport v4.4)

See merge request espressif/esp-idf!18910
2022-07-07 14:01:39 +08:00
3e2aa8e97b improve docs about flash power-down 2022-07-07 11:30:51 +08:00
afc6f7f932 Merge branch 'docs/update_wifi_api_doc_v4.4' into 'release/v4.4'
DOC: update wifi api docs ( backport v4.4)

See merge request espressif/esp-idf!18076
2022-07-07 10:57:36 +08:00
f68d61d5f4 Merge branch 'bugfix/lower_a2dp_appT_prio_v4.4' into 'release/v4.4'
bugfix/lower the priority of application task of a2dp demo (v4.4)

See merge request espressif/esp-idf!18819
2022-07-07 10:56:20 +08:00
6e63caa4fa Merge branch 'bugfix/resolve_redefinition_in_spp_and_hid_v4.4' into 'release/v4.4'
bugfix/resolve redefinition in btc_spp.h and btc_hd.h/btc_hh.h (v4.4)

See merge request espressif/esp-idf!18824
2022-07-07 10:56:04 +08:00
ed7d2d3f0d Merge branch 'bugfix/fix_ble_ke_mem_c_assert_on_c3_s3_v4.4' into 'release/v4.4'
Fixed BLE ke_mem.c assert for v4.4

See merge request espressif/esp-idf!18878
2022-07-07 10:55:49 +08:00
eaf6f3c2cd Merge branch 'bugfix/fix_bluedroid_host_memory_overflow_v4.4' into 'release/v4.4'
Fixed bluedroid host memory overflow for v4.4

See merge request espressif/esp-idf!18903
2022-07-07 10:54:08 +08:00
363b8b2973 Fixed bluedroid host memory overflow 2022-07-06 21:21:30 +08:00
d949df8dcb Merge branch 'bugfix/ext_adv_param_check_v4.4' into 'release/v4.4'
Bluedroid: fix channel map of ext adv params check for v4.4

See merge request espressif/esp-idf!18890
2022-07-06 17:21:27 +08:00
bdaeab5de7 Merge branch 'bugfix/xtensa_sol_frame_saves_extra_registers_v4.4' into 'release/v4.4'
freertos: Xtensa solicited stack frame should save threadptr register (v4.4)

See merge request espressif/esp-idf!18853
2022-07-06 17:19:32 +08:00
8546527213 Merge branch 'bugfix/restore_edr_en_and_protect_for_vhci_env_v4.4' into 'release/v4.4'
bugfix/restore edr_en and add protect for vhci_env (v4.4)

See merge request espressif/esp-idf!18811
2022-07-06 17:15:54 +08:00
a3f72a9310 Merge branch 'feature/esp_docs_1.0.0_v4.4' into 'release/v4.4'
docs: update esp-docs to 1.0.0  (v4.4)

See merge request espressif/esp-idf!18210
2022-07-06 17:14:03 +08:00
9113f72078 Bluedroid: fix channel map of ext adv params check 2022-07-05 19:44:12 +08:00
zwj
3e6cc4892b fix BLE ke_mem.c assert 2022-07-05 16:12:57 +08:00
90e58c3721 docs: fix all doxygen warnings
Doxygen warnings would previously not result in a failed pipeline.
Fixed this as well as all current warnings.
2022-07-05 11:14:40 +08:00
690f802b1c Merge branch 'bugfix/not_use_malloc_in_bluedroid_v4.4' into 'release/v4.4'
component/bt: use osi_malloc instead of malloc in bluedroid

See merge request espressif/esp-idf!18843
2022-07-04 20:05:46 +08:00
977a040301 Merge branch 'bugfix/fix_sink_wrong_sniff_params_v4.4' into 'release/v4.4'
Fix A2DP Sink Wrong Sniff Parameters which Caused by HID Porting[backport 4.4]

See merge request espressif/esp-idf!18801
2022-07-04 19:57:53 +08:00
c26d2ad132 freertos: Xtensa FreeRTOS saves threadptr in solicited stack frame
The Xtensa FreeRTOS port does not save the threadptr register when
doing a voluntary yield. This can result in a crash when multiple
tasks used the threadptr register and call "taskYIELD()".

This commit adds the threadptr register to the solicited stack frame.
2022-07-04 18:27:57 +08:00
65ed4b5339 component/bt: use osi_malloc instead of malloc in bluedroid 2022-07-04 16:10:25 +08:00
e07d16d6a3 docs: update linkcheck configs
linkcheck CI job can now pass, no longer necessary to ignore the results from it.
2022-07-04 11:05:49 +08:00
27cd55dca1 docs: fix broken links 2022-07-04 11:05:49 +08:00
2ad49d47eb docs: fix indention in dac code snippet 2022-07-04 11:05:49 +08:00
116eda0bd2 CI: update esp-idf-doc-env docker image version 2022-07-04 11:05:49 +08:00
389cef7739 docs: update esp-docs 1.0.0
Update esp-docs to 1.0.0 and fix new warnings introduced from update
2022-07-04 11:05:49 +08:00
f3917d1706 restore edr_en which wrongly cleared by rsw
add critical protection for vhci_env_p->vhci_intr_st
ignore max_page when handle remote features
2022-07-01 19:28:36 +08:00
59b50180a0 resolve redefinition in btc_spp.h and btc_hd.h/btc_hh.h
Closes https://github.com/espressif/esp-idf/issues/9199
2022-07-01 19:21:37 +08:00
09289fe451 esp_system: Fix esp32c2/esp32c3/esp32h2 TLS size
The change fixes thread-local-storage size by removing .srodata section
from it. It initially was included in TLS section by mistake.
The issue was found when stack size increased after building applications
with GCC-11.1 compiler. Stack size became bigger because some new data
appeared in .srodata. See more details here:
adce62f53d
2022-07-01 15:19:21 +04:00
9de7886528 lower the priority of application task of a2dp demo 2022-07-01 19:08:47 +08:00
53c186af26 esp_wifi: backport some wifi fix
1.Update wifi doc for espnow/LR/fix rate/disable 11b/multiple antennas
2.Optimization example of wifi station
3.Optimize the null pointer judgment of eb
4.Bugfix for close sniffer mode when wifi stop
5.Fix deep sleep can't reconnect to ap when pmf enable.
6.Fix some ap will ignore auth when rx deauth for a while.
7.Fixed espnow recv unencrypted packets issue
8.Fix not update phy according to country code.
9.Update regdomain max channel according to country info from nvs and or AP.
10.Channel 14 is allowed only 11b mode.
11.Remove csa when switch channel from/to 14 channel.
12.Update phy mode nvs when softap channel from 14 to other.
13.Fix the bug that check whether channel parameter is valid.
2022-07-01 17:39:53 +08:00
d9a278827c optimize the null pointer judgment of eb 2022-07-01 17:39:53 +08:00
be5b89d217 wifi example:optimization example of wifi station 2022-07-01 17:39:53 +08:00
ea13b4ed8b Apply 1 suggestion(s) to 1 file(s) 2022-07-01 17:39:53 +08:00
2db401a737 Apply 1 suggestion(s) to 1 file(s) 2022-07-01 17:39:53 +08:00
db85519413 Apply 2 suggestions by Marius Vikhammer 2022-07-01 17:39:53 +08:00
795c4a4b2a docs: update wifi multiple antennas docs 2022-07-01 17:39:53 +08:00
15845ff47b DOC:Correct IP_EVENT_STA_LOST_IP name
Fix the name of the IP_EVENT_STA_LOST_IP event (was IP_STA_LOST_IP)

Signed-off-by: xueyunfei <xueyunfei@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/8347
2022-07-01 17:39:53 +08:00
31035183da esp_wifi: update esp_wifi_internal_set_fix_rate usage 2022-07-01 17:39:53 +08:00
29432233f8 esp_wifi: update noise floor unit 2022-07-01 17:39:53 +08:00
05770a1f52 Doc:update wifi api docs
* Add documents related to espnow config rate

* Optimization set dns server api description
2022-07-01 17:39:53 +08:00
e04b4d9b81 modify API-reference using Sphinx directives 2022-07-01 17:39:53 +08:00
254ec47ae4 update wifi api docs 2022-07-01 17:39:53 +08:00
c9140caf8c Merge branch 'bugfix/no_proxy_beacon_send_after_deinit_v4.4' into 'release/v4.4'
ble_mesh: stack: Bugfix for proxy beacon send after reinit mesh(v4.4)

See merge request espressif/esp-idf!18791
2022-07-01 17:17:39 +08:00
9616ef8ee8 Merge branch 'bugfix/wifi_condition_linker_mapping_v4.4' into 'release/v4.4'
esp_wifi: Fix linking of WiFi functions dependent on PM_ENABLE (v4.4)

See merge request espressif/esp-idf!18796
2022-07-01 17:17:21 +08:00
4f598d2ec3 fix sink wrong sniff params which caused by HID porting 2022-07-01 14:49:54 +08:00
597ff180d8 Merge branch 'bugfix/fix_stale_pmf_config_v4.4' into 'release/v4.4'
Fix stale PMF config in NVS issue (Backport v4.4)

See merge request espressif/esp-idf!18662
2022-07-01 13:54:42 +08:00
41b9e66082 wifi: Fix linking of WiFi functions dependent on PM_ENABLE
The following functions are only defined when CONFIG_PM_ENABLE is defined:

- wifi_apb80m_request()
- wifi_apb80m_release()

This commit makes their linker script mapping statements also dependent on CONFIG_PM_ENABLE
thus fixing some linker errors when CONFIG_PM_ENABLE is disabled.
2022-07-01 12:29:35 +08:00
23e482feeb ble_mesh: stack: Bugfix for proxy beacon send after reinit mesh 2022-07-01 11:42:07 +08:00
69951819a0 Merge branch 'bugfix/s3_increase_static_alloc_size_v4.4' into 'release/v4.4'
bootloader, esp_system: increase static allocation space for esp32s3 (v4.4)

See merge request espressif/esp-idf!18685
2022-07-01 10:54:25 +08:00
b9e018aa53 Merge branch 'bugfix/ledc_auto_clk_refactor_v4.4' into 'release/v4.4'
LEDC: improved support for ESP32-C3 and refactored divisor calculation (v4.4)

See merge request espressif/esp-idf!17101
2022-07-01 10:52:00 +08:00
cb012683ff Merge branch 'bugfix/spiffs_readdir_errno_v4.4_2' into 'release/v4.4'
spiffs: update submodule to fix SPIFFS_readdir errno issue (v4.4)

See merge request espressif/esp-idf!18637
2022-07-01 10:51:45 +08:00
1bd2e3f9df Merge branch 'feature/s3_ulp_support_v4.4' into 'release/v4.4'
ulp: Added ULP support for  esp32s3 (v4.4)

See merge request espressif/esp-idf!18621
2022-07-01 10:51:18 +08:00
d28dc7f49b Merge branch 'bugfix/idf_as_lib_cmakelists' into 'release/v4.4'
Build: fix idf_as_lib example and toolchain CMake files (v4.4)

See merge request espressif/esp-idf!18589
2022-07-01 10:44:30 +08:00
cd2f38a7bb Merge branch 'feature/efuse_rst_is_treated_as_poweron_rst_v4.4' into 'release/v4.4'
reset_reasons: EFUSE_RST is treated as POWERON_RST + checks errors of eFuse BLOCK0 (v4.4)

See merge request espressif/esp-idf!17871
2022-07-01 10:43:40 +08:00
e8c7364fa3 Merge branch 'bugfix/mbedtls_free_keypair_v4.4' into 'release/v4.4'
Nimble: Fixed memory leak while generating keypair using embedtls v4.4

See merge request espressif/esp-idf!18775
2022-07-01 10:43:19 +08:00
f768b809bb Merge branch 'bugfix/fix_deinit_init_connect_fail_issue_v4.4' into 'release/v4.4'
esp_wifi: clear phy calibrated flag when phy pd memory deinit(Backport v4.4)

See merge request espressif/esp-idf!18777
2022-07-01 10:42:57 +08:00
52c78344c1 esp_wifi: clear phy calibrated flag when phy pd memory deinit 2022-06-30 17:12:05 +08:00
5c33bb8ae2 Merge branch 'bugfix/fix_blufi_example_softap_current_connection_equal_zero_issue_v4.4' into 'release/v4.4'
bluetooth: fix two blufi example bugs(Backport v4.4)

See merge request espressif/esp-idf!18772
2022-06-30 17:01:47 +08:00
279638a39b esp_wifi: Update wifi lib
Fix issue where set_config API uses stale NVS config if PMF disable
API was used before
2022-06-30 14:28:32 +05:30
d5ed8f9db6 Merge branch 'feat/revert_touch_s3_v4.4' into 'release/v4.4'
touch: Added support for using touch in sleep modes back on ESP32-S3 (v4.4)

See merge request espressif/esp-idf!18691
2022-06-30 16:55:23 +08:00
0a8fc491c7 Merge branch 'bugfix/a2dp_source_not_stop_discovery_correctly_v4.4' into 'release/v4.4'
bugfix/avoid wrongly restart discovery in a2dp_source (v4.4)

See merge request espressif/esp-idf!18710
2022-06-30 16:54:52 +08:00
7804d1c4db Merge branch 'bugfix/esp32s2_startup_garbled_output_v4.4' into 'release/v4.4'
esp_system: fix garbled UART output on startup on esp32s2 (v4.4)

See merge request espressif/esp-idf!18750
2022-06-30 16:52:11 +08:00
ec6155dff1 Nimble: Fixed memory leak while generating keypair using embedtls 2022-06-30 14:21:54 +05:30
e4e49783db Merge branch 'bugfix/enable_gcmp_gmac_192bit_v4.4' into 'release/v4.4'
esp_example: Enable GCMP, GMAC for 192 bit config example by default(backport v4.4)

See merge request espressif/esp-idf!18681
2022-06-30 16:51:46 +08:00
f015bcdaed Merge branch 'bugfix/a_small_fix_for_multi_heap_backport_v4.4' into 'release/v4.4'
Heap: fix param passed to assert_valid_block, should be block not ptr(backport v4.4)

See merge request espressif/esp-idf!18673
2022-06-30 16:51:28 +08:00
d1ae2b8ffd Merge branch 'bugfix/app_trace_iram_v4.4' into 'release/v4.4'
apptrace: move all apptrace related functions to IRAM (v4.4)

See merge request espressif/esp-idf!18728
2022-06-30 16:50:55 +08:00
7c28a05c69 Merge branch 'bugfix/configure_link_encryption_for_charac_v4.4' into 'release/v4.4'
WifiProv: Add configuration support for forcing link encryption (v4.4)

See merge request espressif/esp-idf!18660
2022-06-30 16:49:26 +08:00
55773f878d Merge branch 'bugfix/mbedtls_custom_cert_ut_v4.4' into 'release/v4.4'
ci: Fix `custom certificate bundle` UT failure for S3 (v4.4)

See merge request espressif/esp-idf!18658
2022-06-30 16:48:45 +08:00
46cff3cd1c Merge branch 'feature/add_filter_seq_auth_config_v4.4' into 'release/v4.4'
ble_mesh: stack: Add filter old seq_auth packet menuconfig(v4.4)

See merge request espressif/esp-idf!18649
2022-06-30 16:48:01 +08:00
54e01833be Merge branch 'bugfix/fix_wss_server_example_v4.4' into 'release/v4.4'
fix(example): Fix wss_server_example not close socket (backport v4.4)

See merge request espressif/esp-idf!18602
2022-06-30 16:47:24 +08:00
d76d3580c6 Merge branch 'wifi_prov_mgr/wpa3_psk_v4.4' into 'release/v4.4'
wifi_prov: Added support for WPA3_PSK and WPA2_WPA3_PSK APs (v4.4)

See merge request espressif/esp-idf!18601
2022-06-30 16:46:53 +08:00
93d8cf3eb6 Merge branch 'bugfix/sync_host_nocp_cmd_v4.4' into 'release/v4.4'
Nimble: Sync sending Host Number of Completed Packets command

See merge request espressif/esp-idf!18607
2022-06-30 16:39:58 +08:00
1b17711caa Merge branch 'bugfix/dirent-definition_v4.4' into 'release/v4.4'
newlib: dirent d_ino type fix (v4.4)

See merge request espressif/esp-idf!18611
2022-06-30 16:39:39 +08:00
d27d10ae16 Merge branch 'tools/update_cmake_v4.4' into 'release/v4.4'
tools: Update CMake (v4.4)

See merge request espressif/esp-idf!18606
2022-06-30 16:37:48 +08:00
b784b1c239 Merge branch 'feature/update_hfp_ag_version_v4.4' into 'release/v4.4'
component_bt: update hfp_ag version to 1.7.2(v4.4)

See merge request espressif/esp-idf!18603
2022-06-30 16:37:14 +08:00
e8ea685214 Merge branch 'bugfix/sap_mode_change_crash_issue_v4.4' into 'release/v4.4'
Fixes for SAP mode change and PMF issues (Backport v4.4)

See merge request espressif/esp-idf!18590
2022-06-30 16:33:58 +08:00
8827fc28a0 bluetooth: fix two blufi example bugs
1. Softap mode do not assign ip
2. SotAp current connection always show 0
2022-06-30 15:06:53 +08:00
74e9376022 esp_system: fix garbled UART output on startup on esp32s2
Closes https://github.com/espressif/esp-idf/issues/9168
2022-06-29 12:33:05 +02:00
3c358dd074 ulp: only enable relevant wakeup sources for ULP
Do not enable co-processor trap wakeup source when running ULP FSM, as this
could cause spurious wake-ups.
2022-06-29 11:57:05 +08:00
a0e3d488da ulp: Added support for ULP FSM on esp32s3 and fixed bugs for esp32s2
This commit enables ULP FSM support for esp32s3 and updates ULP FSM code
flow for other chips.
It adds C Macro support for the ULP FSM instruction set on esp32s2 and
esp32s3.
The unit tests are also updated to test ULP FSM on ep32s2 and esp32s3.
2022-06-29 11:57:02 +08:00
74d745a80b docs: update cn trans for upl docs 2022-06-29 11:56:59 +08:00
dafcb9a883 apptrace: move all apptrace related functions to IRAM
Closes: https://github.com/espressif/esp-idf/issues/9131
2022-06-29 10:17:48 +08:00
66e52c60f5 avoid wrongly restart discovery 2022-06-28 13:03:44 +08:00
886c2d742d docs: Updated ULP documentation
This commit updates documentation for ULP.
2022-06-28 12:09:33 +08:00
477844806e re-enable riscv ulp gpio support and examples 2022-06-27 17:17:06 +08:00
d424b93192 Revert "touch: add protection for touch sleep case"
This reverts commit 974ac3b4b8.
2022-06-27 14:33:09 +08:00
c3c802d9b8 Revert "touch_sensor: forbid from using touch sensor with sleep on ESP32-S3"
This reverts commit a84faa3cef.
2022-06-27 14:33:09 +08:00
6e6b9ec5a6 bootloader, esp_system: increase static allocation space for esp32s3
The previously used splits between memory allocated for ROM code,
2nd stage bootloader and the app were somewhat safe and conservative.
This resulted in some space being unavailable for static allocation
in the app.

This commit increases the space available for static allocation to the
maximum possible amount.

1. Some of the ROM code static allocation is only used in UART/USB/SPI
   download modes. This region ("shared buffers") has been placed at
   the lower end of ROM memory area, to be reusable in flash boot
   mode. The 2nd stage bootloader linker script is modified to "pack"
   all sections exactly up to the end but with roughly 8K margin between
   startup stacks.
2. Instead of calculating the sections placement and hardcoding the
   addresses in the LD script again, rewrite it to calculate the
   start address of each memory region automatically based on the
   logic above.
3. Adjust the app memory layout (SRAM_IRAM_END) accordingly,
   increasing the space available for static allocation.

Overall these changes increase the space available for static
allocation by about 78kB.

The downside of these changes is that the 2nd stage bootloader .data
segment is now directly adjacent to the startup stack on the PRO CPU.
Previously, there was effectively about 78kB of extra stack space for
the PRO CPU, before the stack would run into the data segment.
2022-06-27 09:22:01 +05:30
5a58ab0d4a esp_example: Enable GCMP, GMAC for 192 bit config 2022-06-24 17:37:06 +05:30
41a0757bcc fix param passed to assert_valid_block, should be block not ptr 2022-06-23 21:43:53 +08:00
7a01fe7a71 WifiProv: Extended support for configuring if link encryption is needed
when attempting to read / write characteristic to bluedroid stack
2022-06-23 17:44:38 +05:30
9e2369cb79 ci: Enable custom certificate bundle test for ESP32-S3
- Increase leakage limit for `test performance RSA key operations`
  UT by 64 bytes
2022-06-23 16:32:26 +05:30
e114850dda mbedtls: Acquire lock before enabling MPI (RSA) hardware
- For ESP32-S3
2022-06-23 16:32:26 +05:30
b82782f109 ble_mesh: stack: Add filter old seq_auth packet menuconfig 2022-06-23 16:17:20 +08:00
1736fdf256 spiffs: update submodule to fix SPIFFS_readdir errno issue
See https://github.com/pellepl/spiffs/pull/288 for the description of the issue.
Reported in https://github.com/esp-rs/rust/issues/117#issuecomment-1142159661
2022-06-22 17:52:17 +02:00
c563d799fe efuse: Checks errors of 4x coding scheme for BLOCK0 if so then abort 2022-06-22 17:16:26 +08:00
dcc706280d reset_reasons: EFUSE_RST is treated as POWERON_RST
ESP32 does not have the EFUSE_RST, the rest chips has this reset reason.
2022-06-22 16:39:02 +08:00
afe3bfe19f SPI:fix spi slave example sender ccount issue
On riscv core, core cycle counter counts the clock cycles only when core is active (not sleeping).
In spi_slave/sender example, it uses ccount (core cycle counter) to do a simple debounce.
Therefore, when using spi_slave/sender and spi_slave/receiver, program will be stuck.
This commit fix this issue by using esp_timer
2022-06-22 15:06:29 +08:00
b72f987c5c ulp: Added ULP RISC-V support for esp32s3
This commit adds support for ULP RISC-V for esp32s3.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2022-06-22 13:33:14 +08:00
e6964819b4 newlib: dirent d_ino type fix
As per the posix spec, `d_ino` should be defined as `ino_t`. See the
reference:
http://pubs.opengroup.org/onlinepubs/7908799/xsh/dirent.h.html.
2022-06-21 14:40:13 +01:00
9ddf575e42 Nimble: Sync sending Host Number of Completed Packets command 2022-06-21 16:40:59 +05:30
ddfc699abf tools: Update CMake
This updates CMake to the latest version (3.23).
There are no deprecations and feature removals that affect us going from the previous version:

https://cmake.org/cmake/help/latest/release/3.21.html#deprecated-and-removed-features

https://cmake.org/cmake/help/latest/release/3.22.html#deprecated-and-removed-features

https://cmake.org/cmake/help/latest/release/3.23.html#deprecated-and-removed-features

Closes https://github.com/espressif/esp-idf/issues/8821
2022-06-21 11:26:09 +02:00
5020faf559 update hfp_ag version to 1.7.2 2022-06-21 14:41:19 +08:00
3169baa76d fix(example): Fix wss_server_example not close socket 2022-06-21 14:23:46 +08:00
279ab23244 wifi_prov: Added support for WPA3_PSK and WPA2_WPA3_PSK APs 2022-06-21 11:17:09 +05:30
d5664cd7e5 Build: Xtensa assembly files are now assembled with -mlongcalls option 2022-06-21 11:20:07 +08:00
d629502586 Build: fix idf_as_lib example not building 2022-06-21 11:17:39 +08:00
8e7ee9ff26 Build: CMake compiler flags will be set, regardless of the cache status
Defining CMake variables from the command-line or from another CMake project,
such as `-DCMAKE_C_FLAGS= -DCMAKE_CXX_FLAGS=`, caused a link failure as ESP
CMake was unable to set its proper compilation flags.
Additional CMake compiler flags can now be provided by another project.

* Closes https://github.com/espressif/esp-idf/issues/7507
2022-06-21 11:07:50 +08:00
6c5fb29c2c Merge branch 'bugfix/light_sleep_when_rtc_is_used_for_gettimeofday_v4.4' into 'release/v4.4'
esp_hw_support: Fix time spent in light sleep when RTC is used for gettimeofday (v4.4)

See merge request espressif/esp-idf!18413
2022-06-21 01:27:33 +08:00
3356aa38ed Merge branch 'feat/add_track_startup_time_to_startup_time_example_v4.4' into 'release/v4.4'
feat: Added tracking startup_time example startup times (v4.4)

See merge request espressif/esp-idf!18441
2022-06-21 01:16:58 +08:00
746df6107c Merge branch 'bugfix/bond_not_saved_for_pairing_again' into 'release/v4.4'
Bugfix/bond not saved properly after re-pairing

See merge request espressif/esp-idf!18235
2022-06-21 00:21:13 +08:00
8a2c9cf47f feat: Added tracking startup_time example startup times 2022-06-20 16:20:00 +00:00
b0a15716ee esp_hw_support: Fix time spent in light sleep when RTC is used for gettimeofday
The esp_timer was not advanced correctly.
2022-06-20 16:17:00 +00:00
586d9a2ef1 esp_wifi: Update wifi libs
Update wifi libs with below fixes -
1. Fix issues caused during SoftAP mode change
2. Error handling and cleanup related to STA PMF
2022-06-20 10:09:45 +00:00
582f9548d6 Merge branch 'nvs/remove_asserts_v4.4' into 'release/v4.4'
change: NVS assertions as runtime errorcodes (v4.4)

See merge request espressif/esp-idf!18460
2022-06-20 16:50:36 +08:00
b085cd2821 Merge branch 'refactor/improve_flash_power_down_logic_backport_v4.4' into 'release/v4.4'
system/sleep: improve flash power down logic(backport v4.4)

See merge request espressif/esp-idf!18587
2022-06-20 15:36:46 +08:00
d273837a51 Merge branch 'feature/modbus_update_for_other_targets_v44' into 'release/v4.4'
modbus: update to support other targets (Backport v4.4)

See merge request espressif/esp-idf!17385
2022-06-20 15:34:06 +08:00
76bde2df72 modbus: update to support other targets (Backport v4.4) 2022-06-20 15:34:06 +08:00
4cc873dfd9 improve flash power down logic 2022-06-20 11:32:20 +08:00
076c6764d9 Merge branch 'bugfix/update_gpio_intr_enable_note_v4.4' into 'release/v4.4'
Update the note of the gpio_intr_enable function(v4.4)

See merge request espressif/esp-idf!18541
2022-06-20 01:24:50 +08:00
a77509a140 Merge branch 'feature/btdm_add_link_role_param_for_gatt_disconnection_event_v4.4' into 'release/v4.4'
component/bt: add link role param for gatt disconnection event(backport v4.4)

See merge request espressif/esp-idf!15948
2022-06-20 00:42:33 +08:00
439c808555 Merge branch 'bugfix/avdtp_genreal_reject_format_error_v4.4' into 'release/v4.4'
component_bt: Fix AVDTP general reject format error(v4.4)

See merge request espressif/esp-idf!18556
2022-06-20 00:09:01 +08:00
57dcaf6ee7 Merge branch 'bugfix/adds_iram_attr_for_efuse_apis_v4.4' into 'release/v4.4'
bootloader_efuse: Adds IRAM_ATTR for efuse API (v4.4)

See merge request espressif/esp-idf!18561
2022-06-20 00:08:43 +08:00
4d0fe48431 Merge branch 'bugfix/enterprise_certs_ca_expired_v4.4' into 'release/v4.4'
esp_wifi: Fix issue of ca certificate expired

See merge request espressif/esp-idf!18519
2022-06-20 00:01:20 +08:00
b7d5e8160f Merge branch 'bugfix/fix_some_memory_leak_in_phy_v4.4' into 'release/v4.4'
Bugfix/fix some memory leak in phy v4.4

See merge request espressif/esp-idf!18551
2022-06-19 23:50:54 +08:00
1133b0ef10 Merge branch 'bugfix/touch_wait_circle_after_wakeup_from_sleep_on_s3_v4.4' into 'release/v4.4'
touch: fix the touch sensor wait cycle on s3 (v4.4)

See merge request espressif/esp-idf!17424
2022-06-19 22:49:08 +08:00
646b52f26e Merge branch 'bugfix/uart_isr_followup' into 'release/v4.4'
UART: Fix custom ISR registration function

See merge request espressif/esp-idf!17359
2022-06-19 22:48:17 +08:00
3176c707da component/bt: add link role param for gatt disconnection event(backport v4.4) 2022-06-19 14:41:55 +00:00
469e2e540b Merge branch 'feature/adds_check_32k_xtal_stopped_v4.4' into 'release/v4.4'
esp_hw_support: Adds a msg when 32k xtal was stopped (v4.4)

See merge request espressif/esp-idf!18411
2022-06-19 22:41:20 +08:00
93bf6be8bd Merge branch 'bugfix/ipc_blocking_v4.4' into 'release/v4.4'
esp_ipc: Fix a case when ipc_task() can wake up blocking task early (v4.4)

See merge request espressif/esp-idf!18415
2022-06-19 22:39:54 +08:00
44976afe6f Merge branch 'bugfix/fatfs_mtime_dst_v4.4' into 'release/v4.4'
fatfs: fix incorrect mtime returned for files created during DST (v4.4)

See merge request espressif/esp-idf!18458
2022-06-19 22:36:25 +08:00
ac4d9888e0 add: Kconfig assert or errorcode option
add: private include header
add: macro encapsulation for assertion or error check
add: ESP_FAIL return code documentation in public headers
change: replaced all assertions by NVS_ASSERT_OR_RETURN macro
change: few internal function return values from void to esp_err_t
change: ESP_ERR_NVS_VALUE_TOO_LONG macro comment
2022-06-19 14:35:42 +00:00
08c30b1c32 esp_wifi: Fix issue of ca certificate expired 2022-06-19 14:35:23 +00:00
dc0650503b Update the note of the gpio_intr_enable function 2022-06-19 14:33:13 +00:00
09b8af7398 fix the bug that some memory leaked in phy after wifi/ble deinit 2022-06-19 14:33:00 +00:00
af493beb76 deinit BB MAC back memory when they are not used 2022-06-19 14:33:00 +00:00
8164030575 Fix AVDTP general reject format error. 2022-06-19 14:32:43 +00:00
c9bec434aa bootloader_efuse: Adds IRAM_ATTR for efuse API
Fixes startup of app for case:
bootloader with 40Mhz and app with 80Mhz (ESPTOOLPY_FLASHFREQ)

Closes https://github.com/espressif/esp-idf/issues/9156
2022-06-19 14:32:15 +00:00
f68ef7f325 Merge branch 'tools/csv_handling_overhaul_v4.4' into 'release/v4.4'
tools: Overhaul csv handling for mfg_gen and nvs_partition_gen (v4.4)

See merge request espressif/esp-idf!18567
2022-06-18 01:23:45 +08:00
367dff055d tools: overhaul csv handling for mfg_gen and nvs_partition_gen
This fixes the issue where multiline strings and strings with delimiters inside the nvs input csv file were incorrectly parsed, and adds back the ability to add comment lines anywhere in the CSV file.

The issue stems from the move away from the python built in csv module to manual parsing, which was made after moving away from using the csv module to parse mfg data.

This reverts back to using the csv module for parsing and writing csv data in both mfg_gen and nvs_partition_gen, fixes the original issue in mfg_gen and improves code quality which makes the code more readable and maintainable.

Closes https://github.com/espressif/esp-idf/issues/7175
2022-06-17 13:50:09 +00:00
8062994960 Merge branch 'prov/update_protobuf_files' into 'release/v4.4'
provisioning: Updated proto auto-generated files for custom_config example

See merge request espressif/esp-idf!18569
2022-06-17 21:45:57 +08:00
b3c2a8c467 provisioning: Updated proto auto-generated files for custom_config example 2022-06-17 15:08:20 +05:30
0391a7e9d0 Merge branch 'bugfix/fix_ws_ping_receive_v4.4' into 'release/v4.4'
fix(websocket): Support handler deal with PING and CLOSE frame (backport v4.4)

See merge request espressif/esp-idf!18529
2022-06-17 14:11:39 +08:00
d02995240d Merge branch 'fix/gitlab_404_local_mirror_v4.4' into 'release/v4.4'
Handle gitlab 404 error (v4.4)

See merge request espressif/esp-idf!16958
2022-06-16 15:59:59 +08:00
1bd2145d6b ci: Add PING test for ci 2022-06-16 05:39:19 +00:00
7db0dcf72b fix(websocket): Support handler deal with PING and CLOSE frame 2022-06-16 05:39:19 +00:00
a0b227cf85 Handle gitlab 404 error
ci: do not retry on 404 when LOCAL_GITLAB_HTTPS_HOST not set
2022-06-16 05:38:46 +00:00
70c1ea2092 Merge branch 'bugfix/spiffs_flake8_check_v4.4' into 'release/v4.4'
ci: exclude spiffs submodule from flake8 checks (v4.4)

See merge request espressif/esp-idf!18535
2022-06-16 13:37:17 +08:00
1638cf47e4 ci: exclude spiffs submodule from flake8 checks 2022-06-16 07:23:24 +02:00
71c176d587 Merge branch 'bugfix/freertos_stack_tcb_alloc_order_v4.4' into 'release/v4.4'
freertos: fix allocation order for stack and TCB per portSTACK_GROWTH (v4.4)

See merge request espressif/esp-idf!18455
2022-06-15 10:55:51 +08:00
b38ba40d4b Merge branch 'bugfix/psram_startup_crash_v4.4' into 'release/v4.4'
psram: Fix startup crash when `CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0` (v4.4)

See merge request espressif/esp-idf!18500
2022-06-15 10:54:53 +08:00
1081d9ef7f Merge branch 'bugfix/spi_bus_flag_check_v4.4' into 'release/v4.4'
driver(spi): fix flag check in bus initialization (v4.4)

See merge request espressif/esp-idf!18463
2022-06-15 10:54:25 +08:00
c1ee8ceda8 Merge branch 'bugfix/esp_crt_bundle_build_issue_v4.4' into 'release/v4.4'
esp_crt_bundle: Fix build problems if MBEDTLS_CERTIFICATE_BUNDLE is disabled (v4.4)

See merge request espressif/esp-idf!18464
2022-06-15 10:53:46 +08:00
9fbdb65ac3 Merge branch 'docs/update_pairing_popup_troubleshoot_v4.4' into 'release/v4.4'
docs: Added a subsection for FAQ regarding paring pop up during provisioning (v4.4)

See merge request espressif/esp-idf!18497
2022-06-15 10:53:20 +08:00
65c85e34b1 Merge branch 'bugfix/cpu_cycle_count_not_iram_v4.4' into 'release/v4.4'
HAL: place cpu_ll_get_cycle_count in IRAM (v4.4)

See merge request espressif/esp-idf!18293
2022-06-15 10:52:48 +08:00
aa95c6545b Merge branch 'fix/usb/buffer_sizes_backport_v4.4' into 'release/v4.4'
usb: TinyUSB buffer sizes (backport v4.4)

See merge request espressif/esp-idf!18502
2022-06-15 10:51:27 +08:00
4aada814cc Merge branch 'feature/remove_back_compatible_with_s3beta_rom_v4.4' into 'release/v4.4'
spi_flash: remove back-compatible with caller function of S3Beta ROM(backport v4.4)

See merge request espressif/esp-idf!18504
2022-06-15 10:50:53 +08:00
08643e5184 Merge branch 'bugfix/rmt_register_file' into 'release/v4.4'
rmt: fix error in rmt register file (v4.4)

See merge request espressif/esp-idf!18511
2022-06-15 10:50:34 +08:00
4908c4e27d Merge branch 'bugfix/eap_method_selection_release_v4.4' into 'release/v4.4'
esp_wifi: Fix the negotiation of method with eap server.

See merge request espressif/esp-idf!18507
2022-06-15 10:50:03 +08:00
18c02b7a24 Merge branch 'bugfix/wlan_fixes_backports' into 'release/v4.4'
esp_wifi: Backport some WLAN fixes(v4.4)

See merge request espressif/esp-idf!18495
2022-06-15 10:48:51 +08:00
1ba0bf31b6 rmt: fix error in rmt register file
Closes https://github.com/espressif/esp-idf/issues/9100
2022-06-14 22:10:00 +08:00
7706cc8daf spi_flash: remove back-compatible with caller function of S3Beta ROM 2022-06-14 19:30:59 +08:00
3806e36807 usb: Fixed RX buffer min size 2022-06-14 12:49:42 +02:00
2b001daa78 Merge branch 'docs/i2c_thread_safety_backport_v4.4' into 'release/v4.4'
docs: Fix I2C thread-safety (backport v4.4)

See merge request espressif/esp-idf!18186
2022-06-14 18:45:07 +08:00
7543b94b38 esp_wifi: Fix the negotiation of method with eap server. 2022-06-14 15:10:14 +05:30
d7b5381fd2 esp_wifi: Remove group cipher check for PMF connection 2022-06-14 14:49:51 +05:30
9fb3ad9946 wpa_supplicant: Unicast key renew in TKIP mic failure
Currently we always request group key renew for during
TKIP mic failure. Add support for unicast/multicast
key renew as per packet.
2022-06-14 14:49:51 +05:30
f05d741c03 esp_wifi: Add APIs to check BTM and RRM support of connected AP 2022-06-14 14:49:51 +05:30
972aa9a9a9 esp_wifi: Changes to not use pmkid caching when SSID is changed 2022-06-14 14:49:51 +05:30
e4df46011c wpa_supplicant: Fix issues reported by coverity 2022-06-14 14:49:51 +05:30
a40641e3b1 Merge branch 'bugfix/wifi_backport_v4.4_0613' into 'release/v4.4'
esp_wifi: backport some wifi fix(v4.4)

See merge request espressif/esp-idf!18486
2022-06-14 17:12:26 +08:00
ed439cc7f3 freertos: Indicate completed initialization for APP CPU with idle task hook
Co-authored-by: Mahavir Jain <mahavir@espressif.com>
2022-06-14 14:19:01 +05:30
288929eb3a Merge branch 'bugfix/fix_ble_ext_adv_parameter_detection_v4.4' into 'release/v4.4'
component/bt: check the ble ext adv parameters (backport release/v4.4)

See merge request espressif/esp-idf!18489
2022-06-14 16:35:25 +08:00
8ad4039cc4 docs: Added a subsection for FAQ regarding paring pop up during provisioning 2022-06-14 11:26:16 +05:30
49baddf113 component/bt: check the ble ext adv parameters 2022-06-14 11:30:13 +08:00
6bbdcbef1e Merge branch 'bugfix/pm_enabled_bt_build_fail_v4.4' into 'release/v4.4'
Bluetooth build fail when power management is enabled(v4.4)

See merge request espressif/esp-idf!18375
2022-06-14 11:22:40 +08:00
6297fa4039 Merge branch 'feature/vfs_spiffs_(f)truncate_support_v4.4' into 'release/v4.4'
spiffs: Add vfs (f)truncate api support (v4.4)

See merge request espressif/esp-idf!17968
2022-06-14 11:22:08 +08:00
e88621532e esp_wifi: backport some wifi fix
1. add ht40 support for espnow & 80211_tx
2. fix smartconfig v2 bssid is zero issue
3. Optimize phy calibration time for C3 and S3
2022-06-14 10:57:47 +08:00
3e93a8c15f test_apps: add build only test for !MBEDTLS_CERTIFICATE_BUNDLE 2022-06-12 09:31:37 +05:30
a597cc80aa examples: add dependency on cert bundle configuration
Refactor examples to build with MBEDTLS_CERTIFICATE_BUNDLE disabled. Only examples
that can work with certificate bundle disabled have been modified here.
2022-06-12 09:30:31 +05:30
660b876465 esp_crt_bundle: Fix build problems if MBEDTLS_CERTIFICATE_BUNDLE is disabled
Exclude source and include file from build list if certificate bundle feature
is disabled.

Closes https://github.com/espressif/esp-idf/issues/8714
Closes IDFGH-7106
2022-06-12 09:29:12 +05:30
cb0275cb8f Merge branch 'bugfix/esp_http_client_test_v4.4' into 'release/v4.4'
esp_http_client example: Fix CI failures (v4.4)

See merge request espressif/esp-idf!18466
2022-06-12 03:52:54 +08:00
384ea8123b https_request_example:
Use local python server to test client session tickets
Update example test to test the client session tickets
Check for minimum heap info in the example test.
2022-06-11 12:19:08 +05:30
68ee89eac9 esp_http_client_test.py: Remove check for HTTP manual redirect
Manual redirect example is not backported on release/v4.4
2022-06-11 12:12:29 +05:30
f41a8df4cc Merge branch 'feature/esp-tls_optimize_memory_v4.4' into 'release/v4.4'
esp-tls: add api to free client session(backport v4.4)

See merge request espressif/esp-idf!18410
2022-06-10 20:22:00 +08:00
e75f4e5a1a Merge branch 'bugfix/mqtt_read_neg_and_ping_v4.4' into 'release/v4.4'
mqtt: Fix incorrect reads on error (v4.4)

See merge request espressif/esp-idf!18177
2022-06-10 18:25:06 +08:00
7691b44ee5 ci/mqtt: Fix weekend test publish-connect on target
* Fix thread safe issue in paho-mqtt library
* Move the weekend test to ethernet runner
2022-06-10 09:12:50 +02:00
61b5285cff mqtt: Fix incorrect reads on error (idf_v4.x)
* Update submodule: git log --oneline 985078affa8a2d2b56b87c8e6455252850f895c6..27eb4726067465c5c67d4ecdca5ddccd26f02580

Detailed description of the changes:
* MQTT: Fix signature matching for integer values (Backport to idf_v4.x)
  - See merge request espressif/esp-mqtt!133
  - Closes https://github.com/espressif/esp-idf/issues/8482
  - MQTT: Fix signature matching for integer values (espressif/esp-mqtt@f162002)
* ci: Deploy idf_v4.x branch to GitHub (espressif/esp-mqtt@ee5ecad)
2022-06-10 09:12:27 +02:00
8878b75a27 driver(spi): fix flag check in bus initialization
The current flag check in the SPI bus initialization is wrong and
causes exceptions when using certain SPI hosts in quad transfert mode.
2022-06-10 10:55:21 +08:00
507e273e1d fatfs: fix incorrect mtime returned for files created during DST
mktime function uses tm_isdst member as an indicator whether the time
stamp is expected to be in daylight saving time (1) or not (0).
FAT filesystem uses local time as mtime, so no information about DST
is available from the filesystem.

According to mktime documentation, tm_isdst can be set to -1, in which
case the C library will try to determine if DST was or wasn't in
effect at that time, and will set UTC time accordingly.

Note that the conversion from UTC to local time and then back to UTC
(time_t -> localtime_r -> FAT timestamp -> mktime -> time_t) does not
always recover the same UTC time. In particular, the local time in the
hour before DST comes into effect can be interpreted as "before DST"
or "after DST", which would correspond to different UTC values. In
this case which option the C library chooses is undefined.

Closes https://github.com/espressif/esp-idf/issues/9039
Originally reported in https://github.com/espressif/arduino-esp32/issues/6786
2022-06-09 22:02:46 +02:00
5b6d9d87a3 freertos: add return value to API vTaskGetSnapshot
`vTaskGetSnapshot` is being used in coredump module to collect diagnostic information.
It is possible that input arguments are invalid and `assert` in this situation is not
correct.

This commit modifies API signature to return pdTRUE in case of success, and pdFALSE
otherwise. Caller can verify return value and then take appropriate decision.
2022-06-09 21:13:23 +05:30
4a59036ab1 freertos: fix allocation order for stack and TCB per portSTACK_GROWTH
This is as per FreeRTOS recommendation and allows to protect task TCB
in case task stack has overflowed.
2022-06-09 20:49:27 +05:30
871af8c5a5 esp_hw_support: Adds a msg when 32k xtal was stopped 2022-06-09 22:45:31 +08:00
62b46a0e92 Merge branch 'bugfix/s3_psram_spinlock_v4.4' into 'release/v4.4'
spinlock: fixed spinlocks not working on S3 if placed in PSRAM (v4.4)

See merge request espressif/esp-idf!18439
2022-06-09 17:18:18 +08:00
3a5e9d5ce1 Merge branch 'feature/add_mld6_flag_for_eth_v4.4' into 'release/v4.4'
feat(netif): Add NETIF_FLAG_MLD6 flag for eth netif (backport v4.4)

See merge request espressif/esp-idf!18266
2022-06-09 10:59:21 +08:00
c3d76d6496 Merge branch 'ci/force_based_on_commit_v4.4' into 'release/v4.4'
ci: support one pipeline must based on commmits (v4.4)

See merge request espressif/esp-idf!17920
2022-06-09 10:58:29 +08:00
be8129dc2d Merge branch 'bugfix/doc_static_Files_v4.4' into 'release/v4.4'
docs: fix missing static file path (v4.4)

See merge request espressif/esp-idf!17329
2022-06-09 10:56:28 +08:00
efdca9431c Merge branch 'bugfix/c3_efuse_fail_bits_v4.4' into 'release/v4.4'
soc: Fix efuse fail bits (v4.4)

See merge request espressif/esp-idf!18417
2022-06-09 10:53:31 +08:00
7905f0d3f8 Merge branch 'feature/adds_efuses_to_table_v4.4' into 'release/v4.4'
efuse: Adds ERR_RST_ENABLE efuse for C3 (v4.4)

See merge request espressif/esp-idf!18419
2022-06-09 10:53:16 +08:00
957505136b spinlock: fixed spinlocks not working on S3 if placed in PSRAM
The compare and set instruction (S32C1I) cannot be used when
lock is not in internal memory.

Closes https://github.com/espressif/esp-idf/issues/9120
2022-06-09 10:39:19 +08:00
75491fe216 spiffs: Add vfs (f)truncate api support
Unit test cases added to verify truncate.

Closes https://github.com/espressif/esp-idf/issues/2234
2022-06-08 12:52:25 +00:00
f1318fe7cb Merge branch 'bugfix/mbedtls_dynamic_memory_crash_on_rsa_ciphers_v4.4' into 'release/v4.4'
mbedtls: fix ssl server crash when enable mbedtls dynamic buffer(backport v4.4)

See merge request espressif/esp-idf!18426
2022-06-08 19:46:43 +08:00
270fadaee2 Merge branch 'bugfix/uninitialized-element_v4.4' into 'release/v4.4'
component_bt:initialize all elements of esp_bt_controller_config_t(v4.4)

See merge request espressif/esp-idf!18404
2022-06-08 15:24:39 +08:00
edcc76ec2e https_server: add mbedtls dynamic buffer function test 2022-06-08 15:09:38 +08:00
4896d0c8f3 mbedtls: fix ssl server crash when enable mbedtls dynamic buffer
Not free keycert until MBEDTLS_SSL_CLIENT_KEY_EXCHANGE for rsa key exchange methods, because keycert will be used to parse client key exchange.
2022-06-08 14:27:41 +08:00
f86be6141b Merge branch 'bugfix/i2c_timeout_issue_v4.4' into 'release/v4.4'
I2C: patch for solving watchdog timeout issue(backport v4.4)

See merge request espressif/esp-idf!18130
2022-06-08 14:12:37 +08:00
f20d229390 Merge branch 'refactor/flash_qio_overidable_v4.4' into 'release/v4.4'
spi_flash: refact that flash qio can be overidable(backport v4.4)

See merge request espressif/esp-idf!18036
2022-06-08 12:37:55 +08:00
e41a7d64b5 Merge branch 'bugfix/do_not_allow_unauthenticated_encrypted_key_data_release_v4.4' into 'release/v4.4'
esp_wifi: Ignore unauthenticated encrypted EAPOL-Key data and fix

See merge request espressif/esp-idf!18314
2022-06-08 10:51:57 +08:00
9b07593ce5 Merge branch 'bugfix/esp_http_client_example_v4.4' into 'release/v4.4'
esp_http_client example: Add cert for redirect to HTTPS example (v4.4)

See merge request espressif/esp-idf!18402
2022-06-08 02:28:48 +08:00
1979c68e82 efuse: Adds ERR_RST_ENABLE efuse for C3 and S3
Closes https://github.com/espressif/esp-idf/issues/8357
2022-06-07 22:06:45 +08:00
02fe424e48 soc: Fix description of efuse fail bits 2022-06-07 21:42:33 +08:00
e5d55fe1b1 esp_ipc: Fix a case when ipc_task() can wake up blocking task early
Closes https://github.com/espressif/esp-idf/issues/8559
2022-06-07 21:20:08 +08:00
f47023f8c2 Merge branch 'update/protobuf_v4.4' into 'release/v4.4'
protobuf: Updated to v1.4.0  (v4.4)

See merge request espressif/esp-idf!18406
2022-06-07 20:37:47 +08:00
1191d9c8e6 example: https_request update free client session api 2022-06-07 19:37:10 +08:00
4be609a471 esp-tls: add api to free client session
Free session with mbedtls api to avoid mem-leak
2022-06-07 19:22:36 +08:00
a7664ecb27 Merge branch 'fix/menuconfig_option_esp_cryptoauthlib_v4.4' into 'release/v4.4'
esp_tls_mbedtls.c: Fix esp-idf integration of esp-cryptoauthlib (v4.4)

See merge request espressif/esp-idf!18400
2022-06-07 18:56:00 +08:00
fbf35a4874 esp_local_ctrl: Regenerated proto-c and python with protobuf compiler v3.21.0
$protoc --version
libprotoc 3.21.0

$ protoc-c --version
protobuf-c 1.4.0
2022-06-07 15:59:41 +05:30
0ca9ad5249 wifi_provisioning: Regenerated proto-c and python with protobuf compiler v3.21.0 2022-06-07 15:59:40 +05:30
509a423f83 protocomm: Regenerated proto-c and python with protobuf compiler v3.21.0 2022-06-07 15:59:40 +05:30
9549f0026f protobuf: Fix v4.21.0 (python) compatibility issue
- Added auto-generated protobuf files (proto-c and python to pre-commit hook ignore lists
2022-06-07 15:59:40 +05:30
0b05f1708d protobuf-c: Update submodule to v1.4.0 2022-06-07 15:59:39 +05:30
d02db62bc3 Merge branch 'test/rtc_8m_d256_v4.4' into 'release/v4.4'
rtc: fixed 8MD256 can't be used as RTC slow src on ESP32 (v4.4)

See merge request espressif/esp-idf!18105
2022-06-07 18:21:12 +08:00
f2048b2d15 initialize all elements of esp_bt_controller_config_t
Closes https://github.com/espressif/esp-idf/pull/9073
2022-06-07 17:30:48 +08:00
b291be8a5d esp_http_client example: Add cert for redirect to HTTPS example
esp_http_client_test.py: Add checks for missing example logs
2022-06-07 14:53:25 +05:30
b306517641 esp_tls_mbedtls.c: Fix esp-idf integration of esp-cryptoauthlib
menuconfig option
2022-06-07 14:45:40 +05:30
e595ae88d4 HAL: place cpu_ll_get_cycle_count in IRAM
Closes https://github.com/espressif/esp-idf/issues/9008
2022-06-07 06:30:46 +00:00
57082d14a5 Merge branch 'feature/semihosting_call_number_change_v4.4' into 'release/v4.4'
Semihosting V2 (v4.4)

See merge request espressif/esp-idf!18332
2022-06-06 20:31:19 +08:00
5accbaebab Merge branch 'bugfix/i2c_port_check_v4.4' into 'release/v4.4'
I2C: Fix I2C ports check in each function of the API implementation

See merge request espressif/esp-idf!18257
2022-06-06 14:56:36 +08:00
5addf329d8 Merge branch 'bugfix/i2c_incorrect_speed_v4.4' into 'release/v4.4'
I2C: Fix SCL period timings on ESP targets (backport v4.4)

See merge request espressif/esp-idf!18271
2022-06-06 12:32:32 +08:00
2ee9fc6aff Bluetooth build fail when power management is enabled
Closes https://github.com/espressif/esp-idf/issues/9081
2022-06-06 11:42:45 +08:00
93d27565ac test_rtc: add test_app to test power consumption 2022-06-06 00:51:38 +08:00
c61db5e9c9 soc_caps: add SOC_PM_SUPPORT_RTC_PERIPH_PD
Partially pick 6336f8191e
2022-06-06 00:17:39 +08:00
deea85b848 pm: add test for RTC using 8MD256 as clock source 2022-06-06 00:16:03 +08:00
2a1002b4a4 modify voltage param to fit all mode of S3 2022-06-05 02:33:51 +08:00
a2e1b6756e esp32s3: fixed dangerous power parameters in sleep modes 2022-06-05 02:33:51 +08:00
f46bd50884 pm: putting dbias and pd_cur code into same function 2022-06-05 02:33:51 +08:00
254870c3c4 rtc: fixed 8MD256 can't be used as RTC slow src on ESP32
Sync configuration from other chips

Closes: https://github.com/espressif/esp-idf/issues/8007, https://github.com/espressif/esp-idf/pull/8089
2022-06-05 02:33:50 +08:00
5e6cffbb14 Merge branch 'bugfix/backport_certificate_bundle_fixes_v4.4' into 'release/v4.4'
Certificate bundle fixes (v4.4)

See merge request espressif/esp-idf!18352
2022-06-03 16:27:47 +08:00
f1abc863a2 Merge branch 'bugfix/console_fixes_4.4' into 'release/v4.4'
console: various fixes and example improvements (backport v4.4)

See merge request espressif/esp-idf!18161
2022-06-03 03:54:30 +08:00
c55db5e688 semihosting: drop absolute path support 2022-06-02 11:14:18 +02:00
2d91698324 Update esp_crt_bundle certificates 2022-06-02 11:03:24 +05:30
279ec3eb35 i2c: fix 'comparision is always true' warning 2022-06-02 13:28:21 +08:00
487df7cb61 Merge branch 'bugfix/add_bda_to_read_rmt_name_param_v4.4' into 'release/v4.4'
Bugfix/add bda to read rmt name param v4.4

See merge request espressif/esp-idf!18280
2022-06-02 11:46:07 +08:00
f51d746a9a Merge branch 'feature/docker_build_gh_actions_v4.4' into 'release/v4.4'
ci: move Docker image builds to Github, plus other improvements (v4.4)

See merge request espressif/esp-idf!18287
2022-06-02 11:45:29 +08:00
cd21a31416 vfs: usb_serial_jtag: consider O_NONBLOCK flag when reading via driver
Closes https://github.com/espressif/esp-idf/issues/8839
2022-06-01 16:32:28 +02:00
129cdcc08c console: linenoiseProbe: check if response is valid
Previously linenoiseProbe would accept any 4 byte response, even one
that isn't expected. This adds a check that the first byte of the
response is ESC.
Suggested in https://github.com/espressif/esp-idf/issues/8839.
2022-06-01 16:32:28 +02:00
78480e215a examples: console: add a readme with an overview of examples 2022-06-01 16:32:28 +02:00
6f57018c9d examples: support USB_CDC and USB_SERIAL_JTAG in basic console example
Related to https://github.com/espressif/esp-idf/issues/8738
Related to https://github.com/espressif/esp-idf/issues/8879

Doesn’t implement USB_CDC (over USB_OTG peripheral) for ESP32-S3 yet;
this only works on ESP32-S2 for now. On ESP32-S3 it is now possible to
use USB_SERIAL_JTAG console.
2022-06-01 16:32:28 +02:00
80f7b45672 examples: console: move duplicated cmd_wifi files into a new component 2022-06-01 16:32:28 +02:00
cb4a197a98 examples: move console_usb example to console directory 2022-06-01 16:30:14 +02:00
fa4256c885 ci: build and push Docker images in Github actions, add arm64 platform
Replaces the previously used Docker Hub autobuild infrastructure.
This allows for more flexible configuration of the build process,
at the expense of some extra maintenance of CI workflow files
required.
2022-06-01 16:23:50 +02:00
dc4fcdd2e1 docs: document build arguments of the Docker image 2022-06-01 16:23:50 +02:00
8eec6cb868 tools/docker: add IDF_CLONE_SHALLOW and IDF_INSTALL_TARGETS arguments
These two arguments can be used to reduce the size of the Docker
image:

- Setting IDF_CLONE_SHALLOW enables shallow cloning.
- Setting IDF_INSTALL_TARGETS to the comma separated list of targets
  results in toolchains being installed only for these targets.
2022-06-01 16:23:50 +02:00
c0df348156 semihosting: version 2 2022-06-01 14:49:03 +02:00
c0dcebc41c Merge branch 'feat/esp32s3_support_gpio_deepsleep_wakeup_v4.4' into 'release/v4.4'
example/deep_sleep: add example of EXT0 and using internal pullups (v4.4)

See merge request espressif/esp-idf!18119
2022-06-01 19:56:17 +08:00
a1d5a9b971 esp_crt_bundle: Add bounds checking for the "esp_crt_bundle_set" API.
Closes https://github.com/espressif/esp-idf/issues/8397
2022-06-01 15:09:50 +05:30
ec0f7850a0 mbedtls: move locally managed root certificates to separate file
Purpose:
This will allow for easily automating periodic updates to
"cacrt_all.pem" file.

Note:
For now newly created "cacrt_local.pem" contains single "DST Root CA X3"
which we are keeping to manage compatibility with endpoints like
"howsmyssl.com". Please note this Root CA is expired and is not part of
Mozilla’s NSS root certificate store.
2022-06-01 15:07:31 +05:30
43d3cb37a0 esp_crt_bundle: Fix build error
- When `esp_crt_bundle.h` is included before any config,
  a build error (`esp_err_t` not defined) is observed

Closes https://github.com/espressif/esp-idf/issues/8606
2022-06-01 15:06:59 +05:30
f1fbbf3171 Merge branch 'bugfix/fixed-unsatisfiable-condition_v4.4' into 'release/v4.4'
Fixed comparison with ESP_MONITOR_DECODE (v4.4)

See merge request espressif/esp-idf!18334
2022-06-01 16:12:40 +08:00
221bf746d0 Fixed comparsion of integer and string that evaluated always to False
Closes https://github.com/espressif/esp-idf/issues/9052
Closes IDFGH-7482
2022-05-31 14:07:18 +02:00
ae0e3e2e2a Merge branch 'feature/add_spiffs_check_v4.4_2' into 'release/v4.4'
spiffs: Add esp_spiffs_check() function (v4.4)

See merge request espressif/esp-idf!18189
2022-05-31 10:28:03 +08:00
d5151ac1f7 Bugfix/bond not saved properly after re-pairing 2022-05-30 22:39:58 +05:30
afde319749 Merge branch 'bugfix/fix_lwip_kconfig_v4.4' into 'release/v4.4'
fix(Kconfig): Fix lw-ip Kconfig display garbled characters (backport v4.4)

See merge request espressif/esp-idf!18320
2022-05-30 17:53:55 +08:00
ad176653a0 fix(Kconfig): Fix lw-ip Kconfig display garbled characters 2022-05-30 16:21:09 +08:00
26ad146077 esp_wifi: Ignore unauthenticated encrypted EAPOL-Key data and fix
handling of key RSC.

Closes https://github.com/espressif/esp-idf/issues/8401
2022-05-30 12:15:44 +05:30
fc30369909 Merge branch 'bugfix/update_efuse_name_v4.4' into 'release/v4.4'
efuse: update efuse name (backport v4.4)

See merge request espressif/esp-idf!18195
2022-05-30 11:15:16 +08:00
2e4784611d efuse: update efuse name (backport v4.4) 2022-05-30 11:15:16 +08:00
0340c2f2bc Merge branch 'bugfix/keep_rtc8m_in_lightsleep_v4.4' into 'release/v4.4'
pm: fixed RTC8M domain power down issue when used as RTC source (v4.4)

See merge request espressif/esp-idf!18075
2022-05-30 09:54:39 +08:00
22cf1d0d58 assign value to uninitialized bt_addr field 2022-05-29 18:08:56 -07:00
35fd2cee7c add address field to read_rmt_name_param 2022-05-29 18:08:41 -07:00
72dcce1ec2 Merge branch 'bugfix/return_idf_component_manager_build_property_v4.4' into 'release/v4.4'
build & config: Add IDF_COMPONENT_MANAGER build property (v4.4)

See merge request espressif/esp-idf!18286
2022-05-28 13:59:17 +08:00
12dfcdd1d9 spiffs: Add esp_spiffs_check() function
esp_spiffs_check() exposes SPIFFS_check() functionality to the user
2022-05-27 21:14:33 +00:00
fbb0e684e9 Merge branch 'bugfix/mkdfu_flash_parameters_v4.4' into 'release/v4.4'
mkdfu.py: Support setting flash parameters (backport v4.4)

See merge request espressif/esp-idf!18291
2022-05-28 03:26:29 +08:00
f40b88e866 mkdfu.py: Support setting flash parameters 2022-05-27 16:24:13 +02:00
d15b02fdb2 Merge branch 'bugfix/disable_extensions_idfpy_tests_v4.4' into 'release/v4.4'
Tools: Make idf.py tests independent on extra extensions (v4.4)

See merge request espressif/esp-idf!18277
2022-05-27 18:57:43 +08:00
c3969b789e build & config: Add IDF_COMPONENT_MANAGER build property 2022-05-27 12:57:00 +02:00
395087ff44 Tools: Make idf.py tests independent on extra extensions 2022-05-27 11:14:08 +02:00
6260f53c14 Merge branch 'feature/modbus_master_fix_check_uart_set_pin_v44' into 'release/v4.4'
example/modbus_master: fix the assert for uart_set_pin (backport v4.4)

See merge request espressif/esp-idf!17624
2022-05-27 11:51:48 +08:00
8ac3d392a2 I2C: Fix SCL period timings on ESP targets
The output frequency is now more accurate as the SCL period timings have been fixed.
This fix applies for ESP32, ESP32S3, ESP32C3 and ESP32H2
2022-05-27 11:17:40 +08:00
692c1a6bea Merge branch 'feature/idf_py_clang_tidy_check_v4.4' into 'release/v4.4'
feat(idf.py): add `idf.py clang-check` and `idf.py clang-html-report` (v4.4)

See merge request espressif/esp-idf!18229
2022-05-26 16:40:10 +08:00
8215bd6670 feat(netif): Add NETIF_FLAG_MLD6 flag for eth netif 2022-05-26 16:07:50 +08:00
308f84972c I2C: Fix I2C ports check in each function of the API implementation
* Closes https://github.com/espressif/esp-idf/issues/9009
2022-05-26 12:44:46 +08:00
992b4ffb1e Merge branch 'bugfix/systimer_counter_value_bit_field_v4.4' into 'release/v4.4'
HAL: Fix systimer counter value bit field (v4.4)

See merge request espressif/esp-idf!18254
2022-05-26 10:16:39 +08:00
906bb0e4a3 hal: Fix systimer counter value bit field
This commit fixes the systimer_counter_value_t by adding a resreved field so that the
type fills 64-bits.

Without the reserved field, when compiling with -O0 optimization, the unoccupied high
bits would not be initalized by the compiler, leading to systimer_hal_get_counter_value()
returning a garbage value.
2022-05-26 01:47:33 +08:00
7e20435a54 Merge branch 'bugfix/fix_cannot_lslp_again_after_ulp_wakeup_backport_v4.4' into 'release/v4.4'
sleep: fix cannot lightsleep again after a wakeup from ULP(backport v4.4)

See merge request espressif/esp-idf!18180
2022-05-25 16:52:36 +08:00
ff4875bc9b Merge branch 'bugfix/setup_defines_for_correct_mutex_usage' into 'release/v4.4'
coap_config_posix.h: Set up defines for correct mutex usage

See merge request espressif/esp-idf!18232
2022-05-25 13:55:44 +08:00
3e7f721d33 Merge branch 'bugfix/i2s_write_timeout_when_setting_clock_v4.4' into 'release/v4.4'
i2s: fixed write timeout while setting the clock (v4.4)

See merge request espressif/esp-idf!18220
2022-05-25 13:34:28 +08:00
1a6c817c27 Merge branch 'bugfix/s3_spi_pre_v4.4' into 'release/v4.4'
hal: Fix max value for clkdiv_pre in ESP32-S3 SPI master clock config (v4.4)

See merge request espressif/esp-idf!18237
2022-05-25 11:29:34 +08:00
0ebd381c16 Merge branch 'contrib/github_pr_9001_v4.4' into 'release/v4.4'
usbh_print_intf_desc prints wrong value for tbInterfaceClass (IDFGH-9000)

See merge request espressif/esp-idf!18236
2022-05-25 01:56:33 +08:00
cca9f93067 usbh_print_intf_desc prints wrong value for tbInterfaceClass (IDFGH-9000) 2022-05-24 14:28:54 +02:00
7a9daa3cd3 hal: Fix max value for clkdiv_pre in ESP32-S3 SPI master clock config
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-05-24 08:51:16 -03:00
993267d745 coap_config_posix.h: Set up defines for correct mutex usage
if COAP_CONSTRAINED_STACK is defined (is for esp-idf), the mutexes set up
to protect the critical sections were not working as expected and were just
dummy entries.

Use the pthread_ version of the mutex instead by defining HAVE_PTHREAD_H
and HAVE_PTHREAD_MUTEX_LOCK.
2022-05-24 14:43:02 +05:30
f16e21aa9d docs(idf.py): add IDF Clang Tidy chapter 2022-05-24 16:08:40 +08:00
5c19581bfe feat(idf.py): add idf.py clang-check and idf.py clang-html-report 2022-05-24 16:08:40 +08:00
9b0f7b657b i2s: fixed write timeout while setting the clock (v4.4) 2022-05-24 10:14:44 +08:00
064148212b Merge branch 'bugfix/read_eof_no_vfs_4.4' into 'release/v4.4'
newlib: fix return value of no-VFS _read_r if nothing received (v4.4)

See merge request espressif/esp-idf!18160
2022-05-23 17:53:47 +08:00
9d2238d6e4 Merge branch 'bugfix/mbedtls_dynamic_buffer_crash_on_ssl_server_v4.4' into 'release/v4.4'
fix(mbedtls): fix ssl server memory leak when enable mbedtls dynamic buffer function(backport v4.4)

See merge request espressif/esp-idf!18166
2022-05-23 11:20:30 +08:00
fc8ef9d1c2 Merge branch 'bugfix/mdsn_fuzzer_extend_v4.4' into 'release/v4.4'
mdns: ~~Extend fuzzing and~~ Fix various petty issues (v4.4)

See merge request espressif/esp-idf!18056
2022-05-20 16:58:13 +08:00
11cf565834 docs: Fix I2C thread-safety 2022-05-20 08:34:04 +02:00
db98a4b2ef Merge branch 'bugfix/vfs_sock_select_race_v4.4' into 'release/v4.4'
vfs: Fix potential select() race if both sock and other-fd trigger (v4.4)

See merge request espressif/esp-idf!18175
2022-05-20 12:55:09 +08:00
bef5b2ac6e remove wrong function rtc_cntl_ll_ulp_wakeup_enable for esp32s2 and esp32s3 2022-05-19 23:27:32 +08:00
25c49588f9 esp_hw_‎support/sleep: ‎fix cannot lightsleep again after a wakeup from ULP
Since ulp wakeup signal are connected to ulp int raw(except esp32), we
need to clear ulp int raw before sleep when ulp wakeup enabled. Otherwise,
if the ulp int raw is already set, chip will not sleep properly.

Closes https://github.com/espressif/esp-idf/issues/6229
2022-05-19 23:13:42 +08:00
f974099b42 vfs: Fix potential select() race if both sock and other-fd trigger
This fixes a potential race condition in select() if both a socket-fd
and non-socket fd trigger simultaneously to unblock this select.
In case of both fds, we use lwip's local thread semaphore, so we only
have to try return it (if it was taken/triggered more than once) when
we exit select().

Closes https://github.com/espressif/esp-idf/issues/8896
2022-05-19 16:57:39 +02:00
ae6c52e9f9 Merge branch 'bugfix/fix_memory_miss_bug_v4.4' into 'release/v4.4'
esp32c3/esp32s3: Fix cpu crash bug when wakeup from lightsleep for memory data miss (backport v4.4)

See merge request espressif/esp-idf!17826
2022-05-19 13:47:20 +08:00
5d95cd58b2 Merge branch 'bugfix/fix_wifi_pm_state_v4.4' into 'release/v4.4'
esp_wifi: fix no null data after WiFi waking up. (backport v4.4)

See merge request espressif/esp-idf!18142
2022-05-19 10:51:59 +08:00
416d01db7a Merge branch 'bugfix/wifi_provisioning_arduino_v4.4' into 'release/v4.4'
provisioning: replace <lwip/inet.h> by <lwip/ip4_addr.h> in wifi_provisioning/wifi_config.h (v4.4)

See merge request espressif/esp-idf!18162
2022-05-19 10:45:38 +08:00
263e1cec64 Merge branch 'bugfix/tools_clang_atomic_alignment_v4.4' into 'release/v4.4'
cmake: add "-Wno-atomic-alignment" flag to cmake script (v4.4)

See merge request espressif/esp-idf!18163
2022-05-19 10:44:46 +08:00
9ce3973f19 Merge branch 'bugfix/errno_overlap_v4.4' into 'release/v4.4'
newlib: fix ESHUTDOWN and ENOTSOCK having the same numerical value (v4.4)

See merge request espressif/esp-idf!18164
2022-05-19 10:44:12 +08:00
81c195fed2 fix(mbedtls): fix ssl server memory leak when enable mbedtls dynamic buffer function 2022-05-19 10:41:40 +08:00
c5deb7a971 Merge branch 'bugfix/disable_bt_pll_track_v4.4' into 'release/v4.4'
Bluetooth: disable PLL track function for ESP32-C3/ESP32-S3 as it introduced coexistence issues(bacport v4.4)

See merge request espressif/esp-idf!18139
2022-05-19 10:41:27 +08:00
74dd39d8b0 Merge branch 'bugfix/Fix_ios_ble_adv_rsp_v4.4' into 'release/v4.4'
Fix iOS advertisement response and simplify (v4.4)

See merge request espressif/esp-idf!18038
2022-05-19 10:40:57 +08:00
7a72f8e852 Merge branch 'bugfix/driver_uart_fix_tx_bytes_rts_assert_failure_v44' into 'release/v4.4'
driver: fixes context switch while sending cause rts reset before send (backport v4.4)

See merge request espressif/esp-idf!17929
2022-05-19 10:40:34 +08:00
6bf650c159 driver: fixes context switch while sending cause rts reset before send (backport v4.4) 2022-05-19 10:40:34 +08:00
0bbdd67231 Merge branch 'bugfix/fix_s3_bbpll_calibrate_fail_bug_v4.4' into 'release/v4.4'
ESP32S3: fix bbpll calibrate fail bug in high temperature  (backport v4.4)

See merge request espressif/esp-idf!17896
2022-05-19 10:39:52 +08:00
6382b51bfb Merge branch 'feature/check_block_after_burn_v4.4' into 'release/v4.4'
efuse: Validates data after burning and re-burnes it if necessary (v4.4)

See merge request espressif/esp-idf!17702
2022-05-19 10:39:17 +08:00
80c516e6ad Merge branch 'bugfix/vfs_fat_(p)write_on_diskfull_v4.4' into 'release/v4.4'
vfs: bugfix vfs_fat_write/pwrite upon disk-full (v4.4)

See merge request espressif/esp-idf!17649
2022-05-19 10:39:01 +08:00
8fe41e2e41 Merge branch 'fix/backport/usb_host/cdc_build' into 'release/v4.4'
usb_host: Don't build CDC host driver for unsupported targets (backport v4.4)

See merge request espressif/esp-idf!17526
2022-05-19 10:38:50 +08:00
b02cf33bfa newlib: fix ESHUTDOWN and ENOTSOCK having the same numerical value 2022-05-18 19:52:15 +02:00
50356cb073 cmake: add "-Wno-atomic-alignment" flag to clang scripts
Clang outputs performance warnings by default for atomic operations with
access size more then 4 bytes. So add "-Wno-atomic-alignment add" flag to
ESP-IDF cmake script.
2022-05-18 19:50:04 +02:00
9359c61fea provisioning: Fix include for Arduino INADDR_NONE 2022-05-18 19:44:05 +02:00
134b5153e3 newlib: fix return value of no-VFS _read_r if nothing received
'read' function should return 0 when encountering an end of file. When
newlib calls read and sees EOF returned, it assumes that this
condition is permanent and never calls 'read' for this file again
(unless the read pointer is moved using fseek).
The correct behavior in case no characters were received over UART is
to return -1. In this case newlib will retry reading from file on next
call to fread, fgetc or another function which calls __srefill_r.
2022-05-18 19:33:10 +02:00
d222adbeeb solve memory error bug when in lightsleep mode 2022-05-18 17:43:13 +08:00
d6f51a5cab esp_wifi: fix no null data after WiFi waking up (backport v4.4). 2022-05-17 23:12:33 +08:00
5c24b7f75f components/bt: disable Bluetooth PLL track function for ESP32-C3/ESP32-S3 as it introduced coexistence issues 2022-05-17 20:54:51 +08:00
fe1cf490b9 Merge branch 'feature/enable_component_manager_by_default_for_pure_cmake_v4.4' into 'release/v4.4'
tools: Enable the component manager by default in CMake (v4.4)

See merge request espressif/esp-idf!18121
2022-05-17 18:42:19 +08:00
04f7c342f0 I2C: patch for solving watchdog timeout issue 2022-05-17 16:36:40 +08:00
bfce7241c4 example/deep_sleep: add example of EXT0 and using internal pullups 2022-05-17 10:45:31 +08:00
66f60095c2 tools: Enable the component manager by default in CMake 2022-05-16 17:10:07 +02:00
81391f57f6 Merge branch 'feature/disable_protection_v4.4' into 'release/v4.4'
bootloader: Create option for toggling memory region protection (v4.4)

See merge request espressif/esp-idf!18117
2022-05-16 22:09:44 +08:00
4efab0d0ff soc/esp32s3: merge gpio caps into soc_caps.h 2022-05-16 22:01:11 +08:00
477d11e9c1 bootloader: Create option for enabling memory region protection
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-05-16 09:39:51 -03:00
4995e24199 Merge branch 'feature/optimize_wifi_provisioning_memory_v4.4' into 'release/v4.4'
feat(wifi_provisioning): Optimize memory for wifi scan ap number (backport v4.4)

See merge request espressif/esp-idf!18113
2022-05-16 15:20:44 +08:00
a706a482c6 feat(wifi_provisioning): Optimize memory for wifi scan ap number 2022-05-16 14:07:19 +08:00
e119d6cb06 pm: add powerdown for int_8m on ESP32-H2
Also move the xtal fpu logic to sleep_modes.c
2022-05-16 00:59:36 +08:00
3806b240cf Merge branch 'bugfix/interrupted_thread_gdb_bt_v4.4' into 'release/v4.4'
riscv: Fixes GDB backtrace of interrupted threads (v4.4)

See merge request espressif/esp-idf!17716
2022-05-13 21:59:18 +08:00
caa5444c93 RISC-V: Fix vectors.S assembly file indentation and macro usage
The file is now more consistent as the macros have been fixed, more comments
have been added and the indentation is now using spaces only.
2022-05-13 12:54:21 +03:00
9017ff235b riscv: Use semihosting to set breakpoint and watchpoint when running under debugger 2022-05-13 12:54:21 +03:00
46a98fb8d1 riscv: Adds support for returning from exception handler 2022-05-13 12:52:06 +03:00
300d67411a riscv: Fixes GDB backtrace end function to point to prvTaskExitError 2022-05-13 12:52:06 +03:00
44bfddd784 riscv: Fixes GDB backtrace of interrupted threads
Save missed SP value on stack
2022-05-13 12:52:06 +03:00
80ea94dd36 Merge branch 'bufix/esp32c3_s3_build_err_v4.4' into 'release/v4.4'
component_bt: Fix ESP32C3/S3 build error after enable light sleep(v4.4)

See merge request espressif/esp-idf!17995
2022-05-13 15:39:38 +08:00
832c199c25 Merge branch 'bugfix/fix_heap_free_memory_v4.4' into 'release/v4.4'
Heap: fix free bytes calculation for TLSF heap (backport v4.4)

See merge request espressif/esp-idf!17688
2022-05-12 16:20:32 +08:00
17b9cc6b4a pm: fixed RTC8M domain power issues
introduced in e44ead5356

1. The int8M power domain config by default is PD. While LEDC is using
RTC8M as clock source, this power domain will be kept on.

But when 8MD256 is used as RTC clock source, the power domain should
also be kept on.

On ESP32, there was protection for it, but broken by commit
e44ead5356. Currently the power domain
will be forced on when LEDC is using RTC8M as clock source &&
!int8m_pd_en (user enable ESP_PDP_DOMAIN_RTC8M in lightsleep). Otherwise
the power domain will be powered off, regardless of RTC clock source.

In other words, int8M domain will be forced off (even when 8MD256
used as RTC clock source) if LEDC not using RTC8M as clock source, user
doesn't enable ESP_PDP_DOMAIN_RTC8M, or in deep sleep.

On later chips, there's no such protection, so 8MD256 could't be used as
RTC clock source in sleep modes.

This commit adds protection of 8MD256 clock to other chips. Fixes the
incorrect protection logic overriding on ESP32. Now the power domain
will be determiend by the logic below (order by priority):

    1. When RTC clock source uses 8MD256, power up
    2. When LEDC uses RTC8M clock source, power up
    3. In deepsleep, power down
    4. Otherwise determined by user config of ESP_PDP_DOMAIN_RTC8M,
       power down by default. (This is preferred to have highest
       priority, but it's kept as is because of current code structure.)

2. Before, after the macro `RTC_SLEEP_CONFIG_DEFAULT` decides dbias, the
protection above may force the int8m PU. This may cause the inconsistent
of dbias and the int8m PU status.

This commit lifts the logic of pd int8m/xtal fpu logic to upper layer
(sleep_modes.c).

Related: https://github.com/espressif/esp-idf/issues/8007, https://github.com/espressif/esp-idf/pull/8089

temp
2022-05-12 15:57:09 +08:00
18fb3d60b8 Apply 1 suggestion(s) to 1 file(s) 2022-05-12 07:49:28 +00:00
06aeeff54e efuse: fix 2022-05-12 07:49:28 +00:00
8c063a326e efuse: Fix 3/4 coding scheme UTs 2022-05-12 07:49:28 +00:00
ce148dd7b8 efuse: Improve messages during burn operation 2022-05-12 07:49:28 +00:00
24af86071d efuse: Burn func can return an error
esp_efuse_utility_burn_chip()
2022-05-12 07:49:28 +00:00
114608142a efuse: Validates data after burning and re-burnes it if necessary
It checks the content of the written data and encoding errors.
2022-05-12 07:49:28 +00:00
009e66e625 Merge branch 'feature/esp_lcd_read_i2c_v4.4' into 'release/v4.4'
Feature/esp lcd read i2c (backport v4.4)

See merge request espressif/esp-idf!18066
2022-05-11 22:33:41 +08:00
9f2d407105 Merge branch 'bugfix/i2c_too_short_panics_v4.4' into 'release/v4.4'
I2C: Read transactions, without a STOP, won't panic anymore (backport v4.4)

See merge request espressif/esp-idf!17954
2022-05-11 14:04:46 +08:00
571afca7dc Merge branch 'bugfix/rmt_undetermined_idle_level' into 'release/v4.4'
rmt: fix undetermined idle level (v4.4)

See merge request espressif/esp-idf!18035
2022-05-11 12:25:21 +08:00
0bd2c55413 mdns: Fix potential read behind parsed packet 2022-05-10 16:45:43 +02:00
d6ad597b0f mdns: Fix memleak when adding delegated host 2022-05-10 16:45:43 +02:00
c8874b0d85 mdns: Fix null-service issue when parsing packets
Closes https://github.com/espressif/esp-idf/issues/8307
2022-05-10 16:45:43 +02:00
c9b0be6ef7 esp_lcd: Add support for rx_param on I2C transport.
(cherry picked from commit 4a2766d906)
2022-05-10 15:03:53 +02:00
c9d5c14451 Fix iOS advertisement response and simplify 2022-05-09 10:09:06 +05:30
ea4b3fdfe5 spi_flash: refact that flash qio can be overidable 2022-05-09 11:08:53 +08:00
f33720a263 rmt_legacy: fix undetermined idle level
Closes https://github.com/espressif/esp-idf/issues/8864
2022-05-08 07:20:30 +00:00
4222e93351 Merge branch 'flash/opi_12345G_support_v4.4' into 'release/v4.4'
opi_flash: Add new 16MB opi flash (MX25UW12345G) support.(backport v4.4)

See merge request espressif/esp-idf!17782
2022-05-08 12:23:18 +08:00
b021055190 Merge branch 'bugfix/i2s_only_right_mode_v4.4' into 'release/v4.4'
i2s: fix only right case and mono stereo switch issue (v4.4)

See merge request espressif/esp-idf!18022
2022-05-07 22:46:45 +08:00
cdaa440d98 i2s: fix only right case v4.4 2022-05-07 13:43:01 +00:00
baa2748f23 Merge branch 'docs/fix_command_in_partition-tables_4.4' into 'release/v4.4'
docs: Fix a command in partition-tables.rst (backport v4.4)

See merge request espressif/esp-idf!18029
2022-05-07 16:57:14 +08:00
91315de70c docs: fix a command in partition-tables 2022-05-07 15:15:22 +08:00
39c63420ba Fix ESP32C3/S3 build error after enable light sleep 2022-05-07 06:19:33 +00:00
123288c1c6 Merge branch 'bugfix/default_ssid_not_set_v4.4' into 'release/v4.4'
esp_wifi: Fix for default ap ssid not set.(v4.4)

See merge request espressif/esp-idf!18005
2022-05-07 12:36:41 +08:00
d72ba54138 Merge branch 'bugfix/fix_websocket_server_v4.4' into 'release/v4.4'
fix(server): Fix websocket server not support handle multiple connections when client send CLOSE frame (backport v4.4)

See merge request espressif/esp-idf!18018
2022-05-07 10:17:59 +08:00
97caa51152 Merge branch 'bugfix/spi_slave_intr_iram_v4.4' into 'release/v4.4'
driver: spi_slave: make sure CS helpers are in IRAM if the ISR is (v4.4)

See merge request espressif/esp-idf!17831
2022-05-06 22:23:13 +08:00
e759fa4697 fix(server): Fix websocket server not support handle multiple connections when client send CLOSE frame 2022-05-06 17:55:14 +08:00
2cd59a1a77 Merge branch 'docs/update_usb_pins_and_add_a_note_to_uart_v4.4' into 'release/v4.4'
doc: update usb pins and provide a note in api-reference/uart (v4.4)

See merge request espressif/esp-idf!17986
2022-05-05 18:31:14 +08:00
88f79ca9ca esp_wifi: Fix for default ap ssid not set.
Closes https://github.com/espressif/esp-idf/issues/8744
2022-05-05 14:04:49 +05:30
e12b3c5644 Merge branch 'fix/idf_tools_fstrings_v4.4' into 'release/v4.4'
Tools: Don't use f-string in idf_tools.py

See merge request espressif/esp-idf!17990
2022-05-04 22:30:49 +08:00
7b33262d26 Tools: Don't use f-string in idf_tools.py
ESP-IDF v4.4 supports Python 3.6 or newer. F-strings are available there
but idf_tools.py can fail if run with older Pythons because the Python
version check is done later.

Closes https://github.com/espressif/esp-idf/issues/8890
2022-05-04 12:01:49 +02:00
a6a245f75f Merge branch 'feature/ftruncate_vfs_fatfs_support_v4.4' into 'release/v4.4'
fatfs: Implement ftruncate function in VFS and FAT VFS (v4.4)

See merge request espressif/esp-idf!17864
2022-05-04 08:14:46 +08:00
70c336963b doc: update usb pins and provide a note in api-reference/uart
Closes https://github.com/espressif/esp-idf/issues/8811

Signed-off-by: Ivan Grokhotkov <ivan@espressif.com>
2022-05-03 23:41:02 +02:00
a615fccd01 Merge branch 'bugfix/spiffs_check_part_alignment_v4.4' into 'release/v4.4'
spiffs: add init checks for partition alignment and data types (v4.4)

See merge request espressif/esp-idf!17835
2022-05-03 17:01:50 +08:00
b6f4629e11 Merge branch 'bugfix/_rtc_slow_length_incorrectly_optimized_backport_v4.4' into 'release/v4.4'
sleep_power_domain: fix _rtc_slow_length being incorrectly optimized by compiler(backport v4.4)

See merge request espressif/esp-idf!17974
2022-05-03 15:04:09 +08:00
653cddf091 Merge branch 'bugfix/fix_rtc_mem_load_err_backport_v4.4' into 'release/v4.4'
rtc_regulator: fix rtc mem load err(backport v4.4)

See merge request espressif/esp-idf!17977
2022-05-03 15:03:41 +08:00
ebb9cc3670 fatfs: Add ftruncate api support for VFS and FAT-VFS
Unit test cases added to verify ftruncate within fatfs tests.

Closes https://github.com/espressif/esp-idf/issues/8279
2022-05-02 04:37:56 +00:00
a2f141807f fix rtc mem load err(since the voltage of rtc regulator is too low) 2022-05-01 23:29:12 +08:00
74399f5b44 fix _rtc_slow_length being incorrectly optimized by compiler 2022-05-01 23:14:18 +08:00
8efd164e7f Merge branch 'bugfix/fix_esp32c3_brownout_bug_after_deepsleep_v4.4' into 'release/v4.4'
rtc: fix c3 brownout bug after deepsleep (backport v4.4)

See merge request espressif/esp-idf!17957
2022-05-01 17:29:33 +08:00
8c8f700c1d Merge branch 'update/mqtt_refs_v4.4' into 'release/v4.4'
mqtt: Fix sending log data; dup flag after queue (v4.4)

See merge request espressif/esp-idf!17402
2022-04-28 22:45:59 +08:00
fe83802d65 fix c3 brownout bug after deepsleep 2022-04-28 18:23:28 +08:00
dcc77b0bed Merge branch 'bugfix/idle_task_skipped_light_sleep_backport_v4.4' into 'release/v4.4'
pm_impl: fix neither enter light sleep nor enter waiti state in idle task(backport v4.4)

See merge request espressif/esp-idf!17837
2022-04-28 16:12:23 +08:00
198dfc92dd mqtt: Fix sending log data; dup flag after queue
* Fix sending mqtt message longer than Tx buffer size
* Fix enqueue API to send data with correct dup flag
* Update submodule: git log --oneline b86d42c130ac64a916ce6cf299d99f9756692394..985078affa8a2d2b56b87c8e6455252850f895c6

Detailed description of the changes:
* Isolate IDF env for v4.4 and v5.0(master)
  - See merge request espressif/esp-mqtt!111
  - ci: Isolate IDF env for v4.4 and v5.0(master) (espressif/esp-mqtt@4c5a65c)
* Client: Remove usage of legacy FreeRTOS types
  - See merge request espressif/esp-mqtt!120
  - ci: Fix build issues with IDF-4.4 against master (espressif/esp-mqtt@c28a56d)
  - See commit https://github.com/espressif/esp-mqtt/commit/6ef98d6
* mqtt_client: Fix mqtt send long data error
  - See merge request espressif/esp-mqtt!117
  - Closes https://github.com/espressif/esp-mqtt/issues/214
  - See commit https://github.com/espressif/esp-mqtt/commit/372b323
* Client: Fix use esp_mqtt_client_enqueue API to send data, data dup flag will be set 1
  - See merge request espressif/esp-mqtt!116
  - See commit https://github.com/espressif/esp-mqtt/commit/df8dc92
2022-04-28 07:55:25 +00:00
6398e19245 Merge branch 'feature/update_openocd_version_v4.4' into 'release/v4.4'
Update OpenOCD version (v4.4)

See merge request espressif/esp-idf!17934
2022-04-28 14:58:59 +08:00
0da60f7b83 I2C: Read transactions, without a STOP, won't panic anymore
* Closes https://github.com/espressif/esp-idf/issues/8548
2022-04-28 14:05:22 +08:00
751c546a68 Heap: fix typos in test and component 2022-04-28 05:59:31 +00:00
bf8fd5f42c Heap: fix free bytes calculation for TLSF heap
* Closes https://github.com/espressif/esp-idf/issues/8270
2022-04-28 05:59:31 +00:00
4178cdaa4f Merge branch 'bugfix/wrong_gpio_is_deep_sleep_wakeup_valid_gpio_v4.4' into 'release/v4.4'
gpio: fix wrong GPIO_IS_DEEP_SLEEP_WAKEUP_VALID_GPIO macro (backport v4.4)

See merge request espressif/esp-idf!17807
2022-04-28 11:19:20 +08:00
4fedbdd264 Merge branch 'bugfix/spp_crash_after_call_spp_deinit_v4.4' into 'release/v4.4'
Component_bt/Fix spp crash after call esp_spp_deinit(v4.4)

See merge request espressif/esp-idf!17930
2022-04-28 01:26:06 +08:00
eff2402b5b Merge branch 'docs/remove_bt_doc_fillers_v4.4' into 'release/v4.4'
docs: remove filler template content from BT docs (v4.4)

See merge request espressif/esp-idf!17947
2022-04-27 20:35:06 +08:00
9ae38aa873 Merge branch 'bugfix/fix_disable_bt_log_ci_fail_v4.4' into 'release/v4.4'
component_bt: Fix CI failure when disable bluetooth debug log(v4.4)

See merge request espressif/esp-idf!17899
2022-04-27 18:20:41 +08:00
ef7ce17dbd Merge branch 'bugfix/fix_build_warring_v4.4' into 'release/v4.4'
esp_phy: fix build warning(v4.4)

See merge request espressif/esp-idf!17840
2022-04-27 18:19:27 +08:00
fc30e896c0 docs: remove filler template content from BT docs 2022-04-27 17:51:27 +08:00
fd45998249 Merge branch 'contrib/github_pr_8779_v4.4' into 'release/v4.4'
esp_wifi: fix clearing default wifi netif procedure(v4.4)

See merge request espressif/esp-idf!17938
2022-04-27 17:17:47 +08:00
e72017bb23 tools: print system platform 2022-04-27 08:58:32 +02:00
6ae22d9f3b tools: add distro links for macos-arm64 2022-04-27 08:56:33 +02:00
46c5be3197 tools: OpenOCD version updated to v0.11.0-esp32-20220411 2022-04-27 08:55:36 +02:00
6232753804 Fix spp initialization failure without free mutex 2022-04-27 14:19:59 +08:00
eb8a4d3423 Fix spp crash after calling esp_spp_deinit 2022-04-27 14:19:50 +08:00
97c9fa7aca ci: support one pipeline must based on commmits 2022-04-27 11:05:08 +08:00
e0d6398a99 esp_wifi: fix clearing default wifi netif procedure
Prior to this change "esp_wifi_clear_default_wifi_driver_and_handlers"
will not remove netif pointer from table when both AP and STA interfaces were
created and destroying default wifi interfaces is done in unfortunate
order. As a result there is dangling pointer left and it may cause crash in
later code (i.e. when esp_wifi_stop() is called).
2022-04-26 22:50:40 -04:00
c41208550a Merge branch 'bugfix/oversized_SegN_as_valid_v4.4' into 'release/v4.4'
ble_mesh: stack: Bugfix for oversized SegN as valid(v4.4)

See merge request espressif/esp-idf!17772
2022-04-26 20:11:35 +08:00
75e50e97f8 Merge branch 'bugfix/scan_mixed_keymgmt_issue_v4.4' into 'release/v4.4'
Combined fix for scan issue and PMF disable API (Backport v4.4)

See merge request espressif/esp-idf!17743
2022-04-26 19:24:12 +08:00
e57697aef2 esp_phy: fix tx power limit for esp32s2/s3/c3 2022-04-26 03:36:47 -04:00
e97720131d esp_phy: fix build warning 2022-04-26 03:36:47 -04:00
36823b45cc Merge branch 'bugfix/rrm_dpp_task_delete_v4.4' into 'release/v4.4'
wpa_supplicant: backport WLAN fixes (release v4.4)

See merge request espressif/esp-idf!17655
2022-04-26 12:38:04 +08:00
1ce01c6f76 Fix CI failure when disable bluetooth debug log 2022-04-26 11:28:01 +08:00
a86cad6afe fix s3 bbpll calibrate fail bug in high temperature 2022-04-25 18:21:10 +08:00
7a34692e6f ble_mesh: stack: Bugfix for oversized SegN as valid 2022-04-25 11:49:50 +08:00
69a3bdacb0 Merge branch 'bugfix/adc2_cal_assert_arbiter_failed_v4.4' into 'release/v4.4'
adc_cal: fixed the assertion failure or returning wrong error code when ADC2 failed the arbitration (v4.4)

See merge request espressif/esp-idf!17586
2022-04-25 10:14:12 +08:00
3419823c46 Merge branch 'bugfix/add_spinlock_for_dma_channel' into 'release/v4.4'
gdma: add spin lock for gdma channel (v4.4)

See merge request espressif/esp-idf!17855
2022-04-24 18:16:58 +08:00
127d187743 Merge branch 'bugfix/i2c_iram_placement_fix_v4.4' into 'release/v4.4'
i2c: Correct hal functions iram placement and remove IRAM_ATTR for i2c_hw_fsm_reset (backport v4.4)

See merge request espressif/esp-idf!17808
2022-04-21 18:28:59 +08:00
5e49369a2c lcd: spi lcd support transmit lsb first
Closes https://github.com/espressif/esp-idf/issues/8790
2022-04-21 10:11:20 +00:00
2f1393ad53 gdma: add spin lock for gdma channel
... because we allow several control functions to be runable under ISR
context
2022-04-21 10:11:20 +00:00
7071506033 Merge branch 'feature/esp32c3_eco4_v4.4' into 'release/v4.4'
esp32c3: Adds ECO4 revision (v4.4)

See merge request espressif/esp-idf!17717
2022-04-21 18:06:41 +08:00
86b39a5042 Merge branch 'bugfix/spi_free_crash_uninitialized_v4.4' into 'release/v4.4'
spi: fixed crash when calling spi_bus_free when not initialized (v4.4)

See merge request espressif/esp-idf!17608
2022-04-21 15:47:13 +08:00
e365f0782e UART: Fix custom ISR registration function
* Closes https://github.com/espressif/esp-idf/issues/8491
2022-04-21 03:05:01 +00:00
7bf3277692 Merge branch 'update/c3_s3_phy_lib_20220419_v4.4' into 'release/v4.4'
Update esp c3/s3 phy lib aa05aec (backport v4.4)

See merge request espressif/esp-idf!17815
2022-04-21 11:01:00 +08:00
be2bd983f4 Merge branch 'feature/vfs_semihosting_c3_v4.4' into 'release/v4.4'
vfs: add support for semihosting on ESP32-C3 (v4.4)

See merge request espressif/esp-idf!17527
2022-04-21 04:43:02 +08:00
de7d69e5cc Merge branch 'bugfix/fatfs_warning_fix_v4.4' into 'release/v4.4'
fatfs: Fix putc_bfd compilation warning (v4.4)

See merge request espressif/esp-idf!17521
2022-04-21 01:56:22 +08:00
fccd450304 fatfs: Fix putc_bfd compilation warning
Fixed FatFs\ff.c: warning: argument of type "TCHAR **" is incompatible with parameter of type "const TCHAR **"

Closes https://github.com/espressif/esp-idf/issues/5870
2022-04-20 16:38:28 +00:00
7494f12319 Merge branch 'bugfix/linenoise_unint_buffer_and_color_v4.4' into 'release/v4.4'
console: linenoise: fix usage of an uninitialized buffer, fix no-color output (v4.4)

See merge request espressif/esp-idf!17829
2022-04-20 20:30:29 +08:00
784b46be11 pm_impl: fix neither enter light sleep nor enter waiti state in idle task 2022-04-20 19:37:46 +08:00
6eeaf50da8 spiffs: add init checks for partition alignment and data types
Closes https://github.com/espressif/esp-idf/issues/8593
2022-04-20 12:53:30 +02:00
43f929de4d driver: spi_slave: make sure CS helpers are in IRAM if the ISR is
Closes https://github.com/espressif/esp-idf/issues/3870
2022-04-20 12:49:49 +02:00
c0b97b6749 console: linenoise: fix usage of an uninitialized buffer
Reported in https://github.com/espressif/esp-idf/issues/6440

The issue could occur if esp_console_config_t::hint_color
was set to -1.
2022-04-20 16:03:09 +05:30
38a16e05d9 console: disable colored hints if CONFIG_LOG_COLORS is not set 2022-04-20 16:03:08 +05:30
2231a3bcbe wpa_supplicant: Remove scan done event in task 2022-04-20 10:08:45 +00:00
fee9509d5d wpa_supplicant: static analysis fixes 2022-04-20 10:08:45 +00:00
f6da49c3c9 wpa_supplicant: Add BTM security checks 2022-04-20 10:08:45 +00:00
bac4173161 esp_example: Enable MbedTLS for DPP enrollee by default 2022-04-20 10:08:45 +00:00
6e826523b1 wpa_supplicant: Correct task deletion for RRM and DPP tasks
Closes https://github.com/espressif/esp-idf/issues/7409
2022-04-20 10:08:45 +00:00
73164b87ae esp32c3: Adds ECO4 revision 2022-04-20 08:40:56 +00:00
4b2098bc58 Merge branch 'docs/update_cn_trans_jtag_debugging_docs_4.4' into 'release/v4.4'
docs: update jtag_debugging docs and get-started-devkitc.rst (backport v4.4)

See merge request espressif/esp-idf!17493
2022-04-20 16:21:04 +08:00
3d6f7f7fe0 Merge branch 'docs/mr16635_backport_v4.4' into 'release/v4.4'
docs: Update CN translation for !16635, !16702, !17043 (v4.4)

See merge request espressif/esp-idf!17465
2022-04-20 16:20:42 +08:00
fefa65239b Merge branch 'docs/mr16425_backport_v4.4' into 'release/v4.4'
docs: Update CN translation for !16425 (v4.4)

See merge request espressif/esp-idf!17459
2022-04-20 16:19:48 +08:00
20e0e9e502 Merge branch 'feature/add_h2_target_to_tools_v4.4' into 'release/v4.4'
tools: add RISC-V toolchain for esp32h2 and target (v4.4)

See merge request espressif/esp-idf!17690
2022-04-20 13:56:24 +08:00
7c740c38cd Merge branch 'feature/flash_size_gt_16mb_pr_v4.4' into 'release/v4.4'
add support for Flash 32MB..128MB (S2, S3) (Github PR + fixups) (v4.4)

See merge request espressif/esp-idf!17423
2022-04-20 13:26:10 +08:00
70adf8f631 Merge branch 'bugfix/fix_spp_initiator_connect_failed_v4.4' into 'release/v4.4'
Component_bt/Fix SPP initiator can not free resource when connection is failed[backport 4.4]

See merge request espressif/esp-idf!17744
2022-04-20 11:01:30 +08:00
5ad3fe66be tools: add RISC-V toolchain for esp32h2 target 2022-04-20 09:52:32 +07:00
01d950feea Merge branch 'bugfix/sdspi_example_esp32s3_v4.4' into 'release/v4.4'
examples: sdspi: re-enable for ESP32-S3, add Kconfig options for pins (v4.4)

See merge request espressif/esp-idf!17420
2022-04-20 06:11:48 +08:00
3604770abb Merge branch 'bugfix/websocket_example_echo_server_v4.4' into 'release/v4.4'
websocket: Updated Kconfig to use 'echo.websocket.events' echo server(v4.4)

See merge request espressif/esp-idf!17604
2022-04-20 05:42:00 +08:00
333fc0c9f8 Merge branch 'bugfix/sdmmc_example_esp32s3_v4.4' into 'release/v4.4'
examples: sdmmc: re-enable for ESP32-S3, add Kconfig options for pins (v4.4)

See merge request espressif/esp-idf!17422
2022-04-20 02:33:42 +08:00
438834b150 Merge branch 'contrib/github_pr_8564_v4.4' into 'release/v4.4'
Fix nested redirect (GitHub PR) (v4.4)

See merge request espressif/esp-idf!17734
2022-04-19 23:36:22 +08:00
213da04fcd Merge branch 'bugfix/esp_lcd_improvements_v4.4' into 'release/v4.4'
bunch of esp lcd improvements (v4.4)

See merge request espressif/esp-idf!17555
2022-04-19 22:39:10 +08:00
6e9414206a partition_table: add a test for total partition size error 2022-04-19 14:00:11 +00:00
04959af635 add support for Flash 32MB..128MB (S2, S3)
ESP32-S2 and ESP32-S3
supports up to 1 GB of external flash and RAM
add support for
-    32MB
-    64MB
-    128MB ( example NOR spiFLASH 1G-BIT W25Q01JVZEIQ Winbond 0xEF 0x40 0x21 )

Merges https://github.com/espressif/esp-idf/pull/7688

Signed-off-by: Ivan Grokhotkov <ivan@espressif.com>
2022-04-19 14:00:11 +00:00
c9db320410 xtensa: fix semihosting arguments potentially begin optimized out
The compiler was not informed that the assembly block should be
treated as a memory barrier and could optimize out the initialization
of local arrays which could be used as semihosting arguments.
This resulted in garbage values being passed as semihosting call
arguments.

Additionally this commit changes the approach for placing values into
specific register. Instead of clobbers, local register variables are
used. This results in simpler generated code, since the compiler is
able to place values directly into the registers used for semihosting
arguments, avoiding additional moves.
2022-04-19 13:55:36 +00:00
ad532236ae vfs: add support for semihosting on ESP32-C3 2022-04-19 13:55:36 +00:00
050d6977f0 Merge branch 'bugfix/idfpy_erase_otadata_v4.4' into 'release/v4.4'
tools: set baudrate and port with otatool. (v4.4)

See merge request espressif/esp-idf!17466
2022-04-19 21:49:11 +08:00
cc3e13305d Merge branch 'bugfix/fix-monitor-attribute-error-coredump_v4.4' into 'release/v4.4'
Fix missing coredump in idf_monitor.py (v4.4)

See merge request espressif/esp-idf!17678
2022-04-19 21:48:54 +08:00
0a79719b27 Merge branch 'bugfix/python_env_not_installed_by_install.ps1_v4.4' into 'release/v4.4'
tools: fix python-env install by install.ps1 (v4.4)

See merge request espressif/esp-idf!17751
2022-04-19 21:48:36 +08:00
c00c343161 Merge branch 'bugfix/flash_from_monitor_on_windows_v4.4' into 'release/v4.4'
Tools: IDF Monitor should flash with the unmodified port (v4.4)

See merge request espressif/esp-idf!17257
2022-04-19 21:46:10 +08:00
76037c66d8 Merge branch 'bugfix/s3_otg_compressed_flash_with_stub_v4.4' into 'release/v4.4'
esptool_py: Support ESP32-S3 USB OTG compressed flashing with stub (v4.4)

See merge request espressif/esp-idf!17780
2022-04-19 21:45:21 +08:00
3e262942fb esp_lcd: remove lvgl v7 port in test cases
LVGL porting examples are temporarily left in test folder.
Now we can remove it, as we have lvgl examples in esp-idf.
And lvgl v7 is legacy, we recommend to use lvgl v8
2022-04-19 13:01:13 +00:00
d23c3fb314 gdma: correct the iram placement logic 2022-04-19 13:01:13 +00:00
5f28db177d i80_lcd: support PSRAM buffer for esp32s3 2022-04-19 13:01:13 +00:00
3e7448d0f3 i80_lcd: support I2S1 LCD mode for esp32 2022-04-19 13:01:13 +00:00
862ccae396 spi_lcd: support large color transfer 2022-04-19 13:01:13 +00:00
ab3d75ab75 rgb_lcd: workaround auto-next frame bug
Closes https://github.com/espressif/esp-idf/issues/8620
2022-04-19 13:01:13 +00:00
c7ee618b25 Update esp c3/s3 phy lib (aa05aec) 2022-04-19 20:17:21 +08:00
d54df43d4c Merge branch 'bugfix/bt_add_some_debug_log_v4.4' into 'release/v4.4'
component_bt: Add some bluetooth debug log(v4.4)

See merge request espressif/esp-idf!17614
2022-04-19 20:12:00 +08:00
37da6d5ede Merge branch 'bugfix/hfp_disc_audio_err_v4.4' into 'release/v4.4'
bugfix/fix_err_when_ag_disc_audio_v4.4

See merge request espressif/esp-idf!17473
2022-04-19 20:07:41 +08:00
98c41377cc Merge branch 'bugfix/crash_when_reconnect_to_sink_v4.4' into 'release/v4.4'
bugfix/fix the failure of reconnect to sink (v4.4)

See merge request espressif/esp-idf!17476
2022-04-19 20:06:38 +08:00
4a88aed12b add missing unlock in btc_spp_cb_handler of BTA_JV_RFCOMM_WRITE_EVT 2022-04-19 20:06:32 +08:00
3897d12024 fix SPP initiator can not free resource when connection is failed 2022-04-19 20:06:32 +08:00
3fe117f84d examples: sdmmc: re-enable for ESP32-S3, add Kconfig options for pins 2022-04-19 13:48:54 +02:00
be56c85b18 examples: file_serving: add support for ESP32-S3, refactoring
* Move filesystem mounting code into a separate file to simplify the
  main source file.
* Clean up SDMMC and SDSPI related code. Move pin configuration into
  Kconfig.
* Use same base_path ('/data') for either SPIFFS or SD. Remove the
  check in file_server.c about the base path.
* Update README according to the changes above.
2022-04-19 13:46:37 +02:00
b76971d353 examples: sdspi: use default DMA channel 2022-04-19 13:46:37 +02:00
2d54f4584e driver: sdspi: set default DMA channel compatible with S3, C3 or later 2022-04-19 13:46:37 +02:00
9b1e76360b examples: sdspi: re-enable for ESP32-S3, add Kconfig options for pins 2022-04-19 13:46:36 +02:00
792eb70334 Merge branch 'https_server/min_cert_auth_mode_v4.4' into 'release/v4.4'
https_server: Add config option to set minimum certificate auth mode (v4.4)

See merge request espressif/esp-idf!17796
2022-04-19 16:26:22 +08:00
0c6ad1b7ba Merge branch 'bugfix/smtp_client_v4.4' into 'release/v4.4'
smtp_client: Fix heap leakage (v4.4)

See merge request espressif/esp-idf!17794
2022-04-19 16:24:35 +08:00
2afe86be7f Merge branch 'bugfix/http_code_v4.4' into 'release/v4.4'
esp_http_client, esp_https_ota: Handle HTTP 303 status code (v4.4)

See merge request espressif/esp-idf!17732
2022-04-19 16:24:20 +08:00
1861ca5700 Merge branch 'bugfix/wifi_prov_mgr_conn_issue_v4.4' into 'release/v4.4'
Wifi_prov_mgr: Fix for device disconnection after pairing (v4.4)

See merge request espressif/esp-idf!17618
2022-04-19 15:47:12 +08:00
677a01851f Merge branch 'bugfix/security_update_pppos_crash_v4.4' into 'release/v4.4'
lw-ip: Apply security fixes from upstream; Fix PPPoS and NAPT ip-forward (v4.4)

See merge request espressif/esp-idf!17419
2022-04-19 15:45:31 +08:00
5b54b1d2c0 websocket: Updated Kconfig to use 'echo.websocket.events' echo server
Updated README to show how to run websocket echo server using Flask

Merges https://github.com/espressif/esp-idf/pull/8262
2022-04-19 07:36:53 +00:00
7509ca57b5 advanced_https_ota/example_test.py: Update redirect URL test to include two redirects 2022-04-19 07:34:33 +00:00
3529b9450e esp_http_client: Add comment for clearing location field in esp_http_client_prepare 2022-04-19 07:34:33 +00:00
9a7d85c09b esp_http_client: fix redirect by resetting location before parsing
Closes #8563.

Signed-off-by: Nicklas Frahm <nicklas.frahm@gmail.com>
2022-04-19 07:34:33 +00:00
b8050b365e Merge branch 'update/version_4_4_1' into 'release/v4.4'
Update version to 4.4.1

See merge request espressif/esp-idf!17791
2022-04-19 15:29:27 +08:00
00229547b2 i2c: Correct hal functions iram placement and remove IRAM_ATTR for i2c_hw_fsm_reset
Closes https://github.com/espressif/esp-idf/issues/8422

(cherry picked from commit 1ceb7c8cd6)
2022-04-18 22:24:47 +08:00
25668f96e4 gpio: fix wrong GPIO_IS_DEEP_SLEEP_WAKEUP_VALID_GPIO macro
Closes https://github.com/espressif/esp-idf/issues/8733

(cherry picked from commit 0d52cb04dc)
2022-04-18 22:18:17 +08:00
c1bb9032c2 https_server: Add config option to min. cert. auth mode
- Added a config option to set the minimum Certificate Verification
  mode to Optional
- When this option is enabled, the peer (the client) certificate
  is checked by the server, however the handshake continues even if
  verification failed.
- By default, the peer certificate is not checked and ignored by the server.

Closes https://github.com/espressif/esp-idf/issues/8664
2022-04-18 11:10:14 +05:30
b8263bb5ba smtp_client: Fixed garbage characters being printed
- The R/W buffers were not cleared before reading/writing
  anything new
2022-04-18 10:33:02 +05:30
fd80ad82c2 smtp_client: Fix heap leakage
- Freed all allocated resources by Mbed TLS at the end of routine
2022-04-18 10:33:02 +05:30
3e494ec5fd Add some bluetooth debug log 2022-04-16 07:14:51 +00:00
1329b19fe4 versions: Update version to 4.4.1 2022-04-16 09:43:14 +08:00
9b75e5664e Merge branch 'bugfix/iperf_performance_v4.4' into 'release/v4.4'
Bugfix/iperf performance (v4.4)

See merge request espressif/esp-idf!17600
2022-04-15 15:52:13 +08:00
82f5cc3402 Merge branch 'bugfix/gdbgui_deps_4.4' into 'release/v4.4'
Tools: Fix incompatible package dependencies of gdbgui

See merge request espressif/esp-idf!17742
2022-04-15 15:07:05 +08:00
4a7f5f41ea spi_flash: esptool temporarily supports H2 clock configurations 2022-04-14 13:22:50 +02:00
71c2f2618f opi_flash: Add new 16MB opi flash (MXIC25UW12345G) support,
Closes https://github.com/espressif/esp-idf/issues/7996
2022-04-14 19:06:18 +08:00
ff84535758 esptool_py: Update to support ESP32-S3 USB OTG compressed flashing with stub 2022-04-14 12:28:28 +02:00
fdb756b8f9 Merge branch 'bugfix/fix_phy_i2c_crash_v4.4' into 'release/v4.4'
esp_phy: Add IRAM_ATTR for phy i2c spinlock (backport v4.4)

See merge request espressif/esp-idf!17757
2022-04-14 18:26:35 +08:00
c4c8aab39d esp_wifi: Update wifi lib
1. In scan, correctly identify AP's with mixed key mgmt
2. Add API to disable PMF configuration
2022-04-13 10:22:00 +05:30
ea1a9f9e3a esp_phy: Add IRAM_ATTR for phy i2c spinlock 2022-04-13 12:15:38 +08:00
0b7068f287 tools: fix python-env install by install.ps1
Closes https://github.com/espressif/esp-idf/issues/8647
2022-04-12 15:06:25 +02:00
734c6f8998 Tools: Fix incompatible package dependencies of gdbgui
Closes https://github.com/espressif/esp-idf/issues/8760
2022-04-12 08:59:30 +02:00
d58b394dc5 Merge branch 'bugfix/fix_i2c_critical_and_iram_funcations_v4.4' into 'release/v4.4'
Update esp c3/s3 phy lib (dcbe608)

See merge request espressif/esp-idf!17714
2022-04-11 15:02:15 +08:00
d485a8cd35 esp_https_ota: Add check for 303 and 308 status code
Closes https://github.com/espressif/esp-idf/issues/8581
2022-04-11 09:42:51 +05:30
98c2132498 esp_http_client: Add new status code 303 and 308 2022-04-11 09:42:47 +05:30
b37df7e3df Update esp c3/s3 phy lib (dcbe608) 2022-04-08 16:42:50 +08:00
b436132f9f Merge branch 'bugfix/phy_regi2c_critical_section_v4.4' into 'release/v4.4'
esp_phy: use spinlock to avoid regi2c access conflicts (v4.4)

See merge request espressif/esp-idf!17691
2022-04-07 19:23:51 +08:00
2dff50c3e2 Eth iperf default sdkconfig: Enable lwIP IRAM optimization 2022-04-06 10:44:31 +00:00
4d581456e4 Added bandwidth limitaion option to iperf test scripts 2022-04-06 10:44:31 +00:00
3f7cf8a540 iperf: added Tx bandwidth limit option 2022-04-06 10:44:31 +00:00
ba62cbc04f Fixed Ethernet lwIP netif error indication 2022-04-06 10:44:31 +00:00
d378ca2b78 esp_phy: use spinlock to avoid regi2c access conflicts 2022-04-06 12:18:23 +08:00
8522bb1178 regi2c: use safe version of spinlock, instead of ISR ver 2022-04-06 09:34:43 +08:00
154778c2a3 example/modbus_master: fix the assert for uart_set_pin
Signed-off-by: aleks <aleks@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/8607
2022-04-05 09:14:08 +00:00
1459ac0915 Fix coredump attribute error in idf_monitor.py
Closes https://github.com/espressif/esp-idf/issues/8651
2022-04-04 14:20:44 +02:00
b33e7f27ea vfs: bugfix vfs_fat_write/pwrite upon disk-full
Closes https://github.com/espressif/esp-idf/issues/5027
2022-03-30 09:55:57 +02:00
f5ee7093b8 Merge branch 'test/disable_touch_sleep_testcase_v4.4' into 'release/v4.4'
touch: add protection for touch sleep case (v4.4)

See merge request espressif/esp-idf!17611
2022-03-30 15:24:15 +08:00
4e827ca09b adc_cal: fixed the assertion failure or returning wrong error code when ADC2 failed the arbitration
Issue exist since first IDF version supporting ESP32-S2.
2022-03-28 10:23:48 +00:00
916533ef92 Merge branch 'bugfix/wifi_prov_mgr_conn_issue' into 'release/v4.4'
NimBLE: Fixed device disconnection issue of wifi prov mgr

Closes IDF-4655

See merge request espressif/esp-idf!17618
2022-03-28 11:49:09 +05:30
472cbbe73b Merge branch 'bugfix/disable_touch_sleep_s3_v4.4' into 'release/v4.4'
touch_sensor: forbid from using touch sensor with sleep on ESP32-S3 (v4.4)

See merge request espressif/esp-idf!17579
2022-03-28 11:27:51 +08:00
b6c2c80e44 touch: add protection for touch sleep case 2022-03-27 02:44:47 +08:00
36d989b16c spi: fixed crash when calling spi_bus_free when not initialized
introduced in 49a48644e4

Closes: https://github.com/espressif/esp-idf/issues/8642
2022-03-27 02:33:18 +08:00
3503ee41ca sleep: fixed the issue error log not printed 2022-03-25 14:50:26 +08:00
ea27a8543a touch_sensor: forbid from using touch sensor with sleep on ESP32-S3
This is not supported yet.
2022-03-25 14:50:26 +08:00
161eaeed25 usb_host: Don't build CDC host driver for unsupported targets 2022-03-18 14:49:58 +01:00
cc054605a0 docs: backport jtag_debugging docs 2022-03-15 18:59:21 +08:00
e9e77e3598 docs: backport cn translation for mr16635 2022-03-14 11:36:43 +08:00
c265a31c97 fix the failure of reconnect to sink 2022-03-14 11:24:17 +08:00
500e4bd06d correct the rate of data-producing
Closes https://github.com/espressif/esp-idf/issues/7911
2022-03-14 10:42:36 +08:00
fdee1faf1e tools: set baudrate and port with otatool.
Bugfix: Allow setting options port -p and baudrate -b, with idf.py otatool commands.

Closes https://github.com/espressif/esp-idf/issues/8317
2022-03-11 15:30:56 +01:00
c29343eb94 Merge branch 'feature/update_esptool_v4.4' into 'release/v4.4'
esptool: Update esptool submodule (v4.4)

See merge request espressif/esp-idf!17454
2022-03-11 16:00:22 +08:00
5da4a79b04 docs: backport cn translation for mr16425 2022-03-11 15:25:52 +08:00
353abc5702 esptool: Update esptool submodule 2022-03-11 06:39:30 +00:00
19faa6ef43 touch: fix the touch sensor wait cycle on s3 2022-03-11 06:24:07 +00:00
47414efe0b lwip: Security fixes; PPPoS null-deref; NAPT ip-forward
* Cherry-pick important fixes to 2.1.2-esp
  - CVE-2020-22283: Attacker could craft a packet that would disclose 8 bytes of some heap memory:
    - icmp6: Don't copy too much data
    - icmp6: Fix copying of chained pbuf in reply
    - icmp6: keep to the RFC and send as much as possible with icmp6 error messages
  - CVE-2020-22284: ZEP - ZigBee Encapsulation Protocol/6LoWPAN is not supported in IDF,
    the netif module (zepif.c) is not included in the build, but users can still inject
    the file into compilation process, implement IO interface and use this.
    - zepif: Copy possibly chained output pbuf properly
    - Add #define for minimum IPv6 MTU length
    - pbuf: Add pbuf_copy_partial_pbuf library function
* PPPoS: Fix null-deref when processing double break packet
  - pppos: fix in_tail null (espressif/esp-lwip@537c69d5)
  - PPP: Add test exhibiting empty packet null-deref (espressif/esp-lwip@202a07da)
* NAPT: Fix PBUF_REF type to clone the pbuf before forwarding
  - IP-FORWARD: If packet-type is PBUF_REF clone it before forwarding
  - Add NAPT unit test to exercise NAT feature for both RAM and REF pbuf types
* version: Update version numbers to match 2.1.2-esp

* Update submodule: 2749568fe1...76303df238
  - test/napt: Add unit test for IP forward with PBUF_REF (espressif/esp-lwip@76303df2)
  - napt: Fix PBUF_REF type to clone the pbuf before forwarding (espressif/esp-lwip@39068263)
  - version: Update version numbers to match 2.1.2-esp (espressif/esp-lwip@2b922919)
  - pppos: fix in_tail null (espressif/esp-lwip@537c69d5)
  - PPP: Add test exhibiting empty packet null-deref (espressif/esp-lwip@202a07da)
  - pbuf: Add pbuf_copy_partial_pbuf library function (espressif/esp-lwip@1c9cd9c1)
  - Add #define for minimum IPv6 MTU length (espressif/esp-lwip@d2dc577b)
  - zepif: Copy possibly chained output pbuf properly (espressif/esp-lwip@64ab7f2a)
  - icmp6: Don't copy too much data (espressif/esp-lwip@4a64731b)
  - icmp6: Fix copying of chained pbuf in reply (espressif/esp-lwip@7c822ff4)
  - icmp6: keep to the RFC and send as much as possible with icmp6 error messages (espressif/esp-lwip@29100ab6)
  - dns: Add API to clear dns cache (espressif/esp-lwip@ee59f77d)
  - CI: Fixed adding gitlab key (espressif/esp-lwip@5a2bdba7)
  - test case: modify test case test_tcp_new_max_num_remove_FIN_WAIT_1 (espressif/esp-lwip@6b090f7d)

Closes https://github.com/espressif/esp-idf/issues/8300
Closes https://github.com/espressif/esp-idf/issues/8451
2022-03-11 06:05:39 +00:00
45dcc4384c Merge branch 'feature/emac_start_stop_test_v4.4' into 'release/v4.4'
test_emac: extended Ethernet start/stop stress test (v4.4)

See merge request espressif/esp-idf!17306
2022-03-11 10:38:40 +08:00
11ae0ed007 increased parallel count of UT_T1_1 test 2022-03-10 15:59:07 +01:00
7a2068c864 Merge branch 'feature/update_hfp_hf_version_v4.4' into 'release/v4.4'
Update HFP_HF version to 1.7.2(v4.4)

See merge request espressif/esp-idf!17382
2022-03-10 20:20:16 +08:00
7768c389ad Created EMAC start/stop stress test under heavy traffic 2022-03-10 10:15:34 +01:00
d53094bdc0 esp_eth: EMAC start/stop optimization 2022-03-10 10:15:34 +01:00
c469316970 Merge branch 'docs/add_note_for_malloc_cap_dma_backport_v4.4' into 'release/v4.4'
docs: add note for MALLOC_CAP_DMA for ESP32-S2 according to customer feedback (backport v4.4)

See merge request espressif/esp-idf!17343
2022-03-10 17:10:10 +08:00
0fca632ffd Merge branch 'bugfix/modbus_fix_start_after_destroy_issues_v44' into 'release/v4.4'
modbus: fix tcp slave destroy issues (backport v4.4)

See merge request espressif/esp-idf!17406
2022-03-09 09:48:36 +08:00
c9ce438466 Merge branch 'bugfix/inline_intrmask_from_isr_v4.4' into 'release/v4.4'
freertos: always inline xPortSetInterruptMaskFromISR and vPortClearInterruptMaskFromISR (v4.4)

See merge request espressif/esp-idf!17325
2022-03-09 09:38:36 +08:00
121ddb87e5 Merge branch 'bugfix/fix_adc_digital_not_reset_issue_v4.4' into 'release/v4.4'
adc: fix adc digital part not reset issue (v4.4)

See merge request espressif/esp-idf!17375
2022-03-08 23:16:33 +08:00
d7fafdc916 freemodbus: fix port enable disable sequence for tcp master and slave 2022-03-08 10:07:19 +01:00
ba9c0c29a9 modbus: fix tcp slave destroy issues
Closes https://github.com/espressif/esp-idf/issues/8211
2022-03-08 09:52:54 +01:00
c45dee0a7a Merge branch 'bugfix/idf_size_assertions_v4.4' into 'release/v4.4'
tools: Fix assertion messages and fix some of them in idf_size.py (v4.4)

See merge request espressif/esp-idf!17348
2022-03-08 02:58:04 +08:00
1b06c55ab1 Merge branch 'bugfix/fix_adc_calibration_light_sleep_issue_v4.4' into 'release/v4.4'
adc: fix calibration error when waking up from light sleep (v4.4)

See merge request espressif/esp-idf!16930
2022-03-07 19:01:31 +08:00
898a7d071b Update HFP_HF version to 1.7.2 2022-03-07 18:16:05 +08:00
dc7cb6de4b Merge branch 'bugfix/ignore_pmf_capable_flag_v4.4' into 'release/v4.4'
Always connect Station in PMF mode if possible (Backport v4.4)

See merge request espressif/esp-idf!17036
2022-03-07 16:24:44 +08:00
e1515beb26 adc: fix adc digital not reset issue 2022-03-07 11:40:18 +08:00
d53ea1166d rng: fix rng adc digital inpu not disabled issue 2022-03-07 11:39:27 +08:00
32afe6a498 sleep: restore analog calibration registers after waking up from light sleep
Closes https://github.com/espressif/esp-idf/issues/8287
Closes https://github.com/espressif/esp-idf/issues/7921
2022-03-07 11:28:48 +08:00
92a67e0fff Merge branch 'bugfix/add-resolution-suggestion-for-coredump_v4.4' into 'release/v4.4'
idf_monitor.py: Remove line finalization when coredump is in progress to avoid coredump failure (v4.4)

See merge request espressif/esp-idf!17364
2022-03-07 11:04:50 +08:00
a97dd5e0e9 Merge branch 'bugfix/ble_mesh_console_correct_repl_config_prompt_forv4.4' into 'release/v4.4'
ble mesh:example:correct repl config prompt in ble mesh console(v4.4)

See merge request espressif/esp-idf!17183
2022-03-07 11:03:54 +08:00
b2e67d6ff1 ble mesh:example:correct repl config prompt in ble mesh console(v4.4) 2022-03-07 11:03:54 +08:00
3d2700146e Merge branch 'bugfix/uart_no_int_after_flush_v4.4' into 'release/v4.4'
UART: RX interrupts are now properly restored after a flush (backport v4.4)

See merge request espressif/esp-idf!17122
2022-03-07 11:03:33 +08:00
d326c5283d Merge branch 'bugfix/ledc_consecutive_fade_v4.4' into 'release/v4.4'
ledc: Bugfixes for issues related to fade protection (backport v4.4)

See merge request espressif/esp-idf!16953
2022-03-07 11:00:46 +08:00
964db79c0e Merge branch 'docs/add_a_note_to_mck_io_num_v4.4' into 'release/v4.4'
docs: add a note to mck_io_num: for esp32, only gpio0/gpio1/gpio3 can be set (v4.4)

See merge request espressif/esp-idf!16694
2022-03-07 11:00:25 +08:00
3c9657fa4e Merge branch 'feature/add_proxy_conn_and_disconn_event_v4.4' into 'release/v4.4'
ble_mesh: stack: Add proxy server connect and disconnect event (v4.4)

See merge request espressif/esp-idf!16993
2022-03-06 14:10:20 +08:00
90083fcbb7 ble_mesh: stack: Bugfix the proxy client abnormal disconnection 2022-03-04 12:33:15 +00:00
1016801eaf ble_mesh: stack: Add proxy server connect and disconnect event 2022-03-04 12:33:15 +00:00
eed93ac5bb Remove line finalization when coredump is active to avoid coredump failure
Closes https://github.com/espressif/esp-idf/issues/8099
2022-03-04 11:40:32 +01:00
21cdaeade9 docs: add a note to mck_io_num: for esp32, only gpio0/gpio1/gpio3 can be set 2022-03-04 07:00:18 +00:00
380ee4b87a Merge branch 'bugfix/update_stack_init_check_v4.4' into 'release/v4.4'
Nimble: Remove stack initialization status from unwanted functions (v4.4)

See merge request espressif/esp-idf!17234
2022-03-04 14:11:23 +08:00
975b525e03 Merge branch 'bugfix/add_pll_track_feature_mr_4.4' into 'release/v4.4'
Add pll track feature

See merge request espressif/esp-idf!17285
2022-03-04 13:54:19 +08:00
f17a435ea7 Merge branch 'refactor/i2s_deprecate_confusing_names_v4.4' into 'release/v4.4'
i2s: Add detailed comments for confusing names (v4.4)

See merge request espressif/esp-idf!16748
2022-03-04 13:18:32 +08:00
103cab3664 Merge branch 'bugfix/tcp_iperf_example_issue_for_4.4' into 'release/v4.4'
wifi:bugfix for iperf issue(backport v4.4)

See merge request espressif/esp-idf!17334
2022-03-04 11:15:11 +08:00
75cfdc63c8 Merge branch 'ci/test_utils_ipc_stack_v4.4' into 'release/v4.4'
CI: increase IPC stack size for test_utils configs (v4.4)

See merge request espressif/esp-idf!17353
2022-03-04 10:44:19 +08:00
03cf81087b CI: increase IPC stack size for test_utils configs 2022-03-04 09:19:09 +08:00
89f57f3402 Merge branch 'bugfix/rom_time_t_size_deps_v4.4' into 'release/v4.4'
esp_rom: remove functions which depend on sizeof(struct stat) and all their callers (v4.4)

See merge request espressif/esp-idf!17040
2022-03-04 04:38:42 +08:00
169008616b Merge branch 'bugfix/a2dp_sniff_v4.4' into 'release/v4.4'
Fix crash when host exit sniff mode(v4.4)

See merge request espressif/esp-idf!17313
2022-03-03 23:37:37 +08:00
aa260a9376 Merge branch 'bugfix/i2s_mono_issue_on_c3_s3_v4.4' into 'release/v4.4'
🔧 i2s: fix bug of switching mono/stereo mode by 'i2s_set_clk' on c3/s3 (v4.4)

See merge request espressif/esp-idf!17331
2022-03-03 21:54:20 +08:00
524da1e4af Tools/idf_size.py: Support .noinit sections
Closes https://github.com/espressif/esp-idf/issues/8428
2022-03-03 13:55:46 +01:00
68a8a7de0d tools/idf_size.py: Identify objects without extension in MAP files 2022-03-03 13:55:46 +01:00
0f11ac2bd3 Merge branch 'bugfix/i2s_dac_incorrect_clock_v4.4' into 'release/v4.4'
i2s: fix adc/dac clock calculation (v4.4)

See merge request espressif/esp-idf!17336
2022-03-03 20:37:43 +08:00
a472035d97 Merge branch 'feature/websocket_server_support_close_handle_v4.4' into 'release/v4.4'
esp_http_server: Websocket CLOSE frame can support callback function (backport v4.4)

See merge request espressif/esp-idf!17339
2022-03-03 18:40:34 +08:00
e6bbfb085f Merge branch 'bugfix/http_client_body_v4.4' into 'release/v4.4'
esp_http_client: Fix data corruption in http_on_body callback (v4.4)

See merge request espressif/esp-idf!17314
2022-03-03 18:29:26 +08:00
d7f8526207 docs: add note for MALLOC_CAP_DMA for ESP32-S2 according to customer feedback 2022-03-03 16:54:18 +08:00
e00580109b examples/common_components: iperf: fix closing of client socket in TCP server mode
Details of the problem : After iperf ended, the socket was not closed, resulting in the WIFI buffer not being released.
2022-03-03 15:47:58 +08:00
3b91281c91 esp_http_server: Websocket CLOSE frame can support callback function
Closes https://github.com/espressif/esp-idf/issues/7493
2022-03-03 15:46:09 +08:00
299d496c30 i2s: add detailed comments to some fileds (v4.4) 2022-03-03 05:55:35 +00:00
15e8601cfc i2s: add mclk_div underflow check
Closes https://github.com/espressif/esp-idf/issues/8344
2022-03-03 12:23:47 +08:00
19f4eca4b9 Fix for mclk/bclk divisors #8326
Merges https://github.com/espressif/esp-idf/pull/8327
2022-03-03 12:23:47 +08:00
7600869c35 esp_http_client: Cache received data in http_on_body callback.
This change fixes issue with data loss when multiple body chunks are
received after calling esp_http_client_fetch_headers.
2022-03-03 03:54:37 +00:00
86d78c1592 i2s: fix bug of switching mono/stereo mode by 'i2s_set_clk' on c3/s3 2022-03-03 03:23:41 +00:00
eff03cbbd9 Merge branch 'feat/support_mxic_unlock_v4.4' into 'release/v4.4'
spi_flash: support unlock MXIC flash chips (v4.4)

See merge request espressif/esp-idf!17251
2022-03-03 11:13:09 +08:00
d8c7c41a43 Fix crash when host exit sniff mode 2022-03-03 02:59:31 +00:00
2792b95c83 docs: fix missing static file path
Also update layout of version table
2022-03-03 10:48:20 +08:00
1690785432 spi flash: fix cache accessed while disabled issues at -O0
mask_get_id and gpio_hal_iomux_func_sel were called while cache
is disabled, but were not inlined as expected at -0O.
Force these functions to always be inlined.
2022-03-03 09:45:22 +08:00
3a7ec8acfa freertos: always inline xPortSetInterruptMaskFromISR and vPortClearInterruptMaskFromISR
These were called from IRAM context where the caller expect them to be inlined
and accessible when cache is disabled. This was not the case when compiled with -O0.

Closes https://github.com/espressif/esp-idf/issues/8301
2022-03-03 09:44:31 +08:00
6ee5e622e8 Merge branch 'bugfix/http_client_ci_v4.4' into 'release/v4.4'
esp_http_client example: Use dl.espressif.com URL for performing request with Range header (v4.4)

See merge request espressif/esp-idf!17316
2022-03-03 00:55:23 +08:00
f0e894e540 Merge branch 'bugfix/remove_c_series_chips_unsupported_efuse_field_backport_v4.4' into 'release/v4.4'
efuse: free esp32c3/esp32h2 unused efuse field (backport v4.4)

See merge request espressif/esp-idf!17292
2022-03-02 18:36:13 +08:00
05bf1cd0f5 Merge branch 'fix/prod_mode_in_configure_ds_script_v4.4' into 'release/v4.4'
configure_ds.py: Fix the error for prod mode. They script now only verifies... (v4.4)

See merge request espressif/esp-idf!17209
2022-03-02 17:19:23 +08:00
27e49aee72 Merge branch 'bugfix/check_chip_id_at_start_ota_v4.4' into 'release/v4.4'
esp_https_ota: fix for checking chip id at start of OTA (v4.4)

See merge request espressif/esp-idf!17220
2022-03-02 17:19:14 +08:00
5f56bbd2d0 Merge branch 'bugfix/rtcio_increase_size_v4.4' into 'release/v4.4'
sleep: fixed ext1 cannot wakeup via RTCIO >= 18 issue (v4.4)

See merge request espressif/esp-idf!17201
2022-03-02 16:53:05 +08:00
ae2a6e40ab Merge branch 'bugfix/spiffs_example_test_v4.4' into 'release/v4.4'
examples/spiffs: increase test timeout (v4.4)

See merge request espressif/esp-idf!17265
2022-03-02 16:51:59 +08:00
64f41ed6c4 Merge branch 'bugfix/bootloader_uart_custom_gpio_v4.4' into 'release/v4.4'
bootloader: fixed the issue custom_uart_gpio doesn't take effect (v4.4)

See merge request espressif/esp-idf!17307
2022-03-02 16:50:49 +08:00
2e8df440c1 Merge branch 'feature/usb_host_cleanup_v4.4' into 'release/v4.4'
USB: Host stack cleanup and QOL update + wTotalLength Fix + omit MSC reset (v4.4.1)

See merge request espressif/esp-idf!16678
2022-03-02 16:49:38 +08:00
0ccee00059 Merge branch 'bugfix/coredump_data_section_v4.4' into 'release/v4.4'
espcoredump: fix a bug where tracked DRAM data where not dumped (v4.4)

See merge request espressif/esp-idf!17120
2022-03-02 16:48:00 +08:00
66e6cac168 Merge branch 'bugfix/tools_fix_gdb_2021r2_patch3_v4.4' into 'release/v4.4'
tools: update esp-2021r2-patch3 toolchain for fixing GDB (v4.4)

See merge request espressif/esp-idf!17245
2022-03-02 16:47:04 +08:00
143c62d95d Merge branch 'bugfix/uart_custom_isr_test_disable_brk' into 'release/v4.4'
UART: Fix custom ISR unit test (v4.4)

See merge request espressif/esp-idf!17232
2022-03-02 16:45:07 +08:00
81f8dce34c examples/esp_http_client: Use dl.espressif.com URL for performing request with Range header
esp_http_client_test.py: Add check for range request log
2022-03-02 13:20:28 +05:30
2ef6b8845b uart: fixed reset logic on ESP32-S3 2022-03-02 02:42:46 +08:00
bdd7610e66 uart: fixed incorrect channel number on ESP32S2, S3 and C3 2022-03-02 02:42:06 +08:00
8543d1b88a bootloader: fixed the issue custom_uart_gpio doesn't take effect 2022-03-02 02:40:45 +08:00
2bdea81b2a Update ESP32-C3 and ESP32-S3 bt lib and phy lib
Add the pll track feature to keep the ble connection stable when the environment
temprature increase form 0 to 74.
2022-03-01 14:56:47 +08:00
659306b243 esp_wifi: Always connect Station in PMF mode if possible
While using esp_wifi_set_config, flag pmf_capable defaults to 0.
Users may not bother to enable it, which prevents connection to a
WPA3 AP. Or the AP may reset into WPA3 mode failing the re-connection.
To ensure better security, deprecate the pmf_capable flag and set it to
true internally.
2022-02-28 17:55:42 +05:30
e6e76195e8 remove in esptool 2022-02-28 17:40:02 +08:00
6c2f5a16bb remove esp32h2 unsupported efuse field 2022-02-28 17:33:12 +08:00
c6aa1cf732 remove esp32c3 unsupported efuse field 2022-02-28 17:26:28 +08:00
377267775c examples/spiffs: increase test timeout
This is to address frequent CI test failure where test most likely
timeouts during SPIFFS formatting operation.
2022-02-24 09:19:53 +05:30
b600c5f30a Tools: IDF Monitor should flash with the unmodified port
Closes https://github.com/espressif/esp-idf/issues/8432
2022-02-23 13:35:42 +01:00
e835599979 bootloader: support unlock MXIC flash chips 2022-02-23 16:23:34 +08:00
48f8a7a26e test_apps/panic: GDB in esp-2021r2-patch3 toolchain doesn't contain the fix for interrupted backtraced
Revert "test_apps/panic: remove workaround for incorrect GDB backtrace"

This reverts commit 4548b6da63.
2022-02-23 10:52:05 +07:00
1982883618 tools: update esp-2021r2-patch3 toolchain for fixing GDB
Closes https://github.com/espressif/esp-idf/issues/8065
    Closes https://github.com/espressif/esp-idf/issues/8342
    Closes https://github.com/espressif/openocd-esp32/issues/210
2022-02-23 09:20:43 +07:00
ae546316d3 Nimble: Check stack initialization status before executing stack command
Previous commit added checks in some functions that can be called
    without stack initalization. Corrected such instances.
2022-02-22 10:26:43 +05:30
2fb3824dfa UART: Fix custom ISR unit test
On ESP32, UART_INTR_BRK_DET may be triggered after setting the new ISR handler.
Disable these interrrupts.
2022-02-22 10:54:06 +08:00
9a36ced294 espcoredump: add a test for coredump dumped sections 2022-02-22 02:38:00 +00:00
b868fd2a95 espcoredump: fix a bug where tracked DRAM data where not dumped
Variables marked as COREDUMP_DRAM_ATTR will now be part of the core dump.

* Closes https://github.com/espressif/esp-idf/issues/8151
2022-02-22 02:38:00 +00:00
1e117f2f83 UART: RX interrupts are now properly restored after a flush
Added a unit test to make sure the expected behavior happens
2022-02-22 02:28:21 +00:00
bf7934aa84 esp_https_ota: fix for checking chip id at start of OTA 2022-02-21 13:55:53 +05:30
e37d149233 configure_ds.py: Fix the error for prod mode. They script now only verifies the purpose in the prod mode.
Closes https://github.com/espressif/esp-idf/issues/8285
2022-02-21 01:33:00 +05:30
d2a2a315ba Bugfix: omit MSC reset during initialization 2022-02-18 15:51:05 +08:00
e898e4b2f5 Bugfix: make wTotalLength uint16_t to avoid truncation 2022-02-18 15:51:05 +08:00
c46b74191e usb: Add USB Host Library documentation
This commit adds the USB Host Library documentation and fixes some nitpicks
in the Host Stack types.

Closes https://github.com/espressif/esp-idf/issues/6408
2022-02-18 15:51:05 +08:00
6f6986277c usb: Add USB Host Library Example
The commit adds a basic example for the USB Host Library
2022-02-18 15:51:05 +08:00
ebd058c8c9 usb: Update USB Host Library
This commit updates the USB Host Library as follows:

- usb_helpers.h
    - Removed dependency on USB Host Library API
    - Added function to print string descriptors
- usbh
    - Fixed bug where an interface/endpoint could be claimed/allocated multiple times
    - Removed redundant device ref_count change
- Added unit test for USB Host Library API usage
2022-02-18 15:51:05 +08:00
50bbdbc1de usb: Hub Driver and USBH recover port automatically after disconnection
This commit updates the Hub Driver and USBH as follows:
- Updated communication mechanism between Hub Driver and USBH
    - USBH notifies the Hub Driver via Hub request callback (usbh_hub_req_cb_t)
    - Hub Driver notifies the USBH via usbh_hub_pass_event()
- Hub Driver now defers all event handling to hub_process.
- Hub Driver and USBH will now automatically recover the port after a disconnected
    device has been closed.
- Fixed incorrect assert in usbh_dev_close()
2022-02-18 15:51:05 +08:00
ea6de613bf usb: Hub Driver Update and Refactor
Hub Driver is refactored as follows:

This commit update and refactors the Hub Driver as follows:

- Refactored enumeration state machine and stage functions
    - Enumeration stage is now incremented
    - Combined transfer stages of enumeration into common functions
- Comments updated
- Fixed usbh_hal_disable_debounce_lock() that would cause root_port_handle_events()
    to fail the HCD_PORT_CMD_RESET call because the previous port connection interrupt
    was not cleared.

The following features were added to the Hub Driver

- Enumeration config descriptor is now fetched in two separate stages
    - Header is fetched first to determine the wTotalLength of the descriptor
    - Fetching the full descriptor will request exactly wTotalLength bytes
    - This works around some non-compliant devices that will babble/return zero
        when requesting a length > wTotalLength
    - Closes https://github.com/espressif/esp-idf/issues/7799
- Enumeration now stores string descriptors
    - The Manufacturer, Product, and Serial Number string descriptors are
        now read and stored during enumeration
    - String descriptors are now part of usb_device_info_t
- Added unit test to test enumeration
2022-02-18 15:51:05 +08:00
7f09fe1b23 usb: USB Host stack uses USB PHY driver
This commit updates the USB Host stack to use the USB PHY driver. The
USB PHY and the OTG Controller should now both be setup/deleted using
usb_new_phy() and usb_del_phy() respectively.

- The hcd_install() now expects the USB PHY and OTG Contorller to be
    already setup before it is called
- usb_host_install() now has an option to skip calling usb_del_phy() if
    the user wants to setup their own USB PHY (e.g., in the case of using
    and external PHY).
- CDC-ACM and MSC examples/test updated to use internal PHY

Closes https://github.com/espressif/esp-idf/issues/8061
2022-02-18 15:51:05 +08:00
b3b8ed79c8 usb: HCD multiple fixes
This commit fixes the following bugs in the HCD

- HCD control pipes fill incorrect transfer size

_buffer_fill_ctrl() would fill the transfer descriptors length with
wLength instead of transfer->num_bytes. Therefore, the remaining length
would be incorrect when a control transfer requests more bytes than are
available.

- Fix USB_TRANSFER_FLAG_ZERO_PACK behavior

The previous behavior of USB_TRANSFER_FLAG_ZERO_PACK was incorrect, and did not
support interrupt pipes. A zero length packet can now be added to Bulk/Interrupt
OUT transfers where the length is a multiple of the endpoint's MPS.

- Fixed HCD port suspend and resume test case

Halting a control pipe mid control transfer can lead some test devices to get stuck
2022-02-18 15:51:05 +08:00
8888179439 usb: Tidy up usbh
- Remove enum_todo_flags from usbh
- USBH move config_desc to constant fields
2022-02-18 15:51:05 +08:00
000d3823bb Merge branch 'cumulative_backport_into_v4.4' into 'release/v4.4'
Cumulative backport MR (v4.4)

See merge request espressif/esp-idf!17194
2022-02-18 07:16:52 +00:00
cdfd59cc0e docs: update copyright date for docs automatically 2022-02-18 12:59:12 +08:00
a8c073c1cc fixed trailing whitespace 2022-02-18 12:58:53 +08:00
dc4783945a freertos: Move Espressif's specific esp_reent_init into collective ifdef 2022-02-18 12:58:53 +08:00
7caacf20c1 Documentation: added ESP32S3 interrupt allocation doc 2022-02-18 12:36:05 +08:00
90c63f7250 esp_system: ipc_isr does not use its own initialization task, it is done from ipc_task()
It helps to reduce the memory usage at startup.

Closes https://github.com/espressif/esp-idf/issues/8111
2022-02-18 12:36:05 +08:00
21b80a969f soc: updated soc_caps about rtc_io and the format 2022-02-18 11:44:43 +08:00
fd20ac807c sleep: fixed ext1 cannot wakeup via RTCIO >= 18 issue
Closes https://github.com/espressif/esp-idf/issues/8231
2022-02-18 11:44:20 +08:00
c904b4807b bugfix (nvs): Fixed issues found by Coverity
*  Fixed potential memory leak
*  Fixed wrong strncpy usage
*  Fixed potential out of bounds access
2022-02-17 22:22:26 +08:00
f3639dafc8 freertos: add pm_trace header include 2022-02-17 22:22:26 +08:00
9cc4c2f34d SPIRAM: 'Abort on allocation failure' should not trigger when there is available SPI ram
(cherry picked from commit 8dcdb2f363fd3fa00bd77e4bd75e7c73d6c7d0fb)
2022-02-17 22:22:26 +08:00
5ff09f0a06 Merge branch 'bugfix/modbus_allow_address_gaps_in_master_data_dict_v44' into 'release/v4.4'
freemodbus: allow address gaps in master data dictionary (support of UID field in MBAP) (backport v4.4)

See merge request espressif/esp-idf!16896
2022-02-17 08:38:57 +00:00
d2399f6d8c freemodbus: allow address gaps in master data dictionary (support of UID field in MBAP) (backport v4.4) 2022-02-17 08:38:56 +00:00
b2ef617a34 Merge branch 'bugfix/fix_ble_adv_underrun_error_v4.4' into 'release/v4.4'
components/bt: Fix ble adv_underrun issue(backport v4.4)

See merge request espressif/esp-idf!17164
2022-02-17 08:30:38 +00:00
38cca53445 Merge branch 'bugfix/assoc_comeback_fail_issue_v4.4' into 'release/v4.4'
Fix assoc comeback causing invalid state & FTM cleanup (Backport v4.4)

See merge request espressif/esp-idf!17170
2022-02-17 04:42:52 +00:00
98c5c7bac8 Merge branch 'bugfix/enterprise_certs_weak_md_v4.4' into 'release/v4.4'
esp_wifi: Fixed issue of weak md for certificates in wifi_enterprise example.(v4.4)

See merge request espressif/esp-idf!16979
2022-02-17 04:40:12 +00:00
b39d0dbf2c Merge branch 'bugfix/usb_default_print_wifi_v4.4' into 'release/v4.4'
esp_phy: enable usb under default(without choosing USB_SERIAL_JTAG) (backport v4.4)

See merge request espressif/esp-idf!17075
2022-02-17 04:15:54 +00:00
f9927119b8 Merge branch 'bugfix/efuse_timesettings_for_esp32s3_v4.4' into 'release/v4.4'
efuse: Fixes eFuse timesettings issue on esp32S3 (v4.4)

See merge request espressif/esp-idf!17177
2022-02-17 04:00:14 +00:00
174bd31bc0 Merge branch 'bugfix/usb_no_rom_log_v4.4' into 'release/v4.4'
USB_SERIAL_JTAG: Fix the issue that there is no rom log when restarting(backport v4.4)

See merge request espressif/esp-idf!17073
2022-02-17 03:59:36 +00:00
6664e6cf43 ds: update gen_digital_signature_tests.py to handle different max key sizes
Max key size is now decided by target parameter, and related parameters are
no longer hard coded.

Closes https://github.com/espressif/esp-idf/issues/8243


(cherry picked from commit 4a3f50faa0)
2022-02-17 11:24:54 +08:00
35d5a30d47 Merge branch 'feature/adc_calibration_version_2_on_c3_v4.4' into 'release/v4.4'
adc: upgrade adc calibration algorithm to version 2 on c3 (v4.4)

See merge request espressif/esp-idf!17049
2022-02-17 03:04:35 +00:00
11440c8757 Merge branch 'bugfix/gpio_intr_on_core1_s3_v4.4' into 'release/v4.4'
gpio: Fix the bug that gpio interrupt cannot be triggered on app cpu on ESP32S3 (backport v4.4)

See merge request espressif/esp-idf!16595
2022-02-17 01:47:46 +00:00
ae6f171370 Merge branch 'bugfix/mdns_null_deref_fuzzer_v4.4_' into 'release/v4.4'
mdns: Fix potential null deref reported by fuzzer test(v4.4)

See merge request espressif/esp-idf!17147
2022-02-17 01:21:00 +00:00
bf7266312c Merge branch 'bugfix/esp_eth_start_tx_buff_v4.4_followup' into 'release/v4.4'
Fixed ESP32 EMAC driver `insufficient TX buffer size` (v4.4 followup)

See merge request espressif/esp-idf!16666
2022-02-16 18:33:12 +00:00
299b6538e4 Merge branch 'bugfix/protocols_test_on_eth_v4.4' into 'release/v4.4'
ci/mqtt: Move protocol tests to eth runners(v4.4)

See merge request espressif/esp-idf!17010
2022-02-16 18:31:54 +00:00
538401aa06 Merge branch 'contrib/github_pr_8337_v4.4' into 'release/v4.4'
Set success when closing socket (GitHub PR) (v4.4)

See merge request espressif/esp-idf!17097
2022-02-16 18:31:30 +00:00
d011404607 esptool: Fixes esp32h2 target name 2022-02-17 00:14:45 +08:00
908874c642 esp_wifi: Update wifi lib
1. Fix assoc comeback causing invalid state
2. Better cleanup in some FTM failure cases
2022-02-16 15:51:50 +05:30
5c7b597594 efuse: Fixes eFuse timesettings issue on esp32S3 2022-02-16 15:15:27 +08:00
60b0d30d9c ci: increase target-test.yml UT_T1_1 job to support newly added LEDC fade ut tests
(cherry picked from commit f5cbe89487)
2022-02-16 15:02:46 +08:00
83edf2dbcf ledc: Fix FADE_NO_WAIT mode concurrency problem.
Add test cases for fade concurrency issue and fade timing check.

Closes https://github.com/espressif/esp-idf/issues/6710

(cherry picked from commit be2ab09832)
2022-02-16 15:02:45 +08:00
574f2c6a17 ledc: bugfix - Simplify the procedure to perform a one-time duty update
Avoid adding one extra fade cycle when performing a one-time duty update.
Add some notes to ledc_get_duty and ledc_update_duty APIs, so that users
are aware of when the new duty will be effective.

Closes https://github.com/espressif/esp-idf/issues/7288

(cherry picked from commit e175086226)
2022-02-16 15:02:45 +08:00
175132a874 adc: upgrade adc calibration algorithm to version 2 on c3 2022-02-16 14:58:42 +08:00
492afe4d4a esp_adc_cal: move esp_adc_cal_get_voltage into common source file 2022-02-16 14:58:42 +08:00
be542db463 esp_adc_cal: simplify CMakeLists.txt 2022-02-16 14:58:42 +08:00
9991b1b021 ci: increase target-test.yml UT_T1_1 job to support newly added ut test 2022-02-16 14:52:39 +08:00
41e452e7d8 gpio: Fix the bug that gpio interrupt cannot be triggered on app cpu on ESP32S3
Closes https://github.com/espressif/esp-idf/issues/7885

(cherry picked from commit 91f1159f9c)
2022-02-16 14:50:51 +08:00
b722e6f6ec gpio: Bugfix - Move esp_intr_free() out of the critical section in gpio_uninstall_isr_service()
Closes https://github.com/espressif/esp-idf/issues/5571

Fix the bug that if the API was called from one core to free the interrupt source on the other core, it would trigger interrupt watchdog.

(cherry picked from commit 0e8286c57b)
2022-02-16 14:50:51 +08:00
81861d03c0 Merge branch 'bugfix/fix_i2c_crash_v4.4' into 'release/v4.4'
I2C: Fix I2C Master operation with repeated start condition (backport v4.4)

See merge request espressif/esp-idf!17118
2022-02-16 06:30:44 +00:00
c0e105cc41 mdns: Fix potential null deref reported by fuzzer test 2022-02-16 06:23:57 +00:00
33f7009bef Merge branch 'bugfix/i2c_spiram_bug_v4.4' into 'release/v4.4'
i2c: fix buffer check when SPIRAM used as a heap (backport v4.4)

See merge request espressif/esp-idf!17098
2022-02-16 05:16:32 +00:00
d483bd9518 Merge branch 'feature/support_eap_fast_release_v4.4' into 'release/v4.4'
Add support for EAP-FAST authentication (backport v4.4)

See merge request espressif/esp-idf!16279
2022-02-16 03:28:15 +00:00
11ec6ed917 Merge branch 'bugfix/eap_client_crash_v4.4' into 'release/v4.4'
wpa_supplicant: Fix memory corruption (v4.4)

See merge request espressif/esp-idf!17128
2022-02-16 03:27:47 +00:00
e3a5a85e2f Merge branch 'feature/gcov_esp32c3_v4.4' into 'release/v4.4'
debug_stubs and gcov: Refactor and add support for RISCV (v4.4)

See merge request espressif/esp-idf!17068
2022-02-16 03:26:49 +00:00
6ba07ccfaa Merge branch 'bugfix/typo_in_i2c_macro_v4.4' into 'release/v4.4'
I2C: Fix typo in I2C_TIMING_VAL_ERR_STR macro name (backport v4.4)

See merge request espressif/esp-idf!17116
2022-02-16 02:49:01 +00:00
118478cd51 Merge branch 'docs/add_an_example_list_for_esp32-wrover-kit_v4.4' into 'release/v4.4'
docs: add an example list for esp-wrover-kit (v4.4)

See merge request espressif/esp-idf!16691
2022-02-16 02:39:04 +00:00
192503abbb Merge branch 'example/nimble_readme_cleanup_v4.4' into 'release/v4.4'
docs/examples Changes on README files on Bluetooth Examples (v4.4)

See merge request espressif/esp-idf!16374
2022-02-16 02:30:04 +00:00
ee908e4ef1 Merge branch 'feature/mdns_null_value_txt_v4.4' into 'release/v4.4'
mdns: Support for null-value TXT records (v4.4)

See merge request espressif/esp-idf!17172
2022-02-16 02:27:25 +00:00
35b2b3e24c components/bt: Fix ble adv_underrun issue
components/bt: Fix LLCP collision for channel map update
2022-02-16 00:39:00 +08:00
a145a5ee48 mdns: Use memcpy() for copy to support non-text TXTs 2022-02-15 13:32:53 +01:00
ec9dbd922d mdns: Support for null-value TXT records
Closes https://github.com/espressif/esp-idf/issues/8267
2022-02-15 13:32:53 +01:00
93be7d5192 usb_serial_jtag: remove the strict condition check in esp_phy 2022-02-15 18:56:49 +08:00
bf523af21d usb_serial_jtag: can print when wifi enabled by default
Closes https://github.com/espressif/esp-idf/issues/8131
2022-02-15 18:56:48 +08:00
a74e06560b USB_SERIAL_JTAG: Fix the issue that there is no rom log when restarting 2022-02-15 18:56:06 +08:00
83daa6dabb Merge branch 'bugfix/bump_docs_docker_tag_v4.4' into 'release/v4.4'
ci: bump esp-docs image tag to v5

See merge request espressif/esp-idf!17157
2022-02-15 10:15:14 +00:00
ed8f29c406 ci: bump esp-docs image tag to v5 2022-02-15 11:55:01 +08:00
8c61c5c565 Merge branch 'bugfix/lcd_rgb_memory_alignment_v4.4' into 'release/v4.4'
rgb lcd memory alignment(v4.4)

See merge request espressif/esp-idf!16883
2022-02-14 15:34:49 +00:00
21b6c46d11 Merge branch 'bugfix/sdio_slave_dma_desc_int_v4.4' into 'release/v4.4'
sdio_slave: Fixed the issue that DMA descriptors allocated to non-DMA capable area (v4.4)

See merge request espressif/esp-idf!17135
2022-02-14 06:27:47 +00:00
13d30652cc Merge branch 'bugfix/wps_fixes_v4.4' into 'release/v4.4'
wpa_supplicant: Add WPS Fixes (Backport V4.4)

See merge request espressif/esp-idf!17064
2022-02-14 06:24:16 +00:00
71b81e4a01 Merge branch 'bugfix/support_esp32s2_eco1_v4.4' into 'release/v4.4'
esp_phy: Update ESP32S2 phy lib to support eco1 chip(V4.4)

See merge request espressif/esp-idf!16715
2022-02-14 05:55:29 +00:00
21b4cd8325 sdio_slave: fixed the issue DMA desc not capable 2022-02-13 22:35:04 +08:00
c2c4b126f7 Merge branch 'feature/support_new_psram_v4.4' into 'release/v4.4'
psram: add ESP32-D0WD-R2-V3 support(backport v4.4)

See merge request espressif/esp-idf!16705
2022-02-13 14:13:38 +00:00
246f72020f Merge branch 'bugfix/modbus_port_fix_lgpl_licensed_files_v4.4' into 'release/v4.4'
freemodbus: fix port contains lgpl licensed files (v4.4)

See merge request espressif/esp-idf!16550
2022-02-12 20:43:22 +00:00
136c5b8204 wpa_supplicant: Fix invalid memory dereference 2022-02-12 10:32:33 +05:30
f60a914bae I2C: Fix I2C Master operation with repeated start condition
* Closes https://github.com/espressif/esp-idf/pull/8353
2022-02-11 15:37:24 +08:00
8f3b47da39 I2C: Fix typo in I2C_TIMING_VAL_ERR_STR macro name
* Closes https://github.com/espressif/esp-idf/pull/8012
2022-02-11 15:29:52 +08:00
47583770a1 Merge branch 'bugfix/fix_esp_http_client_example_v4.4' into 'release/v4.4'
esp_http_client: Fix memory leak in esp_http_client_example (backport v4.4)

See merge request espressif/esp-idf!17095
2022-02-11 04:56:29 +00:00
83ef7b6a95 Merge branch 'feature/limit_component_manager_version' into 'release/v4.4'
Tools: Limit idf-component-manager version

See merge request espressif/esp-idf!16405
2022-02-10 16:07:02 +00:00
730ca0ea43 Merge branch 'bugfix/cpu_reset_perip_clk_disable_v4.4' into 'release/v4.4'
esp_system: change range comparsion for reset reason to specifc cpu reset reason comparison (backport v4.4)

See merge request espressif/esp-idf!15898
2022-02-10 10:32:09 +00:00
0658a5b1da esp_wifi: Add an example for EAP-FAST. 2022-02-10 15:55:21 +05:30
e21832cabb esp_wifi: Add support for EAP-FAST authentication method 2022-02-10 15:54:15 +05:30
8b86834a72 Merge branch 'bugfix/gpio_pin_num_fix_v4.4' into 'release/v4.4'
gpio: Fix some gpio pin num errors on esp32s2 and esp32c3 (backport v4.4)

See merge request espressif/esp-idf!16594
2022-02-10 10:21:52 +00:00
954d52ff3a Merge branch 'flash/add_th_support_v4.4' into 'release/v4.4'
spi_flash: add support for th 1M flash(backport v4.4)

See merge request espressif/esp-idf!16714
2022-02-10 09:40:40 +00:00
fb1695ade7 Merge branch 'bugfix/fix_spi_cs_hold_time_issue_v4.4' into 'release/v4.4'
spi_master: fix spi cs_ena_posttrans issue (v4.4)

See merge request espressif/esp-idf!16686
2022-02-10 09:12:15 +00:00
38b5c012f9 Merge branch 'bugfix/rmt_s2_doesnt_support_rx_wrap_v4.4' into 'release/v4.4'
rmt: do not support rx wrap on esp32s2 (v4.4)

See merge request espressif/esp-idf!17076
2022-02-10 09:11:32 +00:00
9e000d4177 LEDC: divisor calculation will now be rounded up when necessary
Closes https://github.com/espressif/esp-idf/issues/7722
2022-02-10 16:56:07 +08:00
63afc84de5 LEDC: improved support for ESP32-C3 and refactored divisor calculation
As ESP32C3 does not have support for REF_TICK source clock, it is now not
possible to select it anymore.
Auto cfg clock has been improved for all boards.
2022-02-10 16:54:00 +08:00
98647cf351 i2c: fix buffer check when SPIRAM used as a heap
* Closes https://github.com/espressif/esp-idf/issues/8173
2022-02-10 16:16:01 +08:00
5355ba06f1 transport_ssl: use return value from close for non-TLS case 2022-02-10 13:03:32 +05:30
9e892fbf46 Set success when closing socket
Closes https://github.com/espressif/esp-idf/pull/8337
Closes IDFGH-6709
2022-02-10 13:02:58 +05:30
1b8c04bb57 esp_http_client: Fix memory leak in esp_http_client_example
Closes https://github.com/espressif/esp-idf/issues/8346
2022-02-10 14:35:13 +08:00
50302e4157 esp_phy: Update ESP32S2 phy lib to support eco1 chip 2022-02-10 14:13:02 +08:00
14b52e9d83 Merge branch 'bugfix/improve_ota_test_success_rate_v4.4' into 'release/v4.4'
OTA examples: Reduce example test failure rate (v4.4)

See merge request espressif/esp-idf!16613
2022-02-10 05:52:27 +00:00
c7b9f94733 Merge branch 'bugfix/fix_bluedroid_compile_issue_v4.4' into 'release/v4.4'
components/bt: Fix bluedroid compile issue(backport release/v4.4)

See merge request espressif/esp-idf!16592
2022-02-09 11:28:57 +00:00
5cc185c442 Merge branch 'bugfix/controller_hci_uart_esp32c3_readme_v4.4' into 'release/v4.4'
Added support for ESP32-S3 chip in controller_hci_uart_esp32c3_and_esp32s3's README (v4.4)

See merge request espressif/esp-idf!16738
2022-02-09 11:18:40 +00:00
4ecd0ef9fc advanced_https_ota: Move example tests on ethernet runners
Move BT tests to nightly run
2022-02-09 15:03:04 +05:30
42e389263d native_ota_example: Move all example tests to ethernet based runners 2022-02-09 15:03:04 +05:30
f2c5c8e6d8 simple_ota_example: Move redundant and failing example_tests to nightly run 2022-02-09 15:03:04 +05:30
690d7a5d6b target-test.yml: Add EXAMPLE_ETH_OTA runner to OTA on ethernet based runners 2022-02-09 15:03:04 +05:30
956c6b889f rmt: do not support rx wrap on esp32s2
Closes https://github.com/espressif/esp-idf/issues/8354
2022-02-09 17:29:09 +08:00
c8075df214 Merge branch 'bugfix/a2dp_source_congest_v4.4' into 'release/v4.4'
component_bt: Fixed a2dp source audio data packet congestion causing choppy audio in a2dp sink (v4.4)

See merge request espressif/esp-idf!16733
2022-02-09 08:16:01 +00:00
4158da586b Merge branch 'demo/opt_a2dp_demo_doc_v4.4' into 'release/v4.4'
demo/optimize a2dp demo documents (v4.4)

See merge request espressif/esp-idf!16587
2022-02-09 08:13:55 +00:00
afe82b4e1b Merge branch 'bugfix/filter_repeated_packages_v4.4' into 'release/v4.4'
filter repeated packages but not send response(v4.4)

See merge request espressif/esp-idf!16817
2022-02-09 06:18:43 +00:00
006b4456e7 filter repeated packages but not send response(v4.4) 2022-02-09 06:18:42 +00:00
4b7eea25ca Merge branch 'feature/pro_recv_hb_forv4.4' into 'release/v4.4'
provisioner receive heartbeat message (v4.4)

See merge request espressif/esp-idf!16636
2022-02-09 06:18:14 +00:00
006c679f85 provisioner receive heartbeat message (v4.4) 2022-02-09 06:18:13 +00:00
690ff75346 Merge branch 'doc/esp32s3_sdmmc_v4.4' into 'release/v4.4'
docs: peripherals: update SD related docs for ESP32-S3 (v4.4)

See merge request espressif/esp-idf!17043
2022-02-09 03:28:57 +00:00
c2a6f0fe29 Merge branch 'bugfix/perfmon_s3_v4.4' into 'release/v4.4'
perfmon: re-enable example for ESP32-S3, remove warning from the docs (v4.4)

See merge request espressif/esp-idf!17042
2022-02-09 03:28:01 +00:00
54e416d3b8 docs: Updates apptrace menuconfig options in examples 2022-02-08 22:25:33 +03:00
e366d569d8 example/gcov: Adds support for esp32s2, esp32s3, esp32c3 and esp32h2 2022-02-08 22:25:33 +03:00
89fe956ebc gcov: Fixes interference of gcov dump with normal IPC calls 2022-02-08 22:25:33 +03:00
792f510d0d gcov: Do not use shrunk ROM's fake stdout and stderr FILE struct 2022-02-08 22:24:54 +03:00
1bbefc3e5d debug_stubs: Refactor and add support for RISCV 2022-02-08 22:24:54 +03:00
1603b8181f Merge branch 'bugfix/win_rename_delay_v4.4' into 'release/v4.4'
Tools: Use delay between rename attempts on Windows in the installer (v4.4)

See merge request espressif/esp-idf!17056
2022-02-08 18:23:56 +00:00
330da63548 Merge branch 'bugfix/nvs_oom_check_wrong_pointer_v4.4' into 'release/v4.4'
nvs: fixed OOM check wrong pointer issue (backport 4.4)

See merge request espressif/esp-idf!16976
2022-02-08 14:54:48 +00:00
6c0c3029ab Merge branch 'bugfix/vfs_open_errno_v4.4' into 'release/v4.4'
vfs: don't overwrite errno by a hard coded ENOENT (Github PR) (v4.4)

See merge request espressif/esp-idf!17044
2022-02-08 14:37:29 +00:00
757445422d wpa_supplicant: Add WPS Fixes
Add following bugfixes

1. Station not able to connect when WPS pin is pressed first on AP.
2. PBC overlap getting detected for selected registrar PIN APs.
3. Station not considering authorised MACs for PIN method.
4. For PIN methodm If no AP is found, station will loop through
   APs in its vicinity and try to do WPS with them one by one till
   WPS timeout occurs. This is for some APs which do not set
   selected registrar correctly.
2022-02-08 17:22:40 +05:30
e26318bcac freemodbus: fix port contains lgpl licensed files
Initial version of freemodbus master port files have been added to ESP-IDF based on https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32.
The overall repository license, at the time of adding these files, has been BSD 3-clause. However at that time, several port files carried LGPL license headers. As the author of these files confirmed in https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32/issues/61#issuecomment-977828450, this wasn't intentional. ESP-IDF version of modbus master port has been rewritten to target FreeRTOS instead of RT-Thread, but the license headers remained from the original version. This commit corrects this, replacing the license of these files with BSD 3-clause.
2022-02-08 12:43:08 +01:00
f4e54541f3 ws_client: Optimize example test payloads and timeouts
Important update: NO_DATA_TIMEOUT_SEC=5, as some ws-servers typically send pings in 30s or 10s intervals, so we might never fire shutdown test
2022-02-08 18:15:53 +08:00
ff1846bebe ci/websockets: Run ws-client example test on ethernet runners 2022-02-08 18:15:53 +08:00
936bbdc75b ci/mdns: Run mdns test on ethernet runners 2022-02-08 18:15:49 +08:00
63dda9f1d9 ci: Increase parallel job count for Eth runners 2022-02-08 18:15:49 +08:00
2b62d7bfdc ci/mqtt: Move publish-connect test to ethernet runners 2022-02-08 18:15:48 +08:00
d24241d5ad ci/mqtt: Move mqtt example tests to ethernet runners 2022-02-08 18:15:48 +08:00
18da1180ad Tools: Use delay between rename attempts on Windows in the installer 2022-02-08 11:06:14 +01:00
6934a0164a Merge branch 'bugfix/fix_common_clock_bug_v4.4' into 'release/v4.4'
esp_wifi: fix common clock bug (backport v4.4)

See merge request espressif/esp-idf!16971
2022-02-08 09:10:34 +00:00
f98ec313f2 Merge branch 'revert-0a1e309e' into 'release/v4.4'
Revert "Merge branch 'bugfix/temp_disable_f8r8_test_v4.4' into 'release/v4.4'"

See merge request espressif/esp-idf!17037
2022-02-07 14:51:55 +00:00
93855605f3 Merge branch 'bugfix/esp32c3_sysview_examples_build_error_v4.4' into 'release/v4.4'
riscv: fix portSTACK_GROWTH redefinition error (v4.4)

See merge request espressif/esp-idf!17038
2022-02-07 12:48:02 +00:00
23b0cdad8a vfs: add test for errno value after 'open' 2022-02-07 11:36:00 +01:00
931dd74da6 vfs: don't overwrite errno by a hard coded ENOENT
Calling "open" in CHECK_AND_CALL sets a perfectly correct errno.
There is no need to overwrite that with a value of ENOENT, since doing
so hides lower level errors like EIO.

Closes https://github.com/espressif/esp-idf/pull/8036
2022-02-07 11:35:59 +01:00
aaa2a344c6 docs: peripherals: update SD related docs for ESP32-S3 2022-02-07 11:31:17 +01:00
faac0e7589 perfmon: re-enable example for ESP32-S3, remove warning from the docs
Includes minor fix for formatting of code blocks in the example readme
2022-02-07 11:28:57 +01:00
096c013675 esp_rom: remove functions which depend on sizeof(struct stat)
...and all their callers.

With the upcoming switch from sizeof(time_t)==4 to sizeof(time_t)==8,
sizeof(struct stat) is also increasing.

A few newlib functions present in ROM allocate 'struct stat' on the
stack and call _fstat_r on this structure. The implementation of
fstat is provided in ESP-IDF. This implementation will often do
memset(st, 0, sizeof(*st)), where st is 'struct stat*', before setting
some fields of this structure. If IDF is built with sizeof(st)
different from sizeof(st) which ROM was built with, this will lead
to an out-of-bounds write and a stack corruption.

This commit removes problematic ROM functions from the linker script.
Here are the functions which allocate 'struct stat':
* _isatty_r (in ROM)
* __swhatbuf_r, called by __smakebuf_r, called by __swsetup_r and
  __srefill_r (in ROM)
* _fseeko_r (not in ROM)
* glob2 (not in ROM)
* _gettemp (not in ROM)

As a result, these functions are used from libc.a, and use correct
size of 'stat' structure.

Closes https://github.com/espressif/esp-idf/issues/7980
2022-02-07 11:23:59 +01:00
1e80a52de4 Merge branch 'bugfix/i2s_mclk_stopped_when_set_clock' into 'release/v4.4'
i2s: fix mclk stop issue when setting clock (v4.4)

See merge request espressif/esp-idf!16706
2022-02-07 09:47:19 +00:00
8fc5f8ae55 heap: use HEAP_TRACING_STACK_DEPTH default value for riscv 2022-02-07 09:47:57 +01:00
5c8bfa9b46 esp32c3: fix portSTACK_GROWTH redefinition error 2022-02-07 09:47:57 +01:00
2fe53759c9 components/bt: Fix bluedroid compile issue 2022-02-07 16:04:50 +08:00
0a0b652815 Merge branch 'bugfix/fix_bluedroid_ble50_adv_data_length_issue_v4.4' into 'release/v4.4'
components/bt: Fix bluedroid ble50 adv data length issue(backport release/v4.4)

See merge request espressif/esp-idf!16579
2022-02-07 08:01:55 +00:00
aae55512b7 Update copyright headers 2022-02-07 07:41:03 +00:00
371ab10bcd Revert "Merge branch 'bugfix/temp_disable_f8r8_test_v4.4' into 'release/v4.4'"
This reverts merge request !17031
2022-02-07 15:39:25 +08:00
a9df58c776 i2s: fix mclk stopped when setting clock 2022-02-07 15:27:35 +08:00
1140036424 spi_master: fix spi cs_ena_posttrans issue 2022-02-07 12:19:51 +08:00
5e5af3606b Merge branch 'bugfix/nimble_spp_v4.4' into 'release/v4.4'
NimBLE :  SPP example fails to build on Windows (v4.4)

See merge request espressif/esp-idf!17013
2022-02-07 02:35:30 +00:00
7c986a64c7 Merge branch 'feature/adds_tips_to_run_ci_example_tests_v4.4' into 'release/v4.4'
examples: Adds a note on how to meet requirements to run the example_test.py (v4.4)

See merge request espressif/esp-idf!16944
2022-02-06 09:25:40 +00:00
0a1e309ee4 Merge branch 'bugfix/temp_disable_f8r8_test_v4.4' into 'release/v4.4'
ci: temporarily disable MSPI_F8R8 test (v4.4)

See merge request espressif/esp-idf!17031
2022-02-05 05:34:09 +00:00
e67ecd998c ci: temporarily disable MSPI_F8R8 test 2022-02-04 15:23:05 +01:00
d501a53f2f Merge branch 'feature/mbedtls-2.28.0_v4.4' into 'release/v4.4'
mbedtls: Upgrading to v2.28.0 (v4.4)

See merge request espressif/esp-idf!17004
2022-02-02 13:52:54 +00:00
db80244920 Merge branch 'bugfix/nimble_spp' into 'release/v4.4'
NimBLE : Fixed BLE SPP build fail on Windows

Closes : https://github.com/espressif/esp-idf/issues/8305

See merge request espressif/esp-idf!17013
2022-02-02 15:15:24 +05:30
51fc67f5fa ci: Fix issues for build stage
- Fixed logs expecting different format specifier
- Updated ignore list for check_public_header test
- Updated functions ported from mbedTLS
- Fix for make-system build errors
2022-02-02 15:03:48 +05:30
11366d643f mbedtls: Added option MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
- Removed code regarding MBEDTLS_DYNAMIC_FREE_PEER_CERT
  (config was kept for backward compatibility)
- Combined mbedTLS v2.28.x related options under a separate Kconfig menu
2022-02-02 10:56:48 +05:30
c3d2f2361c protocomm: Updated function for constant time buffer comparison
- mbedtls_ssl_safer_memcmp() -> mbedtls_ct_memcmp()
2022-02-02 10:56:48 +05:30
b10d0a533c wpa_supplicant: Saved message-type digest used in handshake for PRF operations 2022-02-02 10:56:48 +05:30
76b9beff3c mbedtls: Moved mbedtls_mpi_mul_int to port layer 2022-02-02 10:56:48 +05:30
76658d5066 mbedtls: Added config options for v2.28.0 upgrade 2022-02-02 10:56:48 +05:30
0fdc5f7490 mbedtls: Upgrade to v2.28.0 2022-02-02 10:56:13 +05:30
28489ac412 Merge branch 'bugfix/provisioning_not_stopping_v4.4' into 'release/v4.4'
wifi_prov_mgr: Fix provisioning not stopping in release mode (v4.4)

See merge request espressif/esp-idf!17002
2022-02-01 05:22:38 +00:00
b7c1c4913e wifi_prov_mgr: Fix provisioning not stopping in release mode
- For the wifi_prov_mgr example in release mode (with NDEBUG defined -
  assertions disabled), the task to stop provisioning is never started
  as it is voided by the assert function it is called in.

Closes https://github.com/espressif/esp-idf/issues/8309
2022-02-01 09:49:45 +05:30
602b26ccd4 Merge branch 'feature/upgrade_expat_component_v4.4' into 'release/v4.4'
expat: upgrade to v2.4.3 release

See merge request espressif/esp-idf!16981
2022-01-31 07:14:04 +00:00
3dbe641c6b expat: upgrade to v2.4.3 release
Detailed changelog: https://github.com/libexpat/libexpat/blob/R_2_4_3/expat/Changes
2022-01-31 11:13:26 +05:30
eb3797dc3f Merge branch 'provisioning/update_readme_v4.4' into 'release/v4.4'
provisioning: Remove legacy examples reference (v4.4)

See merge request espressif/esp-idf!16987
2022-01-29 10:46:56 +00:00
bfd3e9c54c Merge branch 'ci/split_assign_test_and_add_c3_integration_test_4.4' into 'release/v4.4'
Ci: split assign test and add c3 integration test 4.4

See merge request espressif/esp-idf!16925
2022-01-28 14:39:16 +00:00
b9eda8431e Merge branch 'test/esp32s2_fatfs_speedtest_ci_fix_v4.4' into 'release/v4.4'
[Storage]: Re-enable FatFS write/read speed test (v4.4)

See merge request espressif/esp-idf!16080
2022-01-28 10:37:10 +00:00
954844a308 esp_prov.py: Replaced deprecated function for loading modules 2022-01-28 15:46:27 +05:30
e0968e506c Merge branch 'bugfix/unused_tag_string' into 'release/v4.4'
build: fix unused tag string (v4.4)

See merge request espressif/esp-idf!16838
2022-01-28 07:58:40 +00:00
0113e2768d esp_wifi: Fixed issue of weak md for certificates in wifi_enterprise example. 2022-01-28 11:02:06 +05:30
42abd894d4 build: fix unused tag string
Closes https://github.com/espressif/esp-idf/issues/8250
2022-01-28 11:59:45 +08:00
c8eb02bb39 bugfix (nvs): fixed wrong pointer check 2022-01-28 11:37:53 +08:00
257d95fc22 Merge branch 'docs/pinlayout_image_update_backport_v4.4' into 'release/v4.4'
docs: Update ESP32-DevKitC Pin Layout figure of higher resolution (backport v4.4)

See merge request espressif/esp-idf!16364
2022-01-28 03:22:51 +00:00
036e3f2e46 Merge branch 'bugfix/address_already_used_exception_in_ota_tests_v4.4' into 'release/v4.4'
Fix 'address already in use' exception in OTA tests (v4.4)

See merge request espressif/esp-idf!16416
2022-01-27 12:32:45 +00:00
6e6c8bb682 esp_wifi: fix common clock bug (backport v4.4) 2022-01-27 20:19:41 +08:00
7acb7a9e00 Merge branch 'bugfix/rm_copyright_ignore_list' into 'release/v4.4'
CI: Remove unused copyright ignore list

See merge request espressif/esp-idf!16963
2022-01-27 12:15:56 +00:00
4649f3a46e CI: Remove unused copyright ignore list 2022-01-27 12:26:33 +01:00
e64ae67888 fix: pin definitions for other boards
fix: re-enabled fatfs r/w test on sdspi
fix: copyright notice
add: pin definitions for esp32c3
fix: Changed fixed spi dma channel to a macro definition
2022-01-27 12:06:41 +01:00
d16aaae498 Merge branch 'feature/memprot_api_unified_c3_v4.4' into 'release/v4.4'
Memprot API unified - ESP32C3 (v4.4.1)

See merge request espressif/esp-idf!16489
2022-01-27 11:00:03 +00:00
3d5b947355 Tools: Limit idf-component-manager version 2022-01-27 11:46:54 +01:00
b80a070395 esp_system: replace the range comparsion for reset reason in perip clk init with specific reset reason check, also add a test case in LEDC to check for the perip clk not being disabled after cpu reset
(cherry picked from commit f57456e9dd919e5eea1d3cd0caa64b5c97a4df73)
2022-01-27 09:51:00 +00:00
26a876e63f docs:update ESP32-DevKitC Pin Layout figure of higher resolution 2022-01-27 17:05:01 +08:00
8ec62d1d86 Merge branch 'docs/translation_backport_v4.4' into 'release/v4.4'
docs: update CN translation for MR15221 for v4.4

See merge request espressif/esp-idf!16756
2022-01-27 08:27:06 +00:00
3c76a058aa docs: update CN translation for MR15221 for v4.4 2022-01-27 08:27:04 +00:00
c02f6b96af Merge branch 'docs/update_inconsistency_backport_v4.4' into 'release/v4.4'
docs: Update incorrect pins for S3 documentation, set a default value for future targets, and remove line breaks inside paragraphs (backport v4.4)

See merge request espressif/esp-idf!16367
2022-01-27 08:26:07 +00:00
1f45f160a8 Merge branch 'bugfix/fix_console_linenosie_backport_v4.4' into 'release/v4.4'
console: fix console stuck in auto test (backport v4.4)

See merge request espressif/esp-idf!16914
2022-01-27 07:18:46 +00:00
9af4484ce3 examples: Adds a note on how to meet requirements to run the example_test.py
export PYTHONPATH="$IDF_PATH/tools:$IDF_PATH/tools/ci/python_packages"
python -m pip install -r $IDF_PATH/tools/ci/python_packages/ttfw_idf/requirements.txt

It helps to fix the ModuleNotFoundError issue with ttfw_idf and tiny_test_fw modules.

Closes https://github.com/espressif/esp-idf/issues/7815
2022-01-27 14:40:10 +08:00
8ab30f72b2 Merge branch 'bugfix/rd_rem_ext_feats_delayed_cs_v4.4' into 'release/v4.4'
bugfix/fix cs event for rd_rem_ext_feats delayed issue (v4.4)

See merge request espressif/esp-idf!16813
2022-01-27 05:45:35 +00:00
6114ac2994 Merge branch 'bugfix/fix_smartconfig_setopt_fail_v4.4' into 'release/v4.4'
smartconfig: Fix smartconfig set socket option fail (backport v4.4)

See merge request espressif/esp-idf!16772
2022-01-27 05:44:35 +00:00
d982a9a5e1 Merge branch 'bugfix/config_parse_crash_after_flash_erase_v4.4' into 'release/v4.4'
component_bt: fixed config parse crash after flash_erase(v4.4)

See merge request espressif/esp-idf!16730
2022-01-27 05:44:17 +00:00
4f9afec016 Merge branch 'bugfix/ci_check_blobs_v4.4' into 'release/v4.4'
ci: improve checks for Wi-Fi/PHY libraries (v4.4)

See merge request espressif/esp-idf!16659
2022-01-27 05:42:56 +00:00
551cd2793b Merge branch 'doc/optimize_hfp_doc_4_4' into 'release/v4.4'
Doc/optimize hfp doc [backport v4.4]

See merge request espressif/esp-idf!16451
2022-01-27 05:42:17 +00:00
bfd68507d8 Merge branch 'bugfix/PRs_on_esp_hid_v4.4' into 'release/v4.4'
bugfix/handle_3_esp_hid_PRs (v4.4)

See merge request espressif/esp-idf!16590
2022-01-27 05:41:52 +00:00
80a395e319 Merge branch 'Doc/optimize_spp_doc_v4.4' into 'release/v4.4'
Doc/Optimize SPP Document[backport 4.4]

See merge request espressif/esp-idf!16603
2022-01-27 05:41:33 +00:00
5788a393ea Merge branch 'doc/update_document_of_demo_bt_discovery_v4.4' into 'release/v4.4'
Doc/update document of demo bt discovery v4.4

See merge request espressif/esp-idf!16575
2022-01-27 05:40:52 +00:00
7d9b93e2e0 Merge branch 'bugfix/MR16031_v4.4' into 'release/v4.4'
heap: adjust the order of RTC memory heap caps and regions(backport v4.4)

See merge request espressif/esp-idf!16704
2022-01-27 05:30:02 +00:00
7d9652dccf System/Security: Memprot API unified (ESP32C3,ESP32S3)
Unified Memory protection API for all PMS-aware chips

Closes JIRA IDF-3849
2022-01-27 12:40:27 +08:00
386c2a2322 bugfix: checkout ref failed for origin branches 2022-01-27 11:55:58 +08:00
fc1b518ef7 ci: exclude git files when uploading artifacts 2022-01-27 11:55:58 +08:00
beda92a7a5 ci: update intergration test to support esp32c3 2022-01-27 11:55:53 +08:00
606f8fd59b ci: optimize downloading build_ssc artifacts 2022-01-26 22:33:14 +08:00
641bfa388a ci: move integration test related files outside of components 2022-01-26 22:33:14 +08:00
2ba22c4c6e ci: fix target_test label usage 2022-01-26 22:33:14 +08:00
6e11783992 ci: split assign tests 2022-01-26 22:33:09 +08:00
55b1756d5f Merge branch 'contrib/github_pr_8139_backport_v4.4' into 'release/v4.4'
ledc.h - fix extern "C" to include ledc_cb_register() (backport v4.4)

See merge request espressif/esp-idf!16585
2022-01-26 13:40:22 +00:00
b5217ba9a2 Merge branch 'ci/enable_s3_examples_build_v4.4' into 'release/v4.4'
ci: re-enable s3 build for few examples (v4.4)

See merge request espressif/esp-idf!16894
2022-01-26 13:38:14 +00:00
56e854bb4e Merge branch 'bugfix/set_authmode_by_switching_number_to_string_v4.4' into 'release/v4.4'
CI: change ap authmode from number to string (backport v4.4)

See merge request espressif/esp-idf!16553
2022-01-26 11:53:30 +00:00
46fba83ac8 Merge branch 'bugfix/idf_tools_python_env_v4.4' into 'release/v4.4'
tools: improve virtualenv diagnostics, set python path explicitly (v4.4)

See merge request espressif/esp-idf!16807
2022-01-26 10:00:32 +00:00
65b3e0601f Merge branch 'bugfix/add_dummy_to_total_size_v4.4' into 'release/v4.4'
Tools: fix bug with total size calculation issue (v4.4)

See merge request espressif/esp-idf!16859
2022-01-26 09:59:48 +00:00
a59e3ab59d Merge branch 'feature/esp32s3_apptrace_v4.4' into 'release/v4.4'
Feature/esp32s3 apptrace v4.4

See merge request espressif/esp-idf!16649
2022-01-26 09:58:35 +00:00
ea62bcfaf0 Merge branch 'feature/ccache_in_ci_v4.4' into 'release/v4.4'
ci: enable ccache for build jobs (v4.4)

See merge request espressif/esp-idf!16806
2022-01-26 09:12:32 +00:00
a76f908074 Merge branch 'test/remove_spi_flash_perf_thr_v4.4' into 'release/v4.4'
spi_flash_test: remove threshold from unit test (v4.4)

See merge request espressif/esp-idf!16821
2022-01-26 08:20:26 +00:00
446d3bfec8 Fix for advanced_ota_redirect_url example failure in CI 2022-01-26 10:42:13 +08:00
839c34fd0a Fix 'address already in use' exception in OTA tests
We will stop the server instance at the end of each test case. This will solve the "address already in use" exception
2022-01-26 10:42:13 +08:00
f546d5e493 Merge branch 'fix/http2_request_example_v4.4' into 'release/v4.4'
http2_request_example: Change the target http2 server to http2.github.io (v4.4)

See merge request espressif/esp-idf!16670
2022-01-26 02:39:16 +00:00
f5ef3e2cf2 Merge branch 'wifi_prov_mgr/service_key_check_v4.4' into 'release/v4.4'
wifi_prov_mgr: Added check for passphrase length in softAP scheme (v4.4)

See merge request espressif/esp-idf!16569
2022-01-26 02:37:43 +00:00
48eea7c479 Merge branch 'bugfix/fix_esp_https_ota_v4.4' into 'release/v4.4'
esp_https_ota: Fix esp_https_ota_begin may return error and exist memory leak (backport v4.4)

See merge request espressif/esp-idf!16777
2022-01-26 02:36:56 +00:00
39386e05a5 Merge branch 'bugfix/invalid_url_cause_to_crash_v4.4' into 'release/v4.4'
http: Fix parsing invalid url cause to crash (v4.4)

See merge request espressif/esp-idf!16478
2022-01-26 02:34:29 +00:00
e19cc280d9 Merge branch 'docs/update_ws_server_example_readme_v4.4' into 'release/v4.4'
docs: Add user-friendly guide about how to use ws_server_example_test.py (backport v4.4)

See merge request espressif/esp-idf!16782
2022-01-26 02:31:22 +00:00
fb1d00a9d1 Merge branch 'bugfix/efuse_timesettigs_in_burn_op_v4.4' into 'release/v4.4'
efuse: Fixes eFuse timesettings issue on esp32c3 (v4.4)

See merge request espressif/esp-idf!16921
2022-01-26 00:52:33 +00:00
979745417b Merge branch 'refactor/tinyusb_uses_usb_phy_v4.4' into 'release/v4.4'
tinyusb: Update tinyusb.c to use the usb_phy API to configure PHY (v4.4)

See merge request espressif/esp-idf!16855
2022-01-26 00:51:42 +00:00
40949e8d43 Merge branch 'bugfix/app_compatible_with_3_1_bootloader_v4.4' into 'release/v4.4'
esp_system: Fix RTC_WDT protection in esp_restart_noos (v4.4)

See merge request espressif/esp-idf!16740
2022-01-26 00:50:54 +00:00
eb13f8a61d Merge branch 'bugfix/freertos_pd_ticks_to_ms_precision_v4.4' into 'release/v4.4'
Freertos: Fix loss of precision in pdTICKS_TO_MS (v4.4)

See merge request espressif/esp-idf!16673
2022-01-26 00:50:35 +00:00
3ea2a2ba9c Merge branch 'bugfix/bootloader_common_get_sha256_of_partition_when_image_invalid_v4.4' into 'release/v4.4'
bootloader: Fixes bootloader_common_get_sha256_of_partition. Adds hash check. (v4.4)

See merge request espressif/esp-idf!16923
2022-01-26 00:50:09 +00:00
0b5d4edbc6 bootloader: Fixes bootloader_common_get_sha256_of_partition. Adds hash check.
Closes https://github.com/espressif/esp-idf/issues/8274
2022-01-25 19:58:29 +08:00
1638b36804 efuse: Fixes eFuse timesettings issue on esp32c3 2022-01-25 19:14:31 +08:00
c11b6f4885 fix console stuck in auto test 2022-01-25 17:04:48 +08:00
780b9b6d78 Merge branch 'update/version_4_4_0' into 'release/v4.4'
Update version to 4.4.0

See merge request espressif/esp-idf!16909
2022-01-25 08:42:49 +00:00
c899c1b1da Merge branch 'bugfix/mdns_txt_alloc_issue_v4.4' into 'release/v4.4'
mdns: Fix alloc issue if TXT has empty value(Backport v4.4)

See merge request espressif/esp-idf!16889
2022-01-25 06:33:54 +00:00
8153bfe412 versions: Update version to 4.4.0 2022-01-24 23:05:26 +01:00
9f3b116e4f optmize a2dp demo document 2022-01-24 14:23:09 +08:00
e088379b26 ci: re-enable s3 build for few examples 2022-01-24 09:54:08 +05:30
9f0a6d8e16 Merge branch 'bugfix/mdns_txt_alloc_issue_v4.4' into 'release/v4.4'
mdns: Fix alloc issue if TXT has empty value

See merge request espressif/esp-idf!16889
2022-01-21 18:55:51 +00:00
b3f913a058 mdns: Fix alloc issue if TXT has empty value 2022-01-21 22:52:33 +04:00
0b46ac1732 Merge branch 'bugfix/pppos_client_docs_power' into 'release/v4.4'
Examples/PPPoS: Add troubleshooting to correctly power modem (v4.4)

See merge request espressif/esp-idf!16235
2022-01-21 09:46:13 +00:00
88486324db Merge branch 'bugfix/fix_tcp_transport_exception_v4.4' into 'release/v4.4'
tcp_transport: fix tcp trasnport exception(backport release/v4.4)

See merge request espressif/esp-idf!16811
2022-01-21 09:45:45 +00:00
f4c97455c4 Merge branch 'bugfix/apll_coeff_calculate_v4.4' into 'release/v4.4'
i2s: impove the clock division calculation (v4.4)

See merge request espressif/esp-idf!16783
2022-01-21 07:06:30 +00:00
b4fbd87f42 http2_request_example: Change the target http2 server to http2.github.io and
perform only a `GET` request.
2022-01-21 09:15:32 +05:30
f6ab703390 lcd: alloc framebuffer in alignment 2022-01-21 11:30:20 +08:00
9c262ce065 lcd: split gpio check for de and hv mode 2022-01-21 11:30:20 +08:00
ab118fe8be Merge branch 'bugfix/i2s_return_error_code_v4.4' into 'release/v4.4'
i2s: revert the reading/writing can return timeout error (v4.4)

See merge request espressif/esp-idf!16749
2022-01-21 01:21:07 +00:00
a48c6e097a tcp_transport: fix tcp trasnport exception 2022-01-20 15:38:44 +08:00
960672b979 add test for checking memory segments with esptool.py 2022-01-19 17:32:19 +01:00
40eede261e tools/idf_size: Fixed bug with wrong memory calculation 2022-01-19 17:32:18 +01:00
6a6801e357 tinyusb: Update tinyusb.c to use the usb_phy API to configure PHY 2022-01-19 18:18:08 +08:00
0382215ec7 spi_flash_test: remove threshold from unit test 2022-01-17 15:07:06 +08:00
a0e20e17f0 fix cs event for rd_rem_ext_feats delayed issue 2022-01-17 13:02:26 +08:00
2e3f4ff6dd tools: improve virtualenv diagnostics, set python path explicitly
- Check if pip is installed for sys.executable before attempting to
  create the virtual environment, bail out with an error if not.
- Don't pass --seeder argument to virtualenv if its version is
  too old. For example, on Ubuntu 18.04, virtualenv 15.1.0 doesn't
  support this argument.
- Pass --python argument to virtualenv to request specific interpreter
  to be used.

Closes https://github.com/espressif/esp-idf/issues/8045
2022-01-16 21:45:30 +01:00
698b406e56 ci: enable ccache for build jobs 2022-01-16 21:43:15 +01:00
d17194caea ci: disable ccache when running CMake build system tests
Some tests check if certain files are rebuilt when source files are
'touch'ed. With ccache, 'touch'ing source files doesn't cause a
rebuild, hence the test fails. In case IDF_CCACHE_ENABLE was set in
the environment, unset it before starting the tests.
2022-01-16 21:43:15 +01:00
816b0ce878 i2s: impove the apll and clock division calculation 2022-01-13 11:06:40 +08:00
f3e0c8bc41 Merge branch 'feature/oocd_ver_upgrade_v4.4' into 'release/v4.4'
tools: Updates OpenOCD version to 'v0.11.0-esp32-20211220' (v4.4)

See merge request espressif/esp-idf!16765
2022-01-12 14:19:54 +00:00
2a89b3c15a docs: Add user-friendly guide about how to use ws_server_example_test.py
Closes https://github.com/espressif/esp-idf/issues/8060
2022-01-12 20:36:59 +08:00
dbb0eeecc7 esp_https_ota: Fix esp_https_ota_begin may return ESP_OK when http status code is not 200 and may exist memory leak
Closes https://github.com/espressif/esp-idf/issues/8195
2022-01-12 19:53:08 +08:00
a3a05dc056 tools: Updates OpenOCD version to 'v0.11.0-esp32-20211220' 2022-01-12 16:39:07 +08:00
813948d137 Merge branch 'bugfix/tools_win_patch2_v4.4' into 'release/v4.4'
Add toolchain patch2 version for Windows with --with-gnu-ld option (v4.4)

See merge request espressif/esp-idf!16758
2022-01-12 08:33:35 +00:00
d0d3a2f2a0 Merge branch 'bugfix/idf_tools_test_without_versions_v4.4' into 'release/v4.4'
Tools: Load tool versions automatically for IDF Tools tests (v4.4)

See merge request espressif/esp-idf!16510
2022-01-12 08:29:46 +00:00
9cf57a86a0 smartconfig: Fix smartconfig set socket option fail
Closes https://github.com/espressif/esp-idf/issues/8189
2022-01-12 14:48:02 +08:00
c22e33d2ca tools: Add toolchain esp-2021r2-patch2 version for Windows with --with-gnu-ld option
Closes https://github.com/espressif/esp-idf/issues/7864
2022-01-11 20:20:43 +07:00
f0aaf48a93 i2s: revert reading/writing return error code
Closes https://github.com/espressif/esp-idf/issues/8121

Revert reading/writing return ESP_ERR_TIMEOUT introduced in commit b26da6f
2022-01-11 15:43:29 +08:00
7aa2577d86 esp_phy: move lib_printf.c to esp_phy
* fix the issue when esp32h2 target using phy_printf and rtc_printf
2022-01-11 12:09:11 +08:00
8f2045f0da esp_system: Fix RTC_WDT protection in esp_restart_noos
Fixed issue - v4.3 app not compatible with 3.1 bootloader
2022-01-10 21:57:29 +08:00
f4b329f9a5 Rename controller_hci_uart_esp32c3 to controller_hci_uart_esp32c3_and_esp32s3 2022-01-10 20:18:24 +08:00
b5d76c8c32 Added support for ESP32-S3 chip in controller_hci_uart_esp32c3's README 2022-01-10 20:18:17 +08:00
121b33be29 add nvs initialize 2022-01-10 20:18:12 +08:00
7485b4d4b2 btc_a2dp_control_set_datachnl_stat is only used by a2dp sink 2022-01-10 19:17:13 +08:00
49f496e539 remove btc_a2dp_dispatch_datapath_evt and event 2022-01-10 19:16:25 +08:00
e4277d5202 Fixed the crash caused by calling esp_a2d_media_ctrl(ESP_A2D_MEDIA_CTRL_START) after stream started 2022-01-10 19:15:30 +08:00
d338750b86 Fixed a2dp source audio data packet congestion causing choppy audio in a2dp sink 2022-01-10 19:15:17 +08:00
50e00e641b fixed config parse crash after flash_erase
Closes https://github.com/espressif/esp-idf/issues/6170
2022-01-10 17:41:57 +08:00
03d3c43882 Merge branch 'bugfix/fix_null_pointer_deference_issue_4.4_mr' into 'release/v4.4'
Fix the null pointer deference issue via Reconnection Spamming

See merge request espressif/esp-idf!16637
2022-01-10 08:31:33 +00:00
67b4ba33dd spi_flash: add support for th 1M flash 2022-01-10 12:39:09 +08:00
e2ef65e117 psram: add ESP32-D0WD-R2-V3 support 2022-01-10 10:39:00 +08:00
23ec015d75 adjust the order of RTC memory heap caps and regions 2022-01-08 16:19:35 +08:00
81936fd2b6 docs: add an example list for esp-wrover-kit 2022-01-07 16:47:54 +08:00
22b57850bd Merge branch 'bugfix/dpp_no_ip_issue_v4.4' into 'release/v4.4'
Fix STA not getting IP after DPP issue (Backport v4.4)

See merge request espressif/esp-idf!16645
2022-01-06 10:07:02 +00:00
bead7c2eeb freertos: Fix loss of precision in pdTICKS_TO_MS
Closes https://github.com/espressif/esp-idf/pull/7856
Closes https://github.com/espressif/esp-idf/issues/7853

[darian@espressif.com: Updated commit message]
Signed-off-by: Darian Leung <darian@espressif.com>
2022-01-06 15:44:17 +08:00
c1162b15dc Merge branch 'docs/s3_update_v4.4' into 'release/v4.4'
docs: update remaining programming guide docs for S3 (v4.4)

See merge request espressif/esp-idf!16668
2022-01-06 06:39:19 +00:00
b5a1df1db4 Merge branch 'bugfix/spi_slave_test_non_dma_v4.4' into 'release/v4.4'
spi-slave: fix single-board: hd test failing due to DMA buffers ending up in PSRAM (v4.4)

See merge request espressif/esp-idf!16305
2022-01-06 03:11:12 +00:00
219242de89 Merge branch 'bugfix/uart_custom_isr_broken' into 'release/v4.4'
UART: fix a bug preventing the user from freeing a previously registered ISR

See merge request espressif/esp-idf!16581
2022-01-06 03:10:29 +00:00
b64925c567 Merge branch 'docs/fatal_errors_update_4.4' into 'release/v4.4'
refactor (docs): improved fatal errors doc (backport v4.4)

See merge request espressif/esp-idf!16626
2022-01-06 03:10:05 +00:00
116ecf098c docs: Refactor FreeRTOS documentation
This commit refactors the FreeRTOS documentation as follows:

- Rewrite FreeRTOS SMP changes document (ESP-IDF FreeRTOS SMP)
    - Reorganized sections in kernel behavior changes
    - Rewrote descriptions of each kernel behavior changes
    - Added notes about using ESP-IDF FreeRTOS for single core targets
- Moved TLSP callback section to FreeRTOS Additions document
- Moved FreeRTOS configuration section to FreeRTOS API document
- Added notes about FreeRTOS applications in ESP-IDF
2022-01-06 10:19:33 +08:00
5869a4854f docs: fix hard coded target name in essl doc 2022-01-06 10:14:58 +08:00
65e9385d0a docs: Update Power Management and Sleep Modes docs for ESP32-S3 2022-01-06 10:14:57 +08:00
b0812baacd docs: Update TWAI docs for ESP32-S3 2022-01-06 10:14:57 +08:00
a0ed387f71 docs: update performance guide docs with S3 information 2022-01-06 10:14:57 +08:00
02bf07a1a0 docs: update docs with S3 specific information. 2022-01-06 10:14:54 +08:00
2e4c95c1ee update s3 doc 2022-01-06 10:09:51 +08:00
8c2990fcea trax: Adds ESP32-S3 support 2022-01-05 19:34:28 +01:00
18cd2ea3e6 apptrace: Adds ESP32-S3 support 2022-01-05 19:26:33 +01:00
fd9f97b5f4 emac_hal_start/stop function description added 2022-01-05 16:26:37 +01:00
63366f011a phy: update phy lib to remove ets_printf references 2022-01-05 17:29:55 +08:00
09552fdf68 ci: improve checks for Wi-Fi/PHYlibraries
- add missing Wi-Fi header MD5 checks for esp32c3, esp32s3
- check PHY libraries for references to ets_printf, in addition to
  checking Wi-Fi libraries. This used to happen until libphy.a was
  moved into a separate submodule.

Reported in https://github.com/espressif/esp-phy-lib/issues/3
2022-01-05 17:29:35 +08:00
b9989d3644 esp_wifi: Update wifi lib
Fix STA not getting IP after DPP
2022-01-05 16:24:00 +08:00
d83021a6e8 Merge branch 'bugfix/ftm_misc_issues_v4.4' into 'release/v4.4'
Miscellaneous FTM bugfixes (Backport v4.4)

See merge request espressif/esp-idf!16644
2022-01-05 08:12:39 +00:00
52224aebcf Fixed left right key confusion in comments.
"Left" and "Right" were swapped in some comments.
2022-01-05 10:46:46 +08:00
53c2b1f65b esp_wifi: Miscellaneous FTM bugfixes
1. Update wifi libs with bugfixes for corner cases
2. Avoid ASSERT for scan failure in FTM example
2022-01-04 15:49:45 +05:30
4288588751 UART: fix a bug preventing the user from freeing a previously registered ISR
* Closes https://github.com/espressif/esp-idf/issues/8150
2022-01-04 13:38:03 +08:00
d1f1b03beb Merge branch 'contrib/github_pr_7971_v4.4' into 'release/v4.4'
bugfix: Conflicting declaration error when include<rom/secure_boot.h> (v4.4)

See merge request espressif/esp-idf!16566
2022-01-04 03:37:35 +00:00
9a00ef1bc2 Merge branch 'feature/s3_rng_v4.4' into 'release/v4.4'
Bootloader add rng sampling (v4.4)

See merge request espressif/esp-idf!16623
2022-01-04 03:37:15 +00:00
abc18659e6 Merge branch 'bugfix/freertos_appcpu_int_disable_v4.4' into 'release/v4.4'
freertos: ensure interrupts are disabled before enabling tick timer (v4.4)

See merge request espressif/esp-idf!16606
2022-01-04 03:36:54 +00:00
8628079c42 There is an issue that if the the btm_cb.p_sec_dev_rec_list is full,but at the same
time we can't find old device to be replaced,then this can cause crash. So we need
to change the way to malloc the new device or replace the old in the list.
2022-01-04 10:42:09 +08:00
f9e7eb1fbf refactor (docs): improved fatal errors doc 2022-01-04 10:02:29 +08:00
ee24264c75 feat (bootloader): added rng sampling
Set maximum RNG query frequency to save value known from tests
2022-01-03 16:24:41 +05:30
bd9ee38f3c http: Fix parsing invalid url cause to crash
Reason:
For example, if an url is lack of leading 'http:' by mistake, it causes to http_parser_parse_url() cannot parse http host item,
and then pass the null host pointer to _get_host_header(), crash happens.

Fix:
http added null pointer check now.

Closes https://jira.espressif.com:8443/browse/ESPAT-953
2021-12-31 14:40:21 +08:00
f29492dc9d fix typos and format 2021-12-31 11:18:17 +08:00
dc707d5933 freertos: ensure interrupts are disabled before enabling tick timer
xPortStartScheduler calls vPortSetupTimer -> _frxt_tick_timer_init,
which enables tick timer interrupt and sets up the first timeout.
From that point on, the interrupt can fire. If the interrupt happens
while _frxt_dispatch is running, the scheduler will enter an infinite
loop. This is because _frxt_dispatch isn't supposed to be preemptable,
and the tick interrupt will overwrite some of the registers used by
_frxt_dispatch.
Note that this situation doesn't practically occur on the real
hardware, where the execution of vPortSetupTimer and _frxt_dispatch
happens quickly enough. However it can be reproduced on an emulator
if the tick period is set to 1ms.

Add an explicit call to portDISABLE_INTERRUPTS in xPortStartScheduler
to guarantee that _frxt_dispatch doesn't run with interrupts enabled.
This is similar to the esprv_intc_int_set_threshold(1); call in
RISC-V version of port.c.
2021-12-30 18:00:59 +08:00
3b1bdce816 optimize SPP documents 2021-12-30 16:11:56 +08:00
b25fb1111d gpio: Fix some gpio pin num errors on esp32s2 and esp32c3 2021-12-30 12:27:14 +08:00
e39b0dcd2e spacing styling correction 2021-12-30 10:47:49 +08:00
a61a935506 minor styling changes 2021-12-30 10:47:49 +08:00
b72a03fd07 esp_hid: fix output report char declaration
Current issue: output reports sent by Windows not received.
The report characteristic declaration should also support write without
response as specified by HIDS profile:
See https://www.bluetooth.com/specifications/GATT/ (page 14)
2021-12-30 10:47:49 +08:00
629bd67001 fix on esp_hidh report map length checking function
Closes https://github.com/espressif/esp-idf/issues/7586
2021-12-30 10:47:49 +08:00
8423e7d785 ledc.h - fix extern "C" to include ledc_cb_register()
(cherry picked from commit d4de08182e)
2021-12-29 21:14:37 +08:00
bf6b3ec0a8 component/bt: Support set HW CCA threshold value 2021-12-29 14:43:33 +08:00
5fc5016981 component/bt: fix periodic adv parameters detection issue 2021-12-29 14:43:22 +08:00
ace24fd3f8 components/bt: modify name of file 2021-12-29 14:31:54 +08:00
f4c6c48123 components/bt: Update the document of demo bt discovery 2021-12-29 14:31:38 +08:00
55bd48b24e components/bt: Modify demo bt_discovery 2021-12-29 14:31:20 +08:00
474ff3e38f wifi_prov_mgr: Added check for passphrase length in softAP scheme
Closes https://github.com/espressif/esp-idf/issues/8063
2021-12-28 18:13:40 +05:30
9d73448272 Fix copyright headers for few include files 2021-12-28 14:29:33 +05:30
530a06cf61 bugfix: Conflicting declaration error with include<esp_efuse.h>, and Unified secure_boot.h include guard to "pragma once". 2021-12-28 14:29:28 +05:30
bd8e9d98ba CI: change ap authmode from number to string (backport v4.4) 2021-12-27 19:57:40 +08:00
214d62b9ad Merge branch 'bugfix/install_key_refactor_v4.4' into 'release/v4.4'
esp_wifi: Refactor key install code(backport v4.4)

See merge request espressif/esp-idf!16532
2021-12-24 11:48:51 +00:00
d57b946bbf esp_wifi: Refactor key install code 2021-12-24 11:58:18 +08:00
f9ab0ac458 Merge branch 'feature/usb-msc_v4.4' into 'release/v4.4'
USB MSC class (v4.4)

See merge request espressif/esp-idf!16530
2021-12-24 03:48:29 +00:00
84ac488837 Merge branch 'bugfix/alarm_update_invalid_v4.4' into 'release/v4.4'
timer: stop alarm if alarm value doesn't change in ISR callback (v4.4)

See merge request espressif/esp-idf!16524
2021-12-24 03:48:10 +00:00
3171667845 Merge branch 'bugfix/rtc_section_alignment_v4.4_2' into 'release/v4.4'
System: fix RTCFAST section alignment (v4.4)

See merge request espressif/esp-idf!16517
2021-12-24 03:47:02 +00:00
3b4c2b8281 Merge branch 'bugfix/doc_for_ipc_isr_v4.4' into 'release/v4.4'
esp_ipc: Update documentation and API descriptions (v4.4)

See merge request espressif/esp-idf!16032
2021-12-24 03:35:54 +00:00
11cbcdf46a Merge branch 'bugfix/wpa3_memory_leak_v4.4' into 'release/v4.4'
esp_wifi: Fixes memory leak in wpa3.

See merge request espressif/esp-idf!16528
2021-12-24 03:27:31 +00:00
204aa05d0b USB: added MSC Host Driver with VFS support
Closes https://github.com/espressif/esp-idf/issues/6401
2021-12-23 18:30:24 +01:00
88acf66506 Merge branch 'bugfix/freemodbus_timer_struct_not_initialized' into 'release/v4.4'
freemodbus: fixed timer config struct not initialized issue (v4.4)

See merge request espressif/esp-idf!16117
2021-12-23 17:15:00 +00:00
e093575e39 freemodbus: fixed timer config struct not initialized issue (v4.4) 2021-12-23 17:15:00 +00:00
ec554944b7 Merge branch 'feature/backport/usb_host/cdc_driver' into 'release/v4.4'
USB: Add CDC-ACM subclass host driver (backport v4.4)

See merge request espressif/esp-idf!16363
2021-12-23 17:02:33 +00:00
7cd52401b0 esp_wifi: Fixes memory leak in wpa3. 2021-12-23 19:05:03 +05:30
5b80dd44be Merge branch 'feature/gdma_iram_interrupt_v4.4' into 'release/v4.4'
gdma: support IRAM interrupt (v4.4)

See merge request espressif/esp-idf!15993
2021-12-23 12:50:22 +00:00
9f5c6f287e Merge branch 'feature/update_adc_cali_due_to_efuse_version_change_v4.4' into 'release/v4.4'
adc: update s3 adc calibration efuse version (v4.4)

See merge request espressif/esp-idf!16357
2021-12-23 12:49:11 +00:00
81f81b97c3 Merge branch 'feature/adc_dma_driver_4.4' into 'release/v4.4'
adc: dma driver (v4.4)

See merge request espressif/esp-idf!16437
2021-12-23 12:48:47 +00:00
9a42760b22 Merge branch 'feature/posix_compat_functions_v4.4' into 'release/v4.4'
newlib: implement posix_memalign, sysconf, realpath (v4.4)

See merge request espressif/esp-idf!16464
2021-12-23 11:20:54 +00:00
66dd3dade9 Merge branch 'bugfix/ldgen_plus_in_archive_name_v4.4' into 'release/v4.4'
ldgen: allow + sign in archive names (v4.4)

See merge request espressif/esp-idf!16467
2021-12-23 11:15:47 +00:00
b0122177b7 timer: stop alarm if alarm value doesn't change in ISR handler
Alarm will be disabled by hardware when alarm event happend.
In the ISR, if auto-reload is enabled, we should re-enable the alarm.
If the alarm target value is changed in user's callback,
the alarm will be reenabled as well.

Closes https://github.com/espressif/esp-idf/issues/7001
Closes https://github.com/espressif/esp-idf/issues/8095
2021-12-23 18:58:43 +08:00
ec380d04b2 Merge branch 'refactor/fun_pointer_opi_v4.4' into 'release/v4.4'
opi_flash: Add a function pointer for opi required registers(backport v4.4)

See merge request espressif/esp-idf!16359
2021-12-23 09:24:18 +00:00
61149302e5 Merge branch 'bugfix/fix_spp_open_err_bda_v4.4' into 'release/v4.4'
Component_bt/Fix SPP acceptor open with wrong remote address[backport 4.4]

See merge request espressif/esp-idf!16519
2021-12-23 09:23:33 +00:00
1ec46ad3b8 adc: support adc dma driver on all chips 2021-12-23 17:13:46 +08:00
6279f9eb62 Merge branch 'bugfix/fix_heap_memory_corruption_v4.4' into 'release/v4.4'
Heap: Fix a possible bug in the TLSF allocator (backport v4.4)

See merge request espressif/esp-idf!16507
2021-12-23 03:29:45 +00:00
7f48664eda Merge branch 'feature/mbedtls-2.16.12-integration_v4.4' into 'release/v4.4'
mbedtls: upgrade to release v2.16.12 (v4.4)

See merge request espressif/esp-idf!16483
2021-12-23 03:26:17 +00:00
cb2906c7b2 Merge branch 'bugfix/fix_blufi_encryption_fail_v4.4' into 'release/v4.4'
components/bt: fix blufi encryption fail(backport release/v4.4)

See merge request espressif/esp-idf!16314
2021-12-23 03:23:24 +00:00
3390caf994 fix SPP open with wrong remote bd_addr 2021-12-23 10:02:39 +08:00
60386410ae System: fix RTCFAST section alignment
This bugfix contains 3 fixes:
1. .rtc_dummy section is removed (not needed for C3)
2. .rtc_text section is padded with 16B for possible CPU prefetch
3. .rtc_text section is aligned to 4B boundary to comply with PMS Memprot requirements
2021-12-22 21:58:20 +01:00
ba50a4e25e Merge branch 'bugfix/stdatomic_sync_op_and_fetch_v4.4' into 'release/v4.4'
newlib: stdatomic: implement missing "op_fetch", "nand" builtins (v4.4)

See merge request espressif/esp-idf!16465
2021-12-22 12:44:09 +00:00
62322caf38 Merge branch 'contrib/github_pr_7966_v4.4' into 'release/v4.4'
Changed argument pointer to correct data (GitHub PR) (v4.4)

See merge request espressif/esp-idf!16423
2021-12-22 12:42:27 +00:00
3051ad2159 components/bt: fix blufi encryption fail 2021-12-22 20:40:48 +08:00
710883d9bf Merge branch 'bugfix/scannable_adv_duration_estimation_v4.4' into 'release/v4.4'
[Coexistence]: fixed BLE scannable extended adv performance issue in case of Wi-Fi coexistence(backport v4.4)

See merge request espressif/esp-idf!16476
2021-12-22 12:38:17 +00:00
af429e56bb Merge branch 'bugfix/esp_eth_start_tx_buff_v4.4' into 'release/v4.4'
Fixed ESP32 EMAC driver `insufficient TX buffer size` (v4.4)

See merge request espressif/esp-idf!16497
2021-12-22 12:36:40 +00:00
a15bac6b5c Merge branch 'docs/fix_typo_in_header_file' into 'release/v4.4'
docs: Fix typo in sdmmc_cmd.h and inconsistency in spi_master.h (backport release/v4.4)

See merge request espressif/esp-idf!16382
2021-12-22 12:34:05 +00:00
451a173960 Merge branch 'bugfix/idf_exe_dll_deps_v4.4' into 'release/v4.4'
tools: fix idf_exe dependency on vcruntime140.dll, move it out of IDF (v4.4)

See merge request espressif/esp-idf!16352
2021-12-22 12:29:58 +00:00
255ca3d18e Merge branch 'feature/cmake_linux_arm64_v4.4' into 'release/v4.4'
tools: updates for linux-arm64 (aarch64) platform (v4.4)

See merge request espressif/esp-idf!16353
2021-12-22 12:29:33 +00:00
abc7365777 Merge branch 'docs/pthread_rw_lock' into 'release/v4.4'
Docs: documentation about reader-writer-lock impl (v4.4)

See merge request espressif/esp-idf!16148
2021-12-22 12:29:19 +00:00
07221ebaf5 Merge branch 'bugifx/freertos_missing_api_config_v4.4' into 'release/v4.4'
freertos: Add missing INCLUDE_ configurations for some functions (v4.4)

See merge request espressif/esp-idf!16267
2021-12-22 12:28:35 +00:00
c2a71ce5c6 Merge branch 'feature/mbedtls_dynamic_memory_v4.4' into 'release/v4.4'
fix(mbedtls): fix compiling error when open MBEDTLS_SSL_PROTO_DTLS and disable...(backport v4.4)

See merge request espressif/esp-idf!16472
2021-12-22 12:27:27 +00:00
f158a0d538 newlib: implement posix_memalign, sysconf, realpath
Closes https://github.com/espressif/esp-idf/issues/6119
Closes https://github.com/espressif/esp-idf/issues/7798
2021-12-22 10:54:54 +01:00
0b43544a24 Tools: Load tool versions automatically for IDF Tools tests 2021-12-22 10:31:17 +01:00
155de9c49e Heap: Add a target test to check that TLFS allocates the requested size 2021-12-22 14:06:41 +08:00
09db8845c6 Heap: Fix a possible bug in the TLSF allocator
Fix a bug that could return a chunk of memory smaller than requested,
easily leading to a memory corruption, when the required memory alignment
passed to the allocator is 4.
2021-12-22 14:06:41 +08:00
5f5f8bd64e Merge branch 'bugifx/nimble_timer_memory_leak_v4.4' into 'release/v4.4'
[NimBLE]: Fixed memory leak of timer during NimBLE Host start-stop process(backport v4.4)

See merge request espressif/esp-idf!16445
2021-12-22 05:45:23 +00:00
02c7dbab81 Merge branch 'ci/upload_build_example_for_release_test_4.4' into 'release/v4.4'
ci: preserve artifacts for local test apps (4.4)

See merge request espressif/esp-idf!16291
2021-12-22 05:44:01 +00:00
775f2886cc Merge branch 'bugfix/fix_rx_fragment_error_issue_v4.4' into 'release/v4.4'
esp_wifi: fix fragment issue and PMF compatible for faulty APs(Backport v4.4)

See merge request espressif/esp-idf!16390
2021-12-22 05:40:19 +00:00
74ba1175b6 Fixed ESP32 EMAC driver insufficient TX buffer size which could followed esp_eth_stop and esp_eth_start sequence 2021-12-21 14:04:55 +01:00
c91afab332 fix(mbedtls): fix compiling error when open MBEDTLS_SSL_PROTO_DTLS and disable MBEDTLS_SSL_PROTO_DTLS when open MBEDTLS_DYNAMIC_BUFFER 2021-12-21 16:31:47 +08:00
3e3e1a9a9d mbedtls: upgrade to release v2.16.12
For release notes, please refer to:
https://github.com/ARMmbed/mbedtls/releases/tag/v2.16.12
2021-12-21 13:58:40 +05:30
d0b465c7cd mbedtls: small documentation update 2021-12-21 13:58:40 +05:30
8152978d73 component/bt: fixed coexistence scannable extended adv performance issue 2021-12-21 12:43:33 +08:00
bcd47fa0cc component/bt/host/nimble: fixed memory leak due to timer not destroyed during NimBLE host start-stop 2021-12-21 12:31:42 +08:00
d037359359 Merge branch 'bugfix/static_analysis_fixes_v4.4' into 'release/v4.4'
ESP_WIFI: Remove static analysis warnings(backport v4.4)

See merge request espressif/esp-idf!16333
2021-12-21 04:11:22 +00:00
187f47d232 Merge branch 'feature/support_ble_direct_ind_low_adv_v4.4' into 'release/v4.4'
components/bt: Support low duty cycle directed advertising(backport release/v4.4)

See merge request espressif/esp-idf!16377
2021-12-21 04:07:13 +00:00
c50eec53d1 Merge branch 'bugfix/fix_spp_listen_err_v4.4' into 'release/v4.4'
Component_bt/Fix SPP cannot malloc slot bugs[backport v4.4]

See merge request espressif/esp-idf!16383
2021-12-21 04:06:40 +00:00
a650995a2e Merge branch 'bugfix/bt_enc_proc_finish_v4.4' into 'release/v4.4'
bt/bugfix: ACL Rx data is sent to host before enc change event

See merge request espressif/esp-idf!16424
2021-12-21 04:06:22 +00:00
8529a1da35 Merge branch 'bugfix/wpa_supplicant_logs_release_v4.4' into 'release/v4.4'
esp_wifi: Change the verbosity of wpa_supplicant logs (Backport v4.4)

See merge request espressif/esp-idf!16340
2021-12-21 04:03:17 +00:00
f01fa89404 Merge branch 'mesh/bugfix_fix_no_ip_issue_v4.4' into 'release/v4.4'
esp_wifi_mesh: fix the device can not receive IP_EVENT_STA_GOT_IP when the router restarted(backport_v4.4)

See merge request espressif/esp-idf!16343
2021-12-21 04:02:14 +00:00
518f94270b Merge branch 'bugfix/v4.4-otbr-crash' into 'release/v4.4'
openthread: update libraries to v4.4 release

See merge request espressif/esp-idf!16447
2021-12-21 04:01:38 +00:00
f72baac109 freertos: Add missing INCLUDE_ configurations for some functions
This commit adds missing INCLUDE_ configurations to FreeRTOSConfig.h for
the following functions:

- xTaskAbortDelay()
- xTaskGetHandle()

Unit tests for these functions were also added.

Closes https://github.com/espressif/esp-idf/issues/7902
2021-12-21 10:54:28 +08:00
fbdb781fcb ldgen: allow + sign in archive names
Closes https://github.com/espressif/esp-idf/issues/8073
2021-12-21 02:16:32 +01:00
c8c65a2854 newlib: stdatomic: implement missing "op_fetch", "nand" builtins
* Adds implementations of __{atomic,sync}_nand_fetch_n. These builtins
  were implemented for other operations but were not defined for NAND.
* Adds implementation of __atomic_OP_fetch_n for all OPs.
* Adds implementation of __sync_OP_and_fetch_n for all OPs.

Reported in https://github.com/espressif/arduino-esp32/issues/5948
2021-12-21 02:15:45 +01:00
8763c82e26 Fix Typos 2021-12-20 17:04:24 +08:00
dec183dbb5 Optimize HFP Documents 2021-12-20 17:04:15 +08:00
9688cf5c04 openthread: update libraries to v4.4 release
Fixes the library mismatch and border router crash issue in v4.4
release.
2021-12-20 16:16:10 +08:00
63ac2111ce esp_ipc: Update documentation and API descriptions
This commit updates the documentation and API descriptions of
the esp_ipc and esp_ipc_isr features.
2021-12-20 12:41:10 +08:00
a79dc75f0a Merge branch 'bugfix/fix_variable_on_stack_bug_in_seg_slave_example_v4.4' into 'release/v4.4'
spi_slave_hd: fix stack variable bug in seg_slave example (v4.4)

See merge request espressif/esp-idf!16388
2021-12-16 10:17:56 +00:00
161d7ee25a Merge branch 'bugfix/mcpwm_ll_missing_type_conversion_v4.4' into 'release/v4.4'
mcpwm: fix implicit conversion in LL function (v4.4)

See merge request espressif/esp-idf!16407
2021-12-16 10:16:03 +00:00
a2b88eb1a0 Merge branch 'bugfix/fix_adc1_chan8_9_not_defined_on_s3_v4.4' into 'release/v4.4'
adc: fix adc1 channel 8 and 9 not defined bug on s3 (v4.4)

See merge request espressif/esp-idf!16399
2021-12-16 10:14:17 +00:00
431bf72295 bt/bugfix: ACL Rx data is sent to host before enc change event 2021-12-16 15:41:31 +05:30
04fab6f1ac Fixed pcap summary print of 802.11 frame
802.11 Packet Type and Packet Subtype is now correctly decoded
2021-12-16 10:28:30 +01:00
762031424b Changed argument pointer to correct data 2021-12-16 10:28:30 +01:00
b67c833c88 esp_wifi_mesh: fix the device can not receive IP_EVENT_STA_GOT_IP when the router restarted 2021-12-16 17:23:55 +08:00
23e4c12a86 mcpwm: fix implicit conversion in LL function
Closes https://github.com/espressif/esp-idf/issues/8066
2021-12-15 10:24:42 +08:00
2aed35b804 adc: fix adc1 channel 8 and 9 not defined bug on s3 2021-12-14 20:10:47 +08:00
40ae2037bc esp_wifi: Change the verbosity of wpa_supplicant log. 2021-12-14 14:29:09 +05:30
416b3b9465 allow for minimal scope of wifi_init_config_t
With this change one can use the default config as a variable with minimal scope: esp_wifi_init(&(wifi_init_config_t)WIFI_INIT_CONFIG_DEFAULT())
2021-12-14 12:46:37 +08:00
c42db9308f docs: Update miswritten and abbreviated words and syntax errors for initialize WiFi section in esp_wifi.h header file 2021-12-14 12:46:11 +08:00
094b3dba33 esp_wifi: fix fragment issue and PMF compatible for faulty APs
1. fix(pp): fix fragment plt loss when 2td pn compare with 1th pn
2. pmf allow keyindex in big endian format to workaround faulty APs
3. docs: update miswritten and abbreviated words and syntax errors for initialize WiFi section in esp_wifi.h header file
4. allow for minimal scope of wifi_init_config_t
2021-12-14 12:42:25 +08:00
39ed1b2862 spi_slave_hd: fix stack variable bug in seg_slave example
Closes https://github.com/espressif/esp-idf/issues/7163
2021-12-14 12:36:40 +08:00
b8602d4bf9 fix SPP server bugs when the BTC layer can not allocate a slot for the listen port 2021-12-14 11:03:57 +08:00
215f8fe68e docs: fix typo in header files 2021-12-14 11:01:17 +08:00
a628ef5be0 components/bt: Fix high duty cycle directed advertising will not be stopped when timeout 2021-12-14 09:32:34 +08:00
5086d6f3d2 components/bt: Support low duty cycle directed advertising 2021-12-14 09:32:15 +08:00
7506a725be docs: Rebase and typos fixed for the bluetooth README files 2021-12-13 10:31:09 +00:00
4a429d59ac adc: update adc calibration efuse version
ADC calibration scheme and algorithm are not changed. Only the eFuse bit BLOCK1_VERSION is changed. This MR updated the logic to recognize the adc efuse version
2021-12-13 13:03:23 +08:00
f64f2e4955 docs: Update inconsistency parts for S3 documentation, set a default value for future targets, and remove line breaks inside paragraphs 2021-12-13 11:23:18 +08:00
e04eae6659 usb: Add USB host CDC-ACM class driver 2021-12-10 10:04:16 +01:00
a9a5894fe9 opi_flash: Add a function pointer for opi required registers 2021-12-10 15:11:33 +08:00
36934317b0 tools: don't install binutils-esp32ulp on aarch64
Once new binutils-esp32ulp is made and aarch64 artifacts are added,
will add these tools back.

Related to https://github.com/espressif/esp-idf/issues/6432
2021-12-09 17:36:00 +01:00
4949d55ea0 tools: add CMake for linux-arm64 (aarch64) platform
Allows installing cmake on aarch64 linux platforms. Also necessary
when building IDF docker image on macOS aarch64.

Part of https://github.com/espressif/esp-idf/issues/6432
2021-12-09 17:36:00 +01:00
8b4b2234e4 tools: upgrade idf_exe to 1.0.3
https://github.com/espressif/idf_py_exe_tool/releases/tag/v1.0.3
2021-12-09 17:24:43 +01:00
07644ee5cd tools: move idf_exe out of IDF
Source code moved into https://github.com/espressif/idf_py_exe_tool,
so that releases can be built in CI and hosted on Github.
2021-12-09 17:24:43 +01:00
f23dcd3555 Merge branch 'bugfix/fix_phy_enable_watchdog_timeout_issue_4.4' into 'release/v4.4'
Fix the ble task watchdog timeout issue

See merge request espressif/esp-idf!16287
2021-12-09 08:32:34 +00:00
a39af9b000 Merge branch 'bugfix/s3_rtc_ram_deepsleep_test_v4.4' into 'release/v4.4'
ci: fix "can set sleep wake stub from stack in RTC RAM" test case failure (v4.4)

See merge request espressif/esp-idf!16341
2021-12-09 08:25:04 +00:00
25873a668a Merge branch 'bugfix/remove_PIP_USER_v4.4' into 'release/v4.4'
tools: Add check for PIP_USER variable (backport v4.4)

See merge request espressif/esp-idf!16338
2021-12-09 08:11:55 +00:00
d730c84038 ci: fix "can set sleep wake stub from stack in RTC RAM" test case failure
"can set sleep wake stub from stack in RTC RAM" would randomly fail on S3 due to stack overflow.

Fixed wrong usage of stack size and slightly increased it.
2021-12-09 13:59:30 +08:00
fd2000184a ci: add test dir examples/bluetooth/hci/controller_hci_uart_esp32 2021-12-09 13:48:38 +08:00
4d73d4db36 example: build ble_mesh_console example on c3 and s3 as well 2021-12-09 13:48:38 +08:00
4a11276cf4 ci: preserve artifacts for local test apps 2021-12-09 13:48:38 +08:00
e104dd7f27 Merge branch 'bugfix/fix_wifi_bugs_v4.4' into 'release/v4.4'
esp_wifi: fix wifi bugs (Backport v4.4)

See merge request espressif/esp-idf!16278
2021-12-08 15:46:40 +00:00
1e39970e91 tools: Add check for PIP_USER variable
Closes https://github.com/espressif/esp-idf/issues/7910
2021-12-08 16:25:17 +01:00
bd650062ca Merge branch 'feature/update_rtc_memory_heap_caps' into 'release/v4.4'
heap: update RTC memory heap caps (backport v4.4)

See merge request espressif/esp-idf!15941
2021-12-08 13:35:18 +00:00
141c1cd004 Merge branch 'bugfix/crypto_allocate_lldesc_v4.4' into 'release/v4.4'
crypto: dont create DMA descriptors on the stack (v4.4)

See merge request espressif/esp-idf!16323
2021-12-08 13:31:41 +00:00
a77ab8c03e ESP_WIFI: Remove static analysis warnings 2021-12-08 18:03:43 +05:30
c190ab1830 Merge branch 'fix/remove_warning_when_disabling_rom_dl_mode_v4.4' into 'release/v4.4'
secure_boot: Fix warning when UART ROM DL mode is disabled (v4.4)

See merge request espressif/esp-idf!16228
2021-12-08 11:56:15 +00:00
9c686ff341 Update esp32c3 and esp32s3 phy lib and bb lib
Fix the ble task watchdog timeout issue caused by phy enable when exit modem sleep.
2021-12-08 19:16:28 +08:00
fe5ee1041c Merge branch 'bugfix/minimal_stacksize_watchpoint_aware_4.4' into 'release/v4.4'
[freertos]: Changed minimal stack size to regard watchpoint usage (backport v4.4)

See merge request espressif/esp-idf!16303
2021-12-08 10:28:05 +00:00
f2db4c7520 Merge branch 'bugfix/ringbuf_send_semaphore_release_order_v4.4' into 'release/v4.4'
esp_ringbuf: Fix order of semaphore release in xRingbufferSend (v4.4)

See merge request espressif/esp-idf!16229
2021-12-08 10:26:12 +00:00
b4a32e3812 Merge branch 'bugfix/html_redirect_v4.4' into 'release/v4.4'
docs: fix html redirects not working (v4.4)

See merge request espressif/esp-idf!16284
2021-12-08 10:25:47 +00:00
a6e31652b8 Merge branch 'feature/mbedtls_dynamic_memory_v4.4' into 'release/v4.4'
feat(mbedtls): modify __wrap_mbedtls_ssl_setup to decrease SSL peak heap cost(backport v4.4)

See merge request espressif/esp-idf!16275
2021-12-08 10:21:04 +00:00
7d7f91e1d8 Merge branch 'docs/update_the_pinout_figure_of_esp32_devkitc_v4.4' into 'release/v4.4'
docs: update the module on esp32-devkitc from esp32-wrover to esp32-wroom (v4.4)

See merge request espressif/esp-idf!15963
2021-12-08 10:15:54 +00:00
a89ff2677b Merge branch 'bugfix/fix_esp32h2_efuse_get_ext_mac_v4.4' into 'release/v4.4'
efuse_table_gen: Fixes wrong joining fields with omitted names (v4.4)

See merge request espressif/esp-idf!15735
2021-12-08 10:12:25 +00:00
67fcfc2e02 Merge branch 'feature/freertos_try_enter_critical_v4.4' into 'release/v4.4'
freertos: Add portTRY_ENTRY_CRITICAL() and deprecate legacy spinlock fucntions (v4.4)

See merge request espressif/esp-idf!16040
2021-12-08 10:10:17 +00:00
ff3922d217 Merge branch 'bugfix/fix_select_timeout_v4.4' into 'release/v4.4'
VFS: `select` function's timeout is now POSIX compliant (and fix eventfd example) (backport v4.4)

See merge request espressif/esp-idf!16189
2021-12-08 08:32:42 +00:00
2a2d8f5cbc efuse_example_test: Fix the example test
*Unify the log messages when UART ROM Download mode is kept enabled
2021-12-08 16:11:59 +08:00
2c0081b286 secure_boot: Fix warning when UART ROM DL mode is disabled
*Additionally use updated calls to enable rom secure download mode
2021-12-08 16:11:59 +08:00
a1ee43fe9d crypto: also apply cache writeback/invalidate for SPIRAM_USE_MEMMAP
Closes https://github.com/espressif/esp-idf/issues/7944
2021-12-08 16:10:19 +08:00
3b3826b61c crypto: allocate all DMA descriptors to DMA capable memory.
These were previously placed on the stack, but the stack could be placed in
RTC RAM which is not DMA capable.
2021-12-08 16:10:18 +08:00
36e1d1c180 Merge branch 'bugfix/wifi_netif_on_off_cycle_race_v4.4' into 'release/v4.4'
wifi: Fix race conditon invoking invalid callback on deinit (v4.4)

See merge request espressif/esp-idf!16309
2021-12-08 07:31:13 +00:00
feee6a2f36 Merge branch 'bugfix/eth_emac_reset_dma_desc_v4.4' into 'release/v4.4'
esp-eth: emac: Reset Tx DMA channel owner on init (v4.4)

See merge request espressif/esp-idf!16008
2021-12-08 07:18:42 +00:00
f4e5948102 Merge branch 'bugfix/lcd_rgb_pclk_default_to_low_v4.4' into 'release/v4.4'
lcd: rgb pclk idle default to low && RMT IR protocol example for esp32s3 (v4.4)

See merge request espressif/esp-idf!16211
2021-12-08 07:01:08 +00:00
1b7cc59b10 wifi: Fix race conditon invoking invalid callback on deinit
Closes https://github.com/espressif/esp-idf/issues/7579
2021-12-08 07:14:08 +01:00
32077601c4 bugfix (freertos): Changed minimal stack size to regard watchpoint usage 2021-12-08 11:29:09 +08:00
68fc49c4d2 spi-slave: fix single-board: hd test failing due to DMA buffers ending up in PSRAM 2021-12-08 10:59:26 +08:00
d1dc428820 docs: fix html redirects not working
HTML redirects for docs broke during migration to esp-docs.
2021-12-07 09:12:46 +08:00
d7599a53b8 esp_wifi: Update wifi lib
1. Fix FTM failures after repeated operations
2. Update Mexico channel refer to FCC
3. Mesh: fix the issue that layer2 node connect to lower-layer node when FIXED-ROOT root disappeared
4. Decouple softap and 8684 support
2021-12-06 17:45:57 +08:00
f490adf800 esp_wifi: support station only mode for code size down 2021-12-06 17:34:56 +08:00
440b0001d0 esp_wifi: Reset event bits in ftm example to avoid repeated failures
Closes https://github.com/espressif/esp-idf/pull/7773
2021-12-06 17:34:00 +08:00
03b7ffdf4a feat(mbedtls): modify __wrap_mbedtls_ssl_setup to decrease SSL peak heap cost 2021-12-06 17:07:11 +08:00
220a91ae30 Merge branch 'feature/adds_fault_injection_protection_for_check_anti_rollback_v4.4' into 'release/v4.4'
bootloader_support: Adds fault injection protection for check_anti_rollback (v4.4)

See merge request espressif/esp-idf!16179
2021-12-06 04:03:11 +00:00
6affb3da3c Merge branch 'bugfix/scheduler_state_query_thread_safety_v4.4' into 'release/v4.4'
freertos: fix thread safety for checking scheduler state (v4.4)

See merge request espressif/esp-idf!16126
2021-12-06 04:02:53 +00:00
3211346669 Merge branch 'bugfix/hardware_mpi_fallback_issue_v4.4' into 'release/v4.4'
mbedtls: fix hardware MPI (bignum) related regression (v4.4)

See merge request espressif/esp-idf!16236
2021-12-06 04:00:36 +00:00
0c8391acb1 Merge branch 'reduce_bootup_time_when_using_usb-serial-jtag_v4.4' into 'release/v4.4'
rtc_clk: reduce bootup time when using usb-serial-jtag(backport v4.4)

See merge request espressif/esp-idf!16260
2021-12-06 04:00:01 +00:00
b458a60791 Merge branch 'bugfix/fix_can_not_find_mac_addr_error_mr_4.4' into 'release/v4.4'
fix can not find mac addr error

See merge request espressif/esp-idf!16145
2021-12-06 03:37:24 +00:00
5e9c085ae9 Merge branch 'bugfix/xStreamBufferReset_crashing_v4.4' into 'release/v4.4'
FreeRTOS: Fix xStreamBufferReset function always crashing (backport v4.4)

See merge request espressif/esp-idf!16170
2021-12-06 03:36:51 +00:00
faa6ec04f2 Merge branch 'feature/update_option_len_default_value_v4.4' into 'release/v4.4'
lw-ip: Update LWIP_DHCP_OPTIONS_LEN default value when LWIP_DHCP_DISABLE_VENDOR_CLASS_ID disabled(backport v4.4)

See merge request espressif/esp-idf!16253
2021-12-06 03:36:03 +00:00
7ae887dead rmt: update ir example to work with esp32s3 out of box 2021-12-06 10:02:55 +08:00
e311554554 lcd: rgb pclk idle default to low 2021-12-06 10:02:55 +08:00
1d6c95000b reduce bootup time when using usb-serial-jtag 2021-12-03 20:50:22 +08:00
3ebb1a2a00 lwip: Update LWIP_DHCP_OPTIONS_LEN default value when LWIP_DHCP_DISABLE_VENDOR_CLASS_ID disabled
Closes https://github.com/espressif/esp-idf/issues/7742
2021-12-03 17:23:35 +08:00
4fca21b67c Merge branch 'feature/remove_component_manager_tests_v4.4' into 'release/v4.4'
ci: Remove component manager test from build system tests (v4.4)

See merge request espressif/esp-idf!16106
2021-12-02 12:09:49 +00:00
a28e0bf064 mbedtls: remove wrap from component.mk as well
Note: This was not required in original MR, as master branch does
not support GNU Make.
2021-12-02 17:13:31 +05:30
2af37752fe Merge branch 'docs/update_s3_wroom_datasheet_link_backport_v4.4' into 'release/v4.4'
Fix link to esp32-s3-wroom-1 datasheet link (backport v4.4)

See merge request espressif/esp-idf!16093
2021-12-02 09:37:19 +00:00
7fe9d41e33 esp_bignum: move check for supported MPI bits at start of API
This can allow hardware MPI API to return as soon as it identifies
that it can handle require bitlength operation.
2021-12-02 15:07:08 +05:30
9cb4948a23 mbedtls: update mbedtls submodule pointer for MPI API change 2021-12-02 15:07:08 +05:30
99c9637e9b mbedtls: fix hardware MPI (bignum) related regression
In commit de22f3a4e5, combination of
hardware and software MPI (bignum) related approach was used to
work around chip (e.g. ESP32-C3) limitation of max 3072 bits support.

This was done using linker "--wrap" flag but since the relevant API is
being used in same translation (compilation unit), hardware mode was not
getting used in some cases (e.g., RSA key generation).

This commit modified internal mbedTLS API and makes software+hardware
combination deterministic.
2021-12-02 15:07:08 +05:30
e0e6523c09 mbedtls: update kconfig help to correct on supported MPI bits 2021-12-02 15:07:07 +05:30
c25408a009 docs:update the link to esp32-s3-wroom-1 datasheet 2021-12-02 16:51:23 +08:00
288b2a22a5 Examples/PPPoS: Add troubleshooting to correctly power modem
Closes https://github.com/espressif/esp-idf/issues/7807
2021-12-02 09:09:23 +01:00
b98a2a41e0 Merge branch 'bugfix/ksz8081_loopback' into 'release/v4.4'
KSZ8081 Loopback Callback Fix

See merge request espressif/esp-idf!16081
2021-12-02 07:29:31 +00:00
d5c607c54a Merge branch 'bugfix/dm9051_tx_throughput_rate_optimization_v4.4' into 'release/v4.4'
esp_eth: optimize dm9051 Tx throughput(v4.4)

See merge request espressif/esp-idf!15885
2021-12-02 06:51:22 +00:00
92829f66c8 esp_ringbuf: Fix assertion xQueueGenericSend queue.c:818
The release of the semaphore indicating the item was successfully sent must be the last semaphore released.  The receiver may be in another task and may delete the Ringbuffer (such as with a return code across tasks design pattern) if they are through with the Ringbuffer.

The function xRingbufferSendAcquire followed by xRingbufferSendComplete had the semaphores released in the proper order and that same pattern should have been used in xRingbufferSend and xRingbufferSendFromISR.  This commit fixes this order.

Issue (IDFGH-6030) #7716 describes the problem in more detail.

Closes IDFGH-6030, https://github.com/espressif/esp-idf/issues/7716
Closes IDFGH-6036, https://github.com/espressif/esp-idf/pull/7721
2021-12-02 10:25:06 +05:30
762689de86 ci: Fix build system tests to clean the dir 2021-12-01 18:19:15 +01:00
aa96a98c0c Merge branch 'bugfix/riscv_fix_vector_mcause_v4.4' into 'release/v4.4'
RISC-V: fix usage of special register when interrupts are enabled (backport v4.4)

See merge request espressif/esp-idf!16187
2021-12-01 04:20:54 +00:00
66c547e5ab Merge branch 'bugfix/ringbuf_read_pointer_wrap_v4.4' into 'release/v4.4'
ringbuf: Fix bug where comparision between a signed and unsigned operand resulted in incorrect free size for no-split/allow-split buffers (v4.4)

See merge request espressif/esp-idf!15881
2021-12-01 04:18:48 +00:00
3a1e8a9810 Merge branch 'bugfix/avoid-exception-messages-while-export_v4.4' into 'release/v4.4'
Avoid exception messages while autocomplete initialization in export.sh (v4.4)

See merge request espressif/esp-idf!16199
2021-11-30 15:48:55 +00:00
376514480d Merge branch 'feature/backport_v4.4_add_get_errno_api_for_http_client' into 'release/v4.4'
esp_http_client: add a get HTTP client session errno API for esp_http_client(backport v4.4)

See merge request espressif/esp-idf!16195
2021-11-30 12:23:31 +00:00
ee881e3f96 Avoid exception messages while autocomplete initialization in export.sh 2021-11-30 12:42:53 +01:00
8848462d50 Merge branch 'nimble/add_throughput_example_v4.4' into 'release/v4.4'
NimBLE: Add NimBLE throughput demo examples (v4.4)

See merge request espressif/esp-idf!16138
2021-11-30 08:02:35 +00:00
5c08cd3fe1 esp_http_client: add a get HTTP client session errno API for esp_http_client(backport v4.4) 2021-11-30 15:26:48 +08:00
a96b8e151d Add the feature that switch random address to origin mac addr in the ADV
report data.
2021-11-30 14:24:52 +08:00
e91fd5ece9 Example: Fix eventfd example test and added a diagram to explain printed values 2021-11-30 12:01:43 +08:00
51e295b5c2 Merge branch 'bugfix/vfs-select-lock-latency-4.4' into 'release/v4.4'
vfs: reduce lock in vfs_select (v4.4)

See merge request espressif/esp-idf!16172
2021-11-30 03:56:08 +00:00
95eb17a61a Merge branch 'nimble_spp_v4.4' into 'release/v4.4'
NimBLE: BLE example for SPP service (v4.4)

See merge request espressif/esp-idf!16122
2021-11-30 03:54:44 +00:00
db6bc89b8c Merge branch 'bugfix/leedarson_v4.4' into 'release/v4.4'
component_bt: Fix some code logic errors (v4.4)

See merge request espressif/esp-idf!16016
2021-11-30 03:52:24 +00:00
cf21312d8d VFS: select function's timeout is now POSIX compliant
`select` function will now round up the timeout passed as a parameter (if any).
It  makes it POSIX compliant.

* Closes https://github.com/espressif/esp-idf/issues/7514
2021-11-30 11:51:46 +08:00
7cab983b86 RISC-V: fix usage of special register when interrupts are enabled 2021-11-30 11:45:18 +08:00
18612738db Merge branch 'docs/blink_update_supported_targets_on_readme_v4.4' into 'release/v4.4'
example: Update on the README file to change from ESP32-S3-Addax-1 to ESP32-S3-DevKitC-1 (v4.4)

See merge request espressif/esp-idf!15956
2021-11-29 20:40:51 +00:00
5f7037d143 bootloader: add anti-FI checks around secure version in anti-rollback scheme 2021-11-29 18:49:22 +05:30
26baeaca60 esp_eth: add loopback for ksz8081 2021-11-29 20:16:35 +08:00
ce7c936633 vfs: reduce lock in vfs_select 2021-11-29 17:32:43 +08:00
581f1c4550 FreeRTOS: Fix xStreamBufferReset function always crashing
This function resets the spinlock given as a parameter after taking it
(when entering the critical section). This then results in a panic once
it tries to exit the same critical section.

* Closes https://github.com/espressif/esp-idf/issues/7725
2021-11-29 15:31:30 +08:00
75fa6d7e3f Merge branch 'feature/add_coex_hci_command_v4.4' into 'release/v4.4'
Add hci command to set coexistence status (v4.4)

See merge request espressif/esp-idf!16053
2021-11-29 03:23:32 +00:00
a524bd85fd Merge branch 'bugfix/bootloader_utility_warnings_v4.4' into 'release/v4.4'
bootloader_support: Fix compiler warnings (v4.4)

See merge request espressif/esp-idf!16139
2021-11-26 13:32:28 +00:00
3c02b30a54 Merge branch 'bugfix/app_trace_tmo_init_v4.4' into 'release/v4.4'
startup: init timer before calling esp_apptrace_tmo_init (v4.4)

See merge request espressif/esp-idf!16136
2021-11-26 11:53:09 +00:00
8179e858a9 docs(pthread): documentation about reader-writer-lock impl 2021-11-26 16:21:03 +08:00
8fec43eecb Merge branch 'nimble/add_throughput_example' into 'master'
NimBLE throughput example: Changed write api to write without response

See merge request espressif/esp-idf!16138
2021-11-26 12:07:11 +05:30
19727b4968 Merge branch 'docs/examples_bluedroid_ble50_v4.4' into 'release/v4.4'
Readme for the bluedroid ble50 example with tutorial of walkthrough example (v4.4)

See merge request espressif/esp-idf!16099
2021-11-26 06:35:06 +00:00
fe91b306e4 Merge branch 'bugfix/multi_heap_get_info_impl_backport_v4.4' into 'release/v4.4'
heap: fix multi_heap_get_info_impl(backport v4.4)

See merge request espressif/esp-idf!16119
2021-11-26 05:44:49 +00:00
6f6538f053 bootloader_support: Fix unused-but-set-variable compiler warning
When building with BOOTLOADER_LOG_LEVEL lesser then VERBOSE, an error
code variable was being set but not consumed, resulting in a compiler
warning.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-11-26 01:34:42 -03:00
d21ef9b10a bootloader_support: Fix unused-variable compiler warning
Builds for every chip other than ESP32 resulted in a compiler warning
due to "drom_load_addr_aligned" and "irom_load_addr_aligned" not being
used, besides being possible to actually reuse them.
Furthermore, extended the logic for the other similar variables.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-11-26 01:34:40 -03:00
279e135c8f NimBLE throughput example: Add espressif license 2021-11-26 10:03:06 +05:30
76e3e3476e NimBLE throughput example: make multi target support readable 2021-11-26 10:03:06 +05:30
ed43a4eb50 NimBLE: Add throughput demo examples
- Added blecent_throughput(client) and bleprph_throughput(server) examples to
  demonstrate application throughput.
2021-11-26 10:03:06 +05:30
1ef94299a5 Merge branch 'nimble_spp' of ssh://gitlab.espressif.cn:27227/espressif/esp-idf into 'release/v4.4'
Nimble: Added BLE SPP Service

Closes: https://github.com/espressif/esp-idf/issues/7303

See merge request espressif/esp-idf!16122
2021-11-26 09:58:42 +05:30
b748053e2e startup: init timer before calling esp_apptrace_tmo_init 2021-11-25 23:58:36 +01:00
41906a8d31 freertos: fix thread safety for checking scheduler state
This issue was earlier fixed in commit 79e74e5d5f
but during migration to newer FreeRTOS release, it got introduced again.

This commit fixes thread safety issues with configASSERT() calls
regarding the value of uxSchedulerSuspended. A false negative
occurs if a context switch to the opposite core occurs in between
the getting the core ID and the assesment.

Relevant https://github.com/espressif/esp-idf/issues/4230
Closes https://github.com/espressif/esp-idf/issues/7726
Closes IDFGH-6041
2021-11-25 15:43:07 +05:30
02237e4b77 Merge branch 'bugfix/bt_assert_failed_when_interrupt_hlevel_disable_v4.4' into 'release/v4.4'
component/bt: fix assert fail when interrupt hlevel disable(backport release/v4.4)

See merge request espressif/esp-idf!16043
2021-11-25 06:30:08 +00:00
98a932d406 Merge branch 'feature/docker_build_use_git_mirror_v4.4' into 'release/v4.4'
ci: use LOCAL_GIT_MIRROR in docker build job, if set (v4.4)

See merge request espressif/esp-idf!16110
2021-11-25 05:33:42 +00:00
666218d753 heap: fix multi_heap_get_info_impl 2021-11-25 10:34:06 +08:00
ac6793c02a ci: use LOCAL_GIT_MIRROR in docker build job, if set
When the build runner has a local git mirror configured via
LOCAL_GIT_MIRROR variable, use that mirror when cloning IDF insider
the docker build job. Follows similar logic for
LOCAL_GITLAB_HTTPS_HOST, which is used for geo nodes.
2021-11-24 15:40:36 +01:00
adf61033a7 ci: Remove component manager test from build system tests
Component manager itself has a set of integration tests
that run against different ESP-IDF versions
2021-11-24 13:49:46 +01:00
426c79c7ad Readme for the bluedroid ble50 example with tutorial of walkthrough example. 2021-11-24 14:56:53 +05:30
4ce9678c2b Merge branch 'feature/json_schema_for_idf_size_v4.4' into 'release/v4.4'
tools: add json schema for idf_size (v4.4)

See merge request espressif/esp-idf!15959
2021-11-24 09:00:09 +00:00
c193371028 Merge branch 'bugfix/bootloader_debug_buffers_v4.4' into 'release/v4.4'
bootloader_support: Fix and re-enable bootloader_debug_buffer function (v4.4)

See merge request espressif/esp-idf!16073
2021-11-24 03:38:57 +00:00
18dc2cfcc2 bootloader_support: Fix and re-enable bootloader_debug_buffer function
The body of the bootloader_debug_buffer function was conditioned to
macros that were never defined, resulting in deactivated code.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-11-23 09:01:24 -03:00
d7995a650e component/bt: fix assert fail when interrupt hlevel disable 2021-11-23 19:50:54 +08:00
8539939c7d Merge branch 'bugfix/nimble_dirty_timer_handle_after_deinit_v4.4' into 'release/v4.4'
[NimBLE]: clear timer handler during de-initialization(backport for v4.4)

See merge request espressif/esp-idf!16028
2021-11-23 07:15:50 +00:00
e073663660 Merge branch 'bugfix/11kv_scan_event_removal_v4.4' into 'release/v4.4'
esp_wifi: Fixes related to 802.11kv (v4.4)

See merge request espressif/esp-idf!16034
2021-11-23 07:15:31 +00:00
09a892a44f Merge branch 'bugfix/sleep_wrong_log_lvl_v4.4' into 'release/v4.4'
Sleep: fix wrong debug level (backport v4.4)

See merge request espressif/esp-idf!16036
2021-11-23 07:15:02 +00:00
958d63a8d2 Merge branch 'bugfix/fix_static_check_error_mr_4.4' into 'release/v4.4'
Fix the high-impact issues from the code analysis report from customer.

See merge request espressif/esp-idf!16044
2021-11-23 07:14:41 +00:00
81e0c7f662 Merge branch 'bugfix/nvs_partition_encrypted_flag_compatibility_v4.4' into 'release/v4.4'
nvs: add config to ignore "encrypted" flag of nvs partitions (v4.4)

See merge request espressif/esp-idf!15920
2021-11-23 05:46:44 +00:00
a24ea59820 Add hci command to set coexistence status 2021-11-23 11:34:34 +08:00
d43f5af6ef Missing break in switch 2021-11-23 11:31:06 +08:00
c48dec0d44 Dereference null return value 2021-11-23 11:31:06 +08:00
74be458e62 already defined in bt_target.h 2021-11-23 11:31:06 +08:00
a946b6042a Dereference after null check 2021-11-23 11:31:06 +08:00
abbc552f5f Dereference before null check 2021-11-23 11:31:06 +08:00
86ea712aa4 Logically dead code 2021-11-23 11:31:06 +08:00
4345e15f23 Fix the high-impact issues from the code analysis report from customer.
For the CID10564,10384,10280,10098,10038,The memory was released in other place.
For the CID10365,it release the memory in the function when sent successfully.
For the CID10268,10011, we need not change the code.
2021-11-22 19:41:50 +08:00
c5efb55d43 freertos: Add portTRY_ENTRY_CRITICAL() and deprecate legacy spinlock fucntions
Add TRY_ENTRY_CRITICAL() API to all for timeouts when entering critical sections.
The following port API were added:
- portTRY_ENTER_CRITICAL()
- portTRY_ENTER_CRITICAL_ISR()
- portTRY_ENTER_CRITICAL_SAFE()

Deprecated legacy spinlock API in favor of spinlock.h. The following API were deprecated:
- vPortCPUInitializeMutex()
- vPortCPUAcquireMutex()
- vPortCPUAcquireMutexTimeout()
- vPortCPUReleaseMutex()

Other Changes:
- Added portMUX_INITIALIZE() to replace vPortCPUInitializeMutex()
- The assembly of the critical section functions ends up being about 50 instructions longer,
  thus the spinlock test pass threshold had to be increased to account for the extra runtime.

Closes https://github.com/espressif/esp-idf/issues/5301
2021-11-22 18:42:10 +08:00
2ca86a3eaf Sleep: fix wrong debug level
Fix usage of ESP_LOGD in sleep_modes.c which triggers a panic when
used in debug log level.

* Closes https://github.com/espressif/esp-idf/issues/7942
2021-11-22 16:32:21 +08:00
1780c7d8da esp_wifi: Remove scan done event for supplicant scans
Closes https://github.com/espressif/esp-idf/issues/7423
2021-11-22 13:37:42 +05:30
57dc6de613 wpa_supplicant: Fix compilation error when debug enabled
Closes https://github.com/espressif/esp-idf/issues/7789
2021-11-22 13:37:42 +05:30
e5091bb7af wpa_supplicant: Optimize BTM request scan 2021-11-22 13:37:42 +05:30
4aa2ca369b Merge branch 'ci/add_esp32s3_ssc_build_jobs_v4.4' into 'release/v4.4'
CI: add esp32s3 SSC build jobs

See merge request espressif/esp-idf!15910
2021-11-22 07:43:44 +00:00
81ce15f0e0 Merge branch 'bugfix/fix_esp32s3_usb_otg_v4.4' into 'release/v4.4'
esp_phy: fix esp32s3 phy work with USB-OTG issue(v4.4)

See merge request espressif/esp-idf!15914
2021-11-22 06:17:21 +00:00
7816b597a1 Merge branch 'bugfix/fix_modem_sleep_hw_error_mr_4.4' into 'release/v4.4'
fix modem sleep hw error

See merge request espressif/esp-idf!16017
2021-11-22 03:33:54 +00:00
9d67cd8ac6 [nimble]: clear timer handler during de-initialization 2021-11-22 11:17:23 +08:00
ddc44956bf Merge branch 'bugfix/esp32s3_esp_timer_test_failure_v4.4' into 'release/v4.4'
examples: esp_timer: disable secondary console for S3/C3 that can affect test timing (v4.4)

See merge request espressif/esp-idf!16021
2021-11-19 14:35:01 +00:00
997040222d examples: esp_timer: disable secondary console for S3/C3 that can affect test timing 2021-11-19 14:46:06 +05:30
f952b9f71b Merge branch 'feature/oocd_ver_upgrade_v4.4' into 'release/v4.4'
tools: Updates OpenOCD version to 'v0.10.0-esp32-20211111' (v4.4)

See merge request espressif/esp-idf!15999
2021-11-19 08:56:24 +00:00
9b450e19da It is abnormal when getting the deep sleep state bit. So we need to check
the state again and run the "ble_master_soft_rst()" if neesed.
2021-11-19 15:54:20 +08:00
1c792fe57d Fix the issue of device name len limited 2021-11-19 15:50:18 +08:00
056ec73dd2 Merge branch 'bugfix/protocomm_nimble_allocation_v4.4' into 'release/v4.4'
Fix for potential allocation bug in protocomm_nimble.c (v4.4)

See merge request espressif/esp-idf!15996
2021-11-19 05:26:32 +00:00
b2e1c6eb57 Merge branch 'bugfix/fix_custmoer_issues_v4.4' into 'release/v4.4'
bugfix/fix_3_controller_issues_v4.4

See merge request espressif/esp-idf!15973
2021-11-19 03:34:13 +00:00
b7377f0e53 Merge branch 'bugfix/ci_fix_using_branch_name_v4.4' into 'release/v4.4'
ci: fix using HEAD and SHA since we started using merged result pipelines (v4.4)

See merge request espressif/esp-idf!15721
2021-11-19 03:31:20 +00:00
f16bad24ec Merge branch 'bugfix/wifi_prov_mgr_crash_v4.4' into 'release/v4.4'
NimBLE: Fixed wifi_prov_mgr crash after provisioning (v4.4)

See merge request espressif/esp-idf!15859
2021-11-19 03:00:47 +00:00
bafb157749 Merge branch 'bugfix/remove_mcpwm_deprecations_v4.4' into 'release/v4.4'
mcpwm: revert back to allow user register isr handler (v4.4)

See merge request espressif/esp-idf!15940
2021-11-18 09:58:33 +00:00
43811dc172 esp-eth: emac: Reset Tx DMA channel owner on init
Reset ethernet TX DMA descriptors sets owner to CPU, so re-installing the ethernet driver will now not result in packet loss

Merges https://github.com/espressif/esp-idf/pull/7752
2021-11-18 10:46:07 +01:00
5ba6ac26c4 Merge branch 'bugfix/protocomm_nimble_allocation' into 'master'
NimBLE: Fixed potential allocation bug in protocomm_nimble.c

Closes https://github.com/espressif/esp-idf/issues/7689

See merge request espressif/esp-idf!15669
2021-11-18 14:17:35 +05:30
44b1f9272c Merge branch 'feature/usb_serial_default_option_v4.4' into 'release/v4.4'
vfs_usb_serial: set secondary selection for making usb port can output under default menu (backport v4.4)

See merge request espressif/esp-idf!15877
2021-11-18 07:16:55 +00:00
37dc255bc4 idf_tools: Adds 'linux-armhf' platform support 2021-11-17 23:27:45 +03:00
b7bee807ed tools: Updates OpenOCD version to 'v0.10.0-esp32-20211111' 2021-11-17 23:27:45 +03:00
45bc50b2d2 NimBLE: Fixed wifi_prov_mgr crash after provisioning
See merge request espressif/esp-idf!15793
2021-11-17 18:37:20 +05:30
fcecbde778 vfs_usb_serial: set secondary selection for making usb port can output under default menu 2021-11-17 19:54:15 +08:00
8517af090d Merge branch 'bugfix/fix_memory_leak_controller_deinit_v4.4' into 'release/v4.4'
Bugfix/fix memory leak controller deinit v4.4

See merge request espressif/esp-idf!15968
2021-11-17 10:22:32 +00:00
66b887a680 fix HCI_Read_Clock error
fix HCI_Create_Connection_Cancel error
fix ASSERT_WARN during epr
2021-11-17 17:59:26 +08:00
e54802113d Merge branch 'bugfix/esp_timer_before_init_v4.4' into 'release/v4.4'
esp_timer: allow querying the timer before esp_timer_init is called(backport v4.4)

See merge request espressif/esp-idf!15876
2021-11-17 09:20:35 +00:00
ee00029c05 gdma: support IRAM interrupt 2021-11-17 12:57:52 +08:00
c3951d5e9d esp_phy: fix esp32s3 phy work with USB-OTG issue 2021-11-17 11:12:40 +08:00
adc83d532c Merge branch 'bugfix/ps_export_prs_v4.4' into 'release/v4.4'
Tools: PowerShell export script improvements from PRs (v4.4)

See merge request espressif/esp-idf!15923
2021-11-16 15:48:37 +00:00
1891761fbb ESP32: Fix memory leak in controller deinit function
Added change to dealloc s_pm_lock in controller deinit as it gets allocated
during init procedure.

Closes https://github.com/espressif/esp-idf/issues/7653
2021-11-16 10:41:32 +05:30
e6ee8b2fcf mcpwm: revert back to allow user register isr handler
Closes https://github.com/espressif/esp-idf/issues/7890
2021-11-16 11:38:48 +08:00
1d4fda8890 docs: replace the module on esp32-devkitc from esp32-wrover to esp32-wroom 2021-11-15 14:48:54 +01:00
35b20cadce Merge branch 'bugfix/efuse_utility_header_v4.4' into 'release/v4.4'
efuse: Add missing esp_rom_sys.h include file (v4.4)

See merge request espressif/esp-idf!15955
2021-11-15 13:19:39 +00:00
1846c29693 Merge branch 'bugfix/efuse_stdbool_v4.4' into 'release/v4.4'
efuse: Add missing stdbool.h include file (v4.4)

See merge request espressif/esp-idf!15935
2021-11-15 12:58:46 +00:00
e9dd044712 tools: add json schema for idf_size 2021-11-15 13:57:24 +01:00
ad233f4896 Merge branch 'bugfix/aes_gcm_unaligned_psram_v4.4' into 'release/v4.4'
aes: fix potential unaligned access in aes-gcm (v4.4)

See merge request espressif/esp-idf!15801
2021-11-15 12:54:50 +00:00
deff19706f spi_flash: No CPU release time for an erase operation when OS is not running
During the early start, the virtual eFuse mode can call erase operations when OS is not yet running.

Possible workaround: CONFIG_SPI_FLASH_YIELD_DURING_ERASE=n

Fixed for the legacy flash driver as well.
2021-11-15 19:38:09 +08:00
99caa4950c esp_timer: init rtc timer and system timer in early init 2021-11-15 19:38:09 +08:00
85bc2d7240 esp_timer: allow querying the timer before esp_timer_init is called 2021-11-15 19:38:09 +08:00
23be52fa89 example: Update on the README file to change from ESP32-S3-Addax-1 to ESP32-S3-DevKitC-1 2021-11-15 12:02:04 +01:00
8d9ab894c3 efuse: Add missing esp_rom_sys.h include file
This prevents the compiler error for the implicit declaration of
function "esp_rom_printf".

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-11-15 07:52:01 -03:00
ebaffab2fb Merge branch 'bugfix/freertos_round_robin_scheduling_retain_skip_v4.4' into 'release/v4.4'
freertos: Implement best effort round robin scheduling (v4.4)

See merge request espressif/esp-idf!15907
2021-11-15 07:47:43 +00:00
a0f339fead Merge branch 'bugfix/usb_hcd_robustness_v4.4' into 'release/v4.4'
USB Host: Fix how disconnections an EP halts are handled (v4.4)

See merge request espressif/esp-idf!15908
2021-11-15 07:47:37 +00:00
3a7024990e Merge branch 'bugfix/wifi_bt_mac_bb_pd_light_sleep_v4.4' into 'release/v4.4'
backport v4.4: fixes some sleep related issues

See merge request espressif/esp-idf!15932
2021-11-15 07:18:56 +00:00
8d33d54af7 heap: update RTC memory heap caps 2021-11-15 10:56:08 +08:00
3c341364eb efuse: Enable C++ linkage for the include headers on esp_efuse.h
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-11-12 13:29:58 -03:00
0132d2c868 efuse: Add missing stdbool.h include file
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-11-12 13:29:58 -03:00
e75762b02f sleep: deep sleep does not need cpu and wifi/bt mac retention 2021-11-12 19:38:32 +08:00
0665e0165b light sleep: replace new kconfig option of mac bb power down & phy reduce tx power 2021-11-12 19:38:09 +08:00
4083c4ae33 Tools: Make clear the used platform in the PowerShell export script 2021-11-12 07:51:53 +01:00
74950663cf Define $IsWindows if not defined.
The `$IsWindows` PowerShell variable was added in PowerShell Core 6 and
PowerShell 7, and is not present in earlier PowerShell versions. Set to
true if undefined. This fixes https://github.com/espressif/esp-idf/issues/7820.

The first version to run on non-Windows platforms was PowerShell Core
6.0[^1] which means that IsWindows is guaranteed to be defined on all
non-Windows systems. So, if undefined this indicates a Windows platform.

[^1]: https://docs.microsoft.com/en-us/powershell/scripting/install/powershell-support-lifecycle?view=powershell-7.2#release-history

Closes https://github.com/espressif/esp-idf/pull/7858

Closes https://github.com/espressif/esp-idf/issues/7820
2021-11-12 07:51:53 +01:00
4975197d1d Initialize $envvars_array to an empty list.
With strict debugging, i.e. `Set-PSDebug -strict`, execution of export.ps1 will
report the following error:

```
The variable '$envars_array' cannot be retrieved because it has not been set.
At C:\path\to\export.ps1:15 char:1
+ $envars_array # will be filled like:
+ ~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (envars_array:String) [], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined
```

Closes https://github.com/espressif/esp-idf/pull/7819
2021-11-12 07:51:53 +01:00
e3a771511a aes: fix potential unaligned access in aes-gcm 2021-11-12 12:28:28 +08:00
29aba769f2 spi_flash: minor cleanup, use type/subtype from esp_partition.h 2021-11-12 09:43:51 +05:30
e2fb582cf8 nvs: add config to ignore "encrypted" flag of nvs partitions
This is to allow having pre IDF v4.3 behavior where "encrypted"
flag was not being checked for NVS partitions.

It is recommended to enable this new config only if you have
production devices where NVS partition was being set with "encrypted"
flag by mistake.

Please see commit aca9ec28b3 which
introduced check to not allow NVS partitions with "encrypted" flag set.

More discussion on this at:
https://github.com/espressif/esp-idf/issues/5747#issuecomment-956223024
https://github.com/espressif/esp-idf/issues/7839#issuecomment-961477667

Closes https://github.com/espressif/esp-idf/issues/7839
Closes IDFGH-6162
2021-11-12 09:43:51 +05:30
df0929009a Merge branch 'bugfix/gpio_interrupt_on_app_cpu_v4.4' into 'release/v4.4'
gpio: Fix the bug that esp32 gpio interrupt cannot be triggered on core 1 (backport v4.4)

See merge request espressif/esp-idf!15902
2021-11-11 17:01:36 +00:00
d9ae8068fc CI: add esp32s3 SSC build jobs 2021-11-11 18:03:10 +08:00
9b46f4e086 Merge branch 'feature/update_adc_calibration_doc_on_c3_s3_v4.4' into 'release/v4.4'
doc: add adc calibration programming guide on c3 and s3 (v4.4)

See merge request espressif/esp-idf!15896
2021-11-11 08:57:53 +00:00
dd5d452428 Merge branch 'bugfix/power_down_bluetooth_module_when_deinit_v4.4' into 'release/v4.4'
component/bt: Power down bluetooth module when deinit

See merge request espressif/esp-idf!15717
2021-11-11 08:27:51 +00:00
1af36a5b9d usb: Change API and refactor tests
This commit updates the USB Host Library API in the following wasy:
- usb_host_client_handle_t and usb_device_handle_t made into struct pointers
  to generate compiler warnings about conflicting handle types
- usb_host_client_config_t changed to future proof API for Synchronous Clients
- Added usb_host_lib_unblock()
- Added usb_host_device_addr_list_fill()
- Return of usb_host_device_free_all() updated to indicate whether there
  are still devices yet to be freed.
- Blockg APIs are now marked explicitly
- Fixed a bug in usb_host_transfer_submit_control() when checking the bEndpointAddress
  of a control transfer.

Tests are also refactored to move some common macros into shared headers

Closes https://github.com/espressif/esp-idf/issues/7786
2021-11-11 16:26:56 +08:00
891c979c64 usb: Add USB Host Library sudden disconnect tests 2021-11-11 16:26:35 +08:00
0a948594cb usb: Fix USBH handling of disconnections
This commit fixes how the USBH handling of a sudden device disconnection,
more specifically handling of device gone.
- Previously the USBH would only halt, flush, and dequeue the device's
default EP, then send a device gone event to the Host Library layer.
- Now the USBH will also halt and flush all non-default EPs, allowing
all of the URBs to be dequeud.
- Some internal object members are now protected by a mutex instead of
a spinlock.

Closes https://github.com/espressif/esp-idf/issues/7505
2021-11-11 16:26:09 +08:00
de6bf09f40 usb: Fix how the HCD handles sudden disconnection
This commit fixes how the USB Host HCD handles sudden disconnections.

Bugs:
- HW channels remain active when the port suddenly disconnects, and
previously the channel would be disabled by setting the disabled bit,
then waiting for a disabled interrupt. However, ISOC channels do not
generate the disabled interrupt when the port is invalid, thus leading
to tasks getting indefinitely blocked in hcd_pipe_command().

Fix:
On a sudden disconnection, forcibly treat all channels as halted even
if their HCCHAR.ChEna bit is still set. We do a soft reset after a port
error anyways, so the channels will eventually be reset.

Closes https://github.com/espressif/esp-idf/issues/7505
2021-11-11 16:25:01 +08:00
a1082dfa59 usb: Fix LL 8/16 bit register field access
This commit addes the 8/16 bit register field access workarounds to
the DWC_OTG peripheral. This workaround was applied to all other
peripherals in commit 874a720286.
2021-11-11 16:24:08 +08:00
466c42c3c1 freertos: Fix SMP round robin scheduling
The previous SMP freertos round robin would skip over tasks when
time slicing. This commit implements a Best Effort Round Robin
where selected tasks are put to the back of the list, thus
makes the time slicing more fair.

- Documentation has been updated accordingly.
- Tidy up vTaskSwitchContext() to match v10.4.3 more
- Increased esp_ipc task stack size to avoid overflow

Closes https://github.com/espressif/esp-idf/issues/7256
2021-11-11 16:16:11 +08:00
762ca128b4 gpio: Fix the bug that esp32 gpio interrupt cannot be triggered on core 1
Introduced in 874a720286

Closes https://github.com/espressif/esp-idf/issues/7594

(cherry picked from commit 7ec38fcc42)
2021-11-11 12:43:09 +08:00
f6db71539e Merge branch 'bugfix/esp32_light_sleep_crash_4.4' into 'release/v4.4'
Fix crash caused by bluetooth high level interrupt (v4.4)

See merge request espressif/esp-idf!15872
2021-11-11 03:38:49 +00:00
0c0d0f9b35 components/bt: Fix the issue caused by the power off the bt power domain 2021-11-11 11:33:15 +08:00
a2790756b0 fix the wifi scan fail issue caused by the power off the wifi power domain 2021-11-11 11:33:04 +08:00
bd9d8c314e Merge branch 'bugfix/fix_120m_sdr_flash_config_on_non_s3_bug_v4.4' into 'release/v4.4'
spi_flash: make 120m config only visible on s3 sdr mode (v4.4)

See merge request espressif/esp-idf!15868
2021-11-11 02:47:47 +00:00
018bc054a5 Merge branch 'bugfix/LAN8720_reset_assertion_v4.4' into 'release/v4.4'
Increased LAN8720 ETH-PHY reset assertion time (v4.4)

See merge request espressif/esp-idf!15825
2021-11-10 20:39:58 +00:00
d722a37aa6 Merge branch 'refactor/freertos_deprecate_critical_nested_macros_v4.4' into 'release/v4.4'
freertos: Deprecate critical nested macros (v4.4)

See merge request espressif/esp-idf!15613
2021-11-10 16:16:53 +00:00
c62f7fd6ee Merge branch 'bugfix/tools_fix_win_gdb_dlls_v4.4' into 'release/v4.4'
tools: Fix missed DLLs in GDB for Windows (v4.4)

See merge request espressif/esp-idf!15894
2021-11-10 13:55:34 +00:00
10afcc9f63 Merge branch 'bugfix/fix_ble_prefered_ext_conn_parameter_detection_v4.4' into 'release/v4.4'
component/bt: check the ble ext conn parameter(backport v4.4)

See merge request espressif/esp-idf!15768
2021-11-10 13:01:22 +00:00
7e725751e4 freertos: Remove critical nested macros
This commit removes the following critical nested macros as follows:

- portENTER_CRITICAL_NESTED()
- portEXIT_CRITICAL_NESTED()

They are replaced with portSET_INTERRUPT_MASK_FROM_ISR() and
portCLEAR_INTERRUPT_MASK_FROM_ISR() which are the proper FreeRTOS interfaces.

Created a portmacro_deprecated.h for each port to contain deprecated API
that were originally from portmacro.h
2021-11-10 18:34:32 +08:00
6438af2ef9 Merge branch 'bugfix/simplify_codeowners_v4.4' into 'release/v4.4'
gitlab: simplify approvals for backports (v4.4)

See merge request espressif/esp-idf!15865
2021-11-10 10:24:38 +00:00
4a8d4b584a docs: add adc calibration docs on c3 and s3 2021-11-10 18:12:54 +08:00
3b0de88cad tools: Fix missed DLLs in GDB for Windows 2021-11-10 17:07:46 +07:00
9e46667545 ringbuf: Fix bug where comparision between a signed and unsigned operand resulted in incorrect free size for no-split/allow-split buffers
This commit fixes a bug in no-split and allow-split ring buffers free buffer size calculation.
When the free size available in the buffers less than the size of one item header,
the function prvGetCurMaxSizeNoSplit/AllowSplit() incorrectly returned the maxItemSize instead of 0.
This is due to the comparision between a negative and a positive value
where both operands are treated as unsigned during the comparision operation,
thereby treating the negative operand as a large integer.

Also added new unit tests to test buffer-full and almost-full conditions
where this scenario is likely to be hit.

Closes https://github.com/espressif/esp-idf/issues/7344
Closes https://github.com/espressif/esp-idf/pull/7371
2021-11-10 14:42:40 +05:30
2c24beca04 esp_eth: optimize dm9051 Tx throughput 2021-11-10 17:08:21 +08:00
44d13c648b Merge branch 'bugfix/fix_ota_crash_backport_v4.4' into 'release/v4.4'
spi_flash: fix app crash when OTA because the OTA task's stack is in rtc fast memory(backport v4.4)

See merge request espressif/esp-idf!15852
2021-11-10 08:35:34 +00:00
44b9e6e055 Fix crash caused by bluetooth high level interrupt 2021-11-10 16:14:52 +08:00
214d2eeba7 Merge branch 'bugfix/manual_secure_boot_v2_multiple_digest_issue_v4.4' into 'release/v4.4'
secure_boot_v2: fix issue in pre-flashed digest (manual) workflow (v4.4)

See merge request espressif/esp-idf!15780
2021-11-10 04:22:55 +00:00
d5218e84e2 spi_flash: make 120m config only visible on s3 sdr mode 2021-11-10 12:04:49 +08:00
43471b047b Merge branch 'feature/fatfs_disk_status_implementation_v4.4' into 'release/v4.4'
fatfs: Implementation of disk_status for SD/MMC card (v4.4)

See merge request espressif/esp-idf!15847
2021-11-09 18:45:42 +00:00
1ed627d022 gitlab: simplify approvals for backports (v4.4) 2021-11-09 18:39:26 +01:00
8a60e69c24 Merge branch 'bugfix/create_dir_idf_env_v4.4' into 'release/v4.4'
tools: Create the ".espressif" directory on the first run on clean system (v4.4)

See merge request espressif/esp-idf!15855
2021-11-09 13:40:56 +00:00
683da6b46d fatfs: Implementation of disk_status nad disk_initialize for SD/MMC card
FATFS provides a disk status and disk initialize callback which were not
implemented. Implementation has very low impact on SD/MMC speed and
fixes issues, when trying to open file when SD card was removed from
slot and not deinited.

If disk_status returns STA_NOINIT, it will always continue with
disk_initialize. If that returns 0, it will continue like everything is
working normally. So there has to be the same check as in disk_status.
Return of disk_initialize is always checked like this for STA_NOINIT or
STA_PROTECT so if command fails, we return the STA_NOINIT.

stat = disk_initialize(pdrv);
if (stat & STA_NOINIT) return FR_NOT_READY;
if (stat & STA_PROTECT) return FR_WRITE_PROTECTED;

Closes IDF-4125
2021-11-09 20:17:03 +08:00
d9429ca7bc Merge branch 'add_agressive_revoke_v4.4' into 'release/v4.4'
secure_boot: Added Kconfig option for aggressive key revoke (v4.4)

See merge request espressif/esp-idf!15850
2021-11-09 11:15:07 +00:00
2cdf90f810 tools: Create the ".espressif" directory on the first run on clean system
Closes https://github.com/espressif/esp-idf/issues/7848
2021-11-09 12:02:50 +01:00
2f39639c20 secure_boot: Do not allow key revocation in bootloader 2021-11-09 15:19:47 +05:30
7fe2a4815d secure_boot: Added Kconfig option for aggressive key revoke
Applicable to S2, C3, and S3
2021-11-09 15:19:47 +05:30
07b1b45ad6 fix: app crash when OTA because the OTA task's stack is in rtc fast memory 2021-11-09 17:10:20 +08:00
5e4d166323 Merge branch 'bugfix/fix_crash_when_shutdown_bt_v4.4' into 'release/v4.4'
component/bt: fix crash when shutdown bt(backport v4.4)

See merge request espressif/esp-idf!15708
2021-11-09 08:06:24 +00:00
5c6a8711ad Merge branch 'bugfix/hfp_demo_audio_not_sine_v4.4' into 'release/v4.4'
fix hfp_ag demo audio not sine_v4.4

See merge request espressif/esp-idf!15749
2021-11-09 03:02:15 +00:00
864605785b Merge branch 'feature/rw_lock_cond_var_4.4' into 'release/v4.4'
pthread: reader-writer locks implementation (backport 4.4)

See merge request espressif/esp-idf!15830
2021-11-08 13:31:16 +00:00
832865629c Merge branch 'feature/github-7661_v4.4' into 'release/v4.4'
mck pin not defined in i2s examples (v4.4)

See merge request espressif/esp-idf!15836
2021-11-08 13:23:59 +00:00
7195af2d7d i2s: add mck pin definition in the example
If the mck pin is not set to GPIO 0,1,3 or -1 the whole pin configuration fails. This fix corrects that.

Merges https://github.com/espressif/esp-idf/pull/7661
2021-11-08 17:33:18 +08:00
1433f5337f Merge branch 'bugfix/i2s_ws_polarity_in_tdm_v4.4' into 'release/v4.4'
i2s: fix ws signal polarity in tdm mode (v4.4)

See merge request espressif/esp-idf!15820
2021-11-08 09:30:14 +00:00
397e148049 Merge branch 'doc/make_classic_bt_API_ref_only_for_esp32_4.4' into 'release/v4.4'
Doc/make classic bt api ref only for esp32 [backport v4.4]

See merge request espressif/esp-idf!15727
2021-11-08 09:14:24 +00:00
bbe2a1bf34 Merge branch 'feature/add_flash_psram_config_guide_v4.4' into 'release/v4.4'
doc: add flash and psram configuration guide on esp32s3 (4.4)

See merge request espressif/esp-idf!15811
2021-11-08 08:32:36 +00:00
4d0e72dc5f efuse example: Fix pre-load SB test for S2, C3 (erase revoke bits) 2021-11-08 12:48:12 +08:00
4ac351247d secure_boot_v2: fix issue in pre-flashed digest (manual) workflow
This commit fixes issue where empty (unprogrammed) digest slot out of
multiple supported (e.g. 3 for ESP32-C3) could cause issue in
workflow enablement process.

Notes:

1. This issue was applicable for chips supporting "secure-boot-v2"
scheme with multiple digests slots
2. This issue was affecting only manual workflow, where digest of
public was pre-flashed in efuse
3. Change in "flash_encrypt.c" is only for additional safety purpose
2021-11-08 12:48:12 +08:00
cc8214c59d doc: add flash and psram configuration doc in programming guide 2021-11-08 04:32:18 +00:00
56aa8b6cb3 Merge branch 'bugfix/KSZ8851SNL_enable_multicast_v4.4' into 'release/v4.4'
esp_eth: KSZ8851SNL, enable Rx multicast in MAC filter (v4.4)

See merge request espressif/esp-idf!15823
2021-11-08 03:44:15 +00:00
7a6a61feef component/bt: fix crash when shutdown bt(backport v4.4) 2021-11-08 10:55:12 +08:00
b117bcd2a0 feat (pthread): reader-writer locks implementation
* Added implementation based on cond. variables
* Added unit tests

Closes https://github.com/espressif/esp-idf/issues/7411
2021-11-08 10:21:37 +08:00
cd97e95a12 Merge branch 'bugfix/archive_details_always_run_like_diff_v4.4' into 'release/v4.4'
tools: fix bug with idf_size argument archive_details (v4.4)

See merge request espressif/esp-idf!15774
2021-11-05 15:38:38 +00:00
43b62a5b62 Copyright message fix for 'Increased LAN8720 ETH-PHY reset assertion time' 2021-11-05 11:39:04 +01:00
5f9ae3510a Increased LAN8720 ETH-PHY reset assertion time (IDFGH-6018)
Increase reset assertion time from 100µs (as specified minimum in the datasheet) to 150µs.
Some specimen of the LAN8720 need the reset signal asserted longer than 100µs to initialise properly. Otherwise they are in a zombie state where they are establishing and loosing an Ethernet link once in a seconds interval.
2021-11-05 11:35:35 +01:00
484d5c8491 esp_eth: KSZ8851SNL, enable Rx multicast in MAC filter
Closes https://github.com/espressif/esp-idf/issues/7750
2021-11-05 11:23:14 +01:00
f7f9683ef1 i2s: fix ws signal polarity in tdm mode 2021-11-05 11:35:02 +08:00
b298795e37 Merge branch 'bugfix/sig_ble_mesh_errata_e16350_v4.4' into 'release/v4.4'
ble_mesh: stack: Apply the errata E16350 from Bluetooth SIG (v4.4)

See merge request espressif/esp-idf!15815
2021-11-05 03:16:51 +00:00
b1102bb581 Merge branch 'bugfix/ble_mesh_host_init_v4.4' into 'release/v4.4'
ble_mesh: nimble: return error if init host twice (v4.4)

See merge request espressif/esp-idf!15816
2021-11-05 03:14:57 +00:00
fd89e8dae4 Merge branch 'docs/update_mock_doc_v4.4' into 'release/v4.4'
DOCs: Update mocking documentation (backport v4.4)

See merge request espressif/esp-idf!15809
2021-11-05 02:25:00 +00:00
lly
461ffffd77 ble_mesh: nimble: return error if init host twice 2021-11-04 20:31:57 +08:00
lly
c255c6a6f8 ble_mesh: stack: Apply the errata E16350 from Bluetooth SIG 2021-11-04 20:29:38 +08:00
dc20c1fd41 Merge branch 'bugfix/ble_mesh_update_license_v4.4' into 'release/v4.4'
ble_mesh: stack: Update license of esp specific files (v4.4)

See merge request espressif/esp-idf!15765
2021-11-04 12:12:05 +00:00
423b6697ac Merge branch 'bugfix/freertos_prvTaskIsTaskSuspended_v4.4' into 'release/v4.4'
freertos: Fix prvTaskIsTaskSuspended check (v4.4)

See merge request espressif/esp-idf!15612
2021-11-04 10:26:54 +00:00
7c4c5b51de Merge branch 'ci/enable_s3_example_test_v4.4' into 'release/v4.4'
ci: run example test for c3 as well (v4.4)

See merge request espressif/esp-idf!15810
2021-11-04 05:00:42 +00:00
295387167c ci: run example test for c3 as well 2021-11-04 12:12:12 +08:00
40e0d733c2 docs: Update mocking documentation 2021-11-04 11:49:35 +08:00
9fae314f50 Merge branch 'feature/freertos_static_allocation_task_memory_callbacks_v4.4' into 'release/v4.4'
freertos: Add memory hooks for static IDLE and Timer tasks (v4.4)

See merge request espressif/esp-idf!15614
2021-11-03 11:20:10 +00:00
lly
c1df3636b7 ble_mesh: stack: Update license of esp specific files 2021-11-03 14:22:31 +08:00
226f49f37d Merge branch 'bugfix/heartbeat_filter_with_acceptlist_v4.4' into 'release/v4.4'
ble_mesh: stack: Fix heartbeat filter with accept list (v4.4)

See merge request espressif/esp-idf!15675
2021-11-03 06:21:32 +00:00
21b366da73 Merge branch 'feature/add_dhcp_option_v4.4' into 'release/v4.4'
lwip/dhcp: add configure for enable vendor class identify option (backport v4.4)

See merge request espressif/esp-idf!15619
2021-11-02 15:17:19 +00:00
1232094197 change --archive_details output 2021-11-02 14:08:31 +01:00
970132c94b tools: fix bug with idf_size argument archive_details 2021-11-02 14:08:31 +01:00
lly
9e82f7fdcf ble_mesh: stack: Update the license of provisioner_main.c 2021-11-02 20:56:25 +08:00
77eb671168 ble_mesh: stack: Fix heartbeat filter with accept list 2021-11-02 20:54:02 +08:00
9303bc00b2 Merge branch 'bugfix/pppos_report_unknown_line' into 'release/v4.4'
esp_modem: Fix report unknown line (GitHub PR)

See merge request espressif/esp-idf!15621
2021-11-02 12:14:49 +00:00
89873937eb lwip/dhcp: add configure for enable vendor class identify option
Closes https://github.com/espressif/esp-idf/issues/6786
2021-11-02 18:02:22 +08:00
2d3ec44011 Merge branch 'bugfix/ble_conn_latency_max_value_v4.4' into 'release/v4.4'
BLE: Set connection max latency value to 499.

See merge request espressif/esp-idf!15754
2021-11-02 09:11:12 +00:00
14a652376f Examples/PPPoS: Fix handling empty lines with CRLF only
Tokenizing data by '\n' will effectively replace all LF characters by '\0' so checking for phantom lines has to be adjusted:
* minimal empty line is CR only (strlen = 1)
* checking for lines containing CR only
2021-11-02 09:00:34 +01:00
d89112badf component/bt: check the ble ext conn parameter 2021-11-02 15:54:27 +08:00
5ac3b05cbe freertos: Add memory hooks for static IDLE and Timer tasks
This commit adds the following hook functions to obtain memory
for the IDLE and Timer Daemon tasks when configSUPPORT_STATIC_ALLOCATION
is enabled:

- vApplicationGetIdleTaskMemory()
- vApplicationGetTimerTaskMemory()

Currently, both functions simply allocate from the same memory as
regular tasks (i.e., internal memory for both the stack and TCB)

Closes https://github.com/espressif/esp-idf/issues/7511
2021-11-02 14:54:01 +08:00
efad5e56ae freertos: Fix prvTaskIsTaskSuspended check
This commit fixes prvTaskIsTaskSuspended(). Both pending ready lists
should be checked to confirm that is truly suspended.

Closes https://github.com/espressif/esp-idf/issues/7564
2021-11-02 14:51:17 +08:00
6a93575d97 Merge branch 'bugfix/xtensa_clang_version_regex_v4.4' into 'release/v4.4'
fix(tool): export.sh cannot export xtensa-clang if installed (v4.4)

See merge request espressif/esp-idf!15763
2021-11-02 03:38:57 +00:00
dfe91ded9a Merge branch 'bugfix/rm_copyright_check_v4.4' into 'release/v4.4'
CI: Remove the copyright header check from the release branch

See merge request espressif/esp-idf!15758
2021-11-02 03:38:18 +00:00
d269be1861 fix(tool): export.sh cannot export xtensa-clang if installed issue 2021-11-02 09:32:45 +08:00
de136451f1 CI: Remove the copyright header check from the release branch 2021-11-01 12:44:10 +01:00
affe1a0692 BLE: Set connection max latency value to 499. 2021-11-01 16:45:16 +05:30
148e0fce84 Merge branch 'feature/ci_runner_failure_retries_v4.4' into 'release/v4.4'
ci: runner system failure retries (v4.4)

See merge request espressif/esp-idf!15722
2021-11-01 11:11:16 +00:00
86f8d65508 Merge branch 'bugfix/memprot_bad_esp_restart_check_v4.4' into 'release/v4.4'
System/Security: wrong check of the Memprot feature in esp_restart()/panic_restart() (v4.4)

See merge request espressif/esp-idf!15742
2021-11-01 11:07:06 +00:00
ea4f069b45 fix hfp_ag demo audio not sine_v4.4 2021-11-01 12:12:10 +08:00
3f26866533 System/Security: wrong check of the Memprot feature in esp_restart()/panic_restart()
esp_restart()/panic_restart() never resets the Digital system (so far required only by the Memprot feature) as there's a typo in the corresponding #define:
it checks CONFIG_ESP_SYSTEM_CONFIG_MEMPROT_FEATURE instead of CONFIG_ESP_SYSTEM_MEMPROT_FEATURE.
Issue fixed.

IDF-4094
2021-10-29 15:02:17 +02:00
fb3c88510c efuse_table_gen: Fixes wrong joining fields with omitted names
The issue is related to the non-sequential way of description when
such fields going together sequential.

Related to esp32h2 chip for eFuses: MAC_FACTORY and MAC_EXT.
The issue is in wrong indexes of MAC_EXT.
MAC_EXT got indexes like it is joined to MAC_FACTORY.

const esp_efuse_desc_t* ESP_EFUSE_MAC_FACTORY[] = {
    &MAC_FACTORY[0],
    &MAC_FACTORY[1],
    &MAC_FACTORY[2],
    &MAC_FACTORY[3],
    &MAC_FACTORY[4],
    &MAC_FACTORY[5],
    NULL
};

const esp_efuse_desc_t* ESP_EFUSE_MAC_EXT[] = {
    &MAC_EXT[6],
    &MAC_EXT[7],
    NULL
};

This commit fixed it to:

const esp_efuse_desc_t* ESP_EFUSE_MAC_EXT[] = {
    &MAC_EXT[0],
    &MAC_EXT[1],
    NULL
};
2021-10-29 19:17:51 +08:00
281598077a efuse: fix esp32h2 get ext_mac 2021-10-29 19:17:51 +08:00
006ab2d454 ci: Add retries on runner system failures 2021-10-29 13:49:37 +07:00
10741e2254 ci: fix using HEAD and SHA with merged result pipelines 2021-10-29 13:34:53 +07:00
d6e438f3c7 ci: add variable PIPELINE_COMMIT_SHA 2021-10-29 13:34:53 +07:00
1383785aa1 Remove dummy defines of Classic BT 2021-10-29 14:21:26 +08:00
8153b43705 Make ESP32 Bluetooth stack architecture Doc only visible for ESP32 2021-10-29 14:21:18 +08:00
f4aad85f8b Make Classic BT related document links only visible for ESP32 2021-10-29 14:21:12 +08:00
6a7d83af19 Merge branch 'bugfix/fix_http_head_request_v4.4' into 'release/v4.4'
esp_http_client: Fix HEAD request will affect the all next HTTP requests unless we close the HTTP request(backport v4.4)

See merge request espressif/esp-idf!15715
2021-10-29 04:47:22 +00:00
89d290f17a component/bt: Power down bluetooth module when deinit 2021-10-29 10:44:02 +08:00
9705ea5e97 esp_http_client: Fix HEAD request will affect the all next HTTP requests unless we close the HTTP request
Closes https://github.com/espressif/esp-idf/issues/7777
2021-10-29 10:16:12 +08:00
4aaec00c41 Merge branch 'bugfix/define__DOXYGEN___v4.4' into 'release/v4.4'
docs: define __DOXYGEN__ for doxygen builds (v4.4)

See merge request espressif/esp-idf!15679
2021-10-28 06:40:50 +00:00
697f829d60 Merge branch 'bugfix/gdbstub_4_c3_v4.4' into 'release/v4.4'
bugfix/esp-gdbstrub: add missing function for esp32c3/esp32h2. (backport v4.4)

See merge request espressif/esp-idf!15664
2021-10-27 16:49:21 +00:00
7aa3dfc087 Merge branch 'bugfix/fix_phy_usb_issue_v4.4' into 'release/v4.4'
esp_phy: fix esp32c3/s3 phy USB & RSSI issue(v4.4)

See merge request espressif/esp-idf!15646
2021-10-27 14:01:48 +00:00
bd2b1c88ad Merge branch 'bugfix/remove_assert_when_inq_done_4.4' into 'release/v4.4'
component_bt: fix crash after inquiry has finished (v4.4)

See merge request espressif/esp-idf!15673
2021-10-27 11:28:50 +00:00
0c5b5d759a Remove table for all supported chips as useless. 2021-10-27 13:36:58 +03:00
a4821fac21 docs: define __DOXYGEN__ for doxygen builds
Some docs depended on __DOXYGEN__ but this was never defined anywhere.
2021-10-27 17:10:26 +08:00
3187b9b5a4 1. Fix the scan failed issue.
2. Fix connection failed with LG 5.0 phone
3. Remove assert when inquiry done
2021-10-27 14:54:37 +08:00
1703b9d0f3 bugfix/esp-gdbstrub: add missing function for esp32c3/esp32h2. 2021-10-26 20:00:58 +03:00
43a81fb2f9 Merge branch 'bugfix/asio_ssl_build' into 'release/v4.4'
asio: Fix ssl example build removing openssl warning

See merge request espressif/esp-idf!15498
2021-10-26 14:26:12 +00:00
bf4ef23067 Merge branch 'bugfix/pppos_event_deinit_exit_ppp' into 'release/v4.4'
Examples/PPPoS: Minor fixes related to init/deinit cycling

See merge request espressif/esp-idf!15553
2021-10-26 14:25:37 +00:00
044e79ad99 Merge branch 'bugfix/highint_hdl_link_gnumake_v4.4' into 'release/v4.4'
esp_system: fix high level interrupt handler not linked for GNU Make (v4.4)

See merge request espressif/esp-idf!15651
2021-10-26 13:14:25 +00:00
d47d413e25 esp_system: fix high level interrupt handler not linked for GNU Make
In 4972605, high-level interrupt handler hook was renamed from
ld_include_highint_hdl to ld_include_panic_highint_hdl. However the
change wasn't applied in GNU Make based build system. As a result,
the default interrupt handler was linked and features which depended
on the high-level interrupt didn't work.

Closes https://github.com/espressif/esp-idf/issues/7759
Closes https://github.com/espressif/esp-idf/issues/7447
2021-10-26 11:26:45 +02:00
9ceadb4e18 Examples/PPPoS: Fix copyright headers 2021-10-26 10:45:19 +02:00
12f4f8f7f8 Examples/PPPoS: Fixed missed NETIF_PPP_STATUS event unregister
NETIF_PPP_STATUS is registerd while modem gets attached to the related netif.
we don't have any network detach functionality in the modem component, so we
unregister the event during esp_modem_netif_clear_default_handlers().

Related https://esp32.com/viewtopic.php?f=13&t=23632
Related https://github.com/espressif/esp-idf/issues/7469
2021-10-26 10:45:12 +02:00
28d534ad33 Examples/PPPoS: Add mandatory delay after +++ command
Switching back from data (PPP) mode to command mode must be done is the following sequence:
* No characters entered for T1 time (1 second)
* "+++" characters entered with no characters in between (1 second)
* No characters entered for T1 timer (1 second)
(per specification of SIM800 SIM800_Series_AT_Command_Manual_V1.09.pdf)

Related https://github.com/espressif/esp-idf/issues/7608
2021-10-26 10:45:05 +02:00
a0371c1a8f Merge branch 'feature/toolchain_2021r2_v4.4' into 'release/v4.4'
Update toolchains to esp-2021r2 (v4.4)

See merge request espressif/esp-idf!15637
2021-10-26 08:19:22 +00:00
5eb55d2e7a esp_phy: fix esp32c3/s3 phy USB & RSSI issue 2021-10-26 15:48:27 +08:00
076697a56d Update toolchains to esp-2021r2
Updated GDB to 9.2 version for xtensa chips
    Fixed coredump work for xtensa chips
    Fixed backtrace for xtensa chips
    Fixed multilib for riscv32 chips
    Fixed running GDB on some RaspberryPi configuration for riscv32 chip
    Fixed support of fnmatch(), iconv() and some other posix functions in stdlib

    Closes https://github.com/espressif/esp-idf/issues/6124
    Closes https://github.com/espressif/esp-idf/issues/2484
    Closes https://github.com/espressif/esp-idf/issues/3264
    Closes https://github.com/espressif/crosstool-NG/issues/13
    Closes https://github.com/espressif/crosstool-NG/pull/16
2021-10-25 19:55:41 +07:00
4548b6da63 test_apps/panic: remove workaround for incorrect GDB backtrace 2021-10-25 19:55:41 +07:00
91696b9d6d coredump: update test data for toolchain 2021r2 2021-10-25 19:55:41 +07:00
0a8c1259dc asio: Fix ssl example build removing openssl warning
Regression from e68afcb45036901ebc9174b2c8f3804f7921410c causing
non-clean builds for standard asio-ssl example (warning was
suppressed in the CI build only)
2021-10-25 11:59:02 +00:00
ac485b2824 Merge branch 'feature/add_README_for_controller_hci_uart_demo_v4.4' into 'release/v4.4'
feature/add README.md for demo controller_hci_uart_demo_v4.4

See merge request espressif/esp-idf!15571
2021-10-25 07:39:34 +00:00
2720d45e71 Merge branch 'bugfix/newlib_fix_stdatomic_clang_v4.4' into 'release/v4.4'
newlib: fix clang atomics (v4.4)

See merge request espressif/esp-idf!15600
2021-10-22 14:48:56 +00:00
cb6e5b0980 newlib: fix clang atomics
Correction of the SYNC_LOCK_* macros in stdatomic
2021-10-21 17:34:48 +01:00
25ae00cd11 Merge branch 'ci/update_esp_eth_cert_v4.4' into 'release/v4.4'
ci: update cert used for esp_eth test (v4.4)

See merge request espressif/esp-idf!15583
2021-10-21 04:23:34 +00:00
108f85f8b3 ci: update cert used for esp_eth test 2021-10-21 10:05:56 +08:00
99f1687db7 add README.md for demo controller_hci_uart_demo 2021-10-20 09:09:46 +08:00
0a15cc5e5a esp_modem: Fix report unknown line
In esp_dte_handle_line(), it tokenize the data to call handlers separately
for each *line*. So it needs to post the tokenized data when report unknown
line instead of the first token (which could be a '\r' in my test).

Fixes: 336de29413 ("Examples/pppos_client: Fix manual parsing to accept unexpected lines")
Signed-off-by: Axel Lin <axel.lin@gmail.com>
2021-10-18 10:14:31 +08:00
2773 changed files with 144284 additions and 172764 deletions

View File

@ -19,14 +19,6 @@ trim_trailing_whitespace = false
indent_style = tab
indent_size = 2
[*/freertos/**]
indent_style = tab
indent_size = 4
[{*/freertos/**.S,**/FreeRTOSConfig.h}]
indent_style = space
indent_size = 4
[*.pem]
insert_final_newline = false

View File

@ -152,6 +152,8 @@ exclude =
components/openthread/openthread,
components/tinyusb,
components/unity/unity,
components/spiffs/spiffs,
components/freemodbus,
examples/build_system/cmake/import_lib/main/lib/tinyxml2,
examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib,
# autogenerated scripts
@ -167,4 +169,5 @@ exclude =
per-file-ignores =
# Sphinx conf.py files use star imports to setup config variables
docs/conf_common.py: F405
docs/conf_common.py: F405,
components/freemodbus/docs/conf_common.py: F405

75
.github/workflows/docker.yml vendored Normal file
View File

@ -0,0 +1,75 @@
name: docker
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
on:
push:
branches:
- 'master'
- 'release/*'
tags:
- 'v*.*'
env:
# Platforms to build the image for
BUILD_PLATFORMS: linux/amd64,linux/arm64
DOCKERHUB_REPO: ${{ github.repository_owner }}/idf
jobs:
docker:
# Disable the job in forks
if: ${{ github.repository_owner == 'espressif' }}
runs-on: ubuntu-latest
steps:
# Depending on the branch/tag, set CLONE_BRANCH_OR_TAG variable (used in the Dockerfile
# as a build arg) and TAG_NAME (used when tagging the image).
#
# The following 3 steps cover the alternatives (tag, release branch, master branch):
- name: Set variables (tags)
if: ${{ github.ref_type == 'tag' }}
run: |
echo "CLONE_BRANCH_OR_TAG=$GITHUB_REF_NAME" >> $GITHUB_ENV
echo "TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV
- name: Set variables (release branches)
if: ${{ github.ref_type == 'branch' && startsWith(github.ref_name, 'release/') }}
run: |
echo "CLONE_BRANCH_OR_TAG=$GITHUB_REF_NAME" >> $GITHUB_ENV
echo "TAG_NAME=release-${GITHUB_REF_NAME##release/}" >> $GITHUB_ENV
- name: Set variables (main branch)
if: ${{ github.ref_type == 'branch' && github.ref_name == 'master' }}
run: |
echo "CLONE_BRANCH_OR_TAG=master" >> $GITHUB_ENV
echo "TAG_NAME=latest" >> $GITHUB_ENV
# Display the variables set above, just in case.
- name: Check variables
run: |
echo "CLONE_BRANCH_OR_TAG: $CLONE_BRANCH_OR_TAG"
echo "CHECKOUT_REF: $CHECKOUT_REF"
echo "TAG_NAME: $TAG_NAME"
# The following steps are the standard boilerplate from
# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU for multiarch builds
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
context: tools/docker
push: true
tags: ${{ env.DOCKERHUB_REPO }}:${{ env.TAG_NAME }}
platforms: ${{ env.BUILD_PLATFORMS }}
build-args: |
IDF_CLONE_URL=${{ github.server_url }}/${{ github.repository }}.git
IDF_CLONE_BRANCH_OR_TAG=${{ env.CLONE_BRANCH_OR_TAG }}

View File

@ -14,6 +14,14 @@ workflow:
# Disable those non-protected push triggered pipelines
- if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_PIPELINE_SOURCE == "push"'
when: never
# when running merged result pipelines, it would create a temp commit id. use $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA instead of $CI_COMMIT_SHA.
# Please use PIPELINE_COMMIT_SHA at all places that require a commit sha
- if: $CI_OPEN_MERGE_REQUESTS != null
variables:
PIPELINE_COMMIT_SHA: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
- if: $CI_OPEN_MERGE_REQUESTS == null
variables:
PIPELINE_COMMIT_SHA: $CI_COMMIT_SHA
- when: always
variables:
@ -48,7 +56,7 @@ variables:
# Docker images
BOT_DOCKER_IMAGE_TAG: ":latest"
ESP_IDF_DOC_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-idf-doc-env:v4.4-1-v4"
ESP_IDF_DOC_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-idf-doc-env:v4.4-1-v6"
ESP_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-env:v4.4-1"
AFL_FUZZER_TEST_IMAGE: "$CI_DOCKER_REGISTRY/afl-fuzzer-test:v4.4-1-1"
CLANG_STATIC_ANALYSIS_IMAGE: "${CI_DOCKER_REGISTRY}/clang-static-analysis:v4.4-1-2"
@ -59,8 +67,6 @@ variables:
# target test repo parameters
TEST_ENV_CONFIG_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/qa/ci-test-runner-configs.git"
CI_AUTO_TEST_SCRIPT_REPO_URL: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/qa/auto_test_script.git"
CI_AUTO_TEST_SCRIPT_REPO_BRANCH: "ci/v3.1"
.setup_tools_unless_target_test: &setup_tools_unless_target_test |
if [[ -n "$IDF_DONT_USE_MIRRORS" ]]; then
@ -80,6 +86,7 @@ variables:
before_script:
- source tools/ci/utils.sh
- is_based_on_commits $REQUIRED_ANCESTOR_COMMITS
- source tools/ci/setup_python.sh
- add_gitlab_ssh_keys
- source tools/ci/configure_ci_environment.sh
@ -91,6 +98,7 @@ before_script:
before_script:
- echo "Not setting up GitLab key, not fetching submodules"
- source tools/ci/utils.sh
- is_based_on_commits $REQUIRED_ANCESTOR_COMMITS
- source tools/ci/setup_python.sh
- source tools/ci/configure_ci_environment.sh
@ -98,11 +106,15 @@ before_script:
before_script:
- echo "Only load utils.sh"
- source tools/ci/utils.sh
- is_based_on_commits $REQUIRED_ANCESTOR_COMMITS
.before_script_macos:
before_script:
- source tools/ci/utils.sh
- is_based_on_commits $REQUIRED_ANCESTOR_COMMITS
- export IDF_TOOLS_PATH="${HOME}/.espressif_runner_${CI_RUNNER_ID}_${CI_CONCURRENT_ID}"
# Clean up idf-env.json which might not be compatible with one produced by newer ESP-IDF versions
- rm -f ${IDF_TOOLS_PATH}/idf-env.json
- $IDF_PATH/tools/idf_tools.py install-python-env
# On macOS, these tools need to be installed
- $IDF_PATH/tools/idf_tools.py --non-interactive install cmake ninja
@ -115,6 +127,12 @@ before_script:
- export PYTHONPATH="$IDF_PATH/tools:$IDF_PATH/tools/ci/python_packages:$PYTHONPATH"
- fetch_submodules
default:
retry:
max: 2
# In case of a runner failure we could hop to another one, or a network error could go away.
when: runner_system_failure
include:
- '.gitlab/ci/rules.yml'
- '.gitlab/ci/docs.yml'

View File

@ -2,210 +2,5 @@
#
# https://docs.gitlab.com/ee/user/project/code_owners.html#the-syntax-of-code-owners-files
#
# If more than one rule matches a given file, the latest rule is used.
# The file should be generally kept sorted, except when it is necessary
# to use a different order due to the fact above. In that case, use
# '# sort-order-reset' comment line to reset the sort order.
#
# Recipes for a few common cases:
#
# 1. Specific directory with all its contents:
#
# /components/app_trace/
#
# Note the trailing slash!
#
# 2. File with certain extension in any subdirectory of a certain directory:
#
# /examples/**/*.py
#
# This includes an *.py files in /examples/ directory as well.
#
# 3. Contents of a directory with a certain name, anywhere in the tree:
#
# test_*_host/
#
# Will match everything under components/efuse/test_efuse_host/,
# components/heap/test_multi_heap_host/, components/lwip/test_afl_host/, etc.
#
# 4. Same as above, except limited to a specific place in the tree:
#
# /components/esp32*/
#
# Matches everything under /components/esp32, /components/esp32s2, etc.
# Doesn't match /tools/some-test/components/esp32s5.
#
# 5. Specific file:
#
# /tools/tools.json
#
# 6. File with a certain name anywhere in the tree
#
# .gitignore
#
* @esp-idf-codeowners/other
/.* @esp-idf-codeowners/tools
/.gitlab-ci.yml @esp-idf-codeowners/ci
/.gitlab/ci/ @esp-idf-codeowners/ci
/.pre-commit-config.yaml @esp-idf-codeowners/ci
/.readthedocs.yml @esp-idf-codeowners/docs
/CMakeLists.txt @esp-idf-codeowners/build-config
/Kconfig @esp-idf-codeowners/build-config
/add_path.sh @esp-idf-codeowners/tools
/export.* @esp-idf-codeowners/tools
/install.* @esp-idf-codeowners/tools
/sdkconfig.rename @esp-idf-codeowners/build-config
/sonar-project.properties @esp-idf-codeowners/ci
# sort-order-reset
/components/app_trace/ @esp-idf-codeowners/tools
/components/app_update/ @esp-idf-codeowners/system @esp-idf-codeowners/app-utilities
/components/asio/ @esp-idf-codeowners/network
/components/bootloader*/ @esp-idf-codeowners/system @esp-idf-codeowners/security
/components/bt/ @esp-idf-codeowners/bluetooth
/components/cbor/ @esp-idf-codeowners/app-utilities
/components/cmock/ @esp-idf-codeowners/system
/components/coap/ @esp-idf-codeowners/app-utilities
/components/console/ @esp-idf-codeowners/system @esp-idf-codeowners/app-utilities
/components/cxx/ @esp-idf-codeowners/system
/components/driver/ @esp-idf-codeowners/peripherals
/components/efuse/ @esp-idf-codeowners/system
/components/esp32*/ @esp-idf-codeowners/system
/components/esp_adc_cal/ @esp-idf-codeowners/peripherals
/components/esp_common/ @esp-idf-codeowners/system
/components/esp_eth/ @esp-idf-codeowners/network
/components/esp_event/ @esp-idf-codeowners/system
/components/esp_gdbstub/ @esp-idf-codeowners/tools
/components/esp_hid/ @esp-idf-codeowners/bluetooth
/components/esp_http_client/ @esp-idf-codeowners/app-utilities
/components/esp_http_server/ @esp-idf-codeowners/app-utilities
/components/esp_https_ota/ @esp-idf-codeowners/app-utilities
/components/esp_https_server/ @esp-idf-codeowners/app-utilities
/components/esp_hw_support/ @esp-idf-codeowners/system
/components/esp_ipc/ @esp-idf-codeowners/system
/components/esp_lcd/ @esp-idf-codeowners/peripherals
/components/esp_local_ctrl/ @esp-idf-codeowners/app-utilities
/components/esp_netif/ @esp-idf-codeowners/network
/components/esp_phy/ @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/ieee802154
/components/esp_pm/ @esp-idf-codeowners/power-management @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi
/components/esp_ringbuf/ @esp-idf-codeowners/system
/components/esp_rom/ @esp-idf-codeowners/system @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi
/components/esp_serial_slave_link/ @esp-idf-codeowners/peripherals
/components/esp_system/ @esp-idf-codeowners/system
/components/esp_timer/ @esp-idf-codeowners/system
/components/esp-tls/ @esp-idf-codeowners/app-utilities
/components/esp_websocket_client/ @esp-idf-codeowners/network
/components/esp_wifi/ @esp-idf-codeowners/wifi
/components/espcoredump/ @esp-idf-codeowners/tools
/components/esptool_py/ @esp-idf-codeowners/tools
/components/expat/ @esp-idf-codeowners/app-utilities
/components/fatfs/ @esp-idf-codeowners/storage
/components/freemodbus/ @esp-idf-codeowners/peripherals
/components/freertos/ @esp-idf-codeowners/system
/components/hal/ @esp-idf-codeowners/peripherals
/components/heap/ @esp-idf-codeowners/system
/components/idf_test/ @esp-idf-codeowners/ci
/components/ieee802154/ @esp-idf-codeowners/ieee802154
/components/jsmn/ @esp-idf-codeowners/app-utilities
/components/json/ @esp-idf-codeowners/app-utilities
/components/libsodium/ @esp-idf-codeowners/security
/components/log/ @esp-idf-codeowners/system
/components/lwip/ @esp-idf-codeowners/lwip
/components/mbedtls/ @esp-idf-codeowners/app-utilities @esp-idf-codeowners/security
/components/mdns/ @esp-idf-codeowners/network
/components/mqtt/ @esp-idf-codeowners/network
/components/newlib/ @esp-idf-codeowners/system @esp-idf-codeowners/tools
/components/nghttp/ @esp-idf-codeowners/app-utilities
/components/nvs_flash/ @esp-idf-codeowners/storage
/components/openssl/ @esp-idf-codeowners/network
/components/openthread/ @esp-idf-codeowners/ieee802154
/components/partition_table/ @esp-idf-codeowners/system
/components/perfmon/ @esp-idf-codeowners/tools
/components/protobuf-c/ @esp-idf-codeowners/app-utilities
/components/protocomm/ @esp-idf-codeowners/app-utilities
/components/pthread/ @esp-idf-codeowners/system
/components/sdmmc/ @esp-idf-codeowners/storage
/components/soc/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/system
/components/spi_flash/ @esp-idf-codeowners/peripherals
/components/spiffs/ @esp-idf-codeowners/storage
/components/tcp_transport/ @esp-idf-codeowners/network
/components/tcpip_adapter/ @esp-idf-codeowners/network
/components/tinyusb/ @esp-idf-codeowners/peripherals/usb
/components/touch_element/ @esp-idf-codeowners/peripherals
/components/ulp/ @esp-idf-codeowners/system
/components/unity/ @esp-idf-codeowners/ci
/components/usb/ @esp-idf-codeowners/peripherals/usb
/components/vfs/ @esp-idf-codeowners/storage
/components/wear_levelling/ @esp-idf-codeowners/storage
/components/wifi_provisioning/ @esp-idf-codeowners/app-utilities
/components/wpa_supplicant/ @esp-idf-codeowners/wifi
/components/xtensa/ @esp-idf-codeowners/system
/docs/ @esp-idf-codeowners/docs
/docs/**/api-reference/bluetooth/ @esp-idf-codeowners/bluetooth
/docs/**/api-reference/network/ @esp-idf-codeowners/network
/docs/**/api-reference/peripherals/ @esp-idf-codeowners/peripherals
/docs/**/api-reference/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/docs/**/api-reference/provisioning/ @esp-idf-codeowners/app-utilities
/docs/**/api-reference/storage/ @esp-idf-codeowners/storage
/docs/**/api-reference/system/ @esp-idf-codeowners/system
/docs/**/security/ @esp-idf-codeowners/security
/examples/bluetooth/ @esp-idf-codeowners/bluetooth
/examples/build_system/ @esp-idf-codeowners/build-config
/examples/common_components/ @esp-idf-codeowners/system
/examples/cxx/ @esp-idf-codeowners/system
/examples/ethernet/ @esp-idf-codeowners/network
/examples/get-started/ @esp-idf-codeowners/system
/examples/mesh/ @esp-idf-codeowners/wifi
/examples/network/ @esp-idf-codeowners/network @esp-idf-codeowners/wifi
/examples/openthread/ @esp-idf-codeowners/ieee802154
/examples/peripherals/ @esp-idf-codeowners/peripherals
/examples/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/examples/provisioning/ @esp-idf-codeowners/app-utilities
/examples/security/ @esp-idf-codeowners/security
/examples/storage/ @esp-idf-codeowners/storage
/examples/system/ @esp-idf-codeowners/system
/examples/wifi/ @esp-idf-codeowners/wifi
/examples/**/*.py @esp-idf-codeowners/ci @esp-idf-codeowners/tools
/make/ @esp-idf-codeowners/build-config
/tools/ @esp-idf-codeowners/tools
/tools/*_apps.py @esp-idf-codeowners/ci
/tools/ble/ @esp-idf-codeowners/app-utilities
/tools/catch/ @esp-idf-codeowners/ci
/tools/ci/ @esp-idf-codeowners/ci
/tools/cmake/ @esp-idf-codeowners/build-config
/tools/esp_prov/ @esp-idf-codeowners/app-utilities
/tools/find_build_apps/ @esp-idf-codeowners/ci
/tools/idf_size_yaml/ @esp-idf-codeowners/peripherals
/tools/kconfig*/ @esp-idf-codeowners/build-config
/tools/ldgen/ @esp-idf-codeowners/build-config
/tools/mass_mfg/ @esp-idf-codeowners/app-utilities
/tools/mocks/ @esp-idf-codeowners/system
## Note: owners here should be the same as the owners for the same example subdir, above
/tools/test_apps/build_system/ @esp-idf-codeowners/build-config
/tools/test_apps/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/tools/test_apps/security/ @esp-idf-codeowners/security
/tools/test_apps/system/ @esp-idf-codeowners/system
/tools/test_apps/**/*.py @esp-idf-codeowners/ci @esp-idf-codeowners/tools
/tools/unit-test-app/ @esp-idf-codeowners/system @esp-idf-codeowners/tools
requirements.txt @esp-idf-codeowners/tools
# sort-order-reset
# ignore lists
/tools/ci/check_copyright_ignore.txt @esp-idf-codeowners/tools
/tools/ci/check_copyright_permanent_ignore.txt @esp-idf-codeowners/all-maintainers
/tools/ci/check_examples_cmake_make-cmake_ignore.txt @esp-idf-codeowners/tools
/tools/ci/check_examples_cmake_make-make_ignore.txt @esp-idf-codeowners/tools
/tools/ci/mypy_ignore_list.txt @esp-idf-codeowners/tools
* @esp-idf-codeowners/all-maintainers

View File

@ -48,7 +48,7 @@
- `example_test[_esp32/esp32s2/...]`
- `fuzzer_test`
- `host_test`
- `integration_test`
- `integration_test[_wifi/ble]`
- `iperf_stress_test`
- `macos`
- `macos_test`

View File

@ -1,54 +1,137 @@
assign_test:
extends: .rules:test:any_test
tags:
- assign_test
.assign_test_template:
image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
stage: assign_test
# gitlab ci do not support match job with RegEx or wildcard now in dependencies.
# we have a lot build example jobs. now we don't use dependencies, just download all artifacts of build stage.
dependencies: # Here is not a hard dependency relationship, could be skipped. so we do not use "needs" here.
- build_ssc_esp32
- build_esp_idf_tests_cmake_esp32
- build_esp_idf_tests_cmake_esp32s2
- build_esp_idf_tests_cmake_esp32s3
- build_esp_idf_tests_cmake_esp32c3
tags:
- assign_test
variables:
SUBMODULES_TO_FETCH: "components/esptool_py/esptool"
EXAMPLE_TEST_DIR: "${CI_PROJECT_DIR}/examples"
CUSTOM_TEST_DIR: "${CI_PROJECT_DIR}/tools/test_apps"
UNIT_TEST_DIR: "${CI_PROJECT_DIR}/components/idf_test/unit_test"
SUBMODULES_TO_FETCH: components/esptool_py/esptool
artifacts:
paths:
- ${TEST_DIR}/test_configs
- ${BUILD_DIR}/artifact_index.json
when: always
expire_in: 1 week
script:
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py $TEST_TYPE $TEST_DIR -c $CI_TARGET_TEST_CONFIG_FILE -o $TEST_DIR/test_configs
assign_example_test:
extends:
- .assign_test_template
- .rules:build:example_test
needs:
- job: build_examples_cmake_esp32
artifacts: false
optional: true
- job: build_examples_cmake_esp32s2
artifacts: false
optional: true
- job: build_examples_cmake_esp32c3
artifacts: false
optional: true
- job: build_examples_cmake_esp32s3
artifacts: false
optional: true
variables:
TEST_TYPE: example_test
TEST_DIR: ${CI_PROJECT_DIR}/examples
BUILD_DIR: ${CI_PROJECT_DIR}/build_examples
assign_custom_test:
extends:
- .assign_test_template
- .rules:build:custom_test
needs:
- job: build_test_apps_esp32
artifacts: false
optional: true
- job: build_test_apps_esp32s2
artifacts: false
optional: true
- job: build_test_apps_esp32c3
artifacts: false
optional: true
- job: build_test_apps_esp32s3
artifacts: false
optional: true
variables:
TEST_TYPE: custom_test
TEST_DIR: ${CI_PROJECT_DIR}/tools/test_apps
BUILD_DIR: ${CI_PROJECT_DIR}/build_test_apps
assign_component_ut:
extends:
- .assign_test_template
- .rules:build:component_ut
needs:
- job: build_component_ut_esp32
artifacts: false
optional: true
- job: build_component_ut_esp32s2
artifacts: false
optional: true
- job: build_component_ut_esp32c3
artifacts: false
optional: true
- job: build_component_ut_esp32s3
artifacts: false
optional: true
variables:
TEST_TYPE: component_ut
TEST_DIR: ${CI_PROJECT_DIR}/component_ut
BUILD_DIR: ${CI_PROJECT_DIR}/build_component_ut
script:
# COMPONENT_UT_DIRS is set by `set_component_ut_vars` in `utils.sh`
COMPONENT_UT_OUTPUT_DIR: "${CI_PROJECT_DIR}/component_ut"
INTEGRATION_CONFIG_OUTPUT_PATH: "${CI_PROJECT_DIR}/components/idf_test/integration_test/CIConfigs"
- set_component_ut_vars
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py $TEST_TYPE $COMPONENT_UT_DIRS -c $CI_TARGET_TEST_CONFIG_FILE -o $TEST_DIR/test_configs
assign_unit_test:
extends:
- .assign_test_template
- .rules:build:unit_test
needs:
- job: build_esp_idf_tests_cmake_esp32
optional: true
- job: build_esp_idf_tests_cmake_esp32s2
optional: true
- job: build_esp_idf_tests_cmake_esp32c3
optional: true
- job: build_esp_idf_tests_cmake_esp32s3
optional: true
variables:
TEST_TYPE: unit_test
TEST_DIR: ${CI_PROJECT_DIR}/components/idf_test/unit_test
BUILD_DIR: ${CI_PROJECT_DIR}/tools/unit-test-app/builds
script:
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py $TEST_TYPE $TEST_DIR -c $CI_TARGET_TEST_CONFIG_FILE -o $TEST_DIR/test_configs
assign_integration_test:
extends:
- .assign_test_template
- .rules:test:integration_test
- .before_script_minimal
image: ${CI_INTEGRATION_TEST_ENV_IMAGE}
needs:
- build_ssc_esp32
- build_ssc_esp32c3
artifacts:
paths:
- $TEST_DIR/test_configs
variables:
TEST_DIR: ${CI_PROJECT_DIR}/tools/ci/integration_test
BUILD_DIR: ${CI_PROJECT_DIR}/SSC/ssc_bin
INTEGRATION_TEST_CASE_PATH: "${CI_PROJECT_DIR}/auto_test_script/TestCaseFiles"
ASSIGN_TEST_CASE_SCRIPT: "${CI_PROJECT_DIR}/auto_test_script/bin/CIAssignTestCases.py"
PYTHONPATH: ${CI_PROJECT_DIR}/auto_test_script/packages
# auto_test_script only supports python 3.7.x
PYTHON_VER: 3.7.7
artifacts:
paths:
- components/idf_test/*/CIConfigs
- $EXAMPLE_TEST_DIR/test_configs
- $CUSTOM_TEST_DIR/test_configs
- $COMPONENT_UT_OUTPUT_DIR/test_configs
- build_examples/artifact_index.json
- build_test_apps/artifact_index.json
- build_component_ut/artifact_index.json
- tools/unit-test-app/builds/artifact_index.json
expire_in: 1 week
GIT_LFS_SKIP_SMUDGE: 1
script:
- set_component_ut_vars
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py example_test $EXAMPLE_TEST_DIR -c $CI_TARGET_TEST_CONFIG_FILE -o $EXAMPLE_TEST_DIR/test_configs
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py custom_test $CUSTOM_TEST_DIR -c $CI_TARGET_TEST_CONFIG_FILE -o $CUSTOM_TEST_DIR/test_configs
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py component_ut $COMPONENT_UT_DIRS -c $CI_TARGET_TEST_CONFIG_FILE -o $COMPONENT_UT_OUTPUT_DIR/test_configs
- python tools/ci/python_packages/ttfw_idf/IDFAssignTest.py unit_test $UNIT_TEST_DIR -c $CI_TARGET_TEST_CONFIG_FILE -o $UNIT_TEST_DIR/CIConfigs
- add_gitlab_ssh_keys
# clone test script to assign tests
# can not retry if downing git lfs files failed, so using empty_branch first.
- retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} -b empty_branch
- retry_failed git -C auto_test_script checkout -f ${CI_AUTO_TEST_SCRIPT_REPO_BRANCH}
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script --customized_only
- retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} auto_test_script
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script
- cd auto_test_script
- ./tools/ci/setup_idfci.sh
# assign integration test cases
- python ${ASSIGN_TEST_CASE_SCRIPT} -t ${INTEGRATION_TEST_CASE_PATH} -c $CI_TARGET_TEST_CONFIG_FILE -b $IDF_PATH/SSC/ssc_bin -o $INTEGRATION_CONFIG_OUTPUT_PATH
- python ${ASSIGN_TEST_CASE_SCRIPT} -t ${INTEGRATION_TEST_CASE_PATH} -c $CI_TARGET_TEST_CONFIG_FILE -b ${BUILD_DIR} -o $TEST_DIR/test_configs
update_test_cases:
extends: .rules:ref:master-schedule
@ -70,10 +153,10 @@ update_test_cases:
SUBMODULES_TO_FETCH: "components/esptool_py/esptool"
UNIT_TEST_DIR: "${CI_PROJECT_DIR}/components/idf_test/unit_test"
BOT_ACCOUNT_CONFIG_FILE: "${CI_PROJECT_DIR}/test-management/Config/Account.local.yml"
AUTO_TEST_SCRIPT_PATH: "${CI_PROJECT_DIR}/auto_test_script"
PYTHONPATH: ${CI_PROJECT_DIR}/auto_test_script/packages
PYTHON_VER: 3.7.7
script:
- export GIT_SHA=$(echo ${CI_COMMIT_SHA} | cut -c 1-8)
- export GIT_SHA=$(echo ${PIPELINE_COMMIT_SHA} | cut -c 1-8)
- retry_failed git clone $TEST_MANAGEMENT_REPO
- python $CHECKOUT_REF_SCRIPT test-management test-management
- cd test-management

View File

@ -5,6 +5,11 @@
- build
variables:
SIZE_INFO_LOCATION: "$CI_PROJECT_DIR/size_info.txt"
# Enable ccache for all build jobs. See configure_ci_environment.sh for more ccache related settings.
IDF_CCACHE_ENABLE: "1"
after_script:
# Show ccache statistics if enabled globally
- test "$CI_CCACHE_STATS" == 1 && test -n "$(which ccache)" && ccache --show-stats || true
dependencies: []
.build_template_app_template:
@ -34,10 +39,6 @@
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
# Only do the default cmake build for each target, remaining part are done in the build_template_app job
- tools/ci/build_template_app.sh ${BUILD_COMMAND_ARGS}
# Check if there are any stray printf/ets_printf references in WiFi libs
- cd components/esp_wifi/lib
- for dir in esp32 esp32s2; do test $(xtensa-esp32-elf-nm $dir/*.a | grep -w printf | wc -l) -eq 0; done;
- for dir in esp32 esp32s2; do test $(xtensa-esp32-elf-nm $dir/*.a | grep -w ets_printf | wc -l) -eq 0; done;
# build-related-pre-check-jobs ------------------------------------------------
# Build at least one project for each target at earliest stage to reduce build cost for obvious failing commits
@ -82,6 +83,12 @@ build_ssc_esp32c3:
variables:
TARGET_NAME: "ESP32C3"
build_ssc_esp32s3:
extends: .build_ssc_template
parallel: 3
variables:
TARGET_NAME: "ESP32S3"
.build_esp_idf_tests_cmake_template:
extends: .build_template
dependencies: # set dependencies to null to avoid missing artifacts issue
@ -361,8 +368,9 @@ build_docker:
script:
- export LOCAL_CI_REPOSITORY_URL=$CI_REPOSITORY_URL
- if [ -n "$LOCAL_GITLAB_HTTPS_HOST" ]; then export LOCAL_CI_REPOSITORY_URL="https://gitlab-ci-token:${CI_JOB_TOKEN}@${LOCAL_GITLAB_HTTPS_HOST}/${CI_PROJECT_PATH}"; fi
- if [ -n "$LOCAL_GIT_MIRROR" ]; then export LOCAL_CI_REPOSITORY_URL="${LOCAL_GIT_MIRROR}/${CI_PROJECT_PATH}"; fi
- echo "Using repository at $LOCAL_CI_REPOSITORY_URL"
- export DOCKER_BUILD_ARGS="--build-arg IDF_CLONE_URL=${LOCAL_CI_REPOSITORY_URL} --build-arg IDF_CLONE_BRANCH_OR_TAG=${CI_COMMIT_REF_NAME} --build-arg IDF_CHECKOUT_REF=${CI_COMMIT_TAG:-$CI_COMMIT_SHA}"
- export DOCKER_BUILD_ARGS="--build-arg IDF_CLONE_URL=${LOCAL_CI_REPOSITORY_URL} --build-arg IDF_CLONE_BRANCH_OR_TAG=${CI_COMMIT_REF_NAME} --build-arg IDF_CHECKOUT_REF=${CI_COMMIT_TAG:-$PIPELINE_COMMIT_SHA}"
# Build
- docker build --tag ${DOCKER_TMP_IMAGE_NAME} ${DOCKER_BUILD_ARGS} tools/docker/
# We can't mount $PWD/examples/get-started/blink into the container, see https://gitlab.com/gitlab-org/gitlab-ce/issues/41227.
@ -370,31 +378,6 @@ build_docker:
# Therefore, build a copy of the example located inside the container.
- docker run --rm --workdir /opt/esp/idf/examples/get-started/blink ${DOCKER_TMP_IMAGE_NAME} idf.py build
.test-on-windows:
extends:
- .before_script_minimal
- .rules:build:windows
stage: host_test
needs: []
image: $CI_DOCKER_REGISTRY/esp32-toolchain-win-cross
tags:
- build
script:
- cd $TEST_DIR
- mkdir build
- cd build
- cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-i686-w64-mingw32.cmake -DCMAKE_BUILD_TYPE=Release ..
- cmake --build .
build_idf_exe:
extends: .test-on-windows
artifacts:
paths:
- tools/windows/idf_exe/build/idf-exe-v*.zip
expire_in: 4 days
variables:
TEST_DIR: tools/windows/idf_exe
# This job builds template app with permutations of targets and optimization levels
build_template_app:
extends:

View File

@ -61,6 +61,9 @@
patterns:
- build_components
- build_system
included_in:
- "build:{0}"
- build:target_test
build:integration_test:
labels:
@ -68,19 +71,8 @@ build:integration_test:
patterns:
- build_components
- build_system
# -------------
# Special Cases
# -------------
"build:example_test-esp32c3": # esp32c3 test is only run by label, but build jobs should always be triggered
labels:
- build
- example_test
patterns:
- build_components
- build_system
- build-example_test
- example_test
included_in:
- build:target_test
####################
# Target Test Jobs #
@ -92,14 +84,14 @@ build:integration_test:
labels: # For each rule, use labels <test_type> and <test_type>-<target>
- "{0}"
- "{0}_{1}"
- target_test
patterns: # For each rule, use patterns <test_type> and build-<test_type>
- "{0}"
- "build-{0}"
included_in: # Parent rules
- "build:{0}"
- "build:{0}-{1}"
- build:target_test
- test:target_test
- test:any_test
# -------------
# Special Cases
@ -112,42 +104,36 @@ build:integration_test:
- "component_ut_{0}"
- unit_test
- "unit_test_{0}"
- target_test
patterns:
- component_ut
- "build-component_ut-{0}"
included_in:
- build:component_ut
- "build:component_ut-{0}"
- build:target_test
- test:target_test
- test:any_test
"test:example_test-esp32c3": # For esp32c3 we trigger only with label
"labels:example_test-esp32c3":
"test:integration_test_{0}":
matrix:
- - wifi
- ble
labels:
- example_test_esp32c3
included_in:
- build:example_test-esp32c3
- build:target_test
"test:integration_test":
labels:
- "integration_test"
- integration_test_{0}
- integration_test
- target_test
patterns:
- "integration_test"
- integration_test_{0}
# - maybe others
included_in:
- "build:integration_test"
- test:integration_test
- build:integration_test
- build:target_test
- test:target_test
- test:any_test
"test:host_test":
labels:
- host_test
patterns:
- host_test
included_in:
- test:any_test
"test:submodule":
labels:
@ -162,17 +148,17 @@ build:integration_test:
labels:
- iperf_stress_test
included_in:
- build:example_test
- build:example_test-esp32
- build:target_test
- test:any_test
"labels:weekend_test": # custom test
labels:
- weekend_test
included_in:
- build:custom_test
- build:custom_test-esp32
- build:target_test
- test:any_test
"labels:nvs_coverage": # host_test
labels:

View File

@ -21,7 +21,7 @@ deploy_test_result:
extends:
- .deploy_job_template
- .before_script_minimal
- .rules:ref:master-schedule-always
- .rules:ref:master-always
image: $CI_DOCKER_REGISTRY/bot-env
tags:
- deploy_test
@ -39,8 +39,8 @@ deploy_test_result:
AUTO_TEST_SCRIPT_PATH: "${CI_PROJECT_DIR}/auto_test_script"
script:
- add_gitlab_ssh_keys
- export GIT_SHA=$(echo ${CI_COMMIT_SHA} | cut -c 1-8)
- export REV_COUNT=$(git rev-list --count HEAD)
- export GIT_SHA=$(echo ${PIPELINE_COMMIT_SHA} | cut -c 1-8)
- export REV_COUNT=$(git rev-list --count ${PIPELINE_COMMIT_SHA} --)
- export SUMMARY="IDF CI test result for $GIT_SHA (r${REV_COUNT})"
# artifacts of job update_test_cases creates test-management folder
# we need to remove it so we can clone test-management folder again

View File

@ -58,13 +58,14 @@ check_docs_lang_sync:
.build_docs_template:
image: $ESP_IDF_DOC_ENV_IMAGE
variables:
PYTHON_VER: 3.6.13
PYTHON_VER: 3.7.10
tags:
- build_docs
dependencies: []
script:
- cd docs
- pip install -r requirements.txt
- cd docs
- pip install -U -r requirements.txt
- build-docs -t $DOCTGT -bs $DOC_BUILDERS -l $DOCLANG build
parallel:
matrix:
@ -74,13 +75,14 @@ check_docs_lang_sync:
check_docs_gh_links:
image: $ESP_IDF_DOC_ENV_IMAGE
variables:
PYTHON_VER: 3.6.13
PYTHON_VER: 3.7.10
extends:
- .pre_check_job_template
- .doc-rules:build:docs
script:
- cd docs
- pip install -r requirements.txt
- cd docs
- pip install -U -r requirements.txt
- build-docs gh-linkcheck
# stage: build_doc
@ -150,20 +152,19 @@ build_docs_pdf:
extends:
- .before_script_no_sync_submodule
image: $ESP_IDF_DOC_ENV_IMAGE
variables:
PYTHON_VER: 3.6.13
stage: test_deploy
tags:
- deploy
- shiny
variables:
PYTHON_VER: 3.7.10
DOCS_BUILD_DIR: "${IDF_PATH}/docs/_build/"
PYTHONUNBUFFERED: 1
dependencies: []
script:
- add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
- export GIT_VER=$(git describe --always)
- pip install -r docs/requirements.txt
- export GIT_VER=$(git describe --always ${PIPELINE_COMMIT_SHA} --)
- pip install -U -r docs/requirements.txt
- deploy-docs
# stage: test_deploy
@ -224,7 +225,7 @@ check_doc_links:
expire_in: 1 week
allow_failure: true
script:
- cd docs
- pip install -r requirements.txt
# At the moment this check will always fail due to multiple known limitations, ignore result
- build-docs -t $DOCTGT -l $DOCLANG linkcheck || { echo "THERE ARE ISSUES DUE TO KNOWN LIMITATIONS, PLEASE FIX THEM. Nowadays we're ignored them to pass pipeline."; true; }
- cd docs
- pip install -U -r requirements.txt
- build-docs -t $DOCTGT -l $DOCLANG linkcheck

View File

@ -245,7 +245,7 @@ test_espcoredump:
expire_in: 1 week
variables:
IDF_COREDUMP_ELF_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/idf/idf-coredump-elf.git"
IDF_COREDUMP_ELF_TAG: idf-20210910-00
IDF_COREDUMP_ELF_TAG: idf-20210915
# install CMake version specified in tools.json
SETUP_TOOLS_LIST: "all"
script:

View File

@ -15,6 +15,7 @@
image: "$CI_DOCKER_REGISTRY/esp-idf-pre-commit:1"
before_script:
- source tools/ci/utils.sh
- is_based_on_commits $REQUIRED_ANCESTOR_COMMITS
- export PYTHONPATH="$CI_PROJECT_DIR/tools:$CI_PROJECT_DIR/tools/ci/python_packages:$PYTHONPATH"
check_pre_commit_master_release:
@ -22,7 +23,7 @@ check_pre_commit_master_release:
- .check_pre_commit_template
- .rules:protected
script:
- git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | xargs pre-commit run --files
- git diff-tree --no-commit-id --name-only -r $PIPELINE_COMMIT_SHA | xargs pre-commit run --files
check_pre_commit_MR:
extends:
@ -83,15 +84,20 @@ test_check_kconfigs:
script:
- python ${IDF_PATH}/tools/ci/test_check_kconfigs.py
check_wifi_lib_md5:
check_blobs:
extends: .pre_check_base_template
tags:
- build
variables:
SUBMODULES_TO_FETCH: "components/esp_wifi/lib"
SUBMODULES_TO_FETCH: "components/esp_wifi/lib;components/esp_phy/lib"
script:
# Check if Wi-Fi library header files match between IDF and the version used when compiling the libraries
- IDF_TARGET=esp32 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
- IDF_TARGET=esp32s2 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
- IDF_TARGET=esp32s3 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
- IDF_TARGET=esp32c3 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
# Check if Wi-Fi, PHY, BT blobs contain references to specific symbols
- bash $IDF_PATH/tools/ci/check_blobs.sh
check_fuzzer_compilation:
extends: .pre_check_base_template
@ -157,10 +163,14 @@ scan_tests:
TEST_APPS_OUTPUT_DIR: ${CI_PROJECT_DIR}/tools/test_apps/test_configs
COMPONENT_UT_OUTPUT_DIR: ${CI_PROJECT_DIR}/component_ut/test_configs
CI_SCAN_TESTS_PY: ${CI_PROJECT_DIR}/tools/ci/python_packages/ttfw_idf/CIScanTests.py
EXTRA_TEST_DIRS: >-
examples/bluetooth/esp_ble_mesh/ble_mesh_console
examples/bluetooth/hci/controller_hci_uart_esp32
examples/wifi/iperf
script:
- set_component_ut_vars
- run_cmd python $CI_SCAN_TESTS_PY example_test $EXAMPLE_TEST_DIR -b make --exclude examples/build_system/idf_as_lib -c $CI_TARGET_TEST_CONFIG_FILE -o $EXAMPLE_TEST_OUTPUT_DIR
- run_cmd python $CI_SCAN_TESTS_PY example_test $EXAMPLE_TEST_DIR -b cmake --exclude examples/build_system/idf_as_lib -c $CI_TARGET_TEST_CONFIG_FILE -o $EXAMPLE_TEST_OUTPUT_DIR
- run_cmd python $CI_SCAN_TESTS_PY example_test $EXAMPLE_TEST_DIR -b cmake --exclude examples/build_system/idf_as_lib -c $CI_TARGET_TEST_CONFIG_FILE -o $EXAMPLE_TEST_OUTPUT_DIR --extra_test_dirs $EXTRA_TEST_DIRS
- run_cmd python $CI_SCAN_TESTS_PY test_apps $TEST_APPS_TEST_DIR -c $CI_TARGET_TEST_CONFIG_FILE -o $TEST_APPS_OUTPUT_DIR
- run_cmd python $CI_SCAN_TESTS_PY component_ut $COMPONENT_UT_DIRS --exclude $COMPONENT_UT_EXCLUDES -c $CI_TARGET_TEST_CONFIG_FILE -o $COMPONENT_UT_OUTPUT_DIR
@ -190,6 +200,6 @@ check_commit_msg:
extends: .pre_check_job_template
script:
- git status
- git log -n10 --oneline
- git log -n10 --oneline ${PIPELINE_COMMIT_SHA}
# commit start with "WIP: " need to be squashed before merge
- 'git log --pretty=%s master.. -- | grep "^WIP: " && exit 1 || exit 0'
- 'git log --pretty=%s origin/master..${PIPELINE_COMMIT_SHA} -- | grep -i "^WIP:" && exit 1 || exit 0'

View File

@ -87,8 +87,19 @@
- "components/**/test_apps/**/*"
.patterns-integration_test: &patterns-integration_test
- "tools/ci/python_packages/tiny_test_fw/**/*"
.patterns-integration_test_ble: &patterns-integration_test_ble
- "tools/ci/python_packages/gitlab_api.py"
- "tools/ci/integration_test/**/*"
- "components/bt/controller/lib_esp32"
- "components/bt/controller/lib_esp32c3_family"
- "components/bt/host/nimble/nimble"
- "components/esp_phy/lib"
.patterns-integration_test_wifi: &patterns-integration_test_wifi
- "tools/ci/python_packages/gitlab_api.py"
- "tools/ci/integration_test/**/*"
- "components/esp_wifi/lib"
- "components/esp_phy/lib"
.patterns-host_test: &patterns-host_test
- ".gitlab/ci/host-test.yml"
@ -221,12 +232,10 @@
- <<: *if-ref-master
- <<: *if-schedule
.rules:ref:master-schedule-always:
.rules:ref:master-always:
rules:
- <<: *if-ref-master
when: always
- <<: *if-schedule
when: always
.rules:patterns:clang_tidy:
rules:
@ -321,6 +330,12 @@
.if-label-integration_test: &if-label-integration_test
if: '$BOT_LABEL_INTEGRATION_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*integration_test(?:,[^,\n\r]+)*$/i'
.if-label-integration_test_ble: &if-label-integration_test_ble
if: '$BOT_LABEL_INTEGRATION_TEST_BLE || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*integration_test_ble(?:,[^,\n\r]+)*$/i'
.if-label-integration_test_wifi: &if-label-integration_test_wifi
if: '$BOT_LABEL_INTEGRATION_TEST_WIFI || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*integration_test_wifi(?:,[^,\n\r]+)*$/i'
.if-label-iperf_stress_test: &if-label-iperf_stress_test
if: '$BOT_LABEL_IPERF_STRESS_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*iperf_stress_test(?:,[^,\n\r]+)*$/i'
@ -336,6 +351,9 @@
.if-label-submodule: &if-label-submodule
if: '$BOT_LABEL_SUBMODULE || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*submodule(?:,[^,\n\r]+)*$/i'
.if-label-target_test: &if-label-target_test
if: '$BOT_LABEL_TARGET_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*target_test(?:,[^,\n\r]+)*$/i'
.if-label-unit_test: &if-label-unit_test
if: '$BOT_LABEL_UNIT_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test(?:,[^,\n\r]+)*$/i'
@ -366,12 +384,35 @@
- <<: *if-dev-push
changes: *patterns-build_system
.rules:build:component_ut:
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-component_ut_esp32s3
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-component_ut
.rules:build:component_ut-esp32:
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
- <<: *if-dev-push
@ -387,6 +428,7 @@
- <<: *if-label-build
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32c3
- <<: *if-dev-push
@ -402,6 +444,7 @@
- <<: *if-label-build
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32s2
- <<: *if-dev-push
@ -417,6 +460,7 @@
- <<: *if-label-build
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32s3
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32s3
- <<: *if-dev-push
@ -426,12 +470,31 @@
- <<: *if-dev-push
changes: *patterns-component_ut
.rules:build:custom_test:
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-custom_test_esp32s3
- <<: *if-label-target_test
- <<: *if-label-weekend_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-custom_test
.rules:build:custom_test-esp32:
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32
- <<: *if-label-target_test
- <<: *if-label-weekend_test
- <<: *if-dev-push
changes: *patterns-build_components
@ -446,6 +509,7 @@
- <<: *if-label-build
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
@ -459,6 +523,7 @@
- <<: *if-label-build
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
@ -472,6 +537,7 @@
- <<: *if-label-build
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32s3
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
@ -487,6 +553,26 @@
- <<: *if-dev-push
changes: *patterns-docker
.rules:build:example_test:
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32
- <<: *if-label-example_test_esp32c3
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
- <<: *if-label-iperf_stress_test
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-example_test
.rules:build:example_test-esp32:
rules:
- <<: *if-protected
@ -494,6 +580,7 @@
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32
- <<: *if-label-iperf_stress_test
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
@ -509,6 +596,7 @@
- <<: *if-label-build
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32c3
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
@ -524,6 +612,7 @@
- <<: *if-label-build
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32s2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
@ -539,6 +628,7 @@
- <<: *if-label-build
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32s3
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
@ -553,12 +643,17 @@
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-integration_test
- <<: *if-label-integration_test_ble
- <<: *if-label-integration_test_wifi
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-integration_test
changes: *patterns-integration_test_ble
- <<: *if-dev-push
changes: *patterns-integration_test_wifi
.rules:build:macos:
rules:
@ -589,7 +684,10 @@
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
- <<: *if-label-integration_test
- <<: *if-label-integration_test_ble
- <<: *if-label-integration_test_wifi
- <<: *if-label-iperf_stress_test
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
- <<: *if-label-unit_test_esp32c3
@ -609,7 +707,26 @@
- <<: *if-dev-push
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-integration_test
changes: *patterns-integration_test_ble
- <<: *if-dev-push
changes: *patterns-integration_test_wifi
- <<: *if-dev-push
changes: *patterns-unit_test
.rules:build:unit_test:
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-unit_test
@ -617,6 +734,7 @@
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
- <<: *if-dev-push
@ -630,6 +748,7 @@
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32c3
- <<: *if-dev-push
@ -643,6 +762,7 @@
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32s2
- <<: *if-dev-push
@ -656,6 +776,7 @@
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32s3
- <<: *if-dev-push
@ -675,12 +796,6 @@
- <<: *if-dev-push
changes: *patterns-windows
.rules:labels:example_test-esp32c3:
rules:
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test_esp32c3
.rules:labels:fuzzer_test-weekend_test:
rules:
- <<: *if-label-fuzzer_test
@ -698,49 +813,6 @@
rules:
- <<: *if-label-weekend_test
.rules:test:any_test:
rules:
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-component_ut_esp32s3
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-custom_test_esp32s3
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
- <<: *if-label-host_test
- <<: *if-label-integration_test
- <<: *if-label-iperf_stress_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
- <<: *if-label-weekend_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
changes: *patterns-component_ut
- <<: *if-dev-push
changes: *patterns-custom_test
- <<: *if-dev-push
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-host_test
- <<: *if-dev-push
changes: *patterns-integration_test
- <<: *if-dev-push
changes: *patterns-unit_test
.rules:test:component_ut-esp32:
rules:
- <<: *if-protected
@ -748,6 +820,7 @@
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
- <<: *if-dev-push
@ -760,6 +833,7 @@
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32c3
- <<: *if-dev-push
@ -772,6 +846,7 @@
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32s2
- <<: *if-dev-push
@ -784,6 +859,7 @@
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32s3
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32s3
- <<: *if-dev-push
@ -796,6 +872,7 @@
when: never
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-custom_test
@ -806,6 +883,7 @@
when: never
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-custom_test
@ -816,6 +894,7 @@
when: never
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-custom_test
@ -826,6 +905,7 @@
when: never
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32s3
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-custom_test
@ -836,6 +916,20 @@
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
changes: *patterns-example_test
.rules:test:example_test-esp32c3:
rules:
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32c3
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
@ -848,6 +942,7 @@
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32s2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
@ -860,6 +955,7 @@
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32s3
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
@ -880,8 +976,35 @@
- <<: *if-label-build-only
when: never
- <<: *if-label-integration_test
- <<: *if-label-integration_test_ble
- <<: *if-label-integration_test_wifi
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-integration_test
changes: *patterns-integration_test_ble
- <<: *if-dev-push
changes: *patterns-integration_test_wifi
.rules:test:integration_test_ble:
rules:
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-integration_test
- <<: *if-label-integration_test_ble
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-integration_test_ble
.rules:test:integration_test_wifi:
rules:
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-integration_test
- <<: *if-label-integration_test_wifi
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-integration_test_wifi
.rules:test:submodule:
rules:
@ -892,49 +1015,12 @@
- <<: *if-dev-push
changes: *patterns-submodule
.rules:test:target_test:
rules:
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-component_ut_esp32s3
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-custom_test_esp32s3
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
- <<: *if-label-integration_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
changes: *patterns-component_ut
- <<: *if-dev-push
changes: *patterns-custom_test
- <<: *if-dev-push
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-integration_test
- <<: *if-dev-push
changes: *patterns-unit_test
.rules:test:unit_test-esp32:
rules:
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
- <<: *if-dev-push
@ -945,6 +1031,7 @@
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32c3
- <<: *if-dev-push
@ -955,6 +1042,7 @@
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32s2
- <<: *if-dev-push
@ -965,6 +1053,7 @@
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32s3
- <<: *if-dev-push

View File

@ -65,6 +65,7 @@ check_pylint:
name: $SONARQUBE_SCANNER_IMAGE
before_script:
- source tools/ci/utils.sh
- is_based_on_commits $REQUIRED_ANCESTOR_COMMITS
- export PYTHONPATH="$CI_PROJECT_DIR/tools:$CI_PROJECT_DIR/tools/ci/python_packages:$PYTHONPATH"
- fetch_submodules
# Exclude the submodules, all paths ends with /**
@ -123,7 +124,7 @@ code_quality_report:
-Dsonar.branch.name=$CI_COMMIT_REF_NAME
-Dsonar.cxx.clangtidy.reportPath=$REPORT_PATTERN
-Dsonar.exclusions=$EXCLUSIONS
-Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA
-Dsonar.gitlab.commit_sha=$PIPELINE_COMMIT_SHA
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
-Dsonar.host.url=$SONAR_HOST_URL
-Dsonar.login=$SONAR_LOGIN

View File

@ -7,13 +7,13 @@
.target_test_job_template:
stage: target_test
needs:
- assign_test
artifacts:
when: always
paths:
- "**/*.log"
- $LOG_PATH
exclude:
- .git/**/*
expire_in: 1 week
reports:
junit: $LOG_PATH/*/XUNIT_RESULT.xml
@ -38,6 +38,8 @@
.example_test_template:
extends: .target_test_job_template
needs:
- assign_example_test
variables:
TEST_CASE_PATH: "$CI_PROJECT_DIR/examples"
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/examples/test_configs"
@ -55,7 +57,7 @@ test_weekend_mqtt:
- .rules:labels:weekend_test
tags:
- ESP32
- Example_WIFI
- Example_EthKitV1
script:
- export MQTT_PUBLISH_TEST=1
- export TEST_PATH=$CI_PROJECT_DIR/tools/test_apps/protocols/mqtt/publish_connect_test
@ -75,7 +77,7 @@ test_weekend_mqtt:
.example_test_esp32c3_template:
extends:
- .example_test_template
- .rules:labels:example_test-esp32c3
- .rules:test:example_test-esp32c3
.example_test_esp32s3_template:
extends:
@ -115,10 +117,9 @@ example_test_001D:
example_test_OTA:
extends: .example_test_esp32_template
parallel: 2
tags:
- ESP32
- Example_WIFI_OTA
- EXAMPLE_ETH_OTA
example_test_protocols:
extends: .example_test_esp32_template
@ -127,6 +128,13 @@ example_test_protocols:
- ESP32
- Example_WIFI_Protocols
# This job is only triggered by env var `NIGHTLY_RUN`, please do NOT remove
example_test_esp32_WIFI_OTA:
extends: .example_test_esp32_template
tags:
- ESP32
- Example_WIFI_OTA
example_test_002:
extends: .example_test_esp32_template
image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
@ -295,6 +303,8 @@ example_test_ESP32C3_SDSPI:
.test_app_template:
extends: .target_test_job_template
needs:
- assign_custom_test
variables:
TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/test_apps"
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/tools/test_apps/test_configs"
@ -333,6 +343,12 @@ test_app_test_002:
- ESP32
- Example_WIFI
test_app_test_eth:
extends: .test_app_esp32_template
tags:
- ESP32
- Example_EthKitV1
test_app_test_003:
extends: .test_app_esp32_template
tags:
@ -379,8 +395,22 @@ test_app_test_flash_psram_f8r8:
- ESP32S3
- MSPI_F8R8
test_app_test_xip_psram_esp32s2:
extends: .test_app_esp32s2_template
tags:
- ESP32S2
- Example_GENERIC
test_app_test_xip_psram_esp32s3:
extends: .test_app_esp32s3_template
tags:
- ESP32S3
- MSPI_F4R8
.component_ut_template:
extends: .target_test_job_template
needs: # the assign already needs all the build jobs
- assign_component_ut
variables:
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/component_ut/test_configs"
script:
@ -443,9 +473,11 @@ component_ut_test_esp32c3:
.unit_test_template:
extends: .target_test_job_template
needs: # the assign already needs all the build jobs
- assign_unit_test
variables:
TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/unit-test-app"
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/components/idf_test/unit_test/CIConfigs"
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/components/idf_test/unit_test/test_configs"
.unit_test_esp32_template:
extends:
@ -513,7 +545,7 @@ UT_006:
UT_007:
extends: .unit_test_esp32_template
parallel: 4
parallel: 8
tags:
- ESP32_IDF
- UT_T1_1
@ -664,7 +696,7 @@ UT_046:
UT_047:
extends: .unit_test_esp32s2_template
parallel: 5
parallel: 7
tags:
- ESP32S2_IDF
- UT_T1_1
@ -683,7 +715,7 @@ UT_S2_SDSPI:
UT_C3:
extends: .unit_test_esp32c3_template
parallel: 33
parallel: 35
tags:
- ESP32C3_IDF
- UT_T1_1
@ -727,7 +759,7 @@ UT_C3_SDSPI:
UT_S3:
extends: .unit_test_esp32s3_template
parallel: 31
parallel: 33
tags:
- ESP32S3_IDF
- UT_T1_1
@ -761,38 +793,50 @@ component_ut_test_lan8720:
extends:
- .target_test_job_template
- .rules:test:integration_test
needs:
- assign_test
- build_ssc_esp32
- .before_script_minimal
image: ${CI_INTEGRATION_TEST_ENV_IMAGE}
needs: # the assign already needs all the build jobs
- assign_integration_test
variables:
LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32_IDF"
LOG_PATH: "${CI_PROJECT_DIR}/TEST_LOGS"
TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/auto_test_script/TestCaseFiles"
MODULE_UPDATE_FILE: "$CI_PROJECT_DIR/components/idf_test/ModuleDefinition.yml"
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/components/idf_test/integration_test/CIConfigs"
KNOWN_ISSUE_FILE: "${CI_PROJECT_DIR}/components/idf_test/integration_test/KnownIssues"
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/tools/ci/integration_test/test_configs"
KNOWN_ISSUE_FILE: "${CI_PROJECT_DIR}/tools/ci/integration_test/KnownIssues"
CI_RUNNER_SCRIPT: "${CI_PROJECT_DIR}/auto_test_script/bin/CIRunner.py"
PYTHONPATH: ${CI_PROJECT_DIR}/auto_test_script/packages
# auto_test_script only supports python 3.7.x
PYTHON_VER: 3.7.7
PREPARE_TEST_BIN_SCRIPT: "${CI_PROJECT_DIR}/tools/ci/integration_test/prepare_test_bins.py"
PYTHONPATH: "${CI_PROJECT_DIR}/auto_test_script/packages:${CI_PROJECT_DIR}/tools/ci/python_packages:${PYTHONPATH}"
INITIAL_CONDITION_RETRY_COUNT: "1"
GIT_LFS_SKIP_SMUDGE: 1
script:
- *define_config_file_name
# first test if config file exists, if not exist, exit 0
- test -e $CONFIG_FILE || exit 0
- add_gitlab_ssh_keys
# clone local test env configs
- retry_failed git clone $TEST_ENV_CONFIG_REPO
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
# clone test bench
# can not retry if downing git lfs files failed, so using empty_branch first.
- retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} -b empty_branch
- retry_failed git -C auto_test_script checkout -f ${CI_AUTO_TEST_SCRIPT_REPO_BRANCH}
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script --customized_only
- retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} auto_test_script
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script
- cd auto_test_script
- ./tools/ci/setup_idfci.sh
# Merge known issues
- cat ${KNOWN_ISSUE_FILE} >> ${TEST_CASE_FILE_PATH}/KnownIssues
# run test
- python ${PREPARE_TEST_BIN_SCRIPT} $CONFIG_FILE
- python ${CI_RUNNER_SCRIPT} -l "$LOG_PATH/$JOB_FULL_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH
.integration_test_esp32c3_template:
extends:
- .integration_test_template
variables:
LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32C3_IDF"
nvs_compatible_test:
extends: .integration_test_template
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
artifacts:
when: always
paths:
@ -806,144 +850,213 @@ nvs_compatible_test:
- *define_config_file_name
# first test if config file exists, if not exist, exit 0
- test -e $CONFIG_FILE || exit 0
- add_gitlab_ssh_keys
# clone local test env configs
- retry_failed git clone $TEST_ENV_CONFIG_REPO
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
# clone test bench
# can not retry if downing git lfs files failed, so using empty_branch first.
- retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} -b empty_branch
- retry_failed git -C auto_test_script checkout -f ${CI_AUTO_TEST_SCRIPT_REPO_BRANCH}
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script --customized_only
# prepare nvs bins
- retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} auto_test_script
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script
- cd auto_test_script
- ./tools/ci/setup_idfci.sh
# prepare nvs bins
- ./tools/prepare_nvs_bin.sh
# run test
- python ${PREPARE_TEST_BIN_SCRIPT} $CONFIG_FILE
- python ${CI_RUNNER_SCRIPT} -l "$LOG_PATH/$JOB_FULL_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH
IT_001:
extends: .integration_test_template
parallel: 3
tags:
- ESP32_IDF
- SSC_T1_4
IT_002:
extends: .integration_test_template
tags:
- ESP32_IDF
- SSC_T1_2
IT_003:
extends: .integration_test_template
parallel: 14
tags:
- ESP32_IDF
- SSC_T2_5
IT_004:
extends: .integration_test_template
tags:
- ESP32_IDF
- SSC_T1_APC
IT_005:
extends: .integration_test_template
IT_T1_Simple:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
parallel: 2
tags:
- ESP32_IDF
- SSC_T1_5
- SSC_T1_Simple
IT_006:
extends: .integration_test_template
parallel: 12
IT_T1_WAP:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_6
- SSC_T1_WAP
IT_007:
extends: .integration_test_template
IT_T2_Simple:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
parallel: 9
tags:
- ESP32_IDF
- SSC_T2_Simple
IT_T5_BT_Simple:
extends:
- .integration_test_template
- .rules:test:integration_test_ble
parallel: 3
tags:
- ESP32_IDF
- SSC_T1_7
- SSC_T5_BT_Simple
IT_008:
extends: .integration_test_template
IT_T2_BT_Simple:
extends:
- .integration_test_template
- .rules:test:integration_test_ble
parallel: 6
tags:
- ESP32_IDF
- SSC_T1_8
- SSC_T2_BT_Simple
IT_009:
extends: .integration_test_template
IT_T1_BT_Dongle:
extends:
- .integration_test_template
- .rules:test:integration_test_ble
parallel: 2
tags:
- ESP32_IDF
- SSC_T1_3
- SSC_T1_BT_Dongle
IT_011:
extends: .integration_test_template
IT_T1_AP:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_AP
IT_T1_AP_E:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
parallel: 5
tags:
- ESP32_IDF
- SSC_T1_AP_E
IT_T1_WNIC_AP:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_WNIC_AP
IT_T1_WNIC_AP_E:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_WNIC_AP_E
IT_T1_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_MESH1
IT_012:
extends: .integration_test_template
IT_T2_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
parallel: 2
tags:
- ESP32_IDF
- SSC_T2_MESH1
IT_013:
extends: .integration_test_template
IT_T3_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T3_MESH1
IT_014:
extends: .integration_test_template
IT_T6_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T6_MESH1
IT_015:
extends: .integration_test_template
IT_T12_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T12_MESH1
IT_016:
extends: .integration_test_template
IT_T50_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
allow_failure: true
tags:
- ESP32_IDF
- SSC_T50_MESH1
IT_017:
extends: .integration_test_template
IT_T1_MESH2:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_MESH2
IT_018:
extends: .integration_test_template
IT_T2_WNIC:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_9
- SSC_T2_WNIC
IT_019:
extends: .integration_test_template
IT_T2_AP:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T2_AP
IT_T3_Simple:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T3_Simple
IT_C3_T2_BT_Simple:
extends:
- .integration_test_esp32c3_template
- .rules:test:integration_test_ble
parallel: 9
tags:
- ESP32C3_IDF
- SSC_T2_BT_Simple
IT_C3_T5_BT_Simple:
extends:
- .integration_test_esp32c3_template
- .rules:test:integration_test_ble
parallel: 5
tags:
- ESP32C3_IDF
- SSC_T5_BT_Simple
IT_C3_T1_BT_Dongle:
extends:
- .integration_test_esp32c3_template
- .rules:test:integration_test_ble
image: gitlab.espressif.cn:5050/qa/dockerfiles/integration-test-env-dbg:1
parallel: 2
tags:
- ESP32_IDF
- SSC_T2_2
IT_020:
extends: .integration_test_template
tags:
- ESP32_IDF
- SSC_T2_3
IT_021:
extends: .integration_test_template
tags:
- ESP32_IDF
- SSC_T2_4
- ESP32C3_IDF
- SSC_T1_BT_Dongle

View File

@ -12,12 +12,16 @@ repos:
# 2 - any file matching *test*/*expected* (for host tests, if possible use this naming pattern always)
# 3 - any directory named 'testdata'
# 4 - IDF monitor test data
# 5 - protobuf auto-generated files
exclude: &whitespace_excludes |
(?x)^(
.+\.(md|rst|map|bin)|
.+test.*\/.*expected.*|
.+\/testdata\/.+|
.+test_idf_monitor\/tests\/.+
.+test_idf_monitor\/tests\/.+|
.*_pb2.py|
.*.pb-c.h|
.*.pb-c.c
)$
- id: end-of-file-fixer
exclude: *whitespace_excludes
@ -25,16 +29,21 @@ repos:
- id: mixed-line-ending
args: ['-f=lf']
- id: double-quote-string-fixer
- repo: https://gitlab.com/pycqa/flake8
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
args: ['--config=.flake8', '--tee', '--benchmark']
- repo: https://github.com/pycqa/isort
rev: 5.9.3
rev: 5.11.5 # python 3.7 compatible
hooks:
- id: isort
name: isort (python)
exclude: >
(?x)^(
.*_pb2.py
)$
- repo: local
hooks:
- id: check-executables
@ -93,21 +102,14 @@ repos:
name: Check type annotations in python files
entry: tools/ci/check_type_comments.py
additional_dependencies:
- 'mypy==0.800'
- 'mypy-extensions==0.4.3'
- 'mypy==1.0.1'
- 'mypy-extensions==1.0.0'
exclude: >
(?x)^(
.*_pb2.py
)$
language: python
types: [python]
- id: check-copyright
name: Check copyright notices
entry: tools/ci/check_copyright.py --verbose --replace
additional_dependencies:
- 'comment_parser == 1.2.3'
- 'thefuzz == 0.19.0'
- 'thefuzz[speedup] == 0.19.0; sys_platform != "win32"'
# don't depend on python-Levenshtein on Windows, as it requires Microsoft C++ Build Tools to install
language: python
files: \.(py|c|h|cpp|hpp|ld)$
require_serial: true
- id: check-tools-files-patterns
name: Check tools dir files patterns
entry: tools/ci/check_tools_files_patterns.py
@ -120,4 +122,4 @@ repos:
rev: v4.0.1
hooks:
- id: file-contents-sorter
files: 'tools\/ci\/(executable-list\.txt|mypy_ignore_list\.txt|check_copyright_ignore\.txt|check_copyright_permanent_ignore\.txt)'
files: 'tools\/ci\/(executable-list\.txt|mypy_ignore_list\.txt)'

View File

@ -7,11 +7,8 @@ if(CMAKE_CURRENT_LIST_DIR STREQUAL CMAKE_SOURCE_DIR)
"again.")
endif()
unset(compile_options)
unset(c_compile_options)
unset(cxx_compile_options)
unset(compile_definitions)
unset(link_options)
# Variables compile_options, c_compile_options, cxx_compile_options, compile_definitions, link_options shall
# not be unset as they may already contain flags, set by toolchain-TARGET.cmake files.
# Add the following build specifications here, since these seem to be dependent
# on config values on the root Kconfig.
@ -119,6 +116,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
# Multiple cases of attributes unknown to clang, for example
# __attribute__((optimize("-O3")))
list(APPEND compile_options "-Wno-unknown-attributes")
# Disable Clang warnings for atomic operations with access size
# more then 4 bytes
list(APPEND compile_options "-Wno-atomic-alignment")
# Clang also produces many -Wunused-function warnings which GCC doesn't.
# However these aren't treated as errors.
endif()
@ -181,6 +181,7 @@ endif()
idf_build_set_property(COMPILE_OPTIONS "${compile_options}" APPEND)
idf_build_set_property(C_COMPILE_OPTIONS "${c_compile_options}" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "${cxx_compile_options}" APPEND)
idf_build_set_property(ASM_COMPILE_OPTIONS "${asm_compile_options}" APPEND)
idf_build_set_property(COMPILE_DEFINITIONS "${compile_definitions}" APPEND)
idf_build_set_property(LINK_OPTIONS "${link_options}" APPEND)

View File

@ -18,11 +18,13 @@ menu "Application Level Tracing"
config APPTRACE_DEST_TRAX
bool
depends on IDF_TARGET_ARCH_XTENSA && !ESP32_TRAX && !ESP32S2_TRAX
depends on IDF_TARGET_ARCH_XTENSA && !ESP32_TRAX && !ESP32S2_TRAX && !ESP32S3_TRAX
select ESP32_MEMMAP_TRACEMEM
select ESP32S2_MEMMAP_TRACEMEM
select ESP32S3_MEMMAP_TRACEMEM
select ESP32_MEMMAP_TRACEMEM_TWOBANKS
select ESP32S2_MEMMAP_TRACEMEM_TWOBANKS
select ESP32S3_MEMMAP_TRACEMEM_TWOBANKS
default n
help
Enables/disable TRAX tracing HW.

View File

@ -1,3 +1,9 @@
/*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/param.h>
#include <string.h>
#include "sdkconfig.h"
@ -93,7 +99,8 @@ static esp_err_t esp_apptrace_membufs_swap(esp_apptrace_membufs_proto_data_t *pr
if (proto->hw->host_data_pending() && hdr->block_sz > 0) {
// TODO: add support for multiple blocks from host, currently there is no need for that
uint8_t *p = proto->blocks[new_block_num].start + proto->blocks[new_block_num].sz;
ESP_APPTRACE_LOGD("Recvd %d bytes from host [%x %x %x %x %x %x %x %x .. %x %x %x %x %x %x %x %x]", hdr->block_sz,
ESP_APPTRACE_LOGD("Recvd %d bytes from host (@ 0x%x) [%x %x %x %x %x %x %x %x .. %x %x %x %x %x %x %x %x]",
hdr->block_sz, proto->blocks[new_block_num].start,
*(proto->blocks[new_block_num].start+0), *(proto->blocks[new_block_num].start+1),
*(proto->blocks[new_block_num].start+2), *(proto->blocks[new_block_num].start+3),
*(proto->blocks[new_block_num].start+4), *(proto->blocks[new_block_num].start+5),

View File

@ -60,22 +60,16 @@ esp_err_t esp_apptrace_lock_take(esp_apptrace_lock_t *lock, esp_apptrace_tmo_t *
int res;
while (1) {
//Todo: Replace the current locking mechanism and int_state with portTRY_ENTER_CRITICAL() instead.
// do not overwrite lock->int_state before we actually acquired the mux
unsigned int_state = portENTER_CRITICAL_NESTED();
// FIXME: if mux is busy it is not good idea to loop during the whole tmo with disabled IRQs.
// So we check mux state using zero tmo, restore IRQs and let others tasks/IRQs to run on this CPU
// while we are doing our own tmo check.
#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG
bool success = vPortCPUAcquireMutexTimeout(&lock->mux, 0, __FUNCTION__, __LINE__);
#else
unsigned int_state = portSET_INTERRUPT_MASK_FROM_ISR();
bool success = vPortCPUAcquireMutexTimeout(&lock->mux, 0);
#endif
if (success) {
lock->int_state = int_state;
return ESP_OK;
}
portEXIT_CRITICAL_NESTED(int_state);
// we can be preempted from this place till the next call (above) to portENTER_CRITICAL_NESTED()
portCLEAR_INTERRUPT_MASK_FROM_ISR(int_state);
// we can be preempted from this place till the next call (above) to portSET_INTERRUPT_MASK_FROM_ISR()
res = esp_apptrace_tmo_check(tmo);
if (res != ESP_OK) {
break;
@ -90,12 +84,8 @@ esp_err_t esp_apptrace_lock_give(esp_apptrace_lock_t *lock)
unsigned int_state = lock->int_state;
// after call to the following func we can not be sure that lock->int_state
// is not overwritten by other CPU who has acquired the mux just after we released it. See esp_apptrace_lock_take().
#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG
vPortCPUReleaseMutex(&lock->mux, __FUNCTION__, __LINE__);
#else
vPortCPUReleaseMutex(&lock->mux);
#endif
portEXIT_CRITICAL_NESTED(int_state);
portCLEAR_INTERRUPT_MASK_FROM_ISR(int_state);
return ESP_OK;
}

View File

@ -52,18 +52,11 @@ void gcov_dump_task(void *pvParameter)
}
ESP_EARLY_LOGV(TAG, "Config apptrace down buf");
esp_apptrace_down_buffer_config(down_buf, ESP_GCOV_DOWN_BUF_SIZE);
/* we are directing the std outputs to the fake ones in order to reduce stack usage */
FILE *old_stderr = stderr;
FILE *old_stdout = stdout;
stderr = (FILE *) &__sf_fake_stderr;
stdout = (FILE *) &__sf_fake_stdout;
ESP_EARLY_LOGV(TAG, "Dump data...");
__gcov_dump();
// reset dump status to allow incremental data accumulation
__gcov_reset();
free(down_buf);
stderr = old_stderr;
stdout = old_stdout;
ESP_EARLY_LOGV(TAG, "Finish file transfer session");
dump_result = esp_apptrace_fstop(ESP_APPTRACE_DEST_TRAX);
if (dump_result != ESP_OK) {

View File

@ -68,7 +68,7 @@ typedef struct {
*/
static inline void esp_apptrace_lock_init(esp_apptrace_lock_t *lock)
{
vPortCPUInitializeMutex(&lock->mux);
portMUX_INITIALIZE(&lock->mux);
lock->int_state = 0;
}

View File

@ -3,6 +3,10 @@ archive: libapp_trace.a
entries:
app_trace (noflash)
app_trace_util (noflash)
if APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE:
app_trace_membufs_proto (noflash)
if APPTRACE_DEST_JTAG = y:
port (noflash)
if APPTRACE_SV_ENABLE = y:
SEGGER_SYSVIEW (noflash)
SEGGER_RTT_esp (noflash)

View File

@ -1,6 +1,13 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_log.h"
#include "esp_app_trace_membufs_proto.h"
#include "esp_app_trace_port.h"
#include "riscv/semihosting.h"
/** RISCV HW transport data */
typedef struct {
@ -20,8 +27,6 @@ typedef struct {
esp_apptrace_mem_block_t * mem_blocks;
} esp_apptrace_riscv_ctrl_block_t;
#define RISCV_APPTRACE_SYSNR 0x64
#define ESP_APPTRACE_RISCV_BLOCK_LEN_MSK 0x7FFFUL
#define ESP_APPTRACE_RISCV_BLOCK_LEN(_l_) ((_l_) & ESP_APPTRACE_RISCV_BLOCK_LEN_MSK)
#define ESP_APPTRACE_RISCV_BLOCK_LEN_GET(_v_) ((_v_) & ESP_APPTRACE_RISCV_BLOCK_LEN_MSK)
@ -94,25 +99,10 @@ esp_apptrace_hw_t *esp_apptrace_jtag_hw_get(void **data)
e.g. OpenOCD flasher stub use own implementation of it. */
__attribute__((weak)) int esp_apptrace_advertise_ctrl_block(void *ctrl_block_addr)
{
register int sys_nr = RISCV_APPTRACE_SYSNR;
register int host_ret = 0;
if (!esp_cpu_in_ocd_debug_mode()) {
return 0;
}
__asm__ volatile ( \
".option push\n" \
".option norvc\n" \
"mv a0, %[sys_nr]\n" \
"mv a1, %[arg1]\n" \
"slli zero,zero,0x1f\n" \
"ebreak\n" \
"srai zero,zero,0x7\n" \
"mv %[host_ret], a0\n" \
".option pop\n" \
:[host_ret]"=r"(host_ret)
:[sys_nr]"r"(sys_nr),[arg1]"r"(ctrl_block_addr):"a0","a1");
return host_ret;
return (int) semihosting_call_noerrno(ESP_SEMIHOSTING_SYS_APPTRACE_INIT, (long*)ctrl_block_addr);
}
/* Returns up buffers config.

View File

@ -1,3 +1,9 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
//
// How It Works
// ************
@ -143,9 +149,9 @@
#include "sdkconfig.h"
#include "soc/soc.h"
#include "soc/dport_access.h"
#if CONFIG_IDF_TARGET_ESP32
#include "soc/dport_reg.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "soc/tracemem_config.h"
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
#include "soc/sensitive_reg.h"
#endif
#include "eri.h"
@ -154,18 +160,6 @@
#include "esp_app_trace_membufs_proto.h"
#include "esp_app_trace_port.h"
// TODO: move these (and same definitions in trax.c to dport_reg.h)
#if CONFIG_IDF_TARGET_ESP32
#define TRACEMEM_MUX_PROBLK0_APPBLK1 0
#define TRACEMEM_MUX_BLK0_ONLY 1
#define TRACEMEM_MUX_BLK1_ONLY 2
#define TRACEMEM_MUX_PROBLK1_APPBLK0 3
#elif CONFIG_IDF_TARGET_ESP32S2
#define TRACEMEM_MUX_BLK0_NUM 19
#define TRACEMEM_MUX_BLK1_NUM 20
#define TRACEMEM_BLK_NUM2ADDR(_n_) (0x3FFB8000UL + 0x4000UL*((_n_)-4))
#endif
// TRAX is disabled, so we use its registers for our own purposes
// | 31..XXXXXX..24 | 23 .(host_connect). 23 | 22 .(host_data). 22| 21..(block_id)..15 | 14..(block_len)..0 |
#define ESP_APPTRACE_TRAX_CTRL_REG ERI_TRAX_DELAYCNT
@ -182,18 +176,6 @@
#define ESP_APPTRACE_TRAX_INITED(_hw_) ((_hw_)->inited & (1 << cpu_hal_get_core_id()))
#if CONFIG_IDF_TARGET_ESP32
static uint8_t * const s_trax_blocks[] = {
(uint8_t *) 0x3FFFC000,
(uint8_t *) 0x3FFF8000
};
#elif CONFIG_IDF_TARGET_ESP32S2
static uint8_t * const s_trax_blocks[] = {
(uint8_t *)TRACEMEM_BLK_NUM2ADDR(TRACEMEM_MUX_BLK0_NUM),
(uint8_t *)TRACEMEM_BLK_NUM2ADDR(TRACEMEM_MUX_BLK1_NUM)
};
#endif
#define ESP_APPTRACE_TRAX_BLOCK_SIZE (0x4000UL)
/** TRAX HW transport data */
@ -223,6 +205,12 @@ static bool esp_apptrace_trax_host_data_pending(void);
const static char *TAG = "esp_apptrace";
static uint8_t * const s_trax_blocks[] = {
(uint8_t *)TRACEMEM_BLK0_ADDR,
(uint8_t *)TRACEMEM_BLK1_ADDR
};
esp_apptrace_hw_t *esp_apptrace_uart_hw_get(int num, void **data)
{
return NULL;
@ -300,6 +288,14 @@ static inline void esp_apptrace_trax_select_memory_block(int block_num)
DPORT_WRITE_PERI_REG(DPORT_TRACEMEM_MUX_MODE_REG, block_num ? TRACEMEM_MUX_BLK0_ONLY : TRACEMEM_MUX_BLK1_ONLY);
#elif CONFIG_IDF_TARGET_ESP32S2
WRITE_PERI_REG(DPORT_PMS_OCCUPY_3_REG, block_num ? BIT(TRACEMEM_MUX_BLK0_NUM-4) : BIT(TRACEMEM_MUX_BLK1_NUM-4));
#elif CONFIG_IDF_TARGET_ESP32S3
// select memory block to be exposed to the TRAX module (accessed by host)
uint32_t block_bits = block_num ? TRACEMEM_CORE0_MUX_BLK_BITS(TRACEMEM_MUX_BLK0_NUM)
: TRACEMEM_CORE0_MUX_BLK_BITS(TRACEMEM_MUX_BLK1_NUM);
block_bits |= block_num ? TRACEMEM_CORE1_MUX_BLK_BITS(TRACEMEM_MUX_BLK0_NUM)
: TRACEMEM_CORE1_MUX_BLK_BITS(TRACEMEM_MUX_BLK1_NUM);
ESP_EARLY_LOGV(TAG, "Select block %d @ %p (bits 0x%x)", block_num, s_trax_blocks[block_num], block_bits);
DPORT_WRITE_PERI_REG(SENSITIVE_INTERNAL_SRAM_USAGE_2_REG, block_bits);
#endif
}

View File

@ -73,6 +73,8 @@ Revision: $Rev: 3734 $
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#endif
@ -142,6 +144,8 @@ extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI;
#define SYSVIEW_TIMESTAMP_FREQ (CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ * 1000000)
#elif CONFIG_IDF_TARGET_ESP32S2
#define SYSVIEW_TIMESTAMP_FREQ (CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ * 1000000)
#elif CONFIG_IDF_TARGET_ESP32S3
#define SYSVIEW_TIMESTAMP_FREQ (CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ * 1000000)
#endif
#endif // TS_USE_CCOUNT

View File

@ -76,9 +76,6 @@ Notes:
*
**********************************************************************
*/
#ifndef portSTACK_GROWTH
#define portSTACK_GROWTH ( -1 )
#endif
#define SYSVIEW_FREERTOS_MAX_NOF_TASKS CONFIG_APPTRACE_SV_MAX_TASKS

View File

@ -327,9 +327,9 @@ typedef enum {
/**
* @brief Revokes the old signature digest. To be called in the application after the rollback logic.
*
* Relevant for Secure boot v2 on ESP32-S2 where upto 3 key digests can be stored (Key #N-1, Key #N, Key #N+1).
* When key #N-1 used to sign an app is invalidated, an OTA update is to be sent with an app signed with key #N-1 & Key #N.
* After successfully booting the OTA app should call this function to revoke Key #N-1.
* Relevant for Secure boot v2 on ESP32-S2, ESP32-S3, ESP32-C3 where upto 3 key digests can be stored (Key \#N-1, Key \#N, Key \#N+1).
* When key \#N-1 used to sign an app is invalidated, an OTA update is to be sent with an app signed with key \#N-1 & Key \#N.
* After successfully booting the OTA app should call this function to revoke Key \#N-1.
*
* @param index - The index of the signature block to be revoked
*

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -824,3 +824,25 @@ static void test_flow6(void)
// 2 Stage: run factory -> check it -> copy factory to OTA0 -> reboot --//--
// 3 Stage: run OTA0 -> check it -> erase OTA_DATA for next tests -> PASS
TEST_CASE_MULTIPLE_STAGES("Switching between factory, OTA0 using esp_ota_write_with_offset", "[app_update][timeout=90][reset=DEEPSLEEP_RESET, DEEPSLEEP_RESET]", start_test, test_flow6, test_flow6);
TEST_CASE("Test bootloader_common_get_sha256_of_partition returns ESP_ERR_IMAGE_INVALID when image is ivalid", "[partitions]")
{
const esp_partition_t *cur_app = esp_ota_get_running_partition();
ESP_LOGI(TAG, "copy current app to next part");
const esp_partition_t *other_app = get_next_update_partition();
copy_current_app_to_next_part(cur_app, other_app);
erase_ota_data();
uint8_t sha_256_cur_app[32];
uint8_t sha_256_other_app[32];
TEST_ESP_OK(bootloader_common_get_sha256_of_partition(cur_app->address, cur_app->size, cur_app->type, sha_256_cur_app));
TEST_ESP_OK(bootloader_common_get_sha256_of_partition(other_app->address, other_app->size, other_app->type, sha_256_other_app));
TEST_ASSERT_EQUAL_MEMORY_MESSAGE(sha_256_cur_app, sha_256_other_app, sizeof(sha_256_cur_app), "must be the same");
uint32_t data = 0;
bootloader_flash_write(other_app->address + 0x50, &data, sizeof(data), false);
TEST_ESP_ERR(ESP_ERR_IMAGE_INVALID, bootloader_common_get_sha256_of_partition(other_app->address, other_app->size, other_app->type, sha_256_other_app));
TEST_ASSERT_EQUAL_MEMORY_MESSAGE(sha_256_cur_app, sha_256_other_app, sizeof(sha_256_cur_app), "must be the same");
}

View File

@ -193,6 +193,14 @@ menu "Bootloader config"
The GPIO must be held low continuously for this period of time after reset
before a factory reset or test partition boot (as applicable) is performed.
config BOOTLOADER_REGION_PROTECTION_ENABLE
bool "Enable protection for unmapped memory regions"
default y
help
Protects the unmapped memory regions of the entire address space from unintended accesses.
This will ensure that an exception will be triggered whenever the CPU performs a memory
operation on unmapped regions of the address space.
config BOOTLOADER_WDT_ENABLE
bool "Use RTC watchdog in start code"
default y
@ -377,7 +385,6 @@ menu "Bootloader config"
config BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE
hex "Size in bytes for custom purposes"
range 0 0x10
default 0
depends on BOOTLOADER_CUSTOM_RESERVE_RTC
help
@ -421,17 +428,22 @@ menu "Security features"
select MBEDTLS_ECDSA_C
depends on SECURE_SIGNED_ON_BOOT || SECURE_SIGNED_ON_UPDATE
config SECURE_ESP32_SUPPORTS_RSA
bool
default y if ESP32_REV_MIN_FULL >= 300
depends on IDF_TARGET_ESP32
config SECURE_BOOT_SUPPORTS_RSA
bool
default y
depends on ESP32_REV_MIN_3 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
# RSA secure boot is supported in ESP32 revision >= v3.0
depends on SECURE_ESP32_SUPPORTS_RSA || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3 # NOERROR
config SECURE_TARGET_HAS_SECURE_ROM_DL_MODE
bool
default y
depends on IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
config SECURE_SIGNED_APPS_NO_SECURE_BOOT
bool "Require signed app images"
depends on !SECURE_BOOT
@ -501,7 +513,8 @@ menu "Security features"
config SECURE_BOOT
bool "Enable hardware Secure Boot in bootloader (READ DOCS FIRST)"
default n
depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || ESP32C3_REV_MIN_3 || IDF_TARGET_ESP32S3
# Secure boot is not supported for ESP32-C3 revision < v0.3
depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || (IDF_TARGET_ESP32C3 && ESP32C3_REV_MIN_FULL >= 3) || IDF_TARGET_ESP32S3 # NOERROR
select ESPTOOLPY_NO_STUB if !IDF_TARGET_ESP32 && !IDF_TARGET_ESP32S2
help
Build a bootloader which enables Secure Boot on first boot.
@ -514,7 +527,7 @@ menu "Security features"
choice SECURE_BOOT_VERSION
bool "Select secure boot version"
default SECURE_BOOT_V2_ENABLED if ESP32_REV_MIN_3
default SECURE_BOOT_V2_ENABLED if ESP32_REV_MIN_FULL >= 300
depends on SECURE_BOOT
help
Select the Secure Boot Version. Depends on the Chip Revision.
@ -614,6 +627,22 @@ menu "Security features"
Refer to the Secure Boot section of the ESP-IDF Programmer's Guide for this version before enabling.
config SECURE_BOOT_ENABLE_AGGRESSIVE_KEY_REVOKE
bool "Enable Aggressive key revoke strategy"
depends on SECURE_BOOT && (IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3)
default N
help
If this option is set, ROM bootloader will revoke the public key digest burned in efuse block
if it fails to verify the signature of software bootloader with it.
Revocation of keys does not happen when enabling secure boot. Once secure boot is enabled,
key revocation checks will be done on subsequent boot-up, while verifying the software bootloader
This feature provides a strong resistance against physical attacks on the device.
NOTE: Once a digest slot is revoked, it can never be used again to verify an image
This can lead to permanent bricking of the device, in case all keys are revoked
because of signature verification failure.
choice SECURE_BOOTLOADER_KEY_ENCODING
bool "Hardware Key Encoding"
depends on SECURE_BOOTLOADER_REFLASHABLE
@ -851,7 +880,7 @@ menu "Security features"
default SECURE_ENABLE_SECURE_ROM_DL_MODE if SECURE_TARGET_HAS_SECURE_ROM_DL_MODE && !SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT # NOERROR
default SECURE_INSECURE_ALLOW_DL_MODE
depends on SECURE_BOOT_V2_ENABLED || SECURE_FLASH_ENC_ENABLED
depends on !IDF_TARGET_ESP32 || ESP32_REV_MIN_3
depends on !(IDF_TARGET_ESP32 && ESP32_REV_MIN_FULL < 300)
config SECURE_DISABLE_ROM_DL_MODE
bool "UART ROM download mode (Permanently disabled (recommended))"
@ -877,9 +906,9 @@ menu "Security features"
Download Mode into a separate Secure Download mode. This option can only work if
Download Mode is not already disabled by eFuse.
Secure Download mode limits the use of Download Mode functions to simple flash read,
write and erase operations, plus a command to return a summary of currently enabled
security features.
Secure Download mode limits the use of Download Mode functions to update SPI config,
changing baud rate, basic flash write and a command to return a summary of currently
enabled security features (`get_security_info`).
Secure Download mode is not compatible with the esptool.py flasher stub feature,
espefuse.py, read/writing memory or registers, encrypted download, or any other

View File

@ -17,7 +17,7 @@ ifdef CONFIG_IDF_TARGET_ESP32
ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
LINKER_SCRIPTS += $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.spiflash.ld
endif
ifdef CONFIG_ESP32_REV_MIN_3
ifeq ($(shell expr $(CONFIG_ESP32_REV_MIN_FULL) \>= 300), 1)
LINKER_SCRIPTS += $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.eco3.ld
endif
endif

View File

@ -44,7 +44,7 @@ SECTIONS
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libesp_common.a:fpga_overrides.*(.literal.bootloader_fill_random .text.bootloader_fill_random)
*libbootloader_support.a:bootloader_efuse_esp32.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
@ -60,6 +60,7 @@ SECTIONS
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libefuse.a:*.*(.literal .text .literal.* .text.*)
@ -111,8 +112,6 @@ SECTIONS
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
@ -125,6 +124,7 @@ SECTIONS
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
@ -183,4 +183,23 @@ SECTIONS
_etext = .;
} > iram_seg
/** This section will be used by the debugger and disassembler to get more information
* about raw data present in the code.
* Indeed, it may be required to add some padding at some points in the code
* in order to align a branch/jump destination on a particular bound.
* Padding these instructions will generate null bytes that shall be
* interpreted as data, and not code by the debugger or disassembler.
* This section will only be present in the ELF file, not in the final binary
* For more details, check GCC-212
*/
.xt.prop 0 :
{
KEEP (*(.xt.prop .gnu.linkonce.prop.*))
}
.xt.lit 0 :
{
KEEP (*(.xt.lit .gnu.linkonce.p.*))
}
}

View File

@ -1,16 +1,50 @@
/** Simplified memory map for the bootloader.
* Make sure the bootloader can load into main memory without overwriting itself.
* We put 2nd bootloader in the high address space (before ROM stack/data/bss).
* See memory usage for ROM bootloader at the end of this file.
*
* ESP32-C3 ROM static data usage is as follows:
* - 0x3fccae00 - 0x3fcdc710: Shared buffers, used in UART/USB/SPI download mode only
* - 0x3fcdc710 - 0x3fcde710: PRO CPU stack, can be reclaimed as heap after RTOS startup
* - 0x3fcde710 - 0x3fce0000: ROM .bss and .data (not easily reclaimable)
*
* The 2nd stage bootloader can take space up to the end of ROM shared
* buffers area (0x3fcdc710).
*/
/* The offset between Dbus and Ibus. Used to convert between 0x403xxxxx and 0x3fcxxxxx addresses. */
iram_dram_offset = 0x700000;
/* We consider 0x3fcdc710 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
*/
/* These lengths can be adjusted, if necessary: */
bootloader_usable_dram_end = 0x3fcdc710;
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
bootloader_dram_seg_len = 0x5000;
bootloader_iram_loader_seg_len = 0x7000;
bootloader_iram_seg_len = 0x2000;
/* Start of the lower region is determined by region size and the end of the higher region */
bootloader_dram_seg_end = bootloader_usable_dram_end - bootloader_stack_overhead;
bootloader_dram_seg_start = bootloader_dram_seg_end - bootloader_dram_seg_len;
bootloader_iram_loader_seg_start = bootloader_dram_seg_start - bootloader_iram_loader_seg_len + iram_dram_offset;
bootloader_iram_seg_start = bootloader_iram_loader_seg_start - bootloader_iram_seg_len;
MEMORY
{
iram_seg (RWX) : org = 0x403CE000, len = 0x2000
iram_loader_seg (RWX) : org = 0x403D0000, len = 0x6000
dram_seg (RW) : org = 0x3FCD6000, len = 0x4000
iram_seg (RWX) : org = bootloader_iram_seg_start, len = bootloader_iram_seg_len
iram_loader_seg (RWX) : org = bootloader_iram_loader_seg_start, len = bootloader_iram_loader_seg_len
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
}
/* The app may use RAM for static allocations up to the start of iram_loader_seg.
* If you have changed something above and this assert fails:
* 1. Check what the new value of bootloader_iram_loader_seg start is.
* 2. Update the value in this assert.
* 3. Update (SRAM_DRAM_END + I_D_SRAM_OFFSET) in components/esp_system/ld/esp32c3/memory.ld.in to the same value.
*/
ASSERT(bootloader_iram_loader_seg_start == 0x403ce710, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END");
/* Default entry point: */
ENTRY(call_start_cpu0);
@ -31,7 +65,7 @@ SECTIONS
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_enable .text.bootloader_random_enable)
*libbootloader_support.a:bootloader_efuse_esp32c3.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
@ -47,6 +81,7 @@ SECTIONS
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:regi2c_ctrl.*(.literal .text .literal.* .text.*)
@ -99,8 +134,6 @@ SECTIONS
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
@ -113,6 +146,7 @@ SECTIONS
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.* .srodata .srodata.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
@ -177,17 +211,34 @@ SECTIONS
/**
* Appendix: Memory Usage of ROM bootloader
*
* +--------+--------------+------+ 0x3FCC_AE00
* | ^ |
* | | |
* | | data/bss |
* | | |
* | v |
* +------------------------------+ 0x3FCD_C710
* | ^ |
* | | |
* | | stack |
* | | |
* | v |
* +------------------------------+ 0x3FCD_E710
* 0x3fccae00 ------------------> _dram0_0_start
* | |
* | |
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
* | |
* | |
* 0x3fcdc710 ------------------> __stack_sentry
* | |
* | | 2. Startup pro cpu stack (freed when IDF app is running)
* | |
* 0x3fcde710 ------------------> __stack (pro cpu)
* | |
* | |
* | | 3. Shared memory only used in startup code or nonos/early boot*
* | | (can be freed when IDF runs)
* | |
* | |
* 0x3fcdf060 ------------------> _dram0_rtos_reserved_start
* | |
* | |
* | | 4. Shared memory used in startup code and when IDF runs
* | |
* | |
* 0x3fcdf664 ------------------> _dram0_rtos_reserved_end
* | |
* 0x3fcdf830 ------------------> _data_start_interface
* | |
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
* | |
* 0x3fce0000 ------------------> _data_end_interface
*/

View File

@ -1,14 +1,40 @@
/** Simplified memory map for the bootloader.
* Make sure the bootloader can load into main memory without overwriting itself.
* We put 2nd bootloader in the high address space (before ROM stack/data/bss).
* See memory usage for ROM bootloader at the end of this file.
*
* ESP32-H2 ROM static data usage is as follows:
* - 0x3fccb900 - 0x3fcdd210: Shared buffers, used in UART/USB/SPI download mode only
* - 0x3fcdd210 - 0x3fcdf210: PRO CPU stack, can be reclaimed as heap after RTOS startup
* - 0x3fcdf210 - 0x3fce0000: ROM .bss and .data (not easily reclaimable)
*
* The 2nd stage bootloader can take space up to the end of ROM shared
* buffers area (0x3fce9704). For alignment purpose we shall use value (0x3fce9700).
*/
/* The offset between Dbus and Ibus. Used to convert between 0x403xxxxx and 0x3fcxxxxx addresses. */
iram_dram_offset = 0x700000;
/* We consider 0x3fce9700 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
*/
/* These lengths can be adjusted, if necessary: */
bootloader_usable_dram_end = 0x3fcdd120;
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
bootloader_dram_seg_len = 0x5000;
bootloader_iram_loader_seg_len = 0x7000;
bootloader_iram_seg_len = 0x2000;
/* Start of the lower region is determined by region size and the end of the higher region */
bootloader_dram_seg_end = bootloader_usable_dram_end - bootloader_stack_overhead;
bootloader_dram_seg_start = bootloader_dram_seg_end - bootloader_dram_seg_len;
bootloader_iram_loader_seg_start = bootloader_dram_seg_start - bootloader_iram_loader_seg_len + iram_dram_offset;
bootloader_iram_seg_start = bootloader_iram_loader_seg_start - bootloader_iram_seg_len;
MEMORY
{
iram_seg (RWX) : org = 0x403CE000, len = 0x2000
iram_loader_seg (RWX) : org = 0x403D0000, len = 0x6000
dram_seg (RW) : org = 0x3FCD6000, len = 0x4000
iram_seg (RWX) : org = bootloader_iram_seg_start, len = bootloader_iram_seg_len
iram_loader_seg (RWX) : org = bootloader_iram_loader_seg_start, len = bootloader_iram_loader_seg_len
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
}
/* Default entry point: */
@ -31,7 +57,7 @@ SECTIONS
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_enable .text.bootloader_random_enable)
*libbootloader_support.a:bootloader_efuse_esp32h2.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
@ -45,6 +71,7 @@ SECTIONS
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:regi2c_ctrl.*(.literal .text .literal.* .text.*)
@ -97,8 +124,6 @@ SECTIONS
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
@ -111,6 +136,7 @@ SECTIONS
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.* .srodata .srodata.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
@ -174,17 +200,34 @@ SECTIONS
/**
* Appendix: Memory Usage of ROM bootloader
*
* +--------+--------------+------+ 0x3FCC_B900
* | ^ |
* | | |
* | | data/bss |
* | | |
* | v |
* +------------------------------+ 0x3FCD_D210
* | ^ |
* | | |
* | | stack |
* | | |
* | v |
* +------------------------------+ 0x3FCD_F210
* 0x3fccb81c ------------------> _dram0_0_start
* | |
* | |
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
* | |
* | |
* 0x3fcdd120 ------------------> __stack_sentry
* | |
* | | 2. Startup pro cpu stack (freed when IDF app is running)
* | |
* 0x3fcdf120 ------------------> __stack (pro cpu)
* | |
* | |
* | | 3. Shared memory only used in startup code or nonos/early boot*
* | | (can be freed when IDF runs)
* | |
* | |
* 0x3fcdfa6c ------------------> _dram0_rtos_reserved_start
* | |
* | |
* | | 4. Shared memory used in startup code and when IDF runs
* | |
* | |
* 0x3fcdfe40 ------------------> _dram0_rtos_reserved_end
* | |
* 0x3fcdfe4c ------------------> _data_start_interface
* | |
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
* | |
* 0x3fce0000 ------------------> _data_end_interface
*/

View File

@ -31,7 +31,7 @@ SECTIONS
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libesp_common.a:fpga_overrides.*(.literal.bootloader_fill_random .text.bootloader_fill_random)
*libbootloader_support.a:bootloader_efuse_esp32s2.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
@ -47,6 +47,7 @@ SECTIONS
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:regi2c_ctrl.*(.literal .text .literal.* .text.*)
@ -99,8 +100,6 @@ SECTIONS
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
@ -113,6 +112,7 @@ SECTIONS
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
@ -171,4 +171,23 @@ SECTIONS
_etext = .;
} > iram_seg
/** This section will be used by the debugger and disassembler to get more information
* about raw data present in the code.
* Indeed, it may be required to add some padding at some points in the code
* in order to align a branch/jump destination on a particular bound.
* Padding these instructions will generate null bytes that shall be
* interpreted as data, and not code by the debugger or disassembler.
* This section will only be present in the ELF file, not in the final binary
* For more details, check GCC-212
*/
.xt.prop 0 :
{
KEEP (*(.xt.prop .gnu.linkonce.prop.*))
}
.xt.lit 0 :
{
KEEP (*(.xt.lit .gnu.linkonce.p.*))
}
}

View File

@ -1,16 +1,51 @@
/** Simplified memory map for the bootloader.
* Make sure the bootloader can load into main memory without overwriting itself.
* We put 2nd bootloader in the high address space (before ROM stack/data/bss).
* See memory usage for ROM bootloader at the end of this file.
*
* ESP32-S3 ROM static data usage is as follows:
* - 0x3fcd7e00 - 0x3fce9704: Shared buffers, used in UART/USB/SPI download mode only
* - 0x3fce9710 - 0x3fceb710: PRO CPU stack, can be reclaimed as heap after RTOS startup
* - 0x3fceb710 - 0x3fced710: APP CPU stack, can be reclaimed as heap after RTOS startup
* - 0x3fced710 - 0x3fcf0000: ROM .bss and .data (not easily reclaimable)
*
* The 2nd stage bootloader can take space up to the end of ROM shared
* buffers area (0x3fce9704). For alignment purpose we shall use value (0x3fce9700).
*/
/* The offset between Dbus and Ibus. Used to convert between 0x403xxxxx and 0x3fcxxxxx addresses. */
iram_dram_offset = 0x6f0000;
/* We consider 0x3fce9700 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
*/
/* These lengths can be adjusted, if necessary: */
bootloader_usable_dram_end = 0x3fce9700;
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
bootloader_dram_seg_len = 0x4000;
bootloader_iram_loader_seg_len = 0x7000;
bootloader_iram_seg_len = 0x3000;
/* Start of the lower region is determined by region size and the end of the higher region */
bootloader_dram_seg_end = bootloader_usable_dram_end - bootloader_stack_overhead;
bootloader_dram_seg_start = bootloader_dram_seg_end - bootloader_dram_seg_len;
bootloader_iram_loader_seg_start = bootloader_dram_seg_start - bootloader_iram_loader_seg_len + iram_dram_offset;
bootloader_iram_seg_start = bootloader_iram_loader_seg_start - bootloader_iram_seg_len;
MEMORY
{
iram_seg (RWX) : org = 0x403B6000, len = 0x4000
iram_loader_seg (RWX) : org = 0x403BA000, len = 0x6000
dram_seg (RW) : org = 0x3FCD0000, len = 0x4000
iram_seg (RWX) : org = bootloader_iram_seg_start, len = bootloader_iram_seg_len
iram_loader_seg (RWX) : org = bootloader_iram_loader_seg_start, len = bootloader_iram_loader_seg_len
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
}
/* The app may use RAM for static allocations up to the start of iram_loader_seg.
* If you have changed something above and this assert fails:
* 1. Check what the new value of bootloader_iram_loader_seg start is.
* 2. Update the value in this assert.
* 3. Update SRAM_IRAM_END in components/esp_system/ld/esp32s3/memory.ld.in to the same value.
*/
ASSERT(bootloader_iram_loader_seg_start == 0x403cc700, "bootloader_iram_loader_seg_start inconsistent with SRAM_IRAM_END");
/* Default entry point: */
ENTRY(call_start_cpu0);
@ -30,9 +65,8 @@ SECTIONS
*libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_enable .text.bootloader_random_enable)
*libesp_common.a:fpga_overrides.*(.literal.bootloader_fill_random .text.bootloader_fill_random)
*libbootloader_support.a:bootloader_efuse_esp32s3.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
@ -48,6 +82,7 @@ SECTIONS
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:regi2c_ctrl.*(.literal .text .literal.* .text.*)
@ -100,8 +135,6 @@ SECTIONS
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
@ -114,6 +147,7 @@ SECTIONS
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
@ -172,29 +206,62 @@ SECTIONS
_etext = .;
} > iram_seg
}
/** This section will be used by the debugger and disassembler to get more information
* about raw data present in the code.
* Indeed, it may be required to add some padding at some points in the code
* in order to align a branch/jump destination on a particular bound.
* Padding these instructions will generate null bytes that shall be
* interpreted as data, and not code by the debugger or disassembler.
* This section will only be present in the ELF file, not in the final binary
* For more details, check GCC-212
*/
.xt.prop 0 :
{
KEEP (*(.xt.prop .gnu.linkonce.prop.*))
}
.xt.lit 0 :
{
KEEP (*(.xt.lit .gnu.linkonce.p.*))
}
}
/**
* Appendix: Memory Usage of ROM bootloader
*
* +--------+--------------+------+ 0x3FCD_8000
* | ^ |
* | | |
* | | data/bss |
* | | |
* | v |
* +------------------------------+ 0x3FCE_9910
* | ^ |
* | | |
* | | stack (pro) |
* | | |
* | v |
* +------------------------------+ 0x3FCE_B910
* | ^ |
* | | |
* | | stack (app) |
* | | |
* | v |
* +--------+--------------+------+ 0x3FCE_D910
* 0x3fcd7e00 ------------------> _dram0_0_start
* | |
* | |
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
* | |
* | |
* 0x3fce9710 ------------------> __stack_sentry
* | |
* | | 2. Startup pro cpu stack (freed when IDF app is running)
* | |
* 0x3fceb710 ------------------> __stack (pro cpu)
* | |
* | | Startup app cpu stack
* | |
* 0x3fced710 ------------------> __stack_app (app cpu)
* | |
* | |
* | | 3. Shared memory only used in startup code or nonos/early boot*
* | | (can be freed when IDF runs)
* | |
* | |
* 0x3fceee34 ------------------> _dram0_rtos_reserved_start
* | |
* | |
* | | 4. Shared memory used in startup code and when IDF runs
* | |
* | |
* 0x3fcef770 ------------------> _dram0_rtos_reserved_end
* | |
* 0x3fcef81c ------------------> _data_start_interface
* | |
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
* | |
* 0x3fcf0000 ------------------> _data_end_interface
*/

View File

@ -13,7 +13,7 @@ set(srcs
"src/flash_partitions.c"
"src/flash_qio_mode.c"
"src/bootloader_flash_config_${IDF_TARGET}.c"
"src/bootloader_efuse_${IDF_TARGET}.c"
"src/bootloader_efuse.c"
)
if(BOOTLOADER_BUILD)

View File

@ -26,7 +26,7 @@
extern "C" {
#endif
/// Type of hold a GPIO in low state
// Type of hold a GPIO in low state
typedef enum {
GPIO_LONG_HOLD = 1, /*!< The long hold GPIO */
GPIO_SHORT_HOLD = -1, /*!< The short hold GPIO */
@ -187,13 +187,6 @@ int bootloader_common_select_otadata(const esp_ota_select_entry_t *two_otadata,
*/
esp_err_t bootloader_common_get_partition_description(const esp_partition_pos_t *partition, esp_app_desc_t *app_desc);
/**
* @brief Get chip revision
*
* @return Chip revision number
*/
uint8_t bootloader_common_get_chip_revision(void);
/**
* @brief Get chip package
*

View File

@ -9,6 +9,7 @@
#include <esp_spi_flash.h> /* including in bootloader for error values */
#include "sdkconfig.h"
#include "soc/soc_caps.h"
#include "bootloader_flash_override.h"
#ifdef __cplusplus
extern "C" {
@ -32,14 +33,6 @@ uint32_t bootloader_read_flash_id(void);
esp_err_t bootloader_flash_wrap_set(spi_flash_wrap_mode_t mode);
#endif
/**
* @brief Unlock Flash write protect.
* Please do not call this function in SDK.
*
* @note This can be overridden because it's attribute weak.
*/
esp_err_t bootloader_flash_unlock(void);
/**
* @brief Startup flow recommended by XMC. Call at startup before any erase/write operation.
*
@ -47,6 +40,15 @@ esp_err_t bootloader_flash_unlock(void);
*/
esp_err_t bootloader_flash_xmc_startup(void);
/**
* @brief Unlock Flash write protect.
* Please do not call this function in SDK.
*
* @note This can be overridden because it's attribute weak.
*/
esp_err_t IRAM_ATTR __attribute__((weak)) bootloader_flash_unlock(void);
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,101 @@
/*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_err.h"
#include "esp_attr.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned (*bootloader_flash_read_status_fn_t)(void);
typedef void (*bootloader_flash_write_status_fn_t)(unsigned);
typedef struct __attribute__((packed))
{
const char *manufacturer;
uint8_t mfg_id; /* 8-bit JEDEC manufacturer ID */
uint16_t flash_id; /* 16-bit JEDEC flash chip ID */
uint16_t id_mask; /* Bits to match on in flash chip ID */
bootloader_flash_read_status_fn_t read_status_fn;
bootloader_flash_write_status_fn_t write_status_fn;
uint8_t status_qio_bit;
} bootloader_qio_info_t;
/**
* @brief Read 8 bit status using RDSR command
*
* @return Value of SR1.
*/
unsigned bootloader_read_status_8b_rdsr(void);
/**
* @brief Read 8 bit status (second byte) using RDSR2 command
*
* @return Value of SR2
*/
unsigned bootloader_read_status_8b_rdsr2(void);
/**
* @brief Read 16 bit status using RDSR & RDSR2 (low and high bytes)
*
* @return Value of SR2#SR1.
*/
unsigned bootloader_read_status_16b_rdsr_rdsr2(void);
/**
* @brief Write 8 bit status using WRSR
*/
void bootloader_write_status_8b_wrsr(unsigned new_status);
/**
* @brief Write 8 bit status (second byte) using WRSR2.
*/
void bootloader_write_status_8b_wrsr2(unsigned new_status);
/**
* @brief Write 16 bit status using WRSR, (both write SR1 and SR2)
*/
void bootloader_write_status_16b_wrsr(unsigned new_status);
/**
* @brief Read 8 bit status of XM25QU64A.
*
* @return Value of 8 bit SR.
*/
unsigned bootloader_read_status_8b_xmc25qu64a(void);
/**
* @brief Write 8 bit status for XM25QU64A
*/
void bootloader_write_status_8b_xmc25qu64a(unsigned new_status);
/* Array of known flash chips and data to enable Quad I/O mode
Manufacturer & flash ID can be tested by running "esptool.py
flash_id"
If manufacturer ID matches, and flash ID ORed with flash ID mask
matches, enable_qio_mode() will execute "Read Cmd", test if bit
number "QIE Bit" is set, and if not set it will call "Write Cmd"
with this bit set.
Searching of this table stops when the first match is found.
*/
extern const bootloader_qio_info_t __attribute__((weak)) bootloader_flash_qe_support_list[];
/**
* @brief Unlock Flash write protect.
* Please do not call this function in SDK.
*
* @note This can be overridden because it's attribute weak.
*/
esp_err_t IRAM_ATTR __attribute__((weak)) bootloader_flash_unlock(void);
#ifdef __cplusplus
}
#endif

View File

@ -6,6 +6,7 @@
#pragma once
#include <inttypes.h>
#include "esp_assert.h"
/**
* @brief ESP chip ID
@ -21,7 +22,7 @@ typedef enum {
} __attribute__((packed)) esp_chip_id_t;
/** @cond */
_Static_assert(sizeof(esp_chip_id_t) == 2, "esp_chip_id_t should be 16 bit");
ESP_STATIC_ASSERT(sizeof(esp_chip_id_t) == 2, "esp_chip_id_t should be 16 bit");
/** @endcond */
/**
@ -55,6 +56,9 @@ typedef enum {
ESP_IMAGE_FLASH_SIZE_4MB, /*!< SPI flash size 4 MB */
ESP_IMAGE_FLASH_SIZE_8MB, /*!< SPI flash size 8 MB */
ESP_IMAGE_FLASH_SIZE_16MB, /*!< SPI flash size 16 MB */
ESP_IMAGE_FLASH_SIZE_32MB, /*!< SPI flash size 32 MB */
ESP_IMAGE_FLASH_SIZE_64MB, /*!< SPI flash size 64 MB */
ESP_IMAGE_FLASH_SIZE_128MB, /*!< SPI flash size 128 MB */
ESP_IMAGE_FLASH_SIZE_MAX /*!< SPI flash size MAX */
} esp_image_flash_size_t;
@ -75,8 +79,15 @@ typedef struct {
* pin and sets this field to 0xEE=disabled) */
uint8_t spi_pin_drv[3]; /*!< Drive settings for the SPI flash pins (read by ROM bootloader) */
esp_chip_id_t chip_id; /*!< Chip identification number */
uint8_t min_chip_rev; /*!< Minimum chip revision supported by image */
uint8_t reserved[8]; /*!< Reserved bytes in additional header space, currently unused */
uint8_t min_chip_rev; /*!< Minimal chip revision supported by image
* After the Major and Minor revision eFuses were introduced into the chips, this field is no longer used.
* But for compatibility reasons, we keep this field and the data in it.
* Use min_chip_rev_full instead.
* The software interprets this as a Major version for most of the chips and as a Minor version for the ESP32-C3.
*/
uint16_t min_chip_rev_full; /*!< Minimal chip revision supported by image, in format: major * 100 + minor */
uint16_t max_chip_rev_full; /*!< Maximal chip revision supported by image, in format: major * 100 + minor */
uint8_t reserved[4]; /*!< Reserved bytes in additional header space, currently unused */
uint8_t hash_appended; /*!< If 1, a SHA256 digest "simple hash" (of the entire image) is appended after the checksum.
* Included in image length. This digest
* is separate to secure boot and only used for detecting corruption.
@ -85,7 +96,7 @@ typedef struct {
} __attribute__((packed)) esp_image_header_t;
/** @cond */
_Static_assert(sizeof(esp_image_header_t) == 24, "binary image header should be 24 bytes");
ESP_STATIC_ASSERT(sizeof(esp_image_header_t) == 24, "binary image header should be 24 bytes");
/** @endcond */

View File

@ -12,6 +12,7 @@
#include "esp_spi_flash.h"
#endif
#include "soc/efuse_periph.h"
#include "hal/efuse_hal.h"
#include "sdkconfig.h"
#ifdef CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH
@ -46,19 +47,15 @@ typedef enum {
*/
static inline /** @cond */ IRAM_ATTR /** @endcond */ bool esp_flash_encryption_enabled(void)
{
#ifndef CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH
return efuse_hal_flash_encryption_enabled();
#else
uint32_t flash_crypt_cnt = 0;
#if CONFIG_IDF_TARGET_ESP32
#ifndef CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH
flash_crypt_cnt = REG_GET_FIELD(EFUSE_BLK0_RDATA0_REG, EFUSE_RD_FLASH_CRYPT_CNT);
#else
esp_efuse_read_field_blob(ESP_EFUSE_FLASH_CRYPT_CNT, &flash_crypt_cnt, ESP_EFUSE_FLASH_CRYPT_CNT[0]->bit_count);
#endif
esp_efuse_read_field_blob(ESP_EFUSE_FLASH_CRYPT_CNT, &flash_crypt_cnt, ESP_EFUSE_FLASH_CRYPT_CNT[0]->bit_count);
#else
#ifndef CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH
flash_crypt_cnt = REG_GET_FIELD(EFUSE_RD_REPEAT_DATA1_REG, EFUSE_SPI_BOOT_CRYPT_CNT);
#else
esp_efuse_read_field_blob(ESP_EFUSE_SPI_BOOT_CRYPT_CNT, &flash_crypt_cnt, ESP_EFUSE_SPI_BOOT_CRYPT_CNT[0]->bit_count);
#endif
esp_efuse_read_field_blob(ESP_EFUSE_SPI_BOOT_CRYPT_CNT, &flash_crypt_cnt, ESP_EFUSE_SPI_BOOT_CRYPT_CNT[0]->bit_count);
#endif
/* __builtin_parity is in flash, so we calculate parity inline */
bool enabled = false;
@ -69,6 +66,7 @@ static inline /** @cond */ IRAM_ATTR /** @endcond */ bool esp_flash_encryption_e
flash_crypt_cnt >>= 1;
}
return enabled;
#endif // CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH
}
/* @brief Update on-device flash encryption

View File

@ -9,6 +9,7 @@
#include <esp_err.h>
#include "esp_flash_partitions.h"
#include "esp_app_format.h"
#include "esp_assert.h"
#ifdef __cplusplus
extern "C" {
@ -53,12 +54,18 @@ typedef struct {
uint32_t crc; /*!< Check sum crc32 */
} rtc_retain_mem_t;
ESP_STATIC_ASSERT(offsetof(rtc_retain_mem_t, crc) == sizeof(rtc_retain_mem_t) - sizeof(uint32_t), "CRC field must be the last field of rtc_retain_mem_t structure");
#ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC
_Static_assert(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE must be a multiple of 4 bytes");
ESP_STATIC_ASSERT(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE must be a multiple of 4 bytes");
/* The custom field must be the penultimate field */
ESP_STATIC_ASSERT(offsetof(rtc_retain_mem_t, custom) == sizeof(rtc_retain_mem_t) - sizeof(uint32_t) - CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE,
"custom field in rtc_retain_mem_t structure must be the field before the CRC one");
#endif
#if defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP) || defined(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC)
_Static_assert(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_RESERVE_RTC_SIZE must be a multiple of 4 bytes");
ESP_STATIC_ASSERT(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_RESERVE_RTC_SIZE must be a multiple of 4 bytes");
#endif
#ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC
@ -68,7 +75,7 @@ _Static_assert(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_R
#endif
#if defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP) || defined(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC)
_Static_assert(sizeof(rtc_retain_mem_t) <= ESP_BOOTLOADER_RESERVE_RTC, "Reserved RTC area must exceed size of rtc_retain_mem_t");
ESP_STATIC_ASSERT(sizeof(rtc_retain_mem_t) <= ESP_BOOTLOADER_RESERVE_RTC, "Reserved RTC area must exceed size of rtc_retain_mem_t");
#endif
/**

View File

@ -200,7 +200,7 @@ typedef struct {
*/
esp_err_t esp_secure_boot_verify_ecdsa_signature_block(const esp_secure_boot_sig_block_t *sig_block, const uint8_t *image_digest, uint8_t *verified_digest);
#if !CONFIG_IDF_TARGET_ESP32 || CONFIG_ESP32_REV_MIN_3
#if !CONFIG_IDF_TARGET_ESP32 || CONFIG_ESP32_REV_MIN_FULL >= 300
/**
* @brief Structure to hold public key digests calculated from the signature blocks of a single image.
*
@ -223,7 +223,7 @@ typedef struct {
*
*/
esp_err_t esp_secure_boot_verify_rsa_signature_block(const ets_secure_boot_signature_t *sig_block, const uint8_t *image_digest, uint8_t *verified_digest);
#endif // !CONFIG_IDF_TARGET_ESP32 || CONFIG_ESP32_REV_MIN_3
#endif // !CONFIG_IDF_TARGET_ESP32 || CONFIG_ESP32_REV_MIN_FULL >= 300
/** @brief Legacy ECDSA verification function
*

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -24,10 +24,13 @@
#define CMD_RDID 0x9F
#define CMD_WRSR 0x01
#define CMD_WRSR2 0x31 /* Not all SPI flash uses this command */
#define CMD_WRSR3 0x11 /* Not all SPI flash uses this command */
#define CMD_WREN 0x06
#define CMD_WRENVSR 0x50 /* Flash write enable for volatile SR bits */
#define CMD_WRDI 0x04
#define CMD_RDSR 0x05
#define CMD_RDSR2 0x35 /* Not all SPI flash uses this command */
#define CMD_RDSR3 0x15 /* Not all SPI flash uses this command */
#define CMD_OTPEN 0x3A /* Enable OTP mode, not all SPI flash uses this command */
#define CMD_RDSFDP 0x5A /* Read the SFDP of the flash */
#define CMD_WRAP 0x77 /* Set burst with wrap command */
@ -171,4 +174,12 @@ uint32_t bootloader_flash_read_sfdp(uint32_t sfdp_addr, unsigned int miso_byte_n
*/
void bootloader_enable_wp(void);
/**
* @brief Once this function is called,
* any on-going internal operations will be terminated and the device will return to its default power-on
* state and lose all the current volatile settings, such as Volatile Status Register bits, Write Enable Latch
* (WEL) status, Program/Erase Suspend status, etc.
*/
void bootloader_spi_flash_reset(void);
#endif

View File

@ -96,9 +96,10 @@ void bootloader_atexit(void);
esp_err_t bootloader_sha256_hex_to_str(char *out_str, const uint8_t *in_array_hex, size_t len);
/**
* @brief Debug log contents of a buffer as hexadecimal
* @brief Debug log contents of a buffer as hexadecimal.
*
* @note Only works if component log level is DEBUG or higher.
* @note - Only works if component log level is DEBUG or higher.
* - It will print at most 128 bytes from @c buffer.
*
* @param buffer Buffer to log
* @param length Length of buffer in bytes. Maximum length 128 bytes.

View File

@ -7,10 +7,12 @@
#include "soc/soc.h"
#include "soc/rtc.h"
#include "soc/efuse_periph.h"
#include "soc/chip_revision.h"
#include "soc/rtc_cntl_reg.h"
#if CONFIG_IDF_TARGET_ESP32
#include "soc/dport_reg.h"
#endif
#include "hal/efuse_hal.h"
#include "esp_rom_sys.h"
#include "esp_rom_uart.h"
@ -32,8 +34,7 @@ __attribute__((weak)) void bootloader_clock_configure(void)
* document). For rev. 0, switch to 240 instead if it has been enabled
* previously.
*/
uint32_t chip_ver_reg = REG_READ(EFUSE_BLK0_RDATA3_REG);
if ((chip_ver_reg & EFUSE_RD_CHIP_VER_REV1_M) == 0 &&
if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 100) &&
DPORT_REG_GET_FIELD(DPORT_CPU_PER_CONF_REG, DPORT_CPUPERIOD_SEL) == DPORT_CPUPERIOD_SEL_240) {
cpu_freq_mhz = 240;
}

View File

@ -168,6 +168,12 @@ esp_err_t bootloader_common_get_sha256_of_partition (uint32_t address, uint32_t
}
if (data.image.hash_appended) {
memcpy(out_sha_256, data.image_digest, ESP_PARTITION_HASH_LEN);
uint8_t calc_sha256[ESP_PARTITION_HASH_LEN];
// The hash is verified before returning, if app content is invalid then the function returns ESP_ERR_IMAGE_INVALID.
esp_err_t error = bootloader_sha256_flash_contents(address, data.image_len - ESP_PARTITION_HASH_LEN, calc_sha256);
if (error || memcmp(data.image_digest, calc_sha256, ESP_PARTITION_HASH_LEN) != 0) {
return ESP_ERR_IMAGE_INVALID;
}
return ESP_OK;
}
// If image doesn't have a appended hash then hash calculates for entire image.

View File

@ -22,6 +22,9 @@
#include "soc/gpio_periph.h"
#include "soc/rtc.h"
#include "soc/efuse_reg.h"
#include "soc/chip_revision.h"
#include "hal/efuse_ll.h"
#include "hal/efuse_hal.h"
#include "soc/soc_memory_types.h"
#include "hal/gpio_ll.h"
#include "esp_image_format.h"
@ -30,6 +33,7 @@
#include "bootloader_flash_priv.h"
#define ESP_PARTITION_HASH_LEN 32 /* SHA-256 digest length */
#define IS_MAX_REV_SET(max_chip_rev_full) (((max_chip_rev_full) != 65535) && ((max_chip_rev_full) != 0))
static const char* TAG = "boot_comm";
@ -59,28 +63,38 @@ int bootloader_common_get_active_otadata(esp_ota_select_entry_t *two_otadata)
return bootloader_common_select_otadata(two_otadata, valid_two_otadata, true);
}
esp_err_t bootloader_common_check_chip_validity(const esp_image_header_t* img_hdr, esp_image_type type)
esp_err_t __attribute__((optimize("-Os"))) bootloader_common_check_chip_validity(const esp_image_header_t* img_hdr, esp_image_type type)
{
esp_err_t err = ESP_OK;
esp_chip_id_t chip_id = CONFIG_IDF_FIRMWARE_CHIP_ID;
if (chip_id != img_hdr->chip_id) {
ESP_LOGE(TAG, "mismatch chip ID, expected %d, found %d", chip_id, img_hdr->chip_id);
err = ESP_FAIL;
}
} else {
#ifndef CONFIG_IDF_ENV_FPGA
uint8_t revision = bootloader_common_get_chip_revision();
if (revision < img_hdr->min_chip_rev) {
/* To fix this error, please update mininum supported chip revision from configuration,
* located in TARGET (e.g. ESP32) specific options under "Component config" menu */
ESP_LOGE(TAG, "This chip is revision %d but the application is configured for minimum revision %d. Can't run.", revision, img_hdr->min_chip_rev);
err = ESP_FAIL;
} else if (revision != img_hdr->min_chip_rev) {
#ifdef BOOTLOADER_BUILD
ESP_LOGI(TAG, "chip revision: %d, min. %s chip revision: %d", revision, type == ESP_IMAGE_BOOTLOADER ? "bootloader" : "application", img_hdr->min_chip_rev);
#endif
}
unsigned revision = efuse_hal_chip_revision();
unsigned int major_rev = revision / 100;
unsigned int minor_rev = revision % 100;
unsigned min_rev = img_hdr->min_chip_rev_full;
if (type == ESP_IMAGE_BOOTLOADER || type == ESP_IMAGE_APPLICATION) {
if (!ESP_CHIP_REV_ABOVE(revision, min_rev)) {
ESP_LOGE(TAG, "Image requires chip rev >= v%d.%d, but chip is v%d.%d",
min_rev / 100, min_rev % 100,
major_rev, minor_rev);
err = ESP_FAIL;
}
}
if (type == ESP_IMAGE_APPLICATION) {
unsigned max_rev = img_hdr->max_chip_rev_full;
if ((IS_MAX_REV_SET(max_rev) && (revision > max_rev) && !efuse_ll_get_disable_wafer_version_major())) {
ESP_LOGE(TAG, "Image requires chip rev <= v%d.%d, but chip is v%d.%d",
max_rev / 100, max_rev % 100,
major_rev, minor_rev);
err = ESP_FAIL;
}
}
#endif // CONFIG_IDF_ENV_FPGA
}
return err;
}
@ -139,6 +153,8 @@ esp_err_t bootloader_common_get_partition_description(const esp_partition_pos_t
#define RTC_RETAIN_MEM_ADDR (SOC_RTC_DRAM_HIGH - sizeof(rtc_retain_mem_t))
_Static_assert(RTC_RETAIN_MEM_ADDR >= SOC_RTC_DRAM_LOW, "rtc_retain_mem_t structure size is bigger than the RTC memory size. Consider reducing RTC reserved memory size.");
rtc_retain_mem_t *const rtc_retain_mem = (rtc_retain_mem_t *)RTC_RETAIN_MEM_ADDR;
#ifndef BOOTLOADER_BUILD
@ -151,14 +167,25 @@ rtc_retain_mem_t *const rtc_retain_mem = (rtc_retain_mem_t *)RTC_RETAIN_MEM_ADDR
SOC_RESERVE_MEMORY_REGION(RTC_RETAIN_MEM_ADDR, RTC_RETAIN_MEM_ADDR + sizeof(rtc_retain_mem_t), rtc_retain_mem);
#endif
static uint32_t rtc_retain_mem_size(void) {
#ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC
/* A custom memory has been reserved by the user, do not consider this memory into CRC calculation as it may change without
* the have the user updating the CRC. Return the offset of the custom field, which is equivalent to size of the structure
* minus the size of everything after (including) `custom` */
return offsetof(rtc_retain_mem_t, custom);
#else
return sizeof(rtc_retain_mem_t) - sizeof(rtc_retain_mem->crc);
#endif
}
static bool check_rtc_retain_mem(void)
{
return esp_rom_crc32_le(UINT32_MAX, (uint8_t*)rtc_retain_mem, sizeof(rtc_retain_mem_t) - sizeof(rtc_retain_mem->crc)) == rtc_retain_mem->crc && rtc_retain_mem->crc != UINT32_MAX;
return esp_rom_crc32_le(UINT32_MAX, (uint8_t*)rtc_retain_mem, rtc_retain_mem_size()) == rtc_retain_mem->crc && rtc_retain_mem->crc != UINT32_MAX;
}
static void update_rtc_retain_mem_crc(void)
{
rtc_retain_mem->crc = esp_rom_crc32_le(UINT32_MAX, (uint8_t*)rtc_retain_mem, sizeof(rtc_retain_mem_t) - sizeof(rtc_retain_mem->crc));
rtc_retain_mem->crc = esp_rom_crc32_le(UINT32_MAX, (uint8_t*)rtc_retain_mem, rtc_retain_mem_size());
}
void bootloader_common_reset_rtc_retain_mem(void)

View File

@ -44,12 +44,7 @@ void bootloader_console_init(void)
{
const int uart_num = CONFIG_ESP_CONSOLE_UART_NUM;
#if !ESP_ROM_SUPPORT_MULTIPLE_UART
/* esp_rom_install_channel_put is not available unless multiple UARTs are supported */
esp_rom_install_uart_printf();
#else
esp_rom_install_channel_putc(1, esp_rom_uart_putc);
#endif
// Wait for UART FIFO to be empty.
esp_rom_uart_tx_wait_idle(0);
@ -58,10 +53,10 @@ void bootloader_console_init(void)
// Some constants to make the following code less upper-case
const int uart_tx_gpio = CONFIG_ESP_CONSOLE_UART_TX_GPIO;
const int uart_rx_gpio = CONFIG_ESP_CONSOLE_UART_RX_GPIO;
// Switch to the new UART (this just changes UART number used for esp_rom_printf in ROM code).
#if ESP_ROM_SUPPORT_MULTIPLE_UART
esp_rom_uart_set_as_console(uart_num);
#endif
// If console is attached to UART1 or if non-default pins are used,
// need to reconfigure pins using GPIO matrix
if (uart_num != 0 ||
@ -73,10 +68,12 @@ void bootloader_console_init(void)
// Route GPIO signals to/from pins
const uint32_t tx_idx = UART_PERIPH_SIGNAL(uart_num, SOC_UART_TX_PIN_IDX);
const uint32_t rx_idx = UART_PERIPH_SIGNAL(uart_num, SOC_UART_RX_PIN_IDX);
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[uart_rx_gpio], PIN_FUNC_GPIO);
PIN_INPUT_ENABLE(GPIO_PIN_MUX_REG[uart_rx_gpio]);
esp_rom_gpio_pad_pullup_only(uart_rx_gpio);
esp_rom_gpio_connect_out_signal(uart_tx_gpio, tx_idx, 0, 0);
esp_rom_gpio_connect_in_signal(uart_rx_gpio, rx_idx, 0);
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[uart_tx_gpio], PIN_FUNC_GPIO);
// Enable the peripheral
periph_ll_enable_clk_clear_rst(PERIPH_UART0_MODULE + uart_num);
}

View File

@ -0,0 +1,37 @@
/*
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include "sdkconfig.h"
#include "bootloader_common.h"
#include "hal/efuse_ll.h"
#include "hal/efuse_hal.h"
#include "esp_attr.h"
IRAM_ATTR uint32_t bootloader_common_get_chip_ver_pkg(void)
{
return efuse_ll_get_chip_ver_pkg();
}
int bootloader_clock_get_rated_freq_mhz(void)
{
#ifdef CONFIG_IDF_TARGET_ESP32
return efuse_hal_get_rated_freq_mhz();
#elif CONFIG_IDF_TARGET_ESP32C3
return 160;
#elif CONFIG_IDF_TARGET_ESP32H2
return 96;
#elif CONFIG_IDF_TARGET_ESP32S2
return 240;
#elif CONFIG_IDF_TARGET_ESP32S3
return 240;
#endif
}

View File

@ -1,60 +0,0 @@
/*
* SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "bootloader_common.h"
#include "bootloader_clock.h"
#include "soc/efuse_reg.h"
#include "soc/syscon_reg.h"
uint8_t bootloader_common_get_chip_revision(void)
{
uint8_t eco_bit0, eco_bit1, eco_bit2;
eco_bit0 = (REG_READ(EFUSE_BLK0_RDATA3_REG) & 0xF000) >> 15;
eco_bit1 = (REG_READ(EFUSE_BLK0_RDATA5_REG) & 0x100000) >> 20;
eco_bit2 = (REG_READ(SYSCON_DATE_REG) & 0x80000000) >> 31;
uint32_t combine_value = (eco_bit2 << 2) | (eco_bit1 << 1) | eco_bit0;
uint8_t chip_ver = 0;
switch (combine_value) {
case 0:
chip_ver = 0;
break;
case 1:
chip_ver = 1;
break;
case 3:
chip_ver = 2;
break;
#if CONFIG_IDF_ENV_FPGA
case 4: /* Empty efuses, but SYSCON_DATE_REG bit is set */
chip_ver = 3;
break;
#endif
case 7:
chip_ver = 3;
break;
default:
chip_ver = 0;
break;
}
return chip_ver;
}
uint32_t bootloader_common_get_chip_ver_pkg(void)
{
uint32_t pkg_version = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
uint32_t pkg_version_4bit = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG_4BIT);
return (pkg_version_4bit << 3) | pkg_version;
}
int bootloader_clock_get_rated_freq_mhz()
{
//Check if ESP32 is rated for a CPU frequency of 160MHz only
if (REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_RATED) &&
REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_LOW)) {
return 160;
}
return 240;
}

View File

@ -1,20 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include "soc/efuse_reg.h"
uint8_t bootloader_common_get_chip_revision(void)
{
// should return the same value as esp_efuse_get_chip_ver()
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_WAFER_VERSION);
}
uint32_t bootloader_common_get_chip_ver_pkg(void)
{
// should return the same value as esp_efuse_get_pkg_ver()
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_PKG_VERSION);
}

View File

@ -1,20 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include "soc/efuse_reg.h"
uint8_t bootloader_common_get_chip_revision(void)
{
// should return the same value as esp_efuse_get_chip_ver()
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_WAFER_VERSION);
}
uint32_t bootloader_common_get_chip_ver_pkg(void)
{
// should return the same value as esp_efuse_get_pkg_ver()
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_PKG_VERSION);
}

View File

@ -1,23 +0,0 @@
/*
* SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
#include "bootloader_clock.h"
#include "bootloader_common.h"
#include "soc/efuse_reg.h"
uint8_t bootloader_common_get_chip_revision(void)
{
// should return the same value as esp_efuse_get_chip_ver()
/* No other revisions for ESP32-S2 */
return 0;
}
uint32_t bootloader_common_get_chip_ver_pkg(void)
{
// should return the same value as esp_efuse_get_pkg_ver()
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_4_REG, EFUSE_PKG_VERSION);
}

View File

@ -1,20 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
uint8_t bootloader_common_get_chip_revision(void)
{
// should return the same value as esp_efuse_get_chip_ver()
/* No other revisions for ESP32-S3 */
return 0;
}
uint32_t bootloader_common_get_chip_ver_pkg(void)
{
// should return the same value as esp_efuse_get_pkg_ver()
return 0;
}

View File

@ -10,6 +10,7 @@
#include <esp_flash_encrypt.h>
#include "sdkconfig.h"
#include "soc/soc_caps.h"
#include "hal/efuse_hal.h"
#if CONFIG_IDF_TARGET_ESP32
# include "soc/spi_struct.h"
@ -36,22 +37,22 @@
#endif
#ifdef CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH
#define ENCRYPTION_IS_VIRTUAL 1
#define ENCRYPTION_IS_VIRTUAL (!efuse_hal_flash_encryption_enabled())
#else
#define ENCRYPTION_IS_VIRTUAL 0
#endif
#define BYTESHIFT(VAR, IDX) (((VAR) >> ((IDX) * 8)) & 0xFF)
#define ISSI_ID 0x9D
#define MXIC_ID 0xC2
#define GD_Q_ID_HIGH 0xC8
#define GD_Q_ID_MID 0x40
#define GD_Q_ID_LOW 0x16
#define ESP_BOOTLOADER_SPIFLASH_BP_MASK_ISSI (BIT7 | BIT5 | BIT4 | BIT3 | BIT2)
#define ESP_BOOTLOADER_SPIFLASH_QE_16B BIT9 // QE position when you write 16 bits at one time.
#define ESP_BOOTLOADER_SPIFLASH_QE_8B BIT1 // QE position when you write 8 bits(for SR2) at one time.
#define ESP_BOOTLOADER_SPIFLASH_WRITE_8B (8)
#define ESP_BOOTLOADER_SPIFLASH_WRITE_16B (16)
#define ESP_BOOTLOADER_SPIFLASH_QE_GD_SR2 BIT1 // QE position when you write 8 bits(for SR2) at one time.
#define ESP_BOOTLOADER_SPIFLASH_QE_SR1_2BYTE BIT9 // QE position when you write 16 bits at one time.
#ifndef BOOTLOADER_BUILD
/* Normal app version maps to esp_spi_flash.h operations...
@ -495,72 +496,77 @@ FORCE_INLINE_ATTR bool is_gd_q_chip(const esp_rom_spiflash_chip_t* chip)
return BYTESHIFT(chip->device_id, 2) == GD_Q_ID_HIGH && BYTESHIFT(chip->device_id, 1) == GD_Q_ID_MID && BYTESHIFT(chip->device_id, 0) >= GD_Q_ID_LOW;
}
FORCE_INLINE_ATTR bool is_mxic_chip(const esp_rom_spiflash_chip_t* chip)
{
return BYTESHIFT(chip->device_id, 2) == MXIC_ID;
}
esp_err_t IRAM_ATTR __attribute__((weak)) bootloader_flash_unlock(void)
{
// At the beginning status == new_status == status_sr2 == new_status_sr2 == 0.
// If the register doesn't need to be updated, keep them the same (0), so that no command will be actually sent.
uint16_t status = 0; // status for SR1 or SR1+SR2 if writing SR with 01H + 2Bytes.
uint16_t new_status = 0;
uint8_t status_sr2 = 0; // status_sr2 for SR2.
uint8_t new_status_sr2 = 0;
uint8_t write_sr_bit = 0;
uint8_t sr1_bit_num = 0;
esp_err_t err = ESP_OK;
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
if (is_issi_chip(&g_rom_flashchip)) {
write_sr_bit = ESP_BOOTLOADER_SPIFLASH_WRITE_8B;
// ISSI chips have different QE position
if (is_issi_chip(&g_rom_flashchip) || is_mxic_chip(&g_rom_flashchip)) {
// Currently ISSI & MXIC share the same command and register layout, which is different from the default model.
// If any code here needs to be modified, check both chips.
status = bootloader_execute_flash_command(CMD_RDSR, 0, 0, 8);
/* Clear all bits in the mask.
(This is different from ROM esp_rom_spiflash_unlock, which keeps all bits as-is.)
*/
sr1_bit_num = 8;
new_status = status & (~ESP_BOOTLOADER_SPIFLASH_BP_MASK_ISSI);
// Skip if nothing needs to be cleared. Otherwise will waste time waiting for the flash to clear nothing.
} else if (is_gd_q_chip(&g_rom_flashchip)) {
/* The GD chips behaviour is to clear all bits in SR1 and clear bits in SR2 except QE bit.
Use 01H to write SR1 and 31H to write SR2.
*/
write_sr_bit = ESP_BOOTLOADER_SPIFLASH_WRITE_8B;
status = bootloader_execute_flash_command(CMD_RDSR, 0, 0, 8);
sr1_bit_num = 8;
new_status = 0;
status_sr2 = bootloader_execute_flash_command(CMD_RDSR2, 0, 0, 8);
new_status_sr2 = status_sr2 & ESP_BOOTLOADER_SPIFLASH_QE_8B;
new_status_sr2 = status_sr2 & ESP_BOOTLOADER_SPIFLASH_QE_GD_SR2;
} else {
/* For common behaviour, like XMC chips, Use 01H+2Bytes to write both SR1 and SR2*/
write_sr_bit = ESP_BOOTLOADER_SPIFLASH_WRITE_16B;
status = bootloader_execute_flash_command(CMD_RDSR, 0, 0, 8) | (bootloader_execute_flash_command(CMD_RDSR2, 0, 0, 8) << 8);
/* Clear all bits except QE, if it is set.
(This is different from ROM esp_rom_spiflash_unlock, which keeps all bits as-is.)
*/
new_status = status & ESP_BOOTLOADER_SPIFLASH_QE_16B;
sr1_bit_num = 16;
new_status = status & ESP_BOOTLOADER_SPIFLASH_QE_SR1_2BYTE;
}
// When SR is written, set to true to indicate that WRDI need to be sent to ensure the protection is ON before return.
bool status_written = false;
// Skip if nothing needs to be changed. Meaningless writing to SR increases the risk during write and wastes time.
if (status != new_status) {
/* if the status in SR not equal to the ideal status, the status need to be updated */
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
bootloader_execute_flash_command(CMD_WREN, 0, 0, 0);
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
bootloader_execute_flash_command(CMD_WRSR, new_status, write_sr_bit, 0);
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
bootloader_execute_flash_command(CMD_WRSR, new_status, sr1_bit_num, 0);
status_written = true;
}
if (status_sr2 != new_status_sr2) {
/* If the status in SR2 not equal to the ideal status, the status need to be updated.
It doesn't need to be updated if status in SR2 is 0.
Note: if we need to update both SR1 and SR2, the `CMD_WREN` needs to be sent again.
*/
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
bootloader_execute_flash_command(CMD_WREN, 0, 0, 0);
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
bootloader_execute_flash_command(CMD_WRSR2, new_status_sr2, write_sr_bit, 0);
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
bootloader_execute_flash_command(CMD_WRSR2, new_status_sr2, 8, 0);
status_written = true;
}
if (status_written) {
//Call esp_rom_spiflash_wait_idle to make sure previous WRSR is completed.
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
bootloader_execute_flash_command(CMD_WRDI, 0, 0, 0);
}
bootloader_execute_flash_command(CMD_WRDI, 0, 0, 0);
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
return err;
}
@ -568,7 +574,7 @@ esp_err_t IRAM_ATTR __attribute__((weak)) bootloader_flash_unlock(void)
#ifndef g_rom_spiflash_dummy_len_plus // ESP32-C3 uses a macro to access ROM data here
extern uint8_t g_rom_spiflash_dummy_len_plus[];
#endif
IRAM_ATTR static uint32_t bootloader_flash_execute_command_common(
IRAM_ATTR uint32_t bootloader_flash_execute_command_common(
uint8_t command,
uint32_t addr_len, uint32_t address,
uint8_t dummy_len,
@ -598,14 +604,12 @@ IRAM_ATTR static uint32_t bootloader_flash_execute_command_common(
SPIFLASH.addr = address;
#endif
//dummy phase
uint32_t total_dummy = dummy_len;
if (miso_len > 0) {
uint32_t total_dummy = dummy_len + g_rom_spiflash_dummy_len_plus[1];
SPIFLASH.user.usr_dummy = total_dummy > 0;
SPIFLASH.user1.usr_dummy_cyclelen = total_dummy - 1;
} else {
SPIFLASH.user.usr_dummy = 0;
SPIFLASH.user1.usr_dummy_cyclelen = 0;
total_dummy += g_rom_spiflash_dummy_len_plus[1];
}
SPIFLASH.user.usr_dummy = total_dummy > 0;
SPIFLASH.user1.usr_dummy_cyclelen = total_dummy - 1;
//output data
SPIFLASH.user.usr_mosi = mosi_len > 0;
#if CONFIG_IDF_TARGET_ESP32
@ -674,6 +678,12 @@ uint32_t IRAM_ATTR bootloader_read_flash_id(void)
return id;
}
void bootloader_spi_flash_reset(void)
{
bootloader_execute_flash_command(0x66, 0, 0, 0);
bootloader_execute_flash_command(0x99, 0, 0, 0);
}
#if SOC_CACHE_SUPPORT_WRAP
esp_err_t bootloader_flash_wrap_set(spi_flash_wrap_mode_t mode)
{

View File

@ -17,6 +17,8 @@
#include "soc/spi_reg.h"
#include "soc/soc_caps.h"
#include "soc/soc_pins.h"
#include "soc/chip_revision.h"
#include "hal/efuse_hal.h"
#include "hal/gpio_hal.h"
#include "flash_qio_mode.h"
#include "bootloader_common.h"
@ -168,16 +170,13 @@ int bootloader_flash_get_wp_pin(void)
return CONFIG_SPIRAM_SPIWP_SD3_PIN; // can be set for app when DIO or DOUT config used for PSRAM only
#else
// no custom value, find it based on the package eFuse value
uint8_t chip_ver;
uint32_t pkg_ver = bootloader_common_get_chip_ver_pkg();
switch(pkg_ver) {
switch(bootloader_common_get_chip_ver_pkg()) {
case EFUSE_RD_CHIP_VER_PKG_ESP32U4WDH:
case EFUSE_RD_CHIP_VER_PKG_ESP32D2WDQ5:
return ESP32_D2WD_WP_GPIO;
case EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4:
/* Same package IDs are used for ESP32-PICO-V3 and ESP32-PICO-D4, silicon version differentiates */
chip_ver = bootloader_common_get_chip_revision();
return (chip_ver < 3) ? ESP32_D2WD_WP_GPIO : ESP32_PICO_V3_GPIO;
return !ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 300) ? ESP32_D2WD_WP_GPIO : ESP32_PICO_V3_GPIO;
case EFUSE_RD_CHIP_VER_PKG_ESP32PICOV302:
return ESP32_PICO_V3_GPIO;
default:

View File

@ -18,6 +18,7 @@
#include "soc/cpu.h"
#include "soc/rtc.h"
#include "hal/wdt_hal.h"
#include "hal/efuse_hal.h"
static const char *TAG = "boot";
@ -40,9 +41,10 @@ esp_err_t bootloader_read_bootloader_header(void)
esp_err_t bootloader_check_bootloader_validity(void)
{
/* read chip revision from efuse */
uint8_t revision = bootloader_common_get_chip_revision();
ESP_LOGI(TAG, "chip revision: %d", revision);
unsigned revision = efuse_hal_chip_revision();
unsigned major = revision / 100;
unsigned minor = revision % 100;
ESP_LOGI(TAG, "chip revision: v%d.%d", major, minor);
/* compare with the one set in bootloader image header */
if (bootloader_common_check_chip_validity(&bootloader_image_hdr, ESP_IMAGE_BOOTLOADER) != ESP_OK) {
return ESP_FAIL;

View File

@ -17,6 +17,8 @@ void bootloader_init_mem(void)
{
cpu_hal_init_hwloop();
#ifdef CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE
// protect memory region
esp_cpu_configure_region_protection();
#endif
}

View File

@ -12,7 +12,11 @@
void __assert_func(const char *file, int line, const char *func, const char *expr)
{
#if !CONFIG_OPTIMIZATION_ASSERTIONS_SILENT
esp_rom_printf("Assert failed in %s, %s:%d (%s)\r\n", func, file, line, expr);
#endif
while (1) {
}
}

View File

@ -18,6 +18,13 @@
}
#else
#if !defined CONFIG_IDF_TARGET_ESP32S3
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 32 * 2) /* extra factor of 2 is precautionary */
#else
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 23) /* 45 KHz reading frequency is the maximum we have tested so far on S3 */
#endif
__attribute__((weak)) void bootloader_fill_random(void *buffer, size_t length)
{
uint8_t *buffer_bytes = (uint8_t *)buffer;
@ -40,7 +47,7 @@
do {
random ^= REG_READ(WDEV_RND_REG);
now = cpu_hal_get_cycle_count();
} while (now - start < 80 * 32 * 2); /* extra factor of 2 is precautionary */
} while (now - start < RNG_CPU_WAIT_CYCLE_NUM);
}
buffer_bytes[i] = random >> ((i % 4) * 8);
}

View File

@ -6,18 +6,97 @@
#include "sdkconfig.h"
#include "bootloader_random.h"
#include "esp_log.h"
static const char *TAG = "bootloader_random";
#include "soc/system_reg.h"
#include "soc/syscon_reg.h"
#include "soc/apb_saradc_reg.h"
#include "soc/rtc_cntl_reg.h"
#include "soc/sens_reg.h"
#include "regi2c_ctrl.h"
#include "regi2c_saradc.h"
void bootloader_random_enable(void)
{
ESP_LOGW(TAG, "RNG for ESP32-S3 not currently supported"); // IDF-1878
// Don't forget to remove the following line
// *libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_enable .text.bootloader_random_enable)
// In the bootloader.ld when RNG support is ready for ESP32-S3
SET_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_RNG_EN);
// Enable 8M clock source for RNG (this is actually enough to produce strong random results,
// but enabling the SAR ADC as well adds some insurance.)
REG_SET_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_DIG_CLK8M_EN);
/// Enable SAR ADC to read a disconnected input for additional entropy
// Reset ADC clock
SET_PERI_REG_MASK(SYSTEM_PERIP_CLK_EN0_REG, SYSTEM_APB_SARADC_CLK_EN);
CLEAR_PERI_REG_MASK(SYSTEM_PERIP_CLK_EN0_REG, SYSTEM_APB_SARADC_CLK_EN);
// Enable clock and select clock source for ADC digital controller
REG_SET_FIELD(APB_SARADC_APB_ADC_CLKM_CONF_REG, APB_SARADC_CLK_SEL, 2); //APB clock
SET_PERI_REG_MASK(APB_SARADC_CTRL_REG, APB_SARADC_SAR_CLK_GATED);
SET_PERI_REG_MASK(APB_SARADC_APB_ADC_CLKM_CONF_REG, APB_SARADC_CLK_EN);
// Read freq = apb_clk / (APB_SARADC_CLKM_DIV_NUM + 1) / TIMER_TARGET / 2
// Internal ADC sample freq = apb_clk / (APB_SARADC_CLKM_DIV_NUM + 1) / (APB_SARADC_SAR_CLK_DIV + 1)
// Read frequency has to be at least 35 times lower than the sampling frequency
REG_SET_FIELD(APB_SARADC_APB_ADC_CLKM_CONF_REG, APB_SARADC_CLKM_DIV_NUM, 3);
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_SAR_CLK_DIV, 3); // SAR clock divider has to be at least 2
REG_SET_FIELD(APB_SARADC_CTRL2_REG, APB_SARADC_TIMER_TARGET, 70);
CLEAR_PERI_REG_MASK(APB_SARADC_CTRL_REG, APB_SARADC_START_FORCE);
REG_SET_FIELD(SENS_SAR_POWER_XPD_SAR_REG, SENS_FORCE_XPD_SAR, 3);
CLEAR_PERI_REG_MASK(APB_SARADC_CTRL2_REG, APB_SARADC_MEAS_NUM_LIMIT);
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_WORK_MODE, 1);
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_SAR2_PATT_LEN, 0);
WRITE_PERI_REG(APB_SARADC_SAR2_PATT_TAB1_REG,0xafffff); // Test internal voltage if the channel info is 0xa.
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_SAR1_PATT_LEN, 0);
WRITE_PERI_REG(APB_SARADC_SAR1_PATT_TAB1_REG,0xafffff); // Test internal voltage if the channel info is 0xa.
// Enable adc1 digital controller
SET_PERI_REG_MASK(SENS_SAR_MEAS1_MUX_REG, SENS_SAR1_DIG_FORCE);
// Set SARADC2 arbiter
CLEAR_PERI_REG_MASK(SENS_SAR_MEAS2_MUX_REG, SENS_SAR2_RTC_FORCE);
CLEAR_PERI_REG_MASK(APB_SARADC_APB_ADC_ARB_CTRL_REG, APB_SARADC_ADC_ARB_GRANT_FORCE);
CLEAR_PERI_REG_MASK(APB_SARADC_APB_ADC_ARB_CTRL_REG, APB_SARADC_ADC_ARB_FIX_PRIORITY);
// Disable ADC filter
REG_SET_FIELD(APB_SARADC_FILTER_CTRL0_REG, APB_SARADC_FILTER_CHANNEL0, 0xD);
REG_SET_FIELD(APB_SARADC_FILTER_CTRL0_REG, APB_SARADC_FILTER_CHANNEL1, 0xD);
// Start ADC sample
SET_PERI_REG_MASK(APB_SARADC_CTRL2_REG, APB_SARADC_TIMER_SEL);
SET_PERI_REG_MASK(APB_SARADC_CTRL2_REG, APB_SARADC_TIMER_EN);
/*Choose the appropriate internal voltage to measure*/
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_ENCAL_REF_ADDR, 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_ENT_TSENS_ADDR, 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_ENT_RTC_ADDR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_DTEST_RTC_ADDR, 0);
}
//TODO: IDF-4714
void bootloader_random_disable(void)
{
ESP_LOGW(TAG, "RNG for ESP32-S3 not currently supported"); // IDF-1878
/* Restore internal I2C bus state */
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_ENCAL_REF_ADDR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_ENT_TSENS_ADDR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_ENT_RTC_ADDR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_DTEST_RTC_ADDR, 0);
//Power off SAR ADC
REG_SET_FIELD(SENS_SAR_POWER_XPD_SAR_REG, SENS_FORCE_XPD_SAR, 0);
//return to ADC RTC controller
CLEAR_PERI_REG_MASK(SENS_SAR_MEAS1_MUX_REG, SENS_SAR1_DIG_FORCE);
//Invalidate ADC digital trigger timer
CLEAR_PERI_REG_MASK(APB_SARADC_CTRL2_REG, APB_SARADC_TIMER_EN);
//Disable ADC digital part
CLEAR_PERI_REG_MASK(SYSTEM_PERIP_CLK_EN0_REG, SYSTEM_APB_SARADC_CLK_EN);
//Hold reset bit for ADC digital part
SET_PERI_REG_MASK(SYSTEM_PERIP_RST_EN0_REG, SYSTEM_APB_SARADC_RST);
/* Note: the 8M CLK entropy source continues running even after this function is called,
but as mentioned above it's better to enable Wi-Fi or BT or call bootloader_random_enable()
in order to get a secondary entropy source.
*/
}

View File

@ -78,6 +78,7 @@
#include "bootloader_console.h"
#include "bootloader_soc.h"
#include "esp_efuse.h"
#include "esp_fault.h"
static const char *TAG = "boot";
@ -269,9 +270,16 @@ static esp_err_t write_otadata(esp_ota_select_entry_t *otadata, uint32_t offset,
static bool check_anti_rollback(const esp_partition_pos_t *partition)
{
#ifdef CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
esp_app_desc_t app_desc;
esp_app_desc_t app_desc = {};
esp_err_t err = bootloader_common_get_partition_description(partition, &app_desc);
return err == ESP_OK && esp_efuse_check_secure_version(app_desc.secure_version) == true;
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to get partition description %d", err);
return false;
}
bool sec_ver = esp_efuse_check_secure_version(app_desc.secure_version);
/* Anti FI check */
ESP_FAULT_ASSERT(sec_ver == esp_efuse_check_secure_version(app_desc.secure_version));
return sec_ver;
#else
return true;
#endif
@ -284,6 +292,8 @@ static void update_anti_rollback(const esp_partition_pos_t *partition)
esp_err_t err = bootloader_common_get_partition_description(partition, &app_desc);
if (err == ESP_OK) {
esp_efuse_update_secure_version(app_desc.secure_version);
} else {
ESP_LOGE(TAG, "Failed to get partition description %d", err);
}
}
@ -700,7 +710,8 @@ static void set_cache_and_start_app(
uint32_t irom_size,
uint32_t entry_addr)
{
int rc;
int rc __attribute__((unused));
ESP_LOGD(TAG, "configure drom and irom and start");
#if CONFIG_IDF_TARGET_ESP32
Cache_Read_Disable(0);
@ -720,8 +731,8 @@ static void set_cache_and_start_app(
#endif
/* Clear the MMU entries that are already set up,
so the new app only has the mappings it creates.
*/
* so the new app only has the mappings it creates.
*/
#if CONFIG_IDF_TARGET_ESP32
for (int i = 0; i < DPORT_FLASH_MMU_TABLE_SIZE; i++) {
DPORT_PRO_FLASH_MMU_TABLE[i] = DPORT_FLASH_MMU_TABLE_INVALID_VAL;
@ -732,31 +743,33 @@ static void set_cache_and_start_app(
}
#endif
uint32_t drom_load_addr_aligned = drom_load_addr & MMU_FLASH_MASK;
uint32_t drom_addr_aligned = drom_addr & MMU_FLASH_MASK;
uint32_t drom_page_count = bootloader_cache_pages_to_map(drom_size, drom_load_addr);
ESP_LOGV(TAG, "d mmu set paddr=%08x vaddr=%08x size=%d n=%d",
drom_addr & MMU_FLASH_MASK, drom_load_addr_aligned, drom_size, drom_page_count);
drom_addr_aligned, drom_load_addr_aligned, drom_size, drom_page_count);
#if CONFIG_IDF_TARGET_ESP32
rc = cache_flash_mmu_set(0, 0, drom_load_addr_aligned, drom_addr & MMU_FLASH_MASK, 64, drom_page_count);
rc = cache_flash_mmu_set(0, 0, drom_load_addr_aligned, drom_addr_aligned, 64, drom_page_count);
#elif CONFIG_IDF_TARGET_ESP32S2
rc = Cache_Ibus_MMU_Set(MMU_ACCESS_FLASH, drom_load_addr & 0xffff0000, drom_addr & 0xffff0000, 64, drom_page_count, 0);
rc = Cache_Ibus_MMU_Set(MMU_ACCESS_FLASH, drom_load_addr_aligned, drom_addr_aligned, 64, drom_page_count, 0);
#elif CONFIG_IDF_TARGET_ESP32S3
rc = Cache_Dbus_MMU_Set(MMU_ACCESS_FLASH, drom_load_addr & 0xffff0000, drom_addr & 0xffff0000, 64, drom_page_count, 0);
rc = Cache_Dbus_MMU_Set(MMU_ACCESS_FLASH, drom_load_addr_aligned, drom_addr_aligned, 64, drom_page_count, 0);
#elif CONFIG_IDF_TARGET_ESP32C3
rc = Cache_Dbus_MMU_Set(MMU_ACCESS_FLASH, drom_load_addr & 0xffff0000, drom_addr & 0xffff0000, 64, drom_page_count, 0);
rc = Cache_Dbus_MMU_Set(MMU_ACCESS_FLASH, drom_load_addr_aligned, drom_addr_aligned, 64, drom_page_count, 0);
#elif CONFIG_IDF_TARGET_ESP32H2
rc = Cache_Dbus_MMU_Set(MMU_ACCESS_FLASH, drom_load_addr & 0xffff0000, drom_addr & 0xffff0000, 64, drom_page_count, 0);
rc = Cache_Dbus_MMU_Set(MMU_ACCESS_FLASH, drom_load_addr_aligned, drom_addr_aligned, 64, drom_page_count, 0);
#endif
ESP_LOGV(TAG, "rc=%d", rc);
#if CONFIG_IDF_TARGET_ESP32
rc = cache_flash_mmu_set(1, 0, drom_load_addr_aligned, drom_addr & MMU_FLASH_MASK, 64, drom_page_count);
rc = cache_flash_mmu_set(1, 0, drom_load_addr_aligned, drom_addr_aligned, 64, drom_page_count);
ESP_LOGV(TAG, "rc=%d", rc);
#endif
uint32_t irom_load_addr_aligned = irom_load_addr & MMU_FLASH_MASK;
uint32_t irom_addr_aligned = irom_addr & MMU_FLASH_MASK;
uint32_t irom_page_count = bootloader_cache_pages_to_map(irom_size, irom_load_addr);
ESP_LOGV(TAG, "i mmu set paddr=%08x vaddr=%08x size=%d n=%d",
irom_addr & MMU_FLASH_MASK, irom_load_addr_aligned, irom_size, irom_page_count);
irom_addr_aligned, irom_load_addr_aligned, irom_size, irom_page_count);
#if CONFIG_IDF_TARGET_ESP32
rc = cache_flash_mmu_set(0, 0, irom_load_addr_aligned, irom_addr & MMU_FLASH_MASK, 64, irom_page_count);
rc = cache_flash_mmu_set(0, 0, irom_load_addr_aligned, irom_addr_aligned, 64, irom_page_count);
#elif CONFIG_IDF_TARGET_ESP32S2
uint32_t iram1_used = 0;
if (irom_load_addr + irom_size > IRAM1_ADDRESS_LOW) {
@ -767,17 +780,17 @@ static void set_cache_and_start_app(
rc = Cache_Ibus_MMU_Set(MMU_ACCESS_FLASH, IRAM1_ADDRESS_LOW, 0, 64, 64, 1);
REG_CLR_BIT(EXTMEM_PRO_ICACHE_CTRL1_REG, EXTMEM_PRO_ICACHE_MASK_IRAM1);
}
rc = Cache_Ibus_MMU_Set(MMU_ACCESS_FLASH, irom_load_addr & 0xffff0000, irom_addr & 0xffff0000, 64, irom_page_count, 0);
rc = Cache_Ibus_MMU_Set(MMU_ACCESS_FLASH, irom_load_addr_aligned, irom_addr_aligned, 64, irom_page_count, 0);
#elif CONFIG_IDF_TARGET_ESP32S3
rc = Cache_Ibus_MMU_Set(MMU_ACCESS_FLASH, irom_load_addr & 0xffff0000, irom_addr & 0xffff0000, 64, irom_page_count, 0);
rc = Cache_Ibus_MMU_Set(MMU_ACCESS_FLASH, irom_load_addr_aligned, irom_addr_aligned, 64, irom_page_count, 0);
#elif CONFIG_IDF_TARGET_ESP32C3
rc = Cache_Ibus_MMU_Set(MMU_ACCESS_FLASH, irom_load_addr & 0xffff0000, irom_addr & 0xffff0000, 64, irom_page_count, 0);
rc = Cache_Ibus_MMU_Set(MMU_ACCESS_FLASH, irom_load_addr_aligned, irom_addr_aligned, 64, irom_page_count, 0);
#elif CONFIG_IDF_TARGET_ESP32H2
rc = Cache_Ibus_MMU_Set(MMU_ACCESS_FLASH, irom_load_addr & 0xffff0000, irom_addr & 0xffff0000, 64, irom_page_count, 0);
rc = Cache_Ibus_MMU_Set(MMU_ACCESS_FLASH, irom_load_addr_aligned, irom_addr_aligned, 64, irom_page_count, 0);
#endif
ESP_LOGV(TAG, "rc=%d", rc);
#if CONFIG_IDF_TARGET_ESP32
rc = cache_flash_mmu_set(1, 0, irom_load_addr_aligned, irom_addr & MMU_FLASH_MASK, 64, irom_page_count);
rc = cache_flash_mmu_set(1, 0, irom_load_addr_aligned, irom_addr_aligned, 64, irom_page_count);
ESP_LOGV(TAG, "rc=%d", rc);
DPORT_REG_CLR_BIT( DPORT_PRO_CACHE_CTRL1_REG,
(DPORT_PRO_CACHE_MASK_IRAM0) | (DPORT_PRO_CACHE_MASK_IRAM1 & 0) |
@ -865,22 +878,19 @@ esp_err_t bootloader_sha256_hex_to_str(char *out_str, const uint8_t *in_array_he
void bootloader_debug_buffer(const void *buffer, size_t length, const char *label)
{
#if BOOT_LOG_LEVEL >= LOG_LEVEL_DEBUG
assert(length <= 128); // Avoid unbounded VLA size
#if CONFIG_BOOTLOADER_LOG_LEVEL >= 4
const uint8_t *bytes = (const uint8_t *)buffer;
char hexbuf[length * 2 + 1];
hexbuf[length * 2] = 0;
for (size_t i = 0; i < length; i++) {
for (int shift = 0; shift < 2; shift++) {
uint8_t nibble = (bytes[i] >> (shift ? 0 : 4)) & 0x0F;
if (nibble < 10) {
hexbuf[i * 2 + shift] = '0' + nibble;
} else {
hexbuf[i * 2 + shift] = 'a' + nibble - 10;
}
}
}
const size_t output_len = MIN(length, 128);
char hexbuf[128 * 2 + 1];
bootloader_sha256_hex_to_str(hexbuf, bytes, output_len);
hexbuf[output_len * 2] = '\0';
ESP_LOGD(TAG, "%s: %s", label, hexbuf);
#else
(void) buffer;
(void) length;
(void) label;
#endif
}

View File

@ -79,7 +79,7 @@ esp_err_t esp_secure_boot_enable_secure_features(void)
return err;
}
#else
ESP_LOGW(TAG, "Not disabling ROM Download mode - SECURITY COMPROMISED");
ESP_LOGW(TAG, "UART ROM Download mode kept enabled - SECURITY COMPROMISED");
#endif
#ifndef CONFIG_SECURE_BOOT_V2_ALLOW_EFUSE_RD_DIS

View File

@ -23,6 +23,7 @@
#include "soc/extmem_reg.h"
#include "soc/io_mux_reg.h"
#include "soc/system_reg.h"
#include "soc/chip_revision.h"
#include "esp32c3/rom/efuse.h"
#include "esp32c3/rom/spi_flash.h"
#include "esp32c3/rom/cache.h"
@ -38,6 +39,7 @@
#include "bootloader_flash_priv.h"
#include "bootloader_soc.h"
#include "esp_efuse.h"
#include "hal/efuse_hal.h"
static const char *TAG = "boot.esp32c3";
@ -258,7 +260,7 @@ static inline void bootloader_hardware_init(void)
{
// This check is always included in the bootloader so it can
// print the minimum revision error message later in the boot
if (bootloader_common_get_chip_revision() < 3) {
if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 3)) {
REGI2C_WRITE_MASK(I2C_ULP, I2C_ULP_IR_FORCE_XPD_IPH, 1);
REGI2C_WRITE_MASK(I2C_BIAS, I2C_BIAS_DREG_1P1_PVT, 12);
}
@ -271,8 +273,7 @@ static inline void bootloader_ana_reset_config(void)
For ECO2: fix brownout reset bug, support swt & brownout reset;
For ECO3: fix clock glitch reset bug, support all reset, include: swt & brownout & clock glitch reset.
*/
uint8_t chip_version = bootloader_common_get_chip_revision();
switch (chip_version) {
switch (efuse_hal_chip_revision()) {
case 0:
case 1:
//Enable WDT reset. Disable BOR and GLITCH reset

View File

@ -38,7 +38,7 @@ esp_err_t esp_flash_encryption_enable_secure_features(void)
ESP_LOGW(TAG, "Not disabling JTAG - SECURITY COMPROMISED");
#endif
esp_efuse_write_field_bit(ESP_EFUSE_DIS_LEGACY_SPI_BOOT);
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DIRECT_BOOT);
#if defined(CONFIG_SECURE_BOOT_V2_ENABLED) && !defined(CONFIG_SECURE_BOOT_V2_ALLOW_EFUSE_RD_DIS)
// This bit is set when enabling Secure Boot V2, but we can't enable it until this later point in the first boot

View File

@ -16,13 +16,24 @@ static __attribute__((unused)) const char *TAG = "secure_boot";
esp_err_t esp_secure_boot_enable_secure_features(void)
{
esp_efuse_write_field_bit(ESP_EFUSE_DIS_LEGACY_SPI_BOOT);
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DIRECT_BOOT);
#ifdef CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE
ESP_LOGI(TAG, "Enabling Security download mode...");
esp_efuse_write_field_bit(ESP_EFUSE_ENABLE_SECURITY_DOWNLOAD);
esp_err_t err = esp_efuse_enable_rom_secure_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not enable Security download mode...");
return err;
}
#elif CONFIG_SECURE_DISABLE_ROM_DL_MODE
ESP_LOGI(TAG, "Disable ROM Download mode...");
esp_err_t err = esp_efuse_disable_rom_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not disable ROM Download mode...");
return err;
}
#else
ESP_LOGW(TAG, "Not enabling Security download mode - SECURITY COMPROMISED");
ESP_LOGW(TAG, "UART ROM Download mode kept enabled - SECURITY COMPROMISED");
#endif
#ifndef CONFIG_SECURE_BOOT_ALLOW_JTAG

View File

@ -142,7 +142,7 @@ static esp_err_t initialise_flash_encryption(void)
ESP_LOGW(TAG, "Not disabling JTAG - SECURITY COMPROMISED");
#endif
esp_efuse_write_field_bit(ESP_EFUSE_DIS_LEGACY_SPI_BOOT);
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DIRECT_BOOT);
esp_err_t err = esp_efuse_batch_write_commit();
if (err != ESP_OK) {

View File

@ -248,13 +248,25 @@ esp_err_t esp_secure_boot_v2_permanently_enable(const esp_image_metadata_t *imag
return key_state;
}
esp_efuse_write_field_bit(ESP_EFUSE_DIS_LEGACY_SPI_BOOT);
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DIRECT_BOOT);
esp_err_t err = ESP_FAIL;
#ifdef CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE
ESP_LOGI(TAG, "Enabling Security download mode...");
esp_efuse_write_field_bit(ESP_EFUSE_ENABLE_SECURITY_DOWNLOAD);
err = esp_efuse_enable_rom_secure_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not enable Security download mode...");
return err;
}
#elif CONFIG_SECURE_DISABLE_ROM_DL_MODE
ESP_LOGI(TAG, "Disable ROM Download mode...");
err = esp_efuse_disable_rom_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not disable ROM Download mode...");
return err;
}
#else
ESP_LOGW(TAG, "Not enabling Security download mode - SECURITY COMPROMISED");
ESP_LOGW(TAG, "UART ROM Download mode kept enabled - SECURITY COMPROMISED");
#endif
#ifndef CONFIG_SECURE_BOOT_ALLOW_JTAG
@ -272,7 +284,7 @@ esp_err_t esp_secure_boot_v2_permanently_enable(const esp_image_metadata_t *imag
esp_efuse_write_field_bit(ESP_EFUSE_SECURE_BOOT_EN);
esp_err_t err = esp_efuse_batch_write_commit();
err = esp_efuse_batch_write_commit();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Error programming security eFuses (err=0x%x).", err);
return err;

View File

@ -101,6 +101,15 @@ static void update_flash_config(const esp_image_header_t *bootloader_hdr)
case ESP_IMAGE_FLASH_SIZE_16MB:
size = 16;
break;
case ESP_IMAGE_FLASH_SIZE_32MB:
size = 32;
break;
case ESP_IMAGE_FLASH_SIZE_64MB:
size = 64;
break;
case ESP_IMAGE_FLASH_SIZE_128MB:
size = 128;
break;
default:
size = 2;
}
@ -174,6 +183,15 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB";
break;
case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB";
break;
case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB";
break;
case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB";
break;
default:
str = "2MB";
break;

View File

@ -21,9 +21,20 @@ esp_err_t esp_secure_boot_enable_secure_features(void)
#ifdef CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE
ESP_LOGI(TAG, "Enabling Security download mode...");
esp_efuse_write_field_bit(ESP_EFUSE_ENABLE_SECURITY_DOWNLOAD);
esp_err_t err = esp_efuse_enable_rom_secure_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not enable Security download mode...");
return err;
}
#elif CONFIG_SECURE_DISABLE_ROM_DL_MODE
ESP_LOGI(TAG, "Disable ROM Download mode...");
esp_err_t err = esp_efuse_disable_rom_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not disable ROM Download mode...");
return err;
}
#else
ESP_LOGW(TAG, "Not enabling Security download mode - SECURITY COMPROMISED");
ESP_LOGW(TAG, "UART ROM Download mode kept enabled - SECURITY COMPROMISED");
#endif
#ifndef CONFIG_SECURE_BOOT_ALLOW_JTAG

View File

@ -103,6 +103,15 @@ static void update_flash_config(const esp_image_header_t *bootloader_hdr)
case ESP_IMAGE_FLASH_SIZE_16MB:
size = 16;
break;
case ESP_IMAGE_FLASH_SIZE_32MB:
size = 32;
break;
case ESP_IMAGE_FLASH_SIZE_64MB:
size = 64;
break;
case ESP_IMAGE_FLASH_SIZE_128MB:
size = 128;
break;
default:
size = 2;
}
@ -176,6 +185,15 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB";
break;
case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB";
break;
case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB";
break;
case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB";
break;
default:
str = "2MB";
break;
@ -200,6 +218,11 @@ static esp_err_t bootloader_init_spi_flash(void)
}
#endif
#if CONFIG_SPI_FLASH_HPM_ENABLE
// Reset flash, clear volatile bits DC[0:1]. Make it work under default mode to boot.
bootloader_spi_flash_reset();
#endif
bootloader_flash_unlock();
#if CONFIG_ESPTOOLPY_FLASHMODE_QIO || CONFIG_ESPTOOLPY_FLASHMODE_QOUT

View File

@ -39,7 +39,7 @@ esp_err_t esp_flash_encryption_enable_secure_features(void)
ESP_LOGW(TAG, "Not disabling JTAG - SECURITY COMPROMISED");
#endif
esp_efuse_write_field_bit(ESP_EFUSE_DIS_LEGACY_SPI_BOOT);
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DIRECT_BOOT);
#if defined(CONFIG_SECURE_BOOT_V2_ENABLED) && !defined(CONFIG_SECURE_BOOT_V2_ALLOW_EFUSE_RD_DIS)
// This bit is set when enabling Secure Boot V2, but we can't enable it until this later point in the first boot

View File

@ -16,13 +16,24 @@ static __attribute__((unused)) const char *TAG = "secure_boot";
esp_err_t esp_secure_boot_enable_secure_features(void)
{
esp_efuse_write_field_bit(ESP_EFUSE_DIS_LEGACY_SPI_BOOT);
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DIRECT_BOOT);
#ifdef CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE
ESP_LOGI(TAG, "Enabling Security download mode...");
esp_efuse_write_field_bit(ESP_EFUSE_ENABLE_SECURITY_DOWNLOAD);
esp_err_t err = esp_efuse_enable_rom_secure_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not enable Security download mode...");
return err;
}
#elif CONFIG_SECURE_DISABLE_ROM_DL_MODE
ESP_LOGI(TAG, "Disable ROM Download mode...");
esp_err_t err = esp_efuse_disable_rom_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not disable ROM Download mode...");
return err;
}
#else
ESP_LOGW(TAG, "Not enabling Security download mode - SECURITY COMPROMISED");
ESP_LOGW(TAG, "UART ROM Download mode kept enabled - SECURITY COMPROMISED");
#endif
#ifndef CONFIG_SECURE_BOOT_ALLOW_JTAG

View File

@ -31,6 +31,8 @@
#include "esp32h2/rom/secure_boot.h"
#endif
#define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
/* Checking signatures as part of verifying images is necessary:
- Always if secure boot is enabled
- Differently in bootloader and/or app, depending on kconfig
@ -102,7 +104,7 @@ static esp_err_t verify_segment_header(int index, const esp_image_segment_header
while(0)
static esp_err_t process_image_header(esp_image_metadata_t *data, uint32_t part_offset, bootloader_sha256_handle_t *sha_handle, bool do_verify, bool silent);
static esp_err_t process_appended_hash(esp_image_metadata_t *data, uint32_t part_len, bool do_verify, bool silent);
static esp_err_t process_appended_hash_and_sig(esp_image_metadata_t *data, uint32_t part_offset, uint32_t part_len, bool do_verify, bool silent);
static esp_err_t process_checksum(bootloader_sha256_handle_t sha_handle, uint32_t checksum_word, esp_image_metadata_t *data, bool silent, bool skip_check_checksum);
static esp_err_t __attribute__((unused)) verify_secure_boot_signature(bootloader_sha256_handle_t sha_handle, esp_image_metadata_t *data, uint8_t *image_digest, uint8_t *verified_digest);
@ -152,7 +154,7 @@ static esp_err_t image_load(esp_image_load_mode_t mode, const esp_partition_pos_
CHECK_ERR(process_segments(data, silent, do_load, sha_handle, checksum));
bool skip_check_checksum = !do_verify || esp_cpu_in_ocd_debug_mode();
CHECK_ERR(process_checksum(sha_handle, checksum_word, data, silent, skip_check_checksum));
CHECK_ERR(process_appended_hash(data, part->size, do_verify, silent));
CHECK_ERR(process_appended_hash_and_sig(data, part->offset, part->size, do_verify, silent));
if (verify_sha) {
#if (SECURE_BOOT_CHECK_SIGNATURE == 1)
// secure boot images have a signature appended
@ -250,7 +252,11 @@ esp_err_t bootloader_load_image(const esp_partition_pos_t *part, esp_image_metad
#if CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS
mode = ESP_IMAGE_LOAD_NO_VALIDATE;
#elif CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON
if (esp_rom_get_reset_reason(0) == RESET_REASON_CHIP_POWER_ON) {
if (esp_rom_get_reset_reason(0) == RESET_REASON_CHIP_POWER_ON
#if SOC_EFUSE_HAS_EFUSE_RST_BUG
|| esp_rom_get_reset_reason(0) == RESET_REASON_CORE_EFUSE_CRC
#endif
) {
mode = ESP_IMAGE_LOAD_NO_VALIDATE;
}
#endif // CONFIG_BOOTLOADER_SKIP_...
@ -288,7 +294,7 @@ esp_err_t esp_image_get_metadata(const esp_partition_pos_t *part, esp_image_meta
CHECK_ERR(process_segments(metadata, silent, do_load, NULL, NULL));
bool skip_check_checksum = true;
CHECK_ERR(process_checksum(NULL, 0, metadata, silent, skip_check_checksum));
CHECK_ERR(process_appended_hash(metadata, part->size, true, silent));
CHECK_ERR(process_appended_hash_and_sig(metadata, part->offset, part->size, true, silent));
return ESP_OK;
err:
return err;
@ -737,7 +743,7 @@ esp_err_t esp_image_verify_bootloader_data(esp_image_metadata_t *data)
data);
}
static esp_err_t process_appended_hash(esp_image_metadata_t *data, uint32_t part_len, bool do_verify, bool silent)
static esp_err_t process_appended_hash_and_sig(esp_image_metadata_t *data, uint32_t part_offset, uint32_t part_len, bool do_verify, bool silent)
{
esp_err_t err = ESP_OK;
if (data->image.hash_appended) {
@ -748,8 +754,34 @@ static esp_err_t process_appended_hash(esp_image_metadata_t *data, uint32_t part
data->image_len += HASH_LEN;
}
if (data->image_len > part_len) {
FAIL_LOAD("Image length %d doesn't fit in partition length %d", data->image_len, part_len);
uint32_t sig_block_len = 0;
const uint32_t end = data->image_len;
#if CONFIG_SECURE_BOOT || CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT
// Case I: Bootloader part
if (part_offset == ESP_BOOTLOADER_OFFSET) {
// For bootloader with secure boot v1, signature stays in an independant flash
// sector (offset 0x0) and does not get appended to the image.
#if CONFIG_SECURE_BOOT_V2_ENABLED
// Sanity check - secure boot v2 signature block starts on 4K boundary
sig_block_len = ALIGN_UP(end, FLASH_SECTOR_SIZE) - end;
sig_block_len += sizeof(ets_secure_boot_signature_t);
#endif
} else {
// Case II: Application part
#if CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME
sig_block_len = sizeof(esp_secure_boot_sig_block_t);
#else
// Sanity check - secure boot v2 signature block starts on 4K boundary
sig_block_len = ALIGN_UP(end, FLASH_SECTOR_SIZE) - end;
sig_block_len += sizeof(ets_secure_boot_signature_t);
#endif
}
#endif // CONFIG_SECURE_BOOT || CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT
const uint32_t full_image_len = end + sig_block_len;
if (full_image_len > part_len) {
FAIL_LOAD("Image length %d doesn't fit in partition length %d", full_image_len, part_len);
}
return err;
err:
@ -810,7 +842,7 @@ static esp_err_t verify_secure_boot_signature(bootloader_sha256_handle_t sha_han
#if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME
// End of the image needs to be padded all the way to a 4KB boundary, after the simple hash
// (for apps they are usually already padded due to --secure-pad-v2, only a problem if this option was not used.)
uint32_t padded_end = (end + FLASH_SECTOR_SIZE - 1) & ~(FLASH_SECTOR_SIZE-1);
uint32_t padded_end = ALIGN_UP(end, FLASH_SECTOR_SIZE);
if (padded_end > end) {
const void *padding = bootloader_mmap(end, padded_end - end);
bootloader_sha256_data(sha_handle, padding, padded_end - end);
@ -901,6 +933,12 @@ int esp_image_get_flash_size(esp_image_flash_size_t app_flash_size)
return 8 * 1024 * 1024;
case ESP_IMAGE_FLASH_SIZE_16MB:
return 16 * 1024 * 1024;
case ESP_IMAGE_FLASH_SIZE_32MB:
return 32 * 1024 * 1024;
case ESP_IMAGE_FLASH_SIZE_64MB:
return 64 * 1024 * 1024;
case ESP_IMAGE_FLASH_SIZE_128MB:
return 128 * 1024 * 1024;
default:
return 0;
}

View File

@ -174,7 +174,12 @@ void esp_flash_encryption_set_release_mode(void)
ESP_LOGE(TAG, "Flash Encryption support not added, abort..");
abort();
#endif
#if CONFIG_SOC_SUPPORTS_SECURE_DL_MODE
esp_efuse_enable_rom_secure_download_mode();
#else
esp_efuse_disable_rom_download_mode();
#endif
esp_efuse_batch_write_commit();
if (esp_get_flash_encryption_mode() != ESP_FLASH_ENC_MODE_RELEASE) {

View File

@ -104,7 +104,8 @@ static esp_err_t check_and_generate_encryption_keys(void)
#endif // CONFIG_SECURE_FLASH_ENCRYPTION_AES256
#endif // CONFIG_IDF_TARGET_ESP32
esp_efuse_block_t blocks[BLOCKS_NEEDED];
/* Initialize all efuse block entries to invalid (max) value */
esp_efuse_block_t blocks[BLOCKS_NEEDED] = {[0 ... BLOCKS_NEEDED-1] = EFUSE_BLK_KEY_MAX};
bool has_key = true;
for (unsigned i = 0; i < BLOCKS_NEEDED; i++) {
bool tmp_has_key = esp_efuse_find_purpose(purposes[i], &blocks[i]);

View File

@ -30,39 +30,6 @@
static const char *TAG = "qio_mode";
typedef unsigned (*read_status_fn_t)(void);
typedef void (*write_status_fn_t)(unsigned);
typedef struct __attribute__((packed))
{
const char *manufacturer;
uint8_t mfg_id; /* 8-bit JEDEC manufacturer ID */
uint16_t flash_id; /* 16-bit JEDEC flash chip ID */
uint16_t id_mask; /* Bits to match on in flash chip ID */
read_status_fn_t read_status_fn;
write_status_fn_t write_status_fn;
uint8_t status_qio_bit;
} qio_info_t;
/* Read 8 bit status using RDSR command */
static unsigned read_status_8b_rdsr(void);
/* Read 8 bit status (second byte) using RDSR2 command */
static unsigned read_status_8b_rdsr2(void);
/* read 16 bit status using RDSR & RDSR2 (low and high bytes) */
static unsigned read_status_16b_rdsr_rdsr2(void);
/* Write 8 bit status using WRSR */
static void write_status_8b_wrsr(unsigned new_status);
/* Write 8 bit status (second byte) using WRSR2 */
static void write_status_8b_wrsr2(unsigned new_status);
/* Write 16 bit status using WRSR */
static void write_status_16b_wrsr(unsigned new_status);
/* Read 8 bit status of XM25QU64A */
static unsigned read_status_8b_xmc25qu64a(void);
/* Write 8 bit status of XM25QU64A */
static void write_status_8b_xmc25qu64a(unsigned new_status);
/* Array of known flash chips and data to enable Quad I/O mode
Manufacturer & flash ID can be tested by running "esptool.py
@ -75,13 +42,14 @@ static void write_status_8b_xmc25qu64a(unsigned new_status);
Searching of this table stops when the first match is found.
*/
const static qio_info_t chip_data[] = {
const bootloader_qio_info_t __attribute__((weak)) bootloader_flash_qe_support_list[] = {
/* Manufacturer, mfg_id, flash_id, id mask, Read Status, Write Status, QIE Bit */
{ "MXIC", 0xC2, 0x2000, 0xFF00, read_status_8b_rdsr, write_status_8b_wrsr, 6 },
{ "ISSI", 0x9D, 0x4000, 0xCF00, read_status_8b_rdsr, write_status_8b_wrsr, 6 }, /* IDs 0x40xx, 0x70xx */
{ "WinBond", 0xEF, 0x4000, 0xFF00, read_status_16b_rdsr_rdsr2, write_status_16b_wrsr, 9 },
{ "GD", 0xC8, 0x6000, 0xFF00, read_status_16b_rdsr_rdsr2, write_status_16b_wrsr, 9 },
{ "XM25QU64A", 0x20, 0x3817, 0xFFFF, read_status_8b_xmc25qu64a, write_status_8b_xmc25qu64a, 6 },
{ "MXIC", 0xC2, 0x2000, 0xFF00, bootloader_read_status_8b_rdsr, bootloader_write_status_8b_wrsr, 6 },
{ "ISSI", 0x9D, 0x4000, 0xCF00, bootloader_read_status_8b_rdsr, bootloader_write_status_8b_wrsr, 6 }, /* IDs 0x40xx, 0x70xx */
{ "WinBond", 0xEF, 0x4000, 0xFF00, bootloader_read_status_16b_rdsr_rdsr2, bootloader_write_status_16b_wrsr, 9 },
{ "GD", 0xC8, 0x6000, 0xFF00, bootloader_read_status_16b_rdsr_rdsr2, bootloader_write_status_16b_wrsr, 9 },
{ "XM25QU64A", 0x20, 0x3817, 0xFFFF, bootloader_read_status_8b_xmc25qu64a, bootloader_write_status_8b_xmc25qu64a, 6 },
{ "TH", 0xcd, 0x6000, 0xFF00, bootloader_read_status_16b_rdsr_rdsr2, bootloader_write_status_16b_wrsr, 9 },
/* Final entry is default entry, if no other IDs have matched.
@ -90,13 +58,13 @@ const static qio_info_t chip_data[] = {
FM25Q32 (QOUT mode only, mfg ID 0xA1, flash IDs including 4016)
BY25Q32 (mfg ID 0x68, flash IDs including 4016)
*/
{ NULL, 0xFF, 0xFFFF, 0xFFFF, read_status_8b_rdsr2, write_status_8b_wrsr2, 1 },
{ NULL, 0xFF, 0xFFFF, 0xFFFF, bootloader_read_status_8b_rdsr2, bootloader_write_status_8b_wrsr2, 1 },
};
#define NUM_CHIPS (sizeof(chip_data) / sizeof(qio_info_t))
#define NUM_CHIPS (sizeof(bootloader_flash_qe_support_list) / sizeof(bootloader_qio_info_t))
static esp_err_t enable_qio_mode(read_status_fn_t read_status_fn,
write_status_fn_t write_status_fn,
static esp_err_t enable_qio_mode(bootloader_flash_read_status_fn_t read_status_fn,
bootloader_flash_write_status_fn_t write_status_fn,
uint8_t status_qio_bit);
/* Generic function to use the "user command" SPI controller functionality
@ -123,9 +91,9 @@ void bootloader_enable_qio_mode(void)
ESP_LOGD(TAG, "Manufacturer ID 0x%02x chip ID 0x%04x", mfg_id, flash_id);
for (i = 0; i < NUM_CHIPS - 1; i++) {
const qio_info_t *chip = &chip_data[i];
const bootloader_qio_info_t *chip = &bootloader_flash_qe_support_list[i];
if (mfg_id == chip->mfg_id && (flash_id & chip->id_mask) == (chip->flash_id & chip->id_mask)) {
ESP_LOGI(TAG, "Enabling QIO for flash chip %s", chip_data[i].manufacturer);
ESP_LOGI(TAG, "Enabling QIO for flash chip %s", bootloader_flash_qe_support_list[i].manufacturer);
break;
}
}
@ -133,16 +101,16 @@ void bootloader_enable_qio_mode(void)
if (i == NUM_CHIPS - 1) {
ESP_LOGI(TAG, "Enabling default flash chip QIO");
}
enable_qio_mode(chip_data[i].read_status_fn,
chip_data[i].write_status_fn,
chip_data[i].status_qio_bit);
enable_qio_mode(bootloader_flash_qe_support_list[i].read_status_fn,
bootloader_flash_qe_support_list[i].write_status_fn,
bootloader_flash_qe_support_list[i].status_qio_bit);
#if SOC_CACHE_SUPPORT_WRAP
bootloader_flash_wrap_set(FLASH_WRAP_MODE_DISABLE);
#endif
}
static esp_err_t enable_qio_mode(read_status_fn_t read_status_fn,
write_status_fn_t write_status_fn,
static esp_err_t enable_qio_mode(bootloader_flash_read_status_fn_t read_status_fn,
bootloader_flash_write_status_fn_t write_status_fn,
uint8_t status_qio_bit)
{
uint32_t status;
@ -190,37 +158,47 @@ static esp_err_t enable_qio_mode(read_status_fn_t read_status_fn,
return ESP_OK;
}
static unsigned read_status_8b_rdsr(void)
unsigned bootloader_read_status_8b_rdsr(void)
{
return bootloader_execute_flash_command(CMD_RDSR, 0, 0, 8);
}
static unsigned read_status_8b_rdsr2(void)
unsigned bootloader_read_status_8b_rdsr2(void)
{
return bootloader_execute_flash_command(CMD_RDSR2, 0, 0, 8);
}
static unsigned read_status_16b_rdsr_rdsr2(void)
unsigned bootloader_read_status_8b_rdsr3(void)
{
return bootloader_execute_flash_command(CMD_RDSR3, 0, 0, 8);
}
unsigned bootloader_read_status_16b_rdsr_rdsr2(void)
{
return bootloader_execute_flash_command(CMD_RDSR, 0, 0, 8) | (bootloader_execute_flash_command(CMD_RDSR2, 0, 0, 8) << 8);
}
static void write_status_8b_wrsr(unsigned new_status)
void bootloader_write_status_8b_wrsr(unsigned new_status)
{
bootloader_execute_flash_command(CMD_WRSR, new_status, 8, 0);
}
static void write_status_8b_wrsr2(unsigned new_status)
void bootloader_write_status_8b_wrsr2(unsigned new_status)
{
bootloader_execute_flash_command(CMD_WRSR2, new_status, 8, 0);
}
static void write_status_16b_wrsr(unsigned new_status)
void bootloader_write_status_8b_wrsr3(unsigned new_status)
{
bootloader_execute_flash_command(CMD_WRSR3, new_status, 8, 0);
}
void bootloader_write_status_16b_wrsr(unsigned new_status)
{
bootloader_execute_flash_command(CMD_WRSR, new_status, 16, 0);
}
static unsigned read_status_8b_xmc25qu64a(void)
unsigned bootloader_read_status_8b_xmc25qu64a(void)
{
bootloader_execute_flash_command(CMD_OTPEN, 0, 0, 0); /* Enter OTP mode */
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
@ -229,7 +207,7 @@ static unsigned read_status_8b_xmc25qu64a(void)
return read_status;
}
static void write_status_8b_xmc25qu64a(unsigned new_status)
void bootloader_write_status_8b_xmc25qu64a(unsigned new_status)
{
bootloader_execute_flash_command(CMD_OTPEN, 0, 0, 0); /* Enter OTP mode */
esp_rom_spiflash_wait_idle(&g_rom_flashchip);

View File

@ -156,11 +156,11 @@ static esp_err_t check_and_generate_secure_boot_keys(const esp_image_metadata_t
return ret;
}
/* Initialize all efuse block entries to invalid (max) value */
esp_efuse_block_t blocks[SECURE_BOOT_NUM_BLOCKS] = {[0 ... SECURE_BOOT_NUM_BLOCKS-1] = EFUSE_BLK_KEY_MAX};
/* Check if secure boot digests are present */
esp_efuse_block_t blocks[SECURE_BOOT_NUM_BLOCKS];
bool has_secure_boot_digest = false;
for (unsigned i = 0; i < SECURE_BOOT_NUM_BLOCKS; i++) {
blocks[i] = EFUSE_BLK_KEY_MAX;
bool tmp_has_key = esp_efuse_find_purpose(secure_boot_key_purpose[i], &blocks[i]);
if (tmp_has_key) { // For ESP32: esp_efuse_find_purpose() always returns True, need to check whether the key block is used or not.
tmp_has_key &= !esp_efuse_key_block_unused(blocks[i]);
@ -198,6 +198,12 @@ static esp_err_t check_and_generate_secure_boot_keys(const esp_image_metadata_t
}
} else {
for (unsigned i = 0; i < SECURE_BOOT_NUM_BLOCKS; i++) {
/* Check if corresponding digest slot is used or not */
if (blocks[i] == EFUSE_BLK_KEY_MAX) {
ESP_LOGD(TAG, "SECURE_BOOT_DIGEST%d slot is not used", i);
continue;
}
#if SOC_EFUSE_REVOKE_BOOT_KEY_DIGESTS
if (esp_efuse_get_digest_revoke(i)) {
continue;
@ -241,7 +247,7 @@ static esp_err_t check_and_generate_secure_boot_keys(const esp_image_metadata_t
ESP_LOGI(TAG, "%d signature block(s) found appended to the app.", app_key_digests.num_digests);
if (app_key_digests.num_digests > boot_key_digests.num_digests) {
ESP_LOGW(TAG, "App has %d signature blocks but bootloader only has %d. Some keys missing from bootloader?");
ESP_LOGW(TAG, "App has %d signature blocks but bootloader only has %d. Some keys missing from bootloader?", app_key_digests.num_digests, boot_key_digests.num_digests);
}
/* Confirm if at least one public key from the application matches a public key in the bootloader

View File

@ -137,10 +137,13 @@ esp_err_t esp_secure_boot_verify_rsa_signature_block(const ets_secure_boot_signa
#if SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS == 1
int sb_result = ets_secure_boot_verify_signature(sig_block, image_digest, trusted.key_digests[0], verified_digest);
#else
ets_secure_boot_key_digests_t trusted_key_digests;
ets_secure_boot_key_digests_t trusted_key_digests = {0};
for (unsigned i = 0; i < SECURE_BOOT_NUM_BLOCKS; i++) {
trusted_key_digests.key_digests[i] = &trusted.key_digests[i];
}
// Key revocation happens in ROM bootloader.
// Do NOT allow key revocation while verifying application
trusted_key_digests.allow_key_revoke = false;
int sb_result = ets_secure_boot_verify_signature(sig_block, image_digest, &trusted_key_digests, verified_digest);
#endif
if (sb_result != SB_SUCCESS) {

View File

@ -0,0 +1,6 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(test_rtc_custom_section)

View File

@ -0,0 +1,2 @@
| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- |

View File

@ -0,0 +1,2 @@
idf_component_register(SRCS "test_main.c"
INCLUDE_DIRS ".")

View File

@ -0,0 +1,31 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "bootloader_common.h"
#include <stdio.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#define TEST_MAGIC_VALUE 0x42987561
extern rtc_retain_mem_t* bootloader_common_get_rtc_retain_mem(void);
void app_main(void) {
rtc_retain_mem_t* mem = bootloader_common_get_rtc_retain_mem();
uint32_t* _rtc_vars = (uint32_t*) mem->custom;
if (_rtc_vars[0] != TEST_MAGIC_VALUE) {
/* On the first boot, set the data inside the array */
_rtc_vars[0] = TEST_MAGIC_VALUE;
} else {
/* Second boot, the data was saved saved, success */
printf("SUCCESS: data were saved across reboot\n");
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
esp_restart();
}

View File

@ -0,0 +1,3 @@
CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0x10
CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC=y
CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE=0x200

View File

@ -6,7 +6,7 @@ if(CONFIG_BT_ENABLED)
elseif(CONFIG_IDF_TARGET_ESP32C3)
set(srcs "controller/esp32c3/bt.c")
elseif(CONFIG_IDF_TARGET_ESP32S3)
set(srcs "controller/esp32s3/bt.c")
set(srcs "controller/esp32c3/bt.c")
endif()
set(include_dirs common/osi/include)
@ -16,7 +16,7 @@ if(CONFIG_BT_ENABLED)
elseif(CONFIG_IDF_TARGET_ESP32C3)
list(APPEND include_dirs include/esp32c3/include)
elseif(CONFIG_IDF_TARGET_ESP32S3)
list(APPEND include_dirs include/esp32s3/include)
list(APPEND include_dirs include/esp32c3/include)
endif()
list(APPEND priv_include_dirs
@ -38,6 +38,8 @@ if(CONFIG_BT_ENABLED)
"common/osi/buffer.c"
"common/osi/config.c"
"common/osi/fixed_queue.c"
"common/osi/pkt_queue.c"
"common/osi/fixed_pkt_queue.c"
"common/osi/future.c"
"common/osi/hash_functions.c"
"common/osi/hash_map.c"

View File

@ -46,7 +46,8 @@ esp_err_t esp_blufi_send_wifi_conn_report(wifi_mode_t opmode, esp_blufi_sta_conn
arg.wifi_conn_report.softap_conn_num = softap_conn_num;
arg.wifi_conn_report.extra_info = extra_info;
return (btc_transfer_context(&msg, &arg, sizeof(btc_blufi_args_t), btc_blufi_call_deep_copy) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
return (btc_transfer_context(&msg, &arg, sizeof(btc_blufi_args_t), btc_blufi_call_deep_copy,
btc_blufi_call_deep_free) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
esp_err_t esp_blufi_send_wifi_list(uint16_t apCount, esp_blufi_ap_record_t *list)
@ -62,7 +63,8 @@ esp_err_t esp_blufi_send_wifi_list(uint16_t apCount, esp_blufi_ap_record_t *list
arg.wifi_list.apCount = apCount;
arg.wifi_list.list = list;
return (btc_transfer_context(&msg, &arg, sizeof(btc_blufi_args_t), btc_blufi_call_deep_copy) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
return (btc_transfer_context(&msg, &arg, sizeof(btc_blufi_args_t), btc_blufi_call_deep_copy,
btc_blufi_call_deep_free) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
esp_err_t esp_blufi_profile_init(void)
@ -75,7 +77,7 @@ esp_err_t esp_blufi_profile_init(void)
msg.pid = BTC_PID_BLUFI;
msg.act = BTC_BLUFI_ACT_INIT;
return (btc_transfer_context(&msg, NULL, 0, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
return (btc_transfer_context(&msg, NULL, 0, NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
esp_err_t esp_blufi_profile_deinit(void)
@ -88,7 +90,7 @@ esp_err_t esp_blufi_profile_deinit(void)
msg.pid = BTC_PID_BLUFI;
msg.act = BTC_BLUFI_ACT_DEINIT;
return (btc_transfer_context(&msg, NULL, 0, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
return (btc_transfer_context(&msg, NULL, 0, NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
uint16_t esp_blufi_get_version(void)
@ -108,7 +110,7 @@ esp_err_t esp_blufi_send_error_info(esp_blufi_error_state_t state)
msg.act = BTC_BLUFI_ACT_SEND_ERR_INFO;
arg.blufi_err_infor.state = state;
return (btc_transfer_context(&msg, &arg, sizeof(btc_blufi_args_t), NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
return (btc_transfer_context(&msg, &arg, sizeof(btc_blufi_args_t), NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
esp_err_t esp_blufi_send_custom_data(uint8_t *data, uint32_t data_len)
@ -126,6 +128,7 @@ esp_err_t esp_blufi_send_custom_data(uint8_t *data, uint32_t data_len)
arg.custom_data.data = data;
arg.custom_data.data_len = data_len;
return (btc_transfer_context(&msg, &arg, sizeof(btc_blufi_args_t), btc_blufi_call_deep_copy) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
return (btc_transfer_context(&msg, &arg, sizeof(btc_blufi_args_t), btc_blufi_call_deep_copy,
btc_blufi_call_deep_free) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
#endif ///BLUFI_INCLUDED == TRUE

View File

@ -57,6 +57,8 @@ typedef enum {
typedef enum {
ESP_BLUFI_STA_CONN_SUCCESS = 0x00,
ESP_BLUFI_STA_CONN_FAIL = 0x01,
ESP_BLUFI_STA_CONNECTING = 0x02,
ESP_BLUFI_STA_NO_IP = 0x03,
} esp_blufi_sta_conn_state_t;
/// BLUFI init status
@ -82,6 +84,9 @@ typedef enum {
ESP_BLUFI_READ_PARAM_ERROR,
ESP_BLUFI_MAKE_PUBLIC_ERROR,
ESP_BLUFI_DATA_FORMAT_ERROR,
ESP_BLUFI_CALC_MD5_ERROR,
ESP_BLUFI_WIFI_SCAN_FAIL,
ESP_BLUFI_MSG_STATE_ERROR,
} esp_blufi_error_state_t;
/**
@ -105,6 +110,12 @@ typedef struct {
bool softap_max_conn_num_set; /*!< is max connection number of softap interface set */
uint8_t softap_channel; /*!< channel of softap interface */
bool softap_channel_set; /*!< is channel of softap interface set */
uint8_t sta_max_conn_retry; /*!< max retry of sta establish connection */
bool sta_max_conn_retry_set; /*!< is max retry of sta establish connection set */
uint8_t sta_conn_end_reason; /*!< reason of sta connection end */
bool sta_conn_end_reason_set; /*!< is reason of sta connection end set */
int8_t sta_conn_rssi; /*!< rssi of sta connection */
bool sta_conn_rssi_set; /*!< is rssi of sta connection set */
} esp_blufi_extra_info_t;
/** @brief Description of an WiFi AP */
@ -114,9 +125,9 @@ typedef struct {
} esp_blufi_ap_record_t;
/// Bluetooth address length
#define ESP_BD_ADDR_LEN 6
#define ESP_BLUFI_BD_ADDR_LEN 6
/// Bluetooth device address
typedef uint8_t esp_bd_addr_t[ESP_BD_ADDR_LEN];
typedef uint8_t esp_blufi_bd_addr_t[ESP_BLUFI_BD_ADDR_LEN];
/**
* @brief BLUFI callback parameters union
@ -147,7 +158,7 @@ typedef union {
* @brief ESP_BLUFI_EVENT_CONNECT
*/
struct blufi_connect_evt_param {
esp_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
esp_blufi_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
uint8_t server_if; /*!< server interface */
uint16_t conn_id; /*!< Connection id */
} connect; /*!< Blufi callback param of ESP_BLUFI_EVENT_CONNECT */
@ -156,7 +167,7 @@ typedef union {
* @brief ESP_BLUFI_EVENT_DISCONNECT
*/
struct blufi_disconnect_evt_param {
esp_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
esp_blufi_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
} disconnect; /*!< Blufi callback param of ESP_BLUFI_EVENT_DISCONNECT */
/* ESP_BLUFI_EVENT_REQ_WIFI_CONNECT */ /* No callback param */

View File

@ -62,6 +62,10 @@
#endif /* #if CLASSIC_BT_INCLUDED */
#endif
#if (BLE_INCLUDED == TRUE)
#include "btc_gap_ble.h"
#endif
#if CONFIG_BLE_MESH
#include "btc_ble_mesh_ble.h"
#include "btc_ble_mesh_prov.h"
@ -77,6 +81,9 @@
#define BTC_TASK_STACK_SIZE (BT_BTC_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE) //by menuconfig
#define BTC_TASK_NAME "BTC_TASK"
#define BTC_TASK_PRIO (BT_TASK_MAX_PRIORITIES - 6)
#define BTC_TASK_WORKQUEUE_NUM (2)
#define BTC_TASK_WORKQUEUE0_LEN (0)
#define BTC_TASK_WORKQUEUE1_LEN (5)
osi_thread_t *btc_thread;
@ -199,24 +206,12 @@ static void btc_thread_handler(void *arg)
break;
}
if (msg->arg) {
osi_free(msg->arg);
}
osi_free(msg);
}
static bt_status_t btc_task_post(btc_msg_t *msg, uint32_t timeout)
{
btc_msg_t *lmsg;
lmsg = (btc_msg_t *)osi_malloc(sizeof(btc_msg_t));
if (lmsg == NULL) {
return BT_STATUS_NOMEM;
}
memcpy(lmsg, msg, sizeof(btc_msg_t));
if (osi_thread_post(btc_thread, btc_thread_handler, lmsg, 0, timeout) == false) {
if (osi_thread_post(btc_thread, btc_thread_handler, msg, 0, timeout) == false) {
return BT_STATUS_BUSY;
}
@ -229,52 +224,61 @@ static bt_status_t btc_task_post(btc_msg_t *msg, uint32_t timeout)
* @param arg paramter
* @param arg_len length of paramter
* @param copy_func deep copy function
* @param free_func deep free function
* @return BT_STATUS_SUCCESS: success
* others: fail
*/
bt_status_t btc_transfer_context(btc_msg_t *msg, void *arg, int arg_len, btc_arg_deep_copy_t copy_func)
bt_status_t btc_transfer_context(btc_msg_t *msg, void *arg, int arg_len, btc_arg_deep_copy_t copy_func,
btc_arg_deep_free_t free_func)
{
btc_msg_t lmsg;
if (msg == NULL) {
btc_msg_t* lmsg;
bt_status_t ret;
// arg XOR arg_len
if ((msg == NULL) || ((arg == NULL) == !(arg_len == 0))) {
BTC_TRACE_WARNING("%s Invalid parameters\n", __func__);
return BT_STATUS_PARM_INVALID;
}
BTC_TRACE_DEBUG("%s msg %u %u %u %p\n", __func__, msg->sig, msg->pid, msg->act, arg);
memcpy(&lmsg, msg, sizeof(btc_msg_t));
if (arg) {
lmsg.arg = (void *)osi_malloc(arg_len);
if (lmsg.arg == NULL) {
return BT_STATUS_NOMEM;
}
memset(lmsg.arg, 0x00, arg_len); //important, avoid arg which have no length
memcpy(lmsg.arg, arg, arg_len);
if (copy_func) {
copy_func(&lmsg, lmsg.arg, arg);
}
} else {
lmsg.arg = NULL;
lmsg = (btc_msg_t *)osi_malloc(sizeof(btc_msg_t) + arg_len);
if (lmsg == NULL) {
BTC_TRACE_WARNING("%s No memory\n", __func__);
return BT_STATUS_NOMEM;
}
return btc_task_post(&lmsg, OSI_THREAD_MAX_TIMEOUT);
memcpy(lmsg, msg, sizeof(btc_msg_t));
if (arg) {
memset(lmsg->arg, 0x00, arg_len); //important, avoid arg which have no length
memcpy(lmsg->arg, arg, arg_len);
if (copy_func) {
copy_func(lmsg, lmsg->arg, arg);
}
}
ret = btc_task_post(lmsg, OSI_THREAD_MAX_TIMEOUT);
if (ret != BT_STATUS_SUCCESS) {
if (copy_func && free_func) {
free_func(lmsg);
}
osi_free(lmsg);
}
return ret;
}
/**
* transfer an message to another module in tha same task.
* @param msg message
* @param arg paramter
* @return BT_STATUS_SUCCESS: success
* others: fail
*/
bt_status_t btc_inter_profile_call(btc_msg_t *msg, void *arg)
bt_status_t btc_inter_profile_call(btc_msg_t *msg)
{
if (msg == NULL) {
return BT_STATUS_PARM_INVALID;
}
msg->arg = arg;
switch (msg->sig) {
case BTC_SIG_API_CALL:
profile_tab[msg->pid].btc_call(msg);
@ -410,7 +414,9 @@ error_exit:;
bt_status_t btc_init(void)
{
btc_thread = osi_thread_create(BTC_TASK_NAME, BTC_TASK_STACK_SIZE, BTC_TASK_PRIO, BTC_TASK_PINNED_TO_CORE, 2);
const size_t workqueue_len[] = {BTC_TASK_WORKQUEUE0_LEN, BTC_TASK_WORKQUEUE1_LEN};
btc_thread = osi_thread_create(BTC_TASK_NAME, BTC_TASK_STACK_SIZE, BTC_TASK_PRIO, BTC_TASK_PINNED_TO_CORE,
BTC_TASK_WORKQUEUE_NUM, workqueue_len);
if (btc_thread == NULL) {
return BT_STATUS_NOMEM;
}
@ -423,6 +429,7 @@ bt_status_t btc_init(void)
#if (BLE_INCLUDED == TRUE)
btc_gap_callback_init();
btc_gap_ble_init();
#endif ///BLE_INCLUDED == TRUE
#if SCAN_QUEUE_CONGEST_CHECK
@ -440,7 +447,9 @@ void btc_deinit(void)
osi_thread_free(btc_thread);
btc_thread = NULL;
#if (BLE_INCLUDED == TRUE)
btc_gap_ble_deinit();
#endif ///BLE_INCLUDED == TRUE
#if SCAN_QUEUE_CONGEST_CHECK
btc_adv_list_deinit();
#endif
@ -459,3 +468,8 @@ int get_btc_work_queue_size(void)
{
return osi_thread_queue_wait_size(btc_thread, 0);
}
osi_thread_t *btc_get_current_thread(void)
{
return btc_thread;
}

View File

@ -28,7 +28,7 @@ typedef struct btc_msg {
uint8_t aid; //application id
uint8_t pid; //profile id
uint8_t act; //profile action, defined in seprerate header files
void *arg; //param for btc function or function param
UINT8 arg[0]; //param for btc function or function param
} btc_msg_t;
typedef struct btc_adv_packet {
@ -100,6 +100,7 @@ typedef struct {
} btc_func_t;
typedef void (* btc_arg_deep_copy_t)(btc_msg_t *msg, void *dst, void *src);
typedef void (* btc_arg_deep_free_t)(btc_msg_t *msg);
#ifdef __cplusplus
extern "C" {
@ -111,25 +112,33 @@ extern "C" {
* @param arg paramter
* @param arg_len length of paramter
* @param copy_func deep copy function
* @param free_func deep free function
* @return BT_STATUS_SUCCESS: success
* others: fail
*/
bt_status_t btc_transfer_context(btc_msg_t *msg, void *arg, int arg_len, btc_arg_deep_copy_t copy_func);
bt_status_t btc_transfer_context(btc_msg_t *msg, void *arg, int arg_len, btc_arg_deep_copy_t copy_func,
btc_arg_deep_free_t free_func);
/**
* transfer an message to another module in tha same task.
* @param msg message
* @param arg paramter
* @return BT_STATUS_SUCCESS: success
* others: fail
*/
bt_status_t btc_inter_profile_call(btc_msg_t *msg, void *arg);
bt_status_t btc_inter_profile_call(btc_msg_t *msg);
bt_status_t btc_init(void);
void btc_deinit(void);
bool btc_check_queue_is_congest(void);
int get_btc_work_queue_size(void);
/**
* get the BTC thread handle
* @return NULL: fail
* others: pointer of osi_thread structure of BTC
*/
osi_thread_t *btc_get_current_thread(void);
#ifdef __cplusplus
}
#endif

View File

@ -144,7 +144,7 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
msg.act = ESP_BLUFI_EVENT_DEINIT_FINISH;
param.deinit_finish.state = ESP_BLUFI_DEINIT_OK;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
break;
}
@ -283,7 +283,7 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
msg.act = ESP_BLUFI_EVENT_INIT_FINISH;
param.init_finish.state = ESP_BLUFI_INIT_OK;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
break;
}
case BTA_GATTS_CONNECT_EVT: {
@ -295,7 +295,7 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
BT_BD_ADDR_HEX(p_data->conn.remote_bda), p_data->conn.server_if,
p_data->conn.reason, p_data->conn.conn_id);
memcpy(blufi_env.remote_bda, p_data->conn.remote_bda, sizeof(esp_bd_addr_t));
memcpy(blufi_env.remote_bda, p_data->conn.remote_bda, ESP_BLUFI_BD_ADDR_LEN);
blufi_env.conn_id = p_data->conn.conn_id;
blufi_env.is_connected = true;
blufi_env.recv_seq = blufi_env.send_seq = 0;
@ -303,11 +303,11 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_BLE_CONNECT;
memcpy(param.connect.remote_bda, p_data->conn.remote_bda, sizeof(esp_bd_addr_t));
memcpy(param.connect.remote_bda, p_data->conn.remote_bda, ESP_BLUFI_BD_ADDR_LEN);
param.connect.conn_id = BTC_GATT_GET_CONN_ID(p_data->conn.conn_id);
conn_id = param.connect.conn_id;
server_if = p_data->conn.server_if;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
break;
}
case BTA_GATTS_DISCONNECT_EVT: {
@ -320,16 +320,22 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
BT_BD_ADDR_HEX(p_data->conn.remote_bda), p_data->conn.server_if,
p_data->conn.reason, p_data->conn.conn_id);
memcpy(blufi_env.remote_bda, p_data->conn.remote_bda, sizeof(esp_bd_addr_t));
memcpy(blufi_env.remote_bda, p_data->conn.remote_bda, ESP_BLUFI_BD_ADDR_LEN);
blufi_env.conn_id = p_data->conn.conn_id;
blufi_env.recv_seq = blufi_env.send_seq = 0;
blufi_env.sec_mode = 0x0;
blufi_env.offset = 0;
if (blufi_env.aggr_buf != NULL) {
osi_free(blufi_env.aggr_buf);
blufi_env.aggr_buf = NULL;
}
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_BLE_DISCONNECT;
memcpy(param.disconnect.remote_bda, p_data->conn.remote_bda, sizeof(esp_bd_addr_t));
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
memcpy(param.disconnect.remote_bda, p_data->conn.remote_bda, ESP_BLUFI_BD_ADDR_LEN);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
break;
}
case BTA_GATTS_OPEN_EVT:
@ -379,8 +385,6 @@ void esp_blufi_send_encap(void *arg)
retry:
if (blufi_env.is_connected == false) {
BTC_TRACE_WARNING("%s ble connection is broken\n", __func__);
osi_free(hdr);
hdr = NULL;
return;
}
if (esp_ble_get_cur_sendable_packets_num(BTC_GATT_GET_CONN_ID(blufi_env.conn_id)) > 0) {
@ -404,7 +408,7 @@ esp_err_t esp_blufi_close(esp_gatt_if_t gatts_if, uint16_t conn_id)
msg.pid = BTC_PID_GATTS;
msg.act = BTC_GATTS_ACT_CLOSE;
arg.close.conn_id = BTC_GATT_CREATE_CONN_ID(gatts_if, conn_id);
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gatts_args_t), NULL)
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gatts_args_t), NULL, NULL)
== BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}

View File

@ -98,7 +98,7 @@ void btc_blufi_report_error(esp_blufi_error_state_t state)
msg.act = ESP_BLUFI_EVENT_REPORT_ERROR;
esp_blufi_cb_param_t param;
param.report_error.state = state;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
}
void btc_blufi_recv_handler(uint8_t *data, int len)
@ -144,6 +144,16 @@ void btc_blufi_recv_handler(uint8_t *data, int len)
if (BLUFI_FC_IS_FRAG(hdr->fc)) {
if (blufi_env.offset == 0) {
/*
blufi_env.aggr_buf should be NULL if blufi_env.offset is 0.
It is possible that the process of sending fragment packet
has not been completed
*/
if (blufi_env.aggr_buf) {
BTC_TRACE_ERROR("%s msg error, blufi_env.aggr_buf is not freed\n", __func__);
btc_blufi_report_error(ESP_BLUFI_MSG_STATE_ERROR);
return;
}
blufi_env.total_len = hdr->data[0] | (((uint16_t) hdr->data[1]) << 8);
blufi_env.aggr_buf = osi_malloc(blufi_env.total_len);
if (blufi_env.aggr_buf == NULL) {
@ -163,6 +173,18 @@ void btc_blufi_recv_handler(uint8_t *data, int len)
} else {
if (blufi_env.offset > 0) { /* if previous pkt is frag */
/* blufi_env.aggr_buf should not be NULL */
if (blufi_env.aggr_buf == NULL) {
BTC_TRACE_ERROR("%s buffer is NULL\n", __func__);
btc_blufi_report_error(ESP_BLUFI_DH_MALLOC_ERROR);
return;
}
/* payload length should be equal to total_len */
if ((blufi_env.offset + hdr->data_len) != blufi_env.total_len) {
BTC_TRACE_ERROR("%s payload is longer than packet length, len %d \n", __func__, blufi_env.total_len);
btc_blufi_report_error(ESP_BLUFI_DATA_FORMAT_ERROR);
return;
}
memcpy(blufi_env.aggr_buf + blufi_env.offset, hdr->data, hdr->data_len);
btc_blufi_protocol_handler(hdr->type, blufi_env.aggr_buf, blufi_env.total_len);
@ -321,6 +343,21 @@ static void btc_blufi_wifi_conn_report(uint8_t opmode, uint8_t sta_conn_state, u
*p++ = 1;
*p++ = info->softap_channel;
}
if (info->sta_max_conn_retry_set) {
*p++ = BLUFI_TYPE_DATA_SUBTYPE_STA_MAX_CONN_RETRY;
*p++ = 1;
*p++ = info->sta_max_conn_retry;
}
if (info->sta_conn_end_reason_set) {
*p++ = BLUFI_TYPE_DATA_SUBTYPE_STA_CONN_END_REASON;
*p++ = 1;
*p++ = info->sta_conn_end_reason;
}
if (info->sta_conn_rssi_set) {
*p++ = BLUFI_TYPE_DATA_SUBTYPE_STA_CONN_RSSI;
*p++ = 1;
*p++ = info->sta_conn_rssi;
}
}
if (p - data > data_len) {
BTC_TRACE_ERROR("%s len error %d %d\n", __func__, (int)(p - data), data_len);
@ -714,6 +751,21 @@ void btc_blufi_call_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src)
dst->wifi_conn_report.extra_info->softap_channel = src_info->softap_channel;
dst->wifi_conn_report.extra_info_len += (1 + 2);
}
if (src_info->sta_max_conn_retry_set) {
dst->wifi_conn_report.extra_info->sta_max_conn_retry_set = src_info->sta_max_conn_retry_set;
dst->wifi_conn_report.extra_info->sta_max_conn_retry = src_info->sta_max_conn_retry;
dst->wifi_conn_report.extra_info_len += (1 + 2);
}
if (src_info->sta_conn_end_reason_set) {
dst->wifi_conn_report.extra_info->sta_conn_end_reason_set = src_info->sta_conn_end_reason_set;
dst->wifi_conn_report.extra_info->sta_conn_end_reason = src_info->sta_conn_end_reason;
dst->wifi_conn_report.extra_info_len += (1 + 2);
}
if (src_info->sta_conn_rssi_set) {
dst->wifi_conn_report.extra_info->sta_conn_rssi_set = src_info->sta_conn_rssi_set;
dst->wifi_conn_report.extra_info->sta_conn_rssi = src_info->sta_conn_rssi;
dst->wifi_conn_report.extra_info_len += (1 + 2);
}
break;
}
case BTC_BLUFI_ACT_SEND_WIFI_LIST:{

View File

@ -51,35 +51,35 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
msg.act = ESP_BLUFI_EVENT_SET_WIFI_OPMODE;
param.wifi_mode.op_mode = data[0];
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
break;
case BLUFI_TYPE_CTRL_SUBTYPE_CONN_TO_AP:
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_REQ_CONNECT_TO_AP;
btc_transfer_context(&msg, NULL, 0, NULL);
btc_transfer_context(&msg, NULL, 0, NULL, NULL);
break;
case BLUFI_TYPE_CTRL_SUBTYPE_DISCONN_FROM_AP:
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_REQ_DISCONNECT_FROM_AP;
btc_transfer_context(&msg, NULL, 0, NULL);
btc_transfer_context(&msg, NULL, 0, NULL, NULL);
break;
case BLUFI_TYPE_CTRL_SUBTYPE_GET_WIFI_STATUS:
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_GET_WIFI_STATUS;
btc_transfer_context(&msg, NULL, 0, NULL);
btc_transfer_context(&msg, NULL, 0, NULL, NULL);
break;
case BLUFI_TYPE_CTRL_SUBTYPE_DEAUTHENTICATE_STA:
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_DEAUTHENTICATE_STA;
btc_transfer_context(&msg, NULL, 0, NULL);
btc_transfer_context(&msg, NULL, 0, NULL,NULL);
break;
case BLUFI_TYPE_CTRL_SUBTYPE_GET_VERSION: {
uint8_t type = BLUFI_BUILD_TYPE(BLUFI_TYPE_DATA, BLUFI_TYPE_DATA_SUBTYPE_REPLY_VERSION);
@ -94,13 +94,13 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_RECV_SLAVE_DISCONNECT_BLE;
btc_transfer_context(&msg, NULL, 0, NULL);
btc_transfer_context(&msg, NULL, 0, NULL, NULL);
break;
case BLUFI_TYPE_CTRL_SUBTYPE_GET_WIFI_LIST:
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_GET_WIFI_LIST;
btc_transfer_context(&msg, NULL, 0, NULL);
btc_transfer_context(&msg, NULL, 0, NULL, NULL);
break;
default:
BTC_TRACE_ERROR("%s Unkown Ctrl pkt %02x\n", __func__, type);
@ -125,7 +125,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
msg.act = ESP_BLUFI_EVENT_RECV_STA_BSSID;
memcpy(param.sta_bssid.bssid, &data[0], 6);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
break;
case BLUFI_TYPE_DATA_SUBTYPE_STA_SSID:
msg.sig = BTC_SIG_API_CB;
@ -134,7 +134,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
param.sta_ssid.ssid = &data[0];
param.sta_ssid.ssid_len = len;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy, btc_blufi_cb_deep_free);
break;
case BLUFI_TYPE_DATA_SUBTYPE_STA_PASSWD:
msg.sig = BTC_SIG_API_CB;
@ -143,7 +143,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
param.sta_passwd.passwd = &data[0];
param.sta_passwd.passwd_len = len;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy, btc_blufi_cb_deep_free);
break;
case BLUFI_TYPE_DATA_SUBTYPE_SOFTAP_SSID:
msg.sig = BTC_SIG_API_CB;
@ -152,7 +152,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
param.softap_ssid.ssid = &data[0];
param.softap_ssid.ssid_len = len;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy, btc_blufi_cb_deep_free);
break;
case BLUFI_TYPE_DATA_SUBTYPE_SOFTAP_PASSWD:
msg.sig = BTC_SIG_API_CB;
@ -161,7 +161,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
param.softap_passwd.passwd = &data[0];
param.softap_passwd.passwd_len = len;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy, btc_blufi_cb_deep_free);
break;
case BLUFI_TYPE_DATA_SUBTYPE_SOFTAP_MAX_CONN_NUM:
msg.sig = BTC_SIG_API_CB;
@ -169,7 +169,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
msg.act = ESP_BLUFI_EVENT_RECV_SOFTAP_MAX_CONN_NUM;
param.softap_max_conn_num.max_conn_num = data[0];
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
break;
case BLUFI_TYPE_DATA_SUBTYPE_SOFTAP_AUTH_MODE:
msg.sig = BTC_SIG_API_CB;
@ -177,7 +177,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
msg.act = ESP_BLUFI_EVENT_RECV_SOFTAP_AUTH_MODE;
param.softap_auth_mode.auth_mode = data[0];
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
break;
case BLUFI_TYPE_DATA_SUBTYPE_SOFTAP_CHANNEL:
msg.sig = BTC_SIG_API_CB;
@ -185,7 +185,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
msg.act = ESP_BLUFI_EVENT_RECV_SOFTAP_CHANNEL;
param.softap_channel.channel = data[0];
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
break;
case BLUFI_TYPE_DATA_SUBTYPE_USERNAME:
msg.sig = BTC_SIG_API_CB;
@ -194,7 +194,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
param.username.name = &data[0];
param.username.name_len = len;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy, btc_blufi_cb_deep_free);
break;
case BLUFI_TYPE_DATA_SUBTYPE_CA:
msg.sig = BTC_SIG_API_CB;
@ -203,7 +203,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
param.ca.cert = &data[0];
param.ca.cert_len = len;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy, btc_blufi_cb_deep_free);
break;
case BLUFI_TYPE_DATA_SUBTYPE_CLIENT_CERT:
msg.sig = BTC_SIG_API_CB;
@ -212,7 +212,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
param.client_cert.cert = &data[0];
param.client_cert.cert_len = len;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy, btc_blufi_cb_deep_free);
break;
case BLUFI_TYPE_DATA_SUBTYPE_SERVER_CERT:
msg.sig = BTC_SIG_API_CB;
@ -221,7 +221,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
param.client_cert.cert = &data[0];
param.client_cert.cert_len = len;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy, btc_blufi_cb_deep_free);
break;
case BLUFI_TYPE_DATA_SUBTYPE_CLIENT_PRIV_KEY:
msg.sig = BTC_SIG_API_CB;
@ -230,7 +230,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
param.client_pkey.pkey = &data[0];
param.client_pkey.pkey_len = len;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy, btc_blufi_cb_deep_free);
break;
case BLUFI_TYPE_DATA_SUBTYPE_SERVER_PRIV_KEY:
msg.sig = BTC_SIG_API_CB;
@ -239,7 +239,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
param.client_pkey.pkey = &data[0];
param.client_pkey.pkey_len = len;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy, btc_blufi_cb_deep_free);
break;
case BLUFI_TYPE_DATA_SUBTYPE_CUSTOM_DATA:
msg.sig = BTC_SIG_API_CB;
@ -247,7 +247,7 @@ void btc_blufi_protocol_handler(uint8_t type, uint8_t *data, int len)
msg.act = ESP_BLUFI_EVENT_RECV_CUSTOM_DATA;
param.custom_data.data = &data[0];
param.custom_data.data_len = len;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), btc_blufi_cb_deep_copy, btc_blufi_cb_deep_free);
break;
default:
BTC_TRACE_ERROR("%s Unkown Ctrl pkt %02x\n", __func__, type);

View File

@ -20,7 +20,7 @@
#if (BLUFI_INCLUDED == TRUE)
#define BTC_BLUFI_GREAT_VER 0x01 //Version + Subversion
#define BTC_BLUFI_SUB_VER 0x02 //Version + Subversion
#define BTC_BLUFI_SUB_VER 0x03 //Version + Subversion
#define BTC_BLUFI_VERSION ((BTC_BLUFI_GREAT_VER<<8)|BTC_BLUFI_SUB_VER) //Version + Subversion
typedef UINT8 tGATT_IF;
@ -129,6 +129,9 @@ extern tBLUFI_ENV *blufi_env_ptr;
#define BLUFI_TYPE_DATA_SUBTYPE_WIFI_LIST 0x11
#define BLUFI_TYPE_DATA_SUBTYPE_ERROR_INFO 0x12
#define BLUFI_TYPE_DATA_SUBTYPE_CUSTOM_DATA 0x13
#define BLUFI_TYPE_DATA_SUBTYPE_STA_MAX_CONN_RETRY 0x14
#define BLUFI_TYPE_DATA_SUBTYPE_STA_CONN_END_REASON 0x15
#define BLUFI_TYPE_DATA_SUBTYPE_STA_CONN_RSSI 0x16
#define BLUFI_TYPE_IS_CTRL(type) (BLUFI_GET_TYPE((type)) == BLUFI_TYPE_CTRL)
#define BLUFI_TYPE_IS_DATA(type) (BLUFI_GET_TYPE((type)) == BLUFI_TYPE_DATA)

View File

@ -256,12 +256,12 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
rc = ble_gap_conn_find(event->connect.conn_handle, &desc);
assert(rc == 0);
memcpy(param.connect.remote_bda, desc.peer_id_addr.val, sizeof(esp_bd_addr_t));
memcpy(param.connect.remote_bda, desc.peer_id_addr.val, ESP_BLUFI_BD_ADDR_LEN);
param.connect.conn_id = event->connect.conn_handle;
/* save connection handle */
conn_handle = event->connect.conn_handle;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
}
if (event->connect.status != 0) {
/* Connection failed; resume advertising. */
@ -270,18 +270,25 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
return 0;
case BLE_GAP_EVENT_DISCONNECT:
ESP_LOGI(TAG, "disconnect; reason=%d\n", event->disconnect.reason);
memcpy(blufi_env.remote_bda, event->disconnect.conn.peer_id_addr.val, sizeof(esp_bd_addr_t));
memcpy(blufi_env.remote_bda, event->disconnect.conn.peer_id_addr.val, ESP_BLUFI_BD_ADDR_LEN);
blufi_env.is_connected = false;
blufi_env.recv_seq = blufi_env.send_seq = 0;
blufi_env.sec_mode = 0x0;
blufi_env.offset = 0;
if (blufi_env.aggr_buf != NULL) {
osi_free(blufi_env.aggr_buf);
blufi_env.aggr_buf = NULL;
}
btc_msg_t msg;
esp_blufi_cb_param_t param;
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_BLE_DISCONNECT;
memcpy(param.disconnect.remote_bda, event->disconnect.conn.peer_id_addr.val, sizeof(esp_bd_addr_t));
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
memcpy(param.disconnect.remote_bda, event->disconnect.conn.peer_id_addr.val, ESP_BLUFI_BD_ADDR_LEN);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
return 0;
case BLE_GAP_EVENT_CONN_UPDATE:
@ -412,7 +419,7 @@ void esp_blufi_deinit(void)
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_DEINIT_FINISH;
param.deinit_finish.state = ESP_BLUFI_DEINIT_OK;
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL);
btc_transfer_context(&msg, &param, sizeof(esp_blufi_cb_param_t), NULL, NULL);
}
void esp_blufi_send_notify(void *arg)
@ -420,9 +427,15 @@ void esp_blufi_send_notify(void *arg)
struct pkt_info *pkts = (struct pkt_info *) arg;
struct os_mbuf *om;
om = ble_hs_mbuf_from_flat(pkts->pkt, pkts->pkt_len);
if (om == NULL) {
ESP_LOGE(TAG, "Error in allocating memory");
return;
}
int rc = 0;
rc = ble_gattc_notify_custom(conn_handle, gatt_values[1].val_handle, om);
assert(rc == 0);
rc = ble_gatts_notify_custom(blufi_env.conn_id, gatt_values[1].val_handle, om);
if (rc != 0) {
ESP_LOGE(TAG, "Error in sending notification");
}
}
void esp_blufi_disconnect(void)
@ -437,8 +450,6 @@ void esp_blufi_send_encap(void *arg)
struct blufi_hdr *hdr = (struct blufi_hdr *)arg;
if (blufi_env.is_connected == false) {
BTC_TRACE_WARNING("%s ble connection is broken\n", __func__);
osi_free(hdr);
hdr = NULL;
return;
}
btc_blufi_send_notify((uint8_t *)hdr,

View File

@ -62,6 +62,12 @@
#define BTC_DYNAMIC_MEMORY FALSE
#endif
#if UC_BT_BLUEDROID_MEM_DEBUG
#define HEAP_MEMORY_DEBUG TRUE
#else
#define HEAP_MEMORY_DEBUG FALSE
#endif
#ifndef BT_BLE_DYNAMIC_ENV_MEMORY
#define BT_BLE_DYNAMIC_ENV_MEMORY FALSE
#endif

View File

@ -93,4 +93,11 @@
#define UC_BT_BLUFI_ENABLE FALSE
#endif
//MEMORY DEBUG
#ifdef CONFIG_BT_BLUEDROID_MEM_DEBUG
#define UC_BT_BLUEDROID_MEM_DEBUG TRUE
#else
#define UC_BT_BLUEDROID_MEM_DEBUG FALSE
#endif
#endif /* __BT_USER_CONFIG_H__ */

View File

@ -143,13 +143,13 @@ static void alarm_cb_handler(struct alarm_t *alarm)
OSI_TRACE_WARNING("%s, invalid state %d\n", __func__, alarm_state);
return;
}
btc_msg_t msg;
btc_msg_t msg = {0};
btc_alarm_args_t arg;
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_ALARM;
arg.cb = alarm->cb;
arg.cb_data = alarm->cb_data;
btc_transfer_context(&msg, &arg, sizeof(btc_alarm_args_t), NULL);
btc_transfer_context(&msg, &arg, sizeof(btc_alarm_args_t), NULL, NULL);
}
osi_alarm_t *osi_alarm_new(const char *alarm_name, osi_alarm_callback_t callback, void *data, period_ms_t timer_expire)
@ -173,7 +173,7 @@ osi_alarm_t *osi_alarm_new(const char *alarm_name, osi_alarm_callback_t callback
goto end;
}
esp_timer_create_args_t tca;
esp_timer_create_args_t tca = {0};
tca.callback = (esp_timer_cb_t)alarm_cb_handler;
tca.arg = timer_id;
tca.dispatch_method = ESP_TIMER_TASK;

Some files were not shown because too many files have changed in this diff Show More