Commit graph

8350 commits

Author SHA1 Message Date
Angus Gratton
bfc37ab43f Merge branch 'bugfix/spiflash_read_psram' into 'master'
spi_flash: Fix over-allocation and OOM crash when reading from SPI flash to PSRAM buffers

Closes IDFGH-2698

See merge request espressif/esp-idf!7768
2020-03-03 10:20:15 +08:00
Angus Gratton
95f7b1985b spi_flash: Remove 16KB free internal heap limit for esp_flash_read() into PSRAM
Allocation of the temporary internal buffer will now repeat until a small enough buffer can be
allocated, and only fail if less than a 256 byte block of internal RAM is free.

Adds unit test for the same, and generic test utility for creating memory pressure.
2020-03-03 00:17:27 +00:00
Angus Gratton
fb340940d3 spi_flash: Fix over-allocation and OOM crash when reading from SPI flash to PSRAM buffers
Previously would try allocate buffer of minimum size 16KB not maximum size 16KB, causing
out of memory errors for any large reads, or if less than 16KB contiguous free heap.

Also, if using legacy API and internal allocation failed then implementation would abort()
instead of returning the error to the caller.

Added test for using large buffers in PSRAM.

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

Also reported on forum: https://esp32.com/viewtopic.php?f=13&t=14304&p=55972
2020-03-03 00:17:27 +00:00
morris
580ce8fa4a driver: clean pcnt.h i2s.h 2020-03-02 19:31:29 +08:00
xueyunfei
1dfd4d7c42 add host name in discover packet 2020-03-02 08:18:28 +00:00
Aditya Patwardhan
cc0eec52ff esp_https_server: Fixed a PR which adds support for mutual auth in
https_server
Closes https://github.com/espressif/esp-idf/pull/4184
Closes IDFGH-2004
2020-03-02 12:36:36 +05:30
Maximilian Schmidt
559cd57ea6 Support MutualAuthentication in HTTPsServer 2020-03-02 12:28:30 +05:30
xiehang
299ab1360c eps_wifi: Add wifi stop check at wifi deinit entry 2020-03-02 14:20:28 +08:00
zhangyanjiao
36c726de99 esp_wifi: fix bugs related to espnow and channel set
1. Fix the bug for setting channel when Wi-Fi in NULL mode
2. Fix the espnow crash issue
2020-03-02 11:32:05 +08:00
Renz Christian Bagaporo
eb865008d5 cmake: show error message on encrypted flash targets without proper config 2020-03-02 07:18:22 +05:00
Jiang Jiang Jian
6fd855ab8d Merge branch 'bugfix/IPV6_multicast_adress_error' into 'master'
lw-ip:fix ipv6 bug when input the wrong broadcast

Closes IDF-1226

See merge request espressif/esp-idf!7771
2020-02-29 16:24:19 +08:00
Felipe Neves
98e561b79a heap: added aligned alloc implementation on multi_heap layer 2020-02-28 13:17:34 -03:00
liu zhifu
6fa0ef50d1 esp_wifi: fix S2 WiFi RX filter issue 2020-02-28 21:37:30 +08:00
Jiang Jiang Jian
520ae6543d Merge branch 'bugfix/add_ant_field_for_esp32s2' into 'master'
(S2) WiFi: add ant field for esp32s2 and update phy lib v102 to v202

Closes WIFI-1787 and WIFI-1788

See merge request espressif/esp-idf!7676
2020-02-28 21:17:40 +08:00
baohongde
d2aa4a1e50 components/bt: Fix assert when create conntion cancel 2020-02-28 20:13:41 +08:00
ChenJianxing
a182c0682e (S2) WiFi: add ant field for esp32s2 and update phy lib from v102 to v202 2020-02-28 17:44:21 +08:00
Jiang Jiang Jian
40baff19f8 Merge branch 'bugfix/btdm_div_by_zero_in_slp_clk_conversion' into 'master'
bugfix/btdm_div_by_zero_in_slp_clk_conversion

See merge request espressif/esp-idf!7785
2020-02-28 17:19:40 +08:00
liu zhifu
940b4786c5 esp_wifi: fix the bug that WiFi stop leads to memory leak 2020-02-28 12:06:26 +08:00
xueyunfei
74e690402c fix ipv6 bug when input the wrong broadcast 2020-02-28 12:00:45 +08:00
Angus Gratton
04ccb84b83 Merge branch 'feature/cpu_abstraction' into 'master'
CPU related operations abstraction

See merge request espressif/esp-idf!7301
2020-02-28 11:54:29 +08:00
wangmengyang
3428a1ad0b component/bt: set non-zero initial value for bt sleep clock cycle to avoid div-by-zero error in function "btdm_us_2_lpcycles" when BT modem sleep is not enabled 2020-02-28 11:36:48 +08:00
Mahavir Jain
2187948cf0 Merge branch 'bugfix/use_less_ram_for_esp_event_performance_test' into 'master'
esp_event: reduce event bases registered in performance test

See merge request espressif/esp-idf!7807
2020-02-28 11:25:24 +08:00
Michael (XIAO Xufeng)
ce3ab0b8df Merge branch 'bugfix/nec_example' into 'master'
bugfix in NEC example and low level function

Closes IDFGH-2676 and IDFGH-2689

See merge request espressif/esp-idf!7562
2020-02-28 11:00:50 +08:00
Mahavir Jain
371b3d26ee Merge branch 'feature/https_server_using_wolfssl' into 'master'
Feature/https server using wolfssl

See merge request espressif/esp-idf!7422
2020-02-27 18:57:12 +08:00
Renz Christian Bagaporo
c643f743ce esp_event: halve the events registered in performance test 2020-02-27 15:54:54 +05:00
Mahavir Jain
5f897fd33c Merge branch 'feat/secure_boot_v2_v41' into 'master'
feat/secure_boot_v2: Adding secure boot v2 support to ESP32-ECO3

Closes IDF-799

See merge request espressif/esp-idf!6778
2020-02-27 18:54:08 +08:00
Aditya Patwardhan
c6ad650796 esp_tls_wolfssl: Add support for DER formatted certificates 2020-02-27 15:20:22 +05:30
Aditya Patwardhan
0a25922043 esp_tls_wolfssl: 1) Fix SNI for wolfSSL
2) Fix error captures
3) Add error flags specific wolfSSL
4) make respective changes to esp_err_to_name.c
2020-02-27 15:20:22 +05:30
Aditya Patwardhan
d35862b662 esp-tls: Add support for https_server using wolfSSL 2020-02-27 15:20:22 +05:30
Angus Gratton
26efc5a6d0 bootloader: Set the bootloader optimization level separately to the app
Change the default bootloader config to -Os to save size.

This is a useful feature because it allows switching between debug
and release configs in the app without also needing to account for a
size change in the bootloader.
2020-02-27 14:38:52 +05:30
Angus Gratton
d40c69375c bootloader: Add fault injection resistance to Secure Boot bootloader verification
Goal is that multiple faults would be required to bypass a boot-time signature check.

- Also strengthens some address range checks for safe app memory addresses
- Change pre-enable logic to also check the bootloader signature before enabling SBV2 on ESP32

Add some additional checks for invalid sections:

- Sections only partially in DRAM or IRAM are invalid
- If a section is in D/IRAM, allow the possibility only some is in D/IRAM
- Only pass sections that are entirely in the same type of RTC memory region
2020-02-27 14:37:19 +05:30
Angus Gratton
0dacff4df4 secure boot: Encrypt the bootloader signature when enabling flash encryption + secure boot v2 2020-02-27 14:32:42 +05:30
Jiang Jiang Jian
4bd9c2ff64 Merge branch 'bugfix/fix_beacon_frame_vendor_ie_issue' into 'master'
bugfix: Place the Vendor Specific element at the end according to the protocol

Closes WIFI-705

See merge request espressif/esp-idf!7669
2020-02-27 14:31:45 +08:00
Jiang Jiang Jian
5ab8250bde Merge branch 'feat/ble_mesh_update' into 'master'
ble_mesh: Miscellaneous modifications

Closes BLEMESH-139 and BLEMESH-38

See merge request espressif/esp-idf!7385
2020-02-27 11:34:58 +08:00
Michael (XIAO Xufeng)
7f8c827326 Merge branch 'bugfix/fix_driver_ut_pcnt' into 'master'
bugfix(pcnt): fix driver ut pcnt

See merge request espressif/esp-idf!6891
2020-02-27 11:29:28 +08:00
Renz Christian Bagaporo
d46989efa3 soc: remove param checking in cpu related abstractions 2020-02-27 07:15:15 +05:00
Renz Christian Bagaporo
f75cb2ef00 soc: change cpu stall, unstall, and reset core to not return values 2020-02-27 07:15:15 +05:00
Renz Christian Bagaporo
d5c123c1f5 soc: use own macro to assert proper args for cpu abstractions 2020-02-27 07:15:15 +05:00
Renz Christian Bagaporo
7386ac6d15 esp32s2: remove calls to stall/unstall other core 2020-02-27 07:15:15 +05:00
Renz Christian Bagaporo
7f864d24ad soc: prefer assertions, disabling functions for cpu abstractions
Prefer assertions, making available functions only when caps support it
for cpu-related abstractions.

Changes cpu hal functions to stall, unstall, reset to not accept -1;
instead prefering macros that provide the same functionality.
2020-02-27 07:15:14 +05:00
Renz Christian Bagaporo
cefc71cdcd bootloader_support: mem-related initializations using cpu abstractions 2020-02-27 07:14:21 +05:00
Renz Christian Bagaporo
db608736fb freertos: implement get core id with cpu abstraction 2020-02-27 07:14:21 +05:00
Renz Christian Bagaporo
f3c6320ff6 soc: implement cpu utils in terms of cpu abstractions 2020-02-27 07:14:21 +05:00
Renz Christian Bagaporo
c9a51bfbb2 soc: create abstraction for cpu related operations 2020-02-27 07:14:19 +05:00
Jiang Jiang Jian
ac55328efd Merge branch 'bugfix/fix_sae_test_failure' into 'master'
wpa_supplicant: Fix SAE test-case failure on mbedtls version udpate

See merge request espressif/esp-idf!7792
2020-02-26 22:38:06 +08:00
Sachin Parekh
301dacfb33 Exception handlers for LoadStoreError and LoadStoreAlignmentError
Configurable option to use IRAM as byte accessible memory (in single core mode) using
load-store (non-word aligned and non-word size IRAM access specific) exception handlers.
This allows to use IRAM for use-cases where certain performance penalty
(upto 170 cpu cycles per load or store operation) is acceptable. Additional configuration
option has been provided to redirect mbedTLS specific in-out content length buffers to
IRAM (in single core mode), allows to save 20KB per TLS connection.
2020-02-26 20:21:59 +08:00
Sagar Bijwe
0f1710d878 wpa_supplicant: Fix SAE test-case failure on mbedtls version udpate
Problem:
mbedtls_ctr_drbg_context was initialized in crypto_ec_point_mul. This
was okay in releases before 2.16.4 as entropy_len used to get set to
MBEDTLS_CTR_DRBG_ENTROPY_LEN in function mbedtls_ctr_drbg_seed. The
function is now changed to set the length to
MBEDTLS_CTR_DRBG_ENTROPY_LEN if previous length is 0 and hence the bug.

Solution:
Initialize mbedtls_ctr_drbg_context in crypto_ec_point_mul.
2020-02-26 17:50:08 +05:30
Michael (XIAO Xufeng)
c53192d521 Merge branch 'bugfix/fix_uart_set_line_inverse_breaking_change_issue' into 'master'
Bugfix(uart): fix uart_set_line_inverse breaking change issue

Closes IDFGH-2469

See merge request espressif/esp-idf!7345
2020-02-26 18:34:52 +08:00
Michael (XIAO Xufeng)
9d8e590d86 Merge branch 'fix/spi_flash_legacy_on_esp32s2' into 'master'
spi_flash: fix the reading issue using the ROM functions on ESP32-S2

See merge request espressif/esp-idf!7767
2020-02-26 18:04:51 +08:00
lly
134f57b8e0 ble_mesh: Calc incomplete timeout based on msg info 2020-02-26 17:42:04 +08:00
lly
087bafe5b9 ble_mesh: Start the timer when starting to send the client message 2020-02-26 17:41:46 +08:00
lly
90f8a54a71 ble_mesh: No timeout for client message to non-unicast address 2020-02-26 17:41:30 +08:00
lly
97eca35805 ble_mesh: Unify client application and lower transport layer timeout 2020-02-26 17:41:11 +08:00
lly
e24645c791 ble_mesh: Allow maximum 377 octets payload 2020-02-26 17:40:46 +08:00
lly
828bfeac88 ble_mesh: Reset transport info when node is removed 2020-02-26 17:40:23 +08:00
lly
48343a8a8f ble_mesh: Provisioner ignores msg from removed node 2020-02-26 17:39:55 +08:00
lly
7cd08b5824 ble_mesh: Miscellaneous modifications
1. Add an API to set Provisioner static oob value
2. Add an API to deinit BLE Mesh stack
3. Add an API to set Provisioner unicast address
4. Add an API to provision devices with fixed address
5. Add an API to store node composition data
6. Add an API to get node with device uuid
7. Add an API to get node with unicast address
8. Add an API to delete node with device uuid
9. Add an API to delete node with unicast address
10. Add an API for Provisioner to update local AppKey
11. Add an API for Provisioner to update local NetKey
12. Support Provisioner persistent functionality
13. Fix Provisioner entering IV Update procedure
14. Fix an issue which may cause client failing to send msg
15. Use bt_mesh.flags to indicate device role
16. Remove several useless macros
17. Callback RSSI of received mesh provisioning packets
18. Modify the Provisioner disable function
19. Change some log level from debug to info
20. Add parameters to Provisioner bind AppKey completion event
21. Fix node ignoring relay messages issue
22. Support using a specific partition for BLE Mesh
23. Fix compile warning when proxy related macros are disabled
24. Clean up BLE Mesh stack included header files
25. NULL can be input if client message needs no parameters
26. Fix compile warning when BT log is disabled
27. Initilize BLE Mesh stack local variables
28. Support using PSRAM for BLE Mesh mutex, queue and task
29. Add a menuconfig option to enable using memory from PSRAM
30. Clean up sdkconfig.defaults of BLE Mesh examples
2020-02-26 17:37:44 +08:00
xiongyu
4d5c950770 bugfix(pcnt): fix driver ut pcnt
* Let `[ignore] case` return to freedom

  1) Because this test uses its own ISR, we need to release it with `esp_intr_free` instead of `pcnt_isr_service_uninstall`.

  2) `pcnt_evt_queue` needs to be created before the interrupt is registered and needs to be released at the end of each case.

* Add test support for ESP32S2

* Support chip internal connection, no external wiring required.
2020-02-26 16:52:53 +08:00
Michael (XIAO Xufeng)
160d3bd416 Merge branch 'refactor/i2c_const_and_param_check' into 'master'
I2C: const correctness and better param check

See merge request espressif/esp-idf!7582
2020-02-26 16:06:57 +08:00
Jakob Hasse
3bcc6b48af I2C: i2c.h/i2c.c applied new code formatting 2020-02-26 15:12:03 +08:00
Mahavir Jain
6cc4859d02 Merge branch 'feature/enable_protocomm_tests_for_s2' into 'master'
protocomm: enable test cases for esp32s2 with software AES

Closes IDF-1399

See merge request espressif/esp-idf!7675
2020-02-26 11:23:02 +08:00
michael
f1a4c84e57 GPIO: fix unit test issue on ESP32-S2
Also rename some test variables.
2020-02-26 11:12:09 +08:00
michael
7a3f21636f spi_flash: fix the reading issue using the ROM functions in the ROM 2020-02-26 11:12:09 +08:00
michael
f8fae4c80c spi_flash: resume unit tests for ESP32-S2 2020-02-26 11:12:08 +08:00
Jiang Jiang Jian
02e2c30ba2 Merge branch 'bugfix/hfp_github_issues' into 'master'
Bugfix/hfp github issues

Closes BT-614, BT-639, and BT-633

See merge request espressif/esp-idf!7753
2020-02-25 21:05:56 +08:00
Mahavir Jain
b3e7e61f23 protocomm: enable test cases for esp32s2 with software AES 2020-02-25 18:05:35 +05:30
weitianhua
477e584f7d Bugfix for HFP and some Github issue.
1. Bugfix for AG audio crash (change the return position)
2. Fix the error macro name and error return in hfp_hf demo
3. Fix the annotation error using UTF-8 ' (from Github)
4. Change or remove the log in SCO related code region.
5. Correct error of introduction of a function.
2020-02-25 18:03:54 +08:00
Michael (XIAO Xufeng)
8f496a0f96 Merge branch 'refactor/add_ll_for_clock_gate_operation' into 'master'
periph_ctrl: move target specific into ll files

See merge request espressif/esp-idf!7733
2020-02-25 16:56:30 +08:00
Jiang Jiang Jian
cc7b5ed6d2 Merge branch 'feature/resume_several_tests_on_esp32s2' into 'master'
Resume several tests on esp32s2

Closes IDF-1013, IDF-1025, and IDF-1030

See merge request espressif/esp-idf!7751
2020-02-25 14:28:14 +08:00
ronghulin
9afdcb2c70 bugfix: Place the Vendor Specific element at the end according to the protocol 2020-02-25 14:18:50 +08:00
Mahavir Jain
33cdd09385 Merge branch 'bugfix/ota_with_redirection' into 'master'
Fix OTA in case of a redirection

See merge request espressif/esp-idf!7596
2020-02-25 13:08:00 +08:00
Supreet Deshpande
a9ccc5e5c8 feat/secure_boot_v2: Adding secure boot v2 support for ESP32-ECO3 2020-02-25 01:28:22 +05:30
Shubham Kulkarni
63cd95d236 esp_https_ota.c: Add errno check for WiFi disconnection while performing OTA 2020-02-24 16:53:40 +05:30
Shubham Kulkarni
4d40f94168 OTA: Add fix in case of URL redirection and a test case of URL redirection
Closes https://github.com/espressif/esp-idf/issues/4780
2020-02-24 16:53:27 +05:30
morris
e9717fc07b periph_ctrl: move target specific into ll files 2020-02-24 14:50:26 +08:00
Jakob Hasse
d230d44e2d I2C: const correctness, checking SDA/SCL GPIOs
* const correctness in i2c_slave_write_buffer()
* i2c_set_pin() additionally checks whether
  SDA and SCL pins are the same number
2020-02-24 14:30:28 +08:00
morris
2227e2505b resume wifi init test on esp32s2 2020-02-24 14:03:25 +08:00
morris
ea8d6318af add SOC_EMAC_SUPPORTED in soc_caps.h 2020-02-24 11:57:58 +08:00
Jiang Jiang Jian
c65b67115a Merge branch 'bugfix/wifi_run_modem_sleep_on_esp32s2' into 'master'
esp_wifi: run modem sleep on ESP32S2

Closes WIFI-1767

See merge request espressif/esp-idf!7682
2020-02-24 11:44:37 +08:00
houwenxiang
c07e4c775d driver(uart): fix uart_set_line_inverse breaking change issue
closes https://github.com/espressif/esp-idf/issues/4581
2020-02-24 11:36:31 +08:00
Jiang Jiang Jian
7092613eea Merge branch 'bugfix/btdm_check_EXT_CRYS_state_for_sleep_clk' into 'master'
bugfix/btdm_check_EXT_CRYS_state_for_sleep_clk

Closes BT-582

See merge request espressif/esp-idf!7439
2020-02-21 21:21:54 +08:00
Xia Xiaotian
6faaa0ea6b esp_wifi: run modem sleep on ESP32S2 2020-02-21 19:58:41 +08:00
Ivan Grokhotkov
5ccfc332ea Merge branch 'feature/nvs_erase_check_init' into 'master'
NVS Flash: prevent erasing initialized partition

See merge request espressif/esp-idf!7615
2020-02-21 17:47:45 +08:00
Jiang Jiang Jian
e2d8f81ef5 Merge branch 'bugfix/fix_esp32s2_chip_version_name' into 'master'
wifi: Change esp32s2beta dirname to esp32s2 in wifi-lib

See merge request espressif/esp-idf!7654
2020-02-21 17:45:08 +08:00
Jiang Jiang Jian
d3d4746bb7 Merge branch 'bugfix/add_option_to_ipv6_stateless_address_configuration' into 'master'
lw-ip: Add option to ipv6 stateless address configuration

See merge request espressif/esp-idf!7697
2020-02-21 14:53:03 +08:00
Ivan Grokhotkov
b90a68f89b Merge branch 'bugfix/esp32s2_trax' into 'master'
xtensa: add TRAX support for esp32s2

Closes IDF-1408

See merge request espressif/esp-idf!7683
2020-02-21 09:58:15 +08:00
Fu Zhi Bo
7a5b67b8de rtcio: fix rtcio unhold function
Solve problems caused by code refactoring.

Closes https://github.com/espressif/esp-idf/issues/4600
2020-02-20 15:42:28 +08:00
Sagar Bijwe
bbd0ff5347 wifi: Change esp32s2beta dirname to esp32s2 in wifi-lib 2020-02-20 06:57:10 +00:00
wangmengyang
d6e672ed51 component/bt: fall back to main XTAL as Bluetooth sleep clock when EXT 32K CRYS is configured but not detected 2020-02-20 14:34:28 +08:00
xiehang
a4b16213ad lw-ip: Add option to ipv6 stateless address configuration 2020-02-20 14:30:21 +08:00
Jiang Jiang Jian
959b0295f3 Merge branch 'bugfix/coex_a2dp_stuck_after_creating_anther_connection' into 'master'
components/coex: Fix a2dp stuck after creating another connection

See merge request espressif/esp-idf!7651
2020-02-20 14:15:22 +08:00
Jiang Jiang Jian
a512d6e15a Merge branch 'bugfix/coex_fix_misspell_in_kconfig' into 'master'
components/coex: Fix misspell in Kconfig

See merge request espressif/esp-idf!7670
2020-02-20 14:15:04 +08:00
Jiang Jiang Jian
adf10e4469 Merge branch 'bugfix/btdm_role_switch' into 'master'
Fix bugs about role switch

Closes BT-458 and BT-482

See merge request espressif/esp-idf!6878
2020-02-20 13:39:25 +08:00
Jakob Hasse
c6deffb8a2 NVS Flash: prevent erasing initialized partition
Closes https://github.com/espressif/esp-idf/issues/4755
Closes https://github.com/espressif/esp-idf/issues/2777

* nvs_flash_erase_partition() checks whether
  the parition in question is initialized
  already and will return an error if so
* reflect changes in the documentation
2020-02-19 18:16:04 +01:00
Michael (XIAO Xufeng)
fa4eba2e34 Merge branch 'bugfix/add_missing_ledc_set_pin_declaration' into 'master'
Bugfix (LEDC): Add missing ledc_set_pin declaration

Closes IDFGH-2546

See merge request espressif/esp-idf!7344
2020-02-20 00:22:43 +08:00
Ivan Grokhotkov
8fec484d2b xtensa: add TRAX support for esp32s2 2020-02-19 14:02:14 +01:00
baohongde
d11a86076f Fix bugs about role switch
Jitter in FHS
Jitter in first PULL
Receive EDR packet fail after role switch
2020-02-19 20:14:47 +08:00
Ivan Grokhotkov
40cff27053 Merge branch 'feature/esp32s2_pm' into 'master'
esp32s2: power management (DFS and auto light sleep)

Closes IDF-670, IDF-527, and IDFGH-231

See merge request espressif/esp-idf!7578
2020-02-19 18:26:33 +08:00
Ivan Grokhotkov
32ea031b19 Merge branch 'bugfix/bootloader_custom_console_pins' into 'master'
Fix bootloader build if custom UART pins are used (Github PR + ESP32-S2 + test)

See merge request espressif/esp-idf!7665
2020-02-19 16:56:15 +08:00
Paul Abbott
b75e3de447 Bugfix(LEDC): Add missing ledc_set_pin declaration in led.h
Merges https://github.com/espressif/esp-idf/pull/4632
2020-02-19 16:02:33 +08:00