Commit Graph

9631 Commits

Author SHA1 Message Date
wangcheng
9c7896f2c2 components/bt: Fixed the problem of incomplete data packets caused by disordered acl data packets 2020-06-13 14:25:51 +08:00
wangcheng
d767adcbfa components/bt: Consider link_xmit_data_q in congest events to prevent excessive memory usage 2020-06-13 14:22:30 +08:00
Marius Vikhammer
0049385850 websocket: add configurable timeout for PONG not received
Closes IDF-1744
2020-06-12 09:43:29 +00:00
Angus Gratton
1c09cb6769 Merge branch 'bugfix/doc_macro_definitions' into 'master'
doc: Fix macro definitions for different targets

See merge request espressif/esp-idf!8999
2020-06-12 16:37:41 +08:00
Michael (XIAO Xufeng)
fed1ab5f3e Merge branch 'bugfix/tusb_configure_pins' into 'master'
usb: fixed a typo in configure_pins

See merge request espressif/esp-idf!8992
2020-06-12 13:51:02 +08:00
Mahavir Jain
d7e33d60fa Merge branch 'feature/httpd_low_level_apis' into 'master'
esp_http_server: Expose low level socket send/recv APIs

Closes IDFGH-1910

See merge request espressif/esp-idf!9084
2020-06-12 13:40:02 +08:00
Angus Gratton
8193b188e8 driver: Fix some doxygen warnings 2020-06-12 14:31:37 +10:00
morris
7232bc8360 xtensa: add CPU overlay files for esp32s3 2020-06-12 11:41:23 +08:00
morris
0daff849a4 esp_rom: remove unsupported library on esp32s2
Closes https://github.com/espressif/esp-idf/issues/5434
2020-06-11 21:40:08 +08:00
morris
be91b7c52e esp_rom: add esp32s3 rom headers 2020-06-11 21:40:08 +08:00
morris
9cc0f33ed5 esp_rom: add esp32s3 rom symbols 2020-06-11 21:40:08 +08:00
morris
067b1b91c2 global: add new target name: esp32-s3
add target name, chip ID, toochain descriptions for ESP32-S3
2020-06-11 21:40:08 +08:00
lly
a0f1a43edc ble_mesh: Remove boolean type definitions 2020-06-11 16:17:49 +08:00
Nikolaos Strikos
c04cfc2545 ble_mesh: Do not #define bool when compiling in C++ 2020-06-11 16:13:26 +08:00
chenjianqiang
c11621e64e timer: add return task awoken for timer callback 2020-06-11 16:02:55 +08:00
Anton Maklakov
bb5d07b23e Merge branch 'bugfix/gen_crt_py3_utf' into 'master'
Fixes issues encoding issues python3 scripts for unicode chars

See merge request espressif/esp-idf!9094
2020-06-11 10:40:54 +08:00
Piyush Shah
24587ccbbf esp_http_server: Expose low level socket send/recv APIs
For some advanced use cases, the low level APIs may be useful.
2020-06-11 01:56:47 +00:00
houwenxiang
61e3259f22 Driver(UART): fix uart_read_byte and uart_write_byte different in buffer type issue. 2020-06-10 16:22:06 +08:00
Angus Gratton
067ce3ef32 Merge branch 'bugfix/bootloader_skip_verify_jtag' into 'master'
bootloader_support: don't check signature when JTAG is attached

Closes IDFGH-2816 and IDFGH-2660

See merge request espressif/esp-idf!7865
2020-06-10 16:09:32 +08:00
Angus Gratton
e29c9d331f Merge branch 'bugfix/esp32s2_define_correct_size_for_rtc_fast_mem' into 'master'
esp32s2: Fix missed features CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP and...

Closes IDF-1800

See merge request espressif/esp-idf!9031
2020-06-10 16:04:41 +08:00
Angus Gratton
6a838c2eaf Merge branch 'feature/efuse_esp32s2_add_fields_in_table' into 'master'
efuse: Add some fields in efuse_table and update esp_efuse_get_pkg_ver()

Closes IDF-1077

See merge request espressif/esp-idf!9104
2020-06-10 16:01:25 +08:00
Marius Vikhammer
b75edc84e3 esp32s2 SHA: fallback to hashing block by block for non DMA memory
Also adds unit test for SHA with input buffer in flash

Closes IDF-1529
2020-06-10 15:09:20 +08:00
ronghulin
2c599137b9 bugfix: fix interrupt handle param variable error
Closes https://github.com/espressif/esp-idf/issues/5354
2020-06-09 17:35:41 +08:00
KonstantinKondrashov
0c7e13f0cd newlib: Fix adjtime, returns the amount of time remaining from any previous adjustment
If the olddelta argument is not a null pointer, the adjtime function returns information
about any previous time adjustment that has not yet completed.

Closes: https://github.com/espressif/esp-idf/issues/5194
2020-06-08 22:57:38 +08:00
KonstantinKondrashov
5cfdf1aa70 efuse: Add some fields in efuse_table and update esp_efuse_get_pkg_ver()
Closes: IDF-1077
2020-06-08 22:35:08 +08:00
Marius Vikhammer
c343323863 Fixes issues with gen_crt_bundle.py for unicode chars
gen_crt_bundle.py could fail to parse the certificates if it contained a non-ascii character.
2020-06-08 18:27:03 +08:00
Ivan Grokhotkov
e3640301ee Merge branch 'bugfix/cleanup_ext0_wakeup_setup' into 'master'
esp32: disable ext0 wakeup source after test

Closes IDF-1660

See merge request espressif/esp-idf!8745
2020-06-08 15:57:54 +08:00
Ivan Grokhotkov
58e1100473 Merge branch 'bugfix/cast_int_to_size_t_in_cpu_ll' into 'master'
soc: cast int to size_t in cpu_ll

Closes IDFGH-3352

See merge request espressif/esp-idf!9077
2020-06-08 15:40:42 +08:00
Jiang Jiang Jian
ee5a630ee6 Merge branch 'bugfix/esp32_can_not_scan_ap_after_restart' into 'master'
wifi: upadte esp32 phy lib to 4182

Closes WIFI-2433

See merge request espressif/esp-idf!9073
2020-06-08 14:38:18 +08:00
Jiang Jiang Jian
82448f1bc1 Merge branch 'bugfix/supplicant_mbedtls_rsa_apis' into 'master'
wpa_supplicant: Replace internal RSA APIs by mbedtls APIs

See merge request espressif/esp-idf!8099
2020-06-08 14:37:33 +08:00
Michael (XIAO Xufeng)
1a6191debe Merge branch 'bugfix/fix_ledc_unable_to_work_in_light_sleep_mode' into 'master'
bugfix (Ledc):  fix the bug that ledc low-speed channel can not work when chip in light-sleep mode

See merge request espressif/esp-idf!8392
2020-06-08 14:25:43 +08:00
kapil.gupta
1cabd06f0c wpa_supplicant: Replace internal RSA APIs by mbedtls APIs
Curretly wpa_supplicant uses internal APIs for RSA operations
which internally uses lots of big num operations.

Big num operations are CPU expensive and can take a lot of time
which can cause watchdog timer to tigger.

This can be optimize by using mbedtls APIs which uses
hardware blocks for big num operations.

To fix this, write new crypto_mbedtls-rsa.c which has APIs
similar to crypto_internal-rsa.c but uses mbedtls APIs.
2020-06-07 15:31:12 +00:00
Ivan Grokhotkov
8526cb577c Merge branch 'bugfix/coredump_workaround_esp32s2_sha256_support' into 'master'
Limit coredump SHA256 support for ESP32 only

See merge request espressif/esp-idf!8817
2020-06-05 22:14:46 +08:00
chenjianqiang
3ecbb59c15 psram: fix 16mbit psram id read error 2020-06-05 21:06:21 +08:00
Mahavir Jain
05da91f0db spi_flash: add configuration option to select flash write chunk size
Flash write operation is broken down into smaller chunk writes. Size
of this chunk was previously set to 8K but that in-turn meant cache and
non-IRAM resident interrupts could stay disabled upto ~24msec for 8K flash
write operation. If chunk size is brought down to 256 (typical flash page size)
then it brings down cache and non-IRAM interrupts disable duration to ~1msec.

Fix here keeps defaults same but provides configuration option to tweak the
setting based on application requirement.
2020-06-05 14:45:41 +05:30
zhangyanjiao
6f5e9398f7 esp_wifi: upadte esp32 phy lib to 4182
Closes https://github.com/espressif/esp-idf/issues/5323
2020-06-05 17:07:18 +08:00
Mahavir Jain
790aecfc6a Merge branch 'feature/get_chunk_length' into 'master'
esp_http_client: Add API to get chunk length

Closes IDFGH-3319

See merge request espressif/esp-idf!9074
2020-06-05 15:06:26 +08:00
Li Shuai
72f583dfa7 add soft solution for esp32 eco3 live lock issue 2020-06-05 06:04:18 +00:00
Shubham Kulkarni
de5ee9cc80 esp_http_client: Add API to get chunk length in case of chunked responses
Closes: https://github.com/espressif/esp-idf/issues/5302
2020-06-05 09:57:32 +05:30
kapil.gupta
179292f9b3 esp_wifi: Remove auth_changed event and fix wpa2 authmode threshold
Added following as part of this change
1. Removed auth_changed event
2. Updated doc regarding usage of  WPA/WEP secuiry modes
3. Fixed WPA2 enterprise authmode threshold.
2020-06-04 17:54:26 +05:30
Angus Gratton
8b692c85f1 Merge branch 'test/move_rom_unit_test' into 'master'
move rom unit test && enable intr_alloc test on esp32s2

See merge request espressif/esp-idf!8263
2020-06-04 16:47:25 +08:00
Angus Gratton
9d52318683 Merge branch 'doc/ds_S2' into 'master'
DOC: DS documentation for S2

See merge request espressif/esp-idf!8450
2020-06-04 16:36:13 +08:00
Angus Gratton
3b20e73b67 Merge branch 'bugfix/bootloader_header_align' into 'master'
bootloader: Force bootloader_image_hdr to be word aligned

See merge request espressif/esp-idf!9020
2020-06-04 16:21:12 +08:00
Jiang Jiang Jian
c1bbc94e9d Merge branch 'bugfix/esp32s2_airkiss_fail' into 'master'
fix the bug that ESP32S2 can't receive AMPDU when airkiss

Closes ESPCS-380 and WIFI-2369

See merge request espressif/esp-idf!8740
2020-06-04 11:44:17 +08:00
Jakob Hasse
516680a4ff Doc: DS documentation for S2 2020-06-04 10:49:22 +08:00
David Čermák
d3588f53a7 Merge branch 'feature/pin_ethernet_task_to_core' into 'master'
ethernet: support pin emac task to core

Closes IDFGH-3383

See merge request espressif/esp-idf!8953
2020-06-03 22:26:03 +08:00
Island
b2a0e63ca8 Merge branch 'bugfix/ble_mesh_remove_relay_dependency' into 'master'
ble_mesh: Remove relay option dependency

See merge request espressif/esp-idf!9024
2020-06-03 15:20:24 +08:00
Island
ae2898f12e Merge branch 'bugfix/ble_mesh_rework_prov_pdu_len_check' into 'master'
ble_mesh: Rework prov pdu length check

See merge request espressif/esp-idf!8993
2020-06-03 15:10:14 +08:00
morris
2ccdd7eb10 intr_alloc: using isr version of critical section 2020-06-03 13:16:13 +08:00
morris
d70961ad58 esp32s2: add more unit test for esp32s2
Most of the test cases are copied from esp32
add int_alloc test
add delay test
add random test
2020-06-03 13:16:13 +08:00
morris
783779c870 esp_rom: move rom api test into esp_rom component 2020-06-03 13:16:13 +08:00
Michael (XIAO Xufeng)
099f2706aa Merge branch 'bugfix/fix_adc_dac_conflict' into 'master'
Driver(adc): Disable the synchronization operation function of ADC1 and DAC

Closes IDF-1585

See merge request espressif/esp-idf!8364
2020-06-03 12:41:50 +08:00
Michael (XIAO Xufeng)
1a1b0574ac Merge branch 'bugfix/fix_fifo_cnt_bug' into 'master'
bugfix(uart): fix esp32 uart  fifo_cnt bug

See merge request espressif/esp-idf!8974
2020-06-03 11:44:39 +08:00
Ivan Grokhotkov
f4ea9d4cea freertos: increase configMINIMAL_STACK_SIZE when building with -O0
FreeRTOS scheduler uses additional stack space, as in some functions
variables are placed onto the stack instead of registers.

This issue resulted in occasional stack overflows in dport task, when
compiling at -O0 optimization level.

- Increase the configMINIMAL_STACK_SIZE to 1kB.
- Enable the watchpoint at the end of stack in CI startup test for
  this optimization level.
2020-06-02 18:51:16 +02:00
KonstantinKondrashov
4d66c384a4 esp32s2: Fix missed features CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP and CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC
Defines the correct size for RTC fast memory (the same as for ESP32).

Closes: IDF-1800
2020-06-02 22:55:56 +08:00
Ivan Grokhotkov
614a580bbb freertos, soc: don't lower INTLEVEL when entering critical sections
This fixes the issue where XTOS_SET_INTLEVEL would lower INTLEVEL from
4 to 3, when eTaskGetState is invoked during the core dump, triggered
from the interrupt watchdog.
2020-06-02 15:42:24 +02:00
Ivan Grokhotkov
03bb2774d9 spi_flash: don't call vTaskDelay in non-os context
Fixes regression in core dump, when a crash happens in interrupt
context.
2020-06-02 15:42:24 +02:00
xiongyu
eea38d7698 bugfix(uart): fix esp32 fifo_cnt bug
When using DPort to read fifo, fifo_cnt is not credible, we need to calculate the real cnt based on the fifo read and write pointer. When using AHB to read FIFO, we can use fifo_cnt to indicate the data length in fifo.
2020-06-02 21:38:31 +08:00
lly
5ced2206b4 ble_mesh: Remove relay option dependency
When the relay functionality of a node is not enabled, this
issue will cause the node failing to send messages to fixed
group.
2020-06-02 19:05:16 +08:00
Michael (XIAO Xufeng)
d2bb1e1b75 Merge branch 'bugfix/fix_adc_dac_driver_ut' into 'master'
Driver(adc): fix adc driver and UT

See merge request espressif/esp-idf!8482
2020-06-02 17:46:45 +08:00
Jiang Jiang Jian
c807e9f6af Merge branch 'bugfix/enable_esp32s2_wifi_example' into 'master'
esp_wifi: re-enable build wifi example

Closes WIFI-2384

See merge request espressif/esp-idf!8991
2020-06-02 17:38:22 +08:00
Chen Jian Xing
ebb2caa940 esp_wifi: re-enable build wifi example 2020-06-02 17:38:22 +08:00
Angus Gratton
e6151c4394 bootloader: Force bootloader_image_hdr to be word aligned
Possible due to linker order for this file to be placed unaligned,
causing failure from bootloader_flash_read() function.
2020-06-02 18:13:37 +10:00
Renz Bagaporo
8f8e00ee6c esp32: disable ext0 wakeup source after test 2020-06-02 07:48:07 +00:00
zhangyanjiao
1fe08ef40e wifi: fix the bug that ESP32S2 can't receive AMPDU when airkiss 2020-06-02 14:57:13 +08:00
Jiang Jiang Jian
702f768814 Merge branch 'feature/btdm_add_clear_white_list_API' into 'master'
component/bt: add clear white list API

See merge request espressif/esp-idf!8845
2020-06-02 14:53:30 +08:00
zhiweijian
6d593eb6fc component/bt: add clear white list API 2020-06-02 11:29:51 +08:00
Island
bcbf2f2275 Merge branch 'bugfix/ble_mesh_model_recv_fix' into 'master'
Bugfix/ble mesh model recv fix

See merge request espressif/esp-idf!8988
2020-06-02 11:00:07 +08:00
Island
7c72a0b1f0 Merge branch 'bugfix/ble_mesh_example_nvs_store' into 'master'
Bugfix/ble mesh example nvs store

Closes BMCI-84

See merge request espressif/esp-idf!8972
2020-06-02 10:57:54 +08:00
Ivan Grokhotkov
b40c7c78e3 Merge branch 'feature/nvs_cxx_enums' into 'master'
Enabled enum types for nvs C++ handle

See merge request espressif/esp-idf!8700
2020-06-02 01:13:00 +08:00
Ivan Grokhotkov
44d3efc1db Merge branch 'feature/nvs_allow_custom_part' into 'master'
NVS: allow custom partition

See merge request espressif/esp-idf!8910
2020-06-02 01:12:07 +08:00
KonstantinKondrashov
0b62b28e25 esp32s2: Move some code after the stdout initialization 2020-06-01 20:46:21 +08:00
lly
c6e9d789b7 ble_mesh: Rework prov pdu length check 2020-06-01 20:44:52 +08:00
KonstantinKondrashov
3bb2d581c6 esp32: Reduce using ESP_EARLY_LOGx and move some code after the stdout initialization
After setting _GLOBAL_REENT, ESP_LOGIx can be used instead of ESP_EARLY_LOGx.

Closes: https://github.com/espressif/esp-idf/issues/5343
2020-06-01 20:36:08 +08:00
Andrei Gramakov
50f7678403 usb: fixed a typo in configure_pins 2020-06-01 14:17:15 +02:00
fuzhibo
3cc2d0e9a4 Driver(adc): Disable the synchronization operation function of ADC1 and DAC
Closes IDF-1585
2020-06-01 16:23:47 +08:00
Ivan Grokhotkov
b73a38da9e Merge branch 'bugfix/coredump_memregion_size' into 'master'
coredump: Fixes size of memory region used by espcoredump.py

See merge request espressif/esp-idf!8975
2020-06-01 15:04:45 +08:00
fuzhibo
d90e0e4345 driver(adc): fix unit test for ADC-DMA (test_esp32s2.c); fix unit test for ADC-DMA (test_esp32s2.c); fix commit in adc dirver. 2020-06-01 15:00:08 +08:00
Angus Gratton
33bfe2393a Merge branch 'bugfix/wpa_supplicant_no_hw_mpi' into 'master'
wpa_supplicant: Allow building with mbedTLS integration but no hardware MPI

Closes IDFGH-3344

See merge request espressif/esp-idf!8822
2020-06-01 14:48:06 +08:00
Angus Gratton
8b156a9095 Merge branch 'feature/switch_from_external_to_interanl_ram' into 'master'
esp32: Switch SPIRAM stack in esp_restart_noos() to internal stack

Closes IDFGH-3086

See merge request espressif/esp-idf!8785
2020-06-01 14:39:22 +08:00
lly
e41eae1b07 ble_mesh: correct the return type [Zephyr] 2020-06-01 14:08:21 +08:00
lly
1e29d86dd3 ble_mesh: Add net_buf_simple_init_with_data [Zephyr] 2020-06-01 13:57:41 +08:00
lly
8a8caebf51 ble_mesh: Optimize model recv operations [Zephyr]
Previously the model recv operation is a littl fuzzy.
With the changes, the model recv operation is splitted into:
- find op
- check app_idx
- check dst
- check length
- update info & handle message
2020-06-01 13:57:33 +08:00
Michael (XIAO Xufeng)
a7e0cd656c Merge branch 'bugfix/fix_uart_module_enable_issue' into 'master'
Bugfix (uart): fix uart module reset issue

Closes IDFGH-3370

See merge request espressif/esp-idf!8591
2020-06-01 12:13:31 +08:00
Michael (XIAO Xufeng)
507a5e51f5 Merge branch 'bugfix/freemodbus_fix_event_processing_after_destroy' into 'master'
freemodbus: fix event processing failure after destroy

Closes IDFGH-3283

See merge request espressif/esp-idf!8731
2020-06-01 11:40:58 +08:00
houwenxiang
46713a5275 driver(uart): fix uart module reset issue
On ESP32, due to fifo reset issue, UART2 will work incorrectly if reset the fifo of UART1(TX fifo and RX fifo). The software can workaround the RX fifo reset issue,

        while the TX fifo reset issue can not. When UART2 is used and UART1 is used as the log output port, a software reset can reproduce this issue. So we should reset the UART memory

        before the software reset to solve this problem.
2020-06-01 11:01:26 +08:00
houwenxiang
73384adfbe driver(Ledc): fix the bug that ledc low-sleep channel can not work when chip in light-sleep mode
`esp_light_sleep_start` will disable the RTC8M_CLK, which will cause the LEDC low-speed channel to not work in light-sleep mode
2020-06-01 09:51:32 +08:00
Ivan Grokhotkov
754d631247 partition_table: fix generation of signed partition table
Fixes the issue that signed partition table was not generated when
CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES was on, because
partition_table_bin depended on unsigned_partition_bin twice.
Regression from acb7a211.

Also use final_partition_bin variable in esptool_py_flash_target_image
arguments, to avoid issues in the future if final_partition_bin is
changed.
2020-05-31 18:39:30 +02:00
Ivan Grokhotkov
07bf1e23db bootloader_support: don't check signature when JTAG is attached
If an insecure configuration is enabled (no hardware secure boot, just
software signature check), skip the signature check in bootloader if
JTAG debugger is attached. This allows the debugger to set breakpoints
in Flash before the application runs.

Closes https://github.com/espressif/esp-idf/issues/4734
Closes https://github.com/espressif/esp-idf/issues/4878
2020-05-31 18:14:09 +02:00
Sylvio Alves
1fdc7afeb8 coredump: Limit coredump SHA256 support for ESP32 only 2020-05-29 15:25:29 -03:00
Alexey Gerenkov
cfd65df78a coredump: Fixes size of memory region used by espcoredump.py 2020-05-29 20:53:15 +03:00
lly
9063821f01 ble_mesh: Config and health client btc fixes
Fix an issue which may cause no error code is returned
when sending config client or health client messages
with invalid parameters.
2020-05-29 21:10:13 +08:00
lly
409ea309f9 ble_mesh: Add more checks of net_idx & app_idx 2020-05-29 21:10:13 +08:00
lly
47609970db ble_mesh: Optimize some send & recv logs 2020-05-29 21:10:13 +08:00
morris
1184366387 ethernet: support pin emac task to core 2020-05-29 17:51:37 +08:00
lly
9aae4d3ba3 ble_mesh: Local model (un)subscribes group address 2020-05-29 09:40:19 +00:00
lly
2190c2c368 ble_mesh: Define a macro for invalid company id 2020-05-29 09:40:19 +00:00
Jiang Jiang Jian
e783f148f0 Merge branch 'bugfix/wpa3_auth_coex_issue' into 'master'
Fix WPA3 Auth issue in coex scenario

See merge request espressif/esp-idf!8837
2020-05-29 15:19:59 +08:00
Angus Gratton
baedfab382 Merge branch 'feature/dis_uart_dl_mode' into 'master'
feature: Disable UART download mode

Closes IDF-1386

See merge request espressif/esp-idf!8590
2020-05-29 14:09:54 +08:00
Angus Gratton
59f29cbca8 Merge branch 'feature/allow_rtc_memory_for_task_stacks' into 'master'
Add RTC Fast Memory to Dynamic Memory Pool

See merge request espressif/esp-idf!8390
2020-05-29 14:07:01 +08:00
Mahavir Jain
e8035c3eff Merge branch 'feature/app_update_add_api' into 'master'
Add API to write data in a non-contiguous manner

See merge request espressif/esp-idf!8650
2020-05-29 12:25:54 +08:00
Jiang Jiang Jian
ba48120931 Merge branch 'bugfix/add_so_linger_to_menuconfig' into 'master'
lw-ip:add LINGER to menuconfig

Closes WIFI-2342

See merge request espressif/esp-idf!8746
2020-05-29 11:11:03 +08:00
Angus Gratton
f4edc52fa0 efuse: Have support for secure DL mode depend on a soc_caps flag 2020-05-28 18:02:02 +10:00
Angus Gratton
d45eabe676 esptool: Add support for ESP32-S2 Secure Download Mode
* Pass --no-stub from build system if configured to enable ESP32-S2 Secure Download Mode
* Update esptool submodule
2020-05-28 17:52:15 +10:00
Angus Gratton
f64ae4fa99 efuse: Add 'disable Download Mode' & ESP32-S2 'Secure Download Mode' functionality 2020-05-28 17:50:45 +10:00
Angus Gratton
48d9c14c28 efuse: Add new esp_efuse_read_field_bit() convenience function 2020-05-28 17:45:09 +10:00
Angus Gratton
1dd5a4dba4 efuse: Add new esp_efuse_write_field_bit() convenience function 2020-05-28 17:45:09 +10:00
Angus Gratton
9b822a3d2e esp32s2: Disable legacy boot mode & ROM remap modes if either Secure Boot or Flash Encryption is on 2020-05-28 17:45:09 +10:00
liqigan
6cf659f293 components/bt: Adjust the description of esp_bt_gap_start_discovery and esp_bt_gap_cancel_discovery.
Add some comments to explain why `ESP_BT_GAP_DISC_STATE_CHANGED_EVT` is not reported.
2020-05-28 14:47:51 +08:00
Marius Vikhammer
6bebfc84f3 websocket client: the client now aborts the connection if send fails.
Closes IDF-1744
2020-05-28 06:31:46 +00:00
Nachiket Kukade
2185d96fdc esp_wifi: Update wifi lib
Fix WPA3 Auth issue in coex scenario
2020-05-28 11:20:13 +05:30
Shubham Kulkarni
6a1b3221c4 app_update: Add API to write data in a non contiguous manner 2020-05-28 10:18:55 +05:30
Jiang Jiang Jian
8f2d1e7f92 Merge branch 'bugfix/collection_of_confirmed_fixes_from_baidu_project' into 'master'
Bugfix/collection of confirmed fixes from baidu project

Closes BT-826, BT-542, BCI-31, BCI-34, BT-840, and AUD-1857

See merge request espressif/esp-idf!8675
2020-05-28 12:23:58 +08:00
Island
705fc0f0e5 Merge branch 'bugfix/ble_mesh_check_timer_init' into 'master'
ble_mesh: Check the result of creating timer

Closes BLEMESH-218

See merge request espressif/esp-idf!8932
2020-05-28 10:11:47 +08:00
Michael (XIAO Xufeng)
f81da10951 Merge branch 'bugfix/sdmmc_check_slot_before_pullup' into 'master'
sdmmc: Correctly check function parameters before using them

Closes IDFGH-2967

See merge request espressif/esp-idf!8827
2020-05-27 23:08:01 +08:00
Jiang Jiang Jian
1056d2a1b7 Merge branch 'bugfix/esp32s2_flash_mmap_cache2phys_phys2cache' into 'master'
flash mmap: fix bug for cache2phys and phys2cache on esp32s2

See merge request espressif/esp-idf!8526
2020-05-27 20:20:46 +08:00
Jiang Jiang Jian
ed1c0bf445 Merge branch 'bugfix/rm_tx_buffer_limits' into 'master'
esp_wifi: remove wifi tx buffer limits

See merge request espressif/esp-idf!8933
2020-05-27 20:12:17 +08:00
lly
6768c2b7a1 ble_mesh: Check the result of creating timer 2020-05-27 09:30:34 +00:00
Island
3b85d4ef24 Merge branch 'bugfix/ble_mesh_sync_zephyr_fixes' into 'master'
Bugfix/ble mesh sync zephyr fixes

Closes BLEMESH-215

See merge request espressif/esp-idf!8912
2020-05-27 17:26:00 +08:00
Island
d82f3372a0 Merge branch 'bugfix/ble_mesh_not_use_same_private_key' into 'master'
ble_mesh: Not using pre-initialized private key

Closes BLEMESH-214

See merge request espressif/esp-idf!8905
2020-05-27 17:25:39 +08:00
Island
02376b97d4 Merge branch 'bugfix/ble_mesh_uses_deprecated_config' into 'master'
ble_mesh: Fix using old config for duplicate scan

Closes BLEMESH-213

See merge request espressif/esp-idf!8898
2020-05-27 17:23:55 +08:00
Island
7b12d96169 Merge branch 'bugfix/ble_mesh_comp_data_store_restore' into 'master'
ble_mesh: Same func for storing/restoring comp data

See merge request espressif/esp-idf!8882
2020-05-27 17:23:21 +08:00
ChenJianxing
9e45c3c7d8 esp_wifi: remove wifi tx buffer limits 2020-05-27 15:06:53 +08:00
Jakob Hasse
0e5abaf303 Enabled enum types for nvs C++ handle
Closes https://github.com/espressif/esp-idf/issues/5232
2020-05-27 12:36:48 +08:00
Jakob Hasse
0de732fd0e nvs: unit tests for new partition API 2020-05-27 11:22:32 +08:00
Dmitriy Shilin
de89598779 nvs: allow to specify custom partition
Closes https://github.com/espressif/esp-idf/pull/5172
2020-05-27 11:22:32 +08:00
Jiang Jiang Jian
ff9322e007 Merge branch 'mesh/add_ps_ie_option' into 'master'
mesh: add mesh PS option following add announce

Closes WIFI-2348 and WIFI-2330

See merge request espressif/esp-idf!8826
2020-05-27 11:15:50 +08:00
jiangguangming
92eae20bca add new config items for spiflash ci unit-test 2020-05-26 15:23:38 +08:00
jiangguangming
b25ccde45f flash mmap: fix bug for cache2phys and phys2cache on esp32s2 2020-05-26 15:14:23 +08:00
lly
0cfb6c138b ble_mesh: Transport tx fields overflow [Zephyr]
The transport segmented TX nack and seg_pending fields must be at least
6 bits to avoid overflow for 32 segment messages. This change rearranges
the seg_tx fields to gather all state flag fields in one byte, while
making the counter fields whole bytes.
2020-05-26 11:42:31 +08:00
Angus Gratton
94f5129bf8 mbedtls: Don't compile hardware MPI & SHA files if disabled in config
Fixes bug where hardware accelerated mbedtls_mpi API was always used, even when
disabled in config.
2020-05-26 03:37:46 +00:00
lly
f863a1b328 ble_mesh: Friend with unknown appkey [Zephyr]
Ensures that friend messages are enqueued, even if the packet is
received with an appkey is unknown to the friend. Previously, sdu_recv
would return EINVAL if the appkey was unknown, which would prevent the
lower transport layer from adding the packet to the friend queue. This
is irrelevant for the logic in lower transport, and should not be
returned as an error.
2020-05-26 11:16:01 +08:00
lly
05c287e05c ble_mesh: Not using pre-initialized private key 2020-05-26 10:46:22 +08:00
lly
3c1487be0e ble_mesh: Fix using old config for duplicate scan 2020-05-25 16:48:15 +08:00
Michael (XIAO Xufeng)
0d90861984 Merge branch 'bugfix/fix_rmt_driver_breaking_change_issue' into 'master'
Bugfix(RMT):   Fix the breaking change issue of RMT driver.

Closes IDFGH-2837, IDFGH-2579, and IDFGH-2915

See merge request espressif/esp-idf!8006
2020-05-25 15:27:24 +08:00
Angus Gratton
084e170a8f Merge branch 'refactor/esp_ipc' into 'master'
Split esp_ipc to a seaparate component

Closes IDF-1295

See merge request espressif/esp-idf!8520
2020-05-25 15:03:04 +08:00
Michael (XIAO Xufeng)
b3587ff88c Merge branch 'bugfix/fix_i2s_comm_format_unclear_description_bug' into 'master'
Bugfix(I2S):  Fix i2s_comm_format_t configuration parameter does not match the TRM bug

Closes IDFGH-3040, IDFGH-2913, IDFGH-578, IDFGH-2408, and IDFGH-3117

See merge request espressif/esp-idf!8339
2020-05-25 15:00:10 +08:00
lly
bbbdbb8699 ble_mesh: Same func for storing/restoring comp data 2020-05-25 13:27:08 +08:00
Jiang Jiang Jian
5bb656bd5e Merge branch 'bugfix/bt_universal_calculation' into 'master'
bugfix/correct_bt_mac_calculation

Closes IDFGH-3343

See merge request espressif/esp-idf!8825
2020-05-25 11:57:37 +08:00
Wei Tian Hua
6572959fd3 Add user invisible kconfig for bt mac offset
Closes https://github.com/espressif/esp-idf/issues/5320
2020-05-25 11:57:37 +08:00
xueyunfei
df43a1affc add LINGER to menuconfig 2020-05-25 11:23:03 +08:00
Krzysztof Budzynski
56635f22b8 Merge branch 'doc/add_types_api_ref' into 'master'
doc: add peripheral_types.h as API reference for peripheral docs

Closes DOC-136 and IDF-1673

See merge request espressif/esp-idf!8528
2020-05-25 03:22:22 +08:00
Ivan Grokhotkov
1f734b7057 Merge branch 'feature/native_smp_suport' into 'master'
APP CPU syscall table for gcov handler

See merge request espressif/esp-idf!8350
2020-05-23 20:31:22 +08:00
Island
248db690e1 Merge branch 'bugfix/ble_mesh_provisioner_fail_to_pub' into 'master'
ble_mesh: Fix Provisioner failed to publish

Closes BLEMESH-211

See merge request espressif/esp-idf!8872
2020-05-22 19:14:00 +08:00
Darian Leung
baf06d4971 Increase C++ unit test leak threshold
Heap fragmentation causes 4-8 bytes of memory to be leaked
(due to rounding up of memory sizes). Increase the leak
thresholds to prevent test cases from failing.
2020-05-22 16:39:44 +08:00
KonstantinKondrashov
4275056423 esp32: Switch SPIRAM stack in esp_restart_noos() to internal stack
If esp_restart_noos() is run and the stack address points to external memory (SPIRAM)
then Cache_Read_Disable() raises up the error "Cache disabled but cached memory region accessed"
to fix this we switch stack to internal RAM before disable cache.

Added unit tests.

Closes: https://github.com/espressif/esp-idf/issues/5107
2020-05-22 16:23:53 +08:00
lly
af37aee5bf ble_mesh: Fix Provisioner failed to publish 2020-05-22 15:32:12 +08:00
Anton Maklakov
a9c61dca4e Merge branch 'bugfix/static_analysis_mem_issues' into 'master'
fix minor static analysis memory issues

See merge request espressif/esp-idf!8697
2020-05-22 15:08:20 +08:00
Ivan Grokhotkov
a2d7e8cbba Merge branch 'bugfix/crt_bundle_no_config_file' into 'master'
esp_crt_bundle: fixes the "No CA Chain is set" error

See merge request espressif/esp-idf!8851
2020-05-22 09:34:32 +08:00
Mahavir Jain
6272cb842f Merge branch 'feature/esp_wroom32_se_example' into 'master'
Feature/esp wroom32 se example

See merge request espressif/esp-idf!8552
2020-05-21 19:51:19 +08:00
Aditya Patwardhan
423e600d46 secure_element: atecc608_ecdsa example
* Replaced crypotoauthlib with esp-cryptoauthlib
* Added menuconfig option for esp-tls about using HSM
* Added error codes for HSM in esp-tls,
* Added support to select different type of ATECC608A chips
* Added README, updated docs
* tcp_transport: Added option to enable secure_element for ssl

Closes https://github.com/espressif/esp-idf/issues/4432
2020-05-21 13:08:30 +05:30
Marius Vikhammer
f72d259622 esp_crt_bundle: fixes the "No CA Chain is set" error
When compiling esp_crt_bundle.c, it would end up with a different struct layout due
to configuration options from "mbedtls/esp_config.h" not being considered.

This lead to ca_chain potentially not being set correctly.
2020-05-21 15:19:49 +08:00
Island
9f801fd2f5 Merge branch 'bugfix/ble_mesh_friend_init_flag' into 'master'
ble_mesh: Add init flag for friend init/deinit

Closes BLEMESH-205

See merge request espressif/esp-idf!8783
2020-05-21 11:46:17 +08:00
chenyudong
8fb982c512 mesh: add mesh PS option following add announce 2020-05-21 03:40:47 +00:00
Angus Gratton
0ad6e1b977 Merge branch 'feature/80m_flashspeed_esp32s2' into 'master'
esptool: Set 80MHz SPI flash speed for ESP32-S2 & future chips

See merge request espressif/esp-idf!8739
2020-05-21 10:22:59 +08:00
FredrikFornstad
9d58219557 Bugfix: Casting int to size_t 2020-05-20 19:32:18 +02:00
Mahavir Jain
7a2ea9b7f7 esp-tls: add support for using hardware security module 2020-05-20 22:52:37 +05:30
Bryan Hunt
4553f6c95d Add cryptoauthlib as a component with mbedtls integration
* Add options to mbedtls for hardware acceleration
* Disable mbedtls EC curves if hardware acceleration is selected
since the hardware will have to define the curves supported
* Add a hardware ecdsa example
2020-05-20 22:52:37 +05:30
Jiang Jiang Jian
5f08bed88b Merge branch 'feature/optimize_wifi_API_max_tx_power_description' into 'master'
feature: optimize wifi API max tx power description

Closes WIFI-1097

See merge request espressif/esp-idf!8173
2020-05-20 22:43:54 +08:00
liqigan
55f6a927b5 btdm:fix emit ESP_BT_GAP_DISC_STATE_CHANGED_EVT event when call API esp_bt_gap_start_discovery
closes BT-594

See merge request espressif/esp-idf!8808
2020-05-20 22:43:44 +08:00
lly
b1f3843ed6 ble_mesh: Clear two more vars during proxy server deinit 2020-05-20 11:35:26 +00:00
lly
d5b126667a ble_mesh: Add missing sdkconfig.h 2020-05-20 11:35:26 +00:00
lly
4e60919a66 ble_mesh: Init device name during proxy server init
Device name will be reset when deinit mesh stack. If not
initializing device name during the next mesh stack init,
it will fail to set the device name when using bluedroid.
2020-05-20 11:35:26 +00:00
lly
a0ce8c64b0 ble_mesh: Add init flag for friend init/deinit
Since bt_mesh_friend_init() will only be invoked when
a device is provisioned or Provisioner is enabled, so
we add a flag to indicate if the friend functionality
is initialized in case deinit before initialization.
2020-05-20 11:35:26 +00:00
Angus Gratton
5bd75b134d esptool: Set 80MHz SPI flash speed for ESP32-S2 & future chips
Most ESP32 devices will also work at 80MHz, but third party boards/modules
may not have been tested at this speed so the default is kept at 40MHz for safety.
2020-05-20 06:19:34 +00:00
Mahavir Jain
e497bf37c4 Merge branch 'bugfix/httpd_lru_purge' into 'master'
esp_http_server: Fixed a bug which could cause issues with LRU purge

Closes IDFGH-2680

See merge request espressif/esp-idf!8818
2020-05-20 14:08:02 +08:00
Alexander Borsuk
fb0fa34ac8 sdmmc: Correctly check function parameters before using them
Closes https://github.com/espressif/esp-idf/pull/5000
2020-05-20 13:09:05 +08:00
David Čermák
7d7f3f8d8f Merge branch 'bugfix/esp_netif_minor_fixes' into 'master'
esp-netif: Minor fixes

Closes IDFGH-3311

See merge request espressif/esp-idf!8799
2020-05-20 12:47:01 +08:00
ronghulin
cdaeef70c3 feature: optimize wifi API max tx power description 2020-05-20 11:52:42 +08:00
Jiang Jiang Jian
af97a5abc3 Merge branch 'workaround/wps_iot_fixes' into 'master'
wpa_supplicant: WPS Inter operatability Fixes

See merge request espressif/esp-idf!8654
2020-05-20 11:32:34 +08:00
Jiang Jiang Jian
b0cbc4f7bb Merge branch 'bugfix/optimize_4way_handshake' into 'master'
ESP-WIFI; Optimize 4way handshake failure time

See merge request espressif/esp-idf!8020
2020-05-20 11:29:56 +08:00
Jiang Jiang Jian
05f4668ad0 Merge branch 'nimble/update_nimble_submodule' into 'master'
NimBLE: Include upstream fixes and use macros for log level filtering

See merge request espressif/esp-idf!8448
2020-05-20 11:23:46 +08:00
Angus Gratton
0927ec029e wpa_supplicant: Allow building with mbedTLS integration but no hardware MPI
Also disable the relevant function in bignum.h based on config, so fails at
compile not link time.

Closes https://github.com/espressif/esp-idf/issues/5321
2020-05-20 12:06:07 +10:00
Piyush Shah
c2ab112590 esp_http_server: Fixed a bug which could cause issues with LRU purge
LRU counter should be started from 1, and not 0, so that all checks
work fine.

Closes https://github.com/espressif/esp-idf/issues/4753
2020-05-19 22:11:02 +05:30
Mahavir Jain
7dbf01afad coap: move mbedTLS config options from component to examples
CoAP component relies on some mbedTLS crypto configuration
options, e.g. DTLS and PSK. These configuration options if
selected, have footprint impact on generic TLS examples like
https_request or https_ota as well.

Footprint of https_request example with/without change is per below:

$ ./tools/idf_size.py new_https_request.map --diff old_https_request.map

<CURRENT> MAP file: new_https_request.map
<REFERENCE> MAP file: old_https_request.map
Difference is counted as <CURRENT> - <REFERENCE>, i.e. a positive number means that <CURRENT> is larger.
Total sizes of <CURRENT>:                                                 <REFERENCE>     Difference
 DRAM .data size:   14796 bytes                                                 14796
 DRAM .bss  size:   23560 bytes                                                 23680           -120
Used static DRAM:   38356 bytes ( 142380 available, 21.2% used)                 38476           -120 (   +120 available,      +0 total)
Used static IRAM:   89045 bytes (  42027 available, 67.9% used)                 89045                (     +0 available,      +0 total)
      Flash code:  554231 bytes                                                563823          -9592
    Flash rodata:  179000 bytes                                                181224          -2224
Total image size:~ 860632 bytes (.bin may be padded larger)                    872568         -11936

This commit moves relevant config options to CoAP specific examples
and also adds some run time warnings if they are kept disabled.

Closes https://github.com/espressif/esp-idf/issues/5262
2020-05-19 17:23:29 +05:30
kapil.gupta
fb53a454b9 ESP-WIFI: Optimize 4way handshake failure time
In case of wrong passpharse, AP will keep on sending 1/4 multiple
times which may take around 10 secs to disconnect and detect
wrong password event.

Add changes to reject EAPOL1 after 3 consecutive reception
2020-05-19 16:55:42 +05:30
Jiang Jiang Jian
56c307b356 Merge branch 'mesh/set_type_new' into 'master'
mesh: support set new type (node and sta)

Closes WIFI-1824, WIFI-1725, WIFI-1823, and WIFI-1908

See merge request espressif/esp-idf!7934
2020-05-19 16:53:49 +08:00
Ivan Grokhotkov
948580d1a2 Merge branch 'gdb/bt_on_invalid_pc' into 'master'
gdb: Modify PC in case of invalid PC

See merge request espressif/esp-idf!8391
2020-05-19 16:44:07 +08:00
David Cermak
95b5ef3687 esp-netif: wifi-deinit to clear handlers only in tcpip-adapter mode 2020-05-19 08:34:36 +00:00
David Cermak
1183b95cc4 esp-netif: Fix compilation if ESP_GRATUITOUS_ARP not enabled
Closes https://github.com/espressif/esp-idf/issues/5294
2020-05-19 08:34:36 +00:00
kapil.gupta
76335b2558 wpa_supplicant: WPS Inter operatability Fixes
Add WPS IOT fixes under config option

Current fixes under this flag.
1. Allow NULL-padded WPS attributes.
2. Bypass WPS-Config method validation
2020-05-19 08:05:52 +00:00
Nachiket Kukade
c643d0a611 wpa_supplicant: Allow NULL-padded WPS attributes
Some AP's keep NULL-padding at the end of some variable length WPS
Attributes. This is not as par the WPS2.0 specs, but to avoid interop
issues, ignore the padding by reducing the attribute length by 1.
2020-05-19 08:05:52 +00:00
Angus Gratton
183dddd50e Merge branch 'bugfix/wdt_reset_info_unicore' into 'master'
bootloader: Don't print an error message after WDT reset in unicore mode

See merge request espressif/esp-idf!8570
2020-05-19 15:54:06 +08:00
Michael (XIAO Xufeng)
fd3e28ef0d Merge branch 'bugfix/esp_flash_write_performance_regression' into 'master'
esp_flash: fix the write performance regression

See merge request espressif/esp-idf!8658
2020-05-19 12:06:42 +08:00
houwenxiang
0bf2906bc9 driver(RMT): Fix the breaking change issue of RMT driver introduced by refactoring.
After RMT driver refactor, two breaking change are introduced:

    1. Users needs to call `rmt_driver_install` before `rmt_config`.

    2. Do not support memory block count > 1,

    fix this two issues

    closes https://github.com/espressif/esp-idf/issues/4664

    closes https://github.com/espressif/esp-idf/issues/4959
2020-05-19 11:39:38 +08:00
Angus Gratton
3e7ba2f389 bootloader: Don't print an error message after WDT reset in unicore mode
Caused some confusion here: https://github.com/espressif/esp-idf/issues/4388
2020-05-19 03:35:53 +00:00
Angus Gratton
4fa8f7d01b Merge branch 'bugfix/parttool_get_info_wo_info_option' into 'master'
partition_table: Fix parttool.py crashes when retrieving partition info

Closes IDFGH-3279

See merge request espressif/esp-idf!8715
2020-05-19 11:30:20 +08:00
chenyudong
040f4be2a7 mesh: support set new type
If the root is specified (FIXED-ROOT) by set type or set parent, change ie.mesh_type to MESH_ROOT before connect to router
Release emesh_recv_toDS when the root becomes non-root
esp_mesh_set_type now supports MESH_IDLE and MESH_STA
2020-05-19 11:17:56 +08:00
Jiang Jiang Jian
37f4e3855f Merge branch 'bugfix/fix_sta_connect_compatibility' into 'master'
esp_wifi: Fix the timeout issue of EAPOL four-way handshake

Closes WIFI-2110 and WIFI-1809

See merge request espressif/esp-idf!8382
2020-05-18 22:26:52 +08:00
houwenxiang
b35d9002f3 driver(I2S): Fix i2s_comm_format_t configuration parameter does not match the TRM bug.
When I2S `i2s_comm_format_t` is set to `I2S_COMM_FORMAT_I2S_MSB`, the data should launch at first BCK. But not in fact, this MR fixed this issue.

For compatibility, several nwe parameters have been added, and the old parameters will be removed in the future.

    closes https://github.com/espressif/esp-idf/issues/5065

    closes https://github.com/espressif/esp-idf/issues/4957

    closes https://github.com/espressif/esp-idf/issues/2978

    closes https://github.com/espressif/esp-idf/issues/5136

    Merges https://github.com/espressif/esp-idf/pull/4522
2020-05-18 19:55:30 +08:00
Darian Leung
11d96b39d0 esp_ipc: Move to new component
This commit moves esp_ipc into a separate component.
2020-05-18 16:51:45 +08:00
David Cermak
8a45f074fc esp-netif: Added API to get the underlying interface name
The interface name can be used in socket API, i.e. setsockopt(). The API esp_netif_get_netif_impl_name() shoudl be used to populate standard
interface structure struct ifreq.
2020-05-18 09:26:24 +02:00
David Cermak
06711c7c36 examples: common connect component to use both interfaces at once 2020-05-18 09:26:24 +02:00
xiehang
158602c942 esp_wifi: Fix the timeout issue of EAPOL four-way handshake 2020-05-18 14:53:31 +08:00
weitianhua
8fc05d0665 Fix ASSERT for RXDESC and save the log for debug 2020-05-18 06:51:51 +00:00
weitianhua
8d1032ccac Fix ASSERT in ld_acl at line 302 forclkoff1 and localval 2020-05-18 06:51:51 +00:00
weitianhua
77cc105c72 Fix ld_acl schedule bug to parity shift 2020-05-18 06:51:51 +00:00
weitianhua
55877684a0 Fix ASSERT(64,0) in rwble.c 2020-05-18 06:51:51 +00:00
weitianhua
0811851378 Fix ASSERT in ld_pscan.c at line 1032 2020-05-18 06:51:51 +00:00
weitianhua
b20f254483 Free lmp tx buf in EM in the procedure of handling LMP_detach_Req when not received the last acknowledge from peer device and seperate them by ACL State 2020-05-18 06:51:51 +00:00
weitianhua
190ff3ae37 Fix that when slave initiate unsniff procedure and meet transaction collision, no mode change event is repoerted 2020-05-18 06:51:51 +00:00
weitianhua
70fa5b4ac5 Fix int_wdt due to disable interrupt too long time 2020-05-18 06:51:51 +00:00
weitianhua
c18ed5cbee Fix Connection fail in loop 2020-05-18 06:51:51 +00:00
weitianhua
7aeb3d329a Set AFH in BTDM Task when WiFi changes channel 2020-05-18 06:51:51 +00:00
weitianhua
e0e1154b62 Fix ASSERT(25,0) in lc_task.c 2020-05-18 06:51:51 +00:00
weitianhua
899e49b90e Disable frequent warning log in ld_acl 2020-05-18 06:51:51 +00:00
weitianhua
b45f2d3913 Move default log level to WARNING instead ERROR in BT Controller 2020-05-18 06:51:51 +00:00
Mahavir Jain
be3b6b7cb8 Merge branch 'feature/mbedtls_dynamic_memory' into 'master'
feat(mbedtls): add dynamic buffer and local resource managment to decrease SSL heap cost

See merge request espressif/esp-idf!8313
2020-05-18 13:55:05 +08:00
Michael (XIAO Xufeng)
3f778a92da spi_flash: add unit test for read/write performance 2020-05-17 22:06:03 +08:00
Michael (XIAO Xufeng)
651eb1a694 esp_flash: fix the write performance regression
Also changed internal delay unit into microsecond.
2020-05-17 22:06:02 +08:00
Michael (XIAO Xufeng)
f67044c822 spi: simplify the caps header
The mapping logic from register address to instance number is moved into the LL
2020-05-17 22:06:01 +08:00
Michael (XIAO Xufeng)
dae3196157 esp_flash: fix issue that cannot add flash on SPI1 CS1 when SPI_FLASH_SHARE_SPI1_BUS is disabled 2020-05-17 22:06:00 +08:00
Jiang Jiang Jian
bb2379b7ab Merge branch 'bugfix/wpa3_mixed_mode_authype' into 'master'
esp_wifi: Add and utilize WPA3/WPA2 Mixed mode Authtype

See merge request espressif/esp-idf!8778
2020-05-17 17:04:18 +08:00
Jiang Jiang Jian
bef57a8ddc Merge branch 'bugfix/V3.1.7_ble_bug_mr' into 'master'
component/bt: fix notify malloc failed , fix no BLE_AUTH_CMPL_EVT and fix bluedroid btc deinit crash

See merge request espressif/esp-idf!8729
2020-05-16 19:52:34 +08:00
Island
52e9bcb696 Merge branch 'bugfix/ble_mesh_remove_patch' into 'master'
ble_mesh: Remove patch for the bug of an App

Closes BLEMESH-202

See merge request espressif/esp-idf!8737
2020-05-15 20:17:22 +08:00
Nachiket Kukade
d7edd28338 esp_wifi: Update WiFi lib
Add and utilize WPA3/WPA2 Mixed mode Authtype.
2020-05-15 17:24:51 +05:30
Mahavir Jain
5b5a8c276d Merge branch 'feature/mbedtls_add_config_options' into 'master'
Add config options in mbedtls

See merge request espressif/esp-idf!8760
2020-05-15 15:53:21 +08:00
zhiweijian
ec6c7558ef add congest direct callback and fix malloc failed when multi_connection notify performance test 2020-05-15 15:35:39 +08:00
Angus Gratton
62754ff90a Merge branch 'docs/fix_static_sem_api_desc' into 'master'
Fix usage example in xSemaphoreCreateBinaryStatic

Closes IDFGH-3280

See merge request espressif/esp-idf!8750
2020-05-15 15:04:36 +08:00
Shubham Kulkarni
ca3daa50de mbedtls: Add configuration options 2020-05-15 11:27:44 +05:30
Jiang Jiang Jian
26ab1c54ec Merge branch 'bugfix/esp32s2_wifi_skip_light_sleep' into 'master'
esp_wifi: When WiFi TSF is active, skip light sleep

Closes WIFI-2305 and WIFI-2306

See merge request espressif/esp-idf!8639
2020-05-15 11:41:45 +08:00
David Čermák
5e436be77f Merge branch 'bugfix/stop_mac_can_be_controlled_by_user' into 'master'
ethernet: esp_eth_stop API should stop emac hardware

Closes WIFI-2247 and WIFI-2337

See merge request espressif/esp-idf!8664
2020-05-15 04:40:55 +08:00
Mahavir Jain
0d208aabab mbedtls: esp32s2: check and reallocate output buffer if its from non-DMA range
Earlier check was for only input buffer but it is quite likely to have
output buffer also from non-DMA memory range and hence requirement to
reallocate and then copy data from AES engine.
2020-05-14 13:12:26 +00:00
Mahavir Jain
18c1838587 esp32s2: add config option to place RTC data in fast RAM 2020-05-14 13:12:26 +00:00
Mahavir Jain
1aac284dda heap: add rtc fast memory region to dynamic pool
- for ESP32 only enabled in case of unicore config
- capability wise this region (8K) is same as DRAM, except non-DMA capable
- also fixed small issue in reserved memory region processing when (start == end)
2020-05-14 13:12:26 +00:00
Dong Heng
3d57bf30a2 feat(mbedtls): add dynamic buffer and local resource managment to decrease SSL heap cost 2020-05-14 11:45:09 +00:00
Dmytro
ecbfe0f406 Fix usage example in xSemaphoreCreateBinaryStatic 2020-05-14 18:57:48 +08:00
Krzysztof
9b5acea160 Add missing link to ulp header files and link to example following https://esp32.com/viewtopic.php?f=2&t=15562 2020-05-14 17:31:05 +08:00
Michael (XIAO Xufeng)
437a8fa9d2 Merge branch 'test/sdio_ut_performance_time' into 'master'
sdio: fix random unit test performance failure

See merge request espressif/esp-idf!8665
2020-05-14 16:19:45 +08:00
Jiang Jiang Jian
a0288c1e8d Merge branch 'bugfix/wpa3_pmf_memleak_fix' into 'master'
WPA3 / PMF memory leak fixes

Closes WIFI-2324 and WIFI-2326

See merge request espressif/esp-idf!8676
2020-05-14 14:21:21 +08:00
Angus Gratton
8928cbb593 Merge branch 'bugfix/add_requirements_for_espefuse' into 'master'
esp-idf: Update esptool and add reedsolo and bitstring into requirements.txt

See merge request espressif/esp-idf!8641
2020-05-14 12:37:22 +08:00
Michael (XIAO Xufeng)
94ce4836ae Merge branch 'bugfix/fix_gpio_wakeup_light_sleep' into 'master'
driver(gpio): fix gpio can't wakeup light sleep

Closes IDF-1361

See merge request espressif/esp-idf!8522
2020-05-14 11:45:40 +08:00
KonstantinKondrashov
86a73de9b3 esp-idf: Update esptool and add reedsolo and bitstring into requirements.txt
They are necessary for espefuse.py from esptool v3.0.
2020-05-14 13:29:21 +10:00
lly
25a6ea9600 ble_mesh: Remove patch for the bug of an App 2020-05-14 10:24:15 +08:00
Angus Gratton
6ccd7dbc59 Merge branch 'nimble/config_option_sdkconfig_rename' into 'master'
Add NimBLE config options in sdkconfig.rename

Closes IDF-1650

See merge request espressif/esp-idf!8653
2020-05-14 09:30:16 +08:00
Nachiket Kukade
b302b4bb43 wpa_supplicant: Fix memory leaks in WPA3 connection
1. Buffers for SAE messages are not freed after the handshake.
   This causes memory leak, free buffers after SAE handshake.
2. SAE global data is not freed until the next WPA3 connection
   takes place, holding up heap space without reason. Free this
   data after SAE handshake is complete or event fails.
3. Update wifi lib which includes memory leak fix during BIP
   encryption/decryption operations.
2020-05-13 22:54:03 +05:30
Nachiket Kukade
f36455052d wpa_supplicant: Fix formatting of file esp_wpa3.c
Replace tabs with spaces in esp_wpa3.c.
2020-05-13 22:54:03 +05:30
Jiang Jiang Jian
1d5ef75c7d Merge branch 'bugfix/espnow_fetch_peer_crash' into 'master'
wifi: fix the crash issue when fetch peer after delete cur_peer

Closes WIFI-2307

See merge request espressif/esp-idf!8626
2020-05-13 23:21:21 +08:00
aleks
3bbdfb75ad freemodbus: fix event processing failure after destroy
Closes https://github.com/espressif/esp-idf/issues/5275
2020-05-13 15:59:36 +02:00
wangcheng
418b32e71b master missing BLE_AUTH_CMPL_EVT after restart 2020-05-13 20:33:24 +08:00
wangcheng
a5ac789725 fix bta_dm_deinit_cb crash 2020-05-13 20:18:27 +08:00
Xia Xiaotian
526a3e49ed esp_wifi: When WiFi TSF is active, skip light sleep
* Add an API for peripherals to set callbacks to skip light sleep

* Make WiFi power save example work
2020-05-13 19:31:36 +08:00
Wang Jia Lin
cf32e4fc22 Merge branch 'bugfix/fix_adc_io_init_bug' into 'master'
driver(adc): fix adc io init bug

Closes IDF-1541

See merge request espressif/esp-idf!8301
2020-05-13 16:35:58 +08:00
KonstantinKondrashov
e3ea943088 partition_table: Fix parttool.py crashes when retrieving partition info
Closes: IDFGH-3279
Closes: https://github.com/espressif/esp-idf/issues/5271
2020-05-13 16:10:48 +08:00
morris
d8a9ce14d7 ethernet: fix potential task watch dog timeout 2020-05-13 16:03:00 +08:00
morris
4454b198bb ethernet: better control start/stop/uninstall/install 2020-05-13 15:58:42 +08:00
morris
6020d6a5d4 ethernet: esp_eth_stop API should stop emac hardware 2020-05-13 15:58:42 +08:00
David Cermak
f13f8927b1 esp-timer: fix (ignore) false positive memory alloc/free issue found by static analyser 2020-05-13 07:30:26 +02:00
David Cermak
6a47dc9275 esp-netif: fix memory allocation issues found by static analyser 2020-05-13 07:16:45 +02:00
David Cermak
49e8c09ec2 local-ctrl: fix memory allocation issues found by static analyser 2020-05-13 07:16:45 +02:00
David Cermak
917192725a http-client: fix memory allocation issues found by static analyser 2020-05-13 07:16:45 +02:00
Ivan Grokhotkov
695f075a13 Merge branch 'bugfix/core_dump_data_struct_ovf' into 'master'
Fixes core dump data overwriting

See merge request espressif/esp-idf!8611
2020-05-13 04:03:29 +08:00
zhangyanjiao
4dc7a36eca wifi: fix the crash issue when fetch peer after delete cur_peer 2020-05-12 21:05:50 +08:00
Island
c946ca8b45 Merge branch 'bugfix/ble_mesh_node_old_version_to_new' into 'master'
ble_mesh: Fix mesh node device role restore

Closes BLEMESH-188

See merge request espressif/esp-idf!8314
2020-05-12 20:36:55 +08:00
Island
1d22f17da3 Merge branch 'bugfix/ble_mesh_not_ignore_msg_in_fast_prov' into 'master'
ble_mesh: Not ignore msg when fast prov is enabled

Closes BLEMESH-196

See merge request espressif/esp-idf!8698
2020-05-12 20:36:41 +08:00
Island
b0a096495a Merge branch 'bugfix/ble_mesh_fix_typos' into 'master'
ble_mesh: Fix typos

Closes BLEMESH-199

See merge request espressif/esp-idf!8703
2020-05-12 20:36:30 +08:00
Jiang Jiang Jian
84a410dc4c Merge branch 'bugfix/fix_switch_channel_without_discon_issue' into 'master'
esp_wifi: Fix AP switch to adjacent channel without disconnect

Closes WIFI-2192 and WIFI-2277

See merge request espressif/esp-idf!8657
2020-05-12 20:21:12 +08:00
lly
f7ef701856 ble_mesh: Fix mesh node device role restore
Old version of BLE Mesh has no device role storage, because
previously we only support storing mesh node info.
If the binary of the node is upgraded from old version to a
new version (support storing provisioner info), the mesh info
of the node will not be restored because mesh role does not
exist in the flash.
2020-05-12 19:25:57 +08:00
lly
6b9c0dda08 ble_mesh: Fix typos 2020-05-12 16:23:13 +08:00
fuzhibo
d91e64cea4 driver(gpio): fix gpio can't wakeup light sleep 2020-05-12 07:15:13 +00:00
fuzhibo
8256b5f32b driver(adc): fix adc io init bug; add unit test to check; 2020-05-12 06:52:26 +00:00
Mahavir Jain
bd920d22b0 Merge branch 'bugfix/softap_prov_session' into 'master'
protocomm_httpd: Restart security session if request is received on a new session

See merge request espressif/esp-idf!8633
2020-05-12 13:16:20 +08:00
Michael (XIAO Xufeng)
f10a721d88 sdio: fix the unit of performance test 2020-05-12 12:25:46 +08:00
Michael (XIAO Xufeng)
69d9e0eadc sdio: fix random unit test performance failure
The tests used to measure the throughput by FreeRTOS
`xTaskGetTickCount()`. The rounding error can be quite big, compared to
total measurement time (1350 ms for 4-bit mode).

This commit use `esp_timer_get_time()` instead to measure typical time,
which is in microseconds. Moreover, to get rid of the time error from
cache miss, `ccomp_timer_*` are used to get the cache compensated time
to measure the throughput used for unit test performance assertion.
2020-05-12 12:25:45 +08:00
lly
d937b415e3 ble_mesh: Not ignore msg when fast prov is enabled
When fast provisioning is enabled, Provisioner shall not
ignore messages from the nodes whose addresses are not in
the provisioning database. Because other nodes which are
not provisioned by the Primary Provisioner will send node
address messages to the Primary Provisioner.
2020-05-12 11:22:07 +08:00
Jiang Jiang Jian
5f2be35525 Merge branch 'bugfix/supplicant_general_fixes' into 'master'
wpa_supplicant: Fix some memleaks and invalid memory access

Closes IDF-1335

See merge request espressif/esp-idf!8201
2020-05-12 11:03:14 +08:00
Piyush Shah
05852bc4aa protocomm_httpd: Restart security session if request is received on a new session
This commit fixes a bug as well as changes a behaviour.

Bugfix: During softap/httpd based provisioning, if a session was closed
midway and a new one started, it would never proceed if the http server
assigns same socket number to the new session (which happens almost always).
Now, if a session is closed, using the http callbacks, the older session
data is cleared so that a new one can be created.

Behavioural change: If a client (mobile app particularly) does not use
persistent http session i.e. all provisioning communication on the same
socket, the provisioning may fail. Earlier, since the session context was
not getting cleared, even if the client closed a session and continued
on a new one, it would go through if the socket number assigned was same
(which happens almost always).

Ideally, from a security perspective, all communication related
to secure provisioning must happen on the same socket, and so, this
change is required.
2020-05-11 13:01:13 +00:00
Mahavir Jain
012b111d6d Merge branch 'feature/mbedtls_hkdf' into 'master'
mbedtls_hkdf: Add a config option to enable HKDF

See merge request espressif/esp-idf!8680
2020-05-11 15:29:54 +08:00
Piyush Shah
43b3def711 mbedtls_hkdf: Add a config option to enable HKDF 2020-05-11 11:49:14 +05:30
Prasad Alatkar
2ef489005b NimBLE: Include upstream fixes and use macros for log level filtering
Change list:
- Reduces the size of the compiled binary, PR: https://github.com/espressif/esp-nimble/pull/6
- Null pointer check, PR: https://github.com/apache/mynewt-nimble/pull/701
- Pairing procedure abort on unexpected req: https://github.com/apache/mynewt-nimble/pull/710
- Fix conn flags after pairing: https://github.com/apache/mynewt-nimble/pull/730
- Remove notification for update process timeout (Vol 6, Part B, section 5.2 ):
  https://github.com/apache/mynewt-nimble/pull/782
- CCCD fix : https://github.com/apache/mynewt-nimble/pull/790 and
  https://github.com/apache/mynewt-nimble/pull/804
- Host based Privacy (RPA) fix: https://github.com/espressif/esp-nimble/pull/7

 Closes https://github.com/espressif/esp-nimble/issues/10

 Closes https://github.com/espressif/esp-idf/issues/4413
2020-05-11 05:36:50 +00:00
Marius Vikhammer
27fa1dc0dd doc: add peripheral_types.h as API reference for peripheral docs
Closes DOC-136
Closes IDF-1673
2020-05-11 11:20:39 +08:00
lly
c2fd80b8f4 ble_mesh: Fix not update prov addr in fast prov
When using fast provisioning, the Provisioner functionality
will be enabled. Unicast addresses within the pre-allocated
range will be used for provisioning nodes. And during the
address assignment, the allocated unicast address will be
checked that if it's duplicated with other nodes addresses
and the Provisioner's own addresses.
So before starting using fast provisioning, we need to update
the Provisioner address.
2020-05-11 02:29:18 +00:00
lly
97f11600e3 ble_mesh: net_key_status only pull one key idx [Zephyr]
Fixes bug where the config client's net_key_status handler would attempt
to pull two key indexes from a message which only holds one.
2020-05-11 02:29:18 +00:00
lly
9d7adc3e1b ble_mesh: Update client message timeout calculation
Since the behavior of sending segmented messages has been
changed properly, the calculation of timeout value which
will be used when sending an acknowledged message by a
client model also needs to be updated.
2020-05-11 02:29:18 +00:00
lly
5e59233cc0 ble_mesh: Add lock for segmented msg operations
Add mutex to protect some variables of the mesh segmented
messages.
Currently the timeout handler of mesh will be executed in
the btc task, while the received mesh messages will be
handled in the btu task. In case some variables are set to
NULL when handled in the btu task, meanwhile these variables
are also accessed in the timeout handler, so we add mutex to
protect these variables and related operations.
2020-05-11 02:29:18 +00:00
lly
9e5fec73f8 ble_mesh: Fix dereferencing pointer before checking for NULL [Zephyr]
The publication context is checked for NULL in bt_mesh_model_publish()
however it was dereferenced before that. Move the assignment to
ctx.send_rel to the same place where other ctx members are set.
2020-05-11 02:29:18 +00:00
lly
d7a671ab7a ble_mesh: Optimize some mesh log output 2020-05-11 02:29:18 +00:00
lly
52493a1644 ble_mesh: Fix restore when revoke keys [Zephyr]
Store keys (NetKey and AppKey) again after revoking.
2020-05-11 02:29:18 +00:00
lly
8ea6714a96 ble_mesh: Spit mesh_util.h into different header files
Split mesh_util.h into mesh_byteorder.h, mesh_compiler.h,
mesh_ffs.h and mesh_util.h based on the classification of
Zephyr, which will make further porting more clear.
2020-05-11 02:29:18 +00:00
lly
52a30c8f4a ble_mesh: Split mesh os related into a separate file 2020-05-11 02:29:18 +00:00
lly
01a8a6c150 ble_mesh: Split mesh mutex into a separate file 2020-05-11 02:29:18 +00:00
lly
c493be489f ble_mesh: Rename mesh_kernel.* to mesh_timer.* 2020-05-11 02:29:18 +00:00
lly
25dfee4bdd ble_mesh: Add and use transport macro definitions [Zephyr] 2020-05-11 02:29:18 +00:00
lly
df525bf0b3 ble_mesh: Friend SeqAuth cleanup [Zephyr]
The Friend queue uses the message SeqAuth to determine whether the
message is already in the queue. To facilitate this, the SeqAuth is
passed around as a pointer throughout the transport modules. In the
bt_mesh_ctl_send functions, this parameter is also exposed in the API,
but the internal usage is inconsistent and buggy. Also, no one actually
uses this parameter.

- Removes seq_auth param from bt_mesh_ctl_send, instead passing NULL
  directly to the friend module, to enforce its addition to the queue.
- Makes the seq_auth pointer const throughout the friend module.
2020-05-11 02:29:18 +00:00
lly
cd58874a9b ble_mesh: Rework msg_cache [Zephyr]
Changes the behavior of the message cache to optimize for cache
capacity. Previously, the message cache's primary function was to avoid
decrypting messages multiple times, although the cache's main function
in the spec is to avoid message rebroadcasting. Optimizing for minimal
decryption causes us to fill the network cache faster, which in turn
causes more cache misses, potentially outweighing the advantage.

Now stores src + seq in message cache instead of field hash value. This
cuts cache size in two, while including more of the sequence number than
before.

Adds messages to the cache only after the packet is successfully
decrypted. This reduces noise in the cache, and ensures that no
invalid deobfuscations are added.

Additionally, this fixes a bug where multiple calls to net_decrypt with
the same packet failed, as the message cache found its own entry from
the previous call.
2020-05-11 02:29:18 +00:00
lly
ef8206cdc6 ble_mesh: Segmented TX to groups [Zephyr]
Implements several changes to the transport layer segmented tx to
improve group message performance:
- Moves retransmit counter to tx context instead of per packet. As every
  unacked packet is sent every retransmit, the retransmit counters would
  be the same in each segment. This makes it easier to control progress.
- Delays the scheduling of the retransmit until the completion of the
  last segment by adding a seg_pending counter. This is essentially the
  same as the old behavior, except that the old behavior might retrigger
  the sending before all segments are finished if the advertising is
  slow.
- Allows the group transmits to stop as soon as all retransmits have
  been exhausted, instead of timing out waiting for acks that won't
  come. This allows group tx to finish without error.
- Fixes a bug where a failed TX would block IV update.
- Cancels any pending transmissions of acked segments.
- Reduces log level for several common group tx scenarios that aren't
  erronous.
2020-05-11 02:29:18 +00:00
lly
fd9a16805a ble_mesh: Add comment explaining use of byte order [Zephyr]
Add comment that explains why a different byte order is used for the
3-byte opcode on the CID part of the opcode.
2020-05-11 02:29:18 +00:00
lly
4d1d5261cc ble_mesh: Use 24-bit functions [Zephyr]
Use 24-bit functions for byteorder and net_buf in order to make the
byteorder used more readable.
2020-05-11 02:29:18 +00:00
lly
da99734ba8 ble_mesh: Optimize net_buf_simple routines [Zephyr]
Use sys_put_xyz() helpers instead of memcpy() whenever possible. This
brings in straight-line inline code for pushes and adds of known,
small sizes.
2020-05-11 02:29:18 +00:00
lly
4fd1b2db0e ble_mesh: Add PRIu64 & PRIx64 in mesh_types.h 2020-05-11 02:29:18 +00:00
lly
fb84166cbd ble_mesh: Add push functions for supported bit-variants [Zephyr]
Add push functions for bit-widths supported by add and pull functions.
2020-05-11 02:29:18 +00:00
lly
ee1eb994b7 ble_mesh: Add support for 64 bit data type [Zephyr]
This enables pulling and pushing values in 64 bit format.
2020-05-11 02:29:18 +00:00
lly
b186be52f0 ble_mesh: Add support for 48 bit data type [Zephyr]
This enables pulling and pushing values in 48 bit format.
2020-05-11 02:29:18 +00:00
lly
23c8bbcbf5 ble_mesh: Add 48 bit variants [Zephyr]
This adds sys_*_*48 functions that operation on a 48 bits values.
2020-05-11 02:29:18 +00:00
lly
4e1d3974fb ble_mesh: Add support for 24 bit data type [Zephyr]
This enables pulling and pushing values in 24 bit format.
2020-05-11 02:29:18 +00:00
lly
26dbfdcb9d ble_mesh: Add 24 bit variants [Zephyr]
This adds sys_*_*24 functions that operation on a 24 bits values.
2020-05-11 02:29:18 +00:00
lly
95440c4d28 ble_mesh: Group resends in proxy nodes [Zephyr]
Resend transport segments for groups on the advertiser interface, even
if a connected proxy node holds the group.
2020-05-11 02:29:18 +00:00
lly
1f47cfff7f ble_mesh: Typo in condition in comp_add_elem of cfg_srv [Zephyr]
Vendor model IDs take up four (not two) bytes in the composition
2020-05-11 02:29:18 +00:00
lly
31b175e372 ble_mesh: GATT Proxy Spec 1.0.1 changes [Zephyr]
Backport of https://github.com/apache/mynewt-nimble/pull/724

Mesh spec 1.0.1 changes proxy disabling behavior to only affect the
relaying from proxy nodes. Previously, disabling proxy would shut down
all proxy and node activity.

Tweaks from the original commit:
- Removed redundant call to bt_mesh_adv_update() in gatt_proxy_set()
- Removed invalid ref to 4.2.11.1 in node_identity_set()

---

According to Mesh Profile Spec 1.0.1, Section 4.2.11:
"If the Proxy feature is disabled, a GATT client device can connect
over GATT to that node for configuration and control. Messages from
the GATT bearer are not relayed to the advertising bearer."

Moreover some notes have been removed from the spec compared to
version 1.0:

Mesh Profile Spec 1.0, Section 4.2.11:

"Upon transition from GATT Proxy state 0x01 to GATT Proxy state 0x00
the GATT Bearer Server shall disconnect all GATT Bearer Clients."

"The Configuration Client should turn off the Proxy state as the last
step in the configuration process."

Mesh Profile Spec 1.0, Section 4.2.11.1:

"When the GATT Proxy state is set to 0x00, the Node Identity state
for all subnets shall be set to 0x00 and shall not be changed."
2020-05-11 02:29:18 +00:00
lly
e385197c27 ble_mesh: Support reliable sending when publishing [Zephyr]
Until now the choice of reliable sending (segmented messages with
acks) was implicitly dependent on the size of the payload. Add a new
member to the bt_mesh_model_pub to force using segment acks even when
the payload would fit a single unsegmented message.
2020-05-11 02:29:18 +00:00
lly
cc549897d5 ble_mesh: Check device uuid when init provisioning 2020-05-11 02:29:18 +00:00
lly
ca3d1637ca ble_mesh: Fix provisioning buffer initialization [Zephyr]
When PB-GATT support has been enabled the provisioning code "borrows"
the buffer from the proxy code. However, the way that initialization
was happening the proxy buffers were initialized only after
provisioning initialization, resulting in a corrupted buffer with
buf->data pointing to NULL. Reorder the initialization calls so that
proxy is done first and provisioning only after it.
2020-05-11 02:29:18 +00:00
lly
6c868a070b ble_mesh: Skip publish if update fails [Zephyr]
Allow models to skip a periodic publish interval by returning an error
from the publish update callback.

Previously, an error return from publish update would cancel periodic
publishing. This can't be recovered from, and as such, no valid model
implementation could return an error from this callback, and there was
no way to skip a periodic publish.
2020-05-11 02:29:18 +00:00
lly
aad8908d9c ble_mesh: Enable Segmented Control Messages [Zephyr]
The function bt_mesh_ctl_send() used to support maximum length of
11 bytes. The segmentation complies with the BLE Mesh Standard.
The ack is disabled in case of non unicast address.
2020-05-11 02:29:18 +00:00
Michael (XIAO Xufeng)
f7ec57b615 Merge branch 'feature/usb_wrap_headers' into 'master'
usb: add usb_wrap headers, move some code from LL to HAL

See merge request espressif/esp-idf!8395
2020-05-10 19:19:14 +08:00
David Čermák
e86f530e42 Merge branch 'bugfix/mdns_config_stacksize' into 'master'
mdns: Allow config mDNS task stack size (GitHub PR)

Closes IDFGH-3219

See merge request espressif/esp-idf!8635
2020-05-09 19:49:15 +08:00
xiehang
0c7cac6ee3 esp_wifi: Fix AP switch to adjacent channel without disconnect 2020-05-09 17:26:51 +08:00
Jiang Jiang Jian
27d0ca52b2 Merge branch 'bugfix/fix_memleak_in_wpa3_feature' into 'master'
fix(wpa_supplicant): fix memleak in wpa3 feature

See merge request espressif/esp-idf!8643
2020-05-08 22:34:01 +08:00
Mahavir Jain
5425ef85ce Merge branch 'bugfix/pthread_tcb_cleanup_wrapper' into 'master'
Fix linking for vPortCleanUpTCB wrapper

See merge request espressif/esp-idf!8652
2020-05-08 21:31:35 +08:00
Sachin Parekh
c0a33487b1 gdbstub_xtensa.c: Replace with cpu_ll_pc_to_ptr macro
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2020-05-08 18:35:48 +05:30
Sachin Parekh
46d914ff45 gdb: Modify PC in case of invalid PC
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2020-05-08 18:34:52 +05:30
Krzysztof Budzynski
fc4a5609ac Merge branch 'bugfix/docs_esp_https_ota' into 'master'
Resolve documentation issue reported by boarchuz in...

See merge request espressif/esp-idf!8648
2020-05-08 16:30:42 +08:00
Hrishikesh Dhayagude
f67902a5dd Add NimBLE config options in sdkconfig.rename 2020-05-08 12:04:46 +05:30
Shubham Kulkarni
4a83b488a8 pthread: Use INTERFACE in target_link_libraries for vPortCleanUpTCB wrapper 2020-05-08 11:55:23 +05:30
Michael (XIAO Xufeng)
178c7c2e82 Merge branch 'bugfix/spi_lock_suppress_alter_log' into 'master'
spi: suppress spi_bus_lock_touch log level

Closes IDFGH-3030

See merge request espressif/esp-idf!8634
2020-05-08 11:26:11 +08:00
Alexey Gerenkov
16726e9980 gcov: Fixes APP CPU syscall table 2020-05-08 03:13:18 +03:00
Krzysztof
f1c7b0ba6f Resolve documentation issue reported by boarchuz in https://esp32.com/viewtopic.php?f=5&t=14148#p59419 2020-05-07 22:00:27 +02:00
Axel Lin
cf7e48c779 mdns: Allow config mDNS task stack size
Signed-off-by: Axel Lin <axel.lin@gmail.com>

Merges https://github.com/espressif/esp-idf/pull/5216
2020-05-07 21:49:02 +02:00
David Čermák
3a2f059f11 Merge branch 'bugfix/pppos_connect_dhcpc_failed' into 'master'
esp_netif: fix default connect handler to check dhcpc return value

Closes IDFGH-3173

See merge request espressif/esp-idf!8581
2020-05-08 03:25:09 +08:00
David Cermak
65b993234d esp_hid: fix memory leak if getting dev reports fails 2020-05-07 12:56:54 +00:00
Mahavir Jain
d7fb9d54ba Merge branch 'feature/get_url' into 'master'
Add API to get URL from HTTP client

Closes IDFGH-3094

See merge request espressif/esp-idf!8637
2020-05-07 17:57:16 +08:00
Zhang Jun Hao
e9b3feb85d fix(wpa_supplicant): fix memleak in wpa3 feature 2020-05-07 17:28:07 +08:00
Shubham Kulkarni
890f541edf esp_http_client: Add API to get URL from client
Closes: https://github.com/espressif/esp-idf/issues/5115
2020-05-07 14:20:28 +05:30
Angus Gratton
b2fe7f681e Merge branch 'bugfix/esp32_eco3_init_syscall_table' into 'master'
newlib: initialize syscall_table_ptr_app in single core mode

Closes IDFGH-3254

See merge request espressif/esp-idf!8596
2020-05-07 15:17:13 +08:00
Mahavir Jain
a2263571b5 Merge branch 'feature/mbedtls_chacha_poly' into 'master'
mbedtls: Add config options for chacha20, poly1305 and chachapoly

See merge request espressif/esp-idf!8605
2020-05-07 03:44:23 +08:00
Alexey Gerenkov
c91ed2b917 coredump: Increases FreeRTOS ISR stack for ELF data format 2020-05-06 20:07:30 +03:00
Michael (XIAO Xufeng)
e04bb43b9f spi: suppress spi_bus_lock_touch log level
The log in the spi_bus_lock_touch may be annoying. This commit suppress 
the log level, and make the log visible only when the device altered.

Resolves https://github.com/espressif/esp-idf/issues/5056
2020-05-07 00:32:24 +08:00
David Čermák
a064e0c4de Merge branch 'bugfix/tcp_connect_tout' into 'master'
tcp_transport: Implement connect timeout

Closes IDFGH-2971, IDFGH-2810, and IDFGH-1541

See merge request espressif/esp-idf!8428
2020-05-06 20:07:05 +08:00
Alexey Gerenkov
ef1b3330c2 coredump: Fixes coredump data overwriting due to 'TaskSnapshot_t' and 'core_dump_task_header_t' difference 2020-05-06 15:04:58 +03:00
kapil.gupta
3b5fcbe06f wpa_supplicant: Fix some memleaks and invalid memory access
Add changes to fix issues reported in clang analyzer
2020-05-06 10:31:59 +00:00
Ivan Grokhotkov
d5195d19ae Merge branch 'feature/endian_h_compat_header' into 'master'
newlib: add endian.h header file for compatibility (Github PR)

See merge request espressif/esp-idf!8236
2020-05-06 16:54:41 +08:00
Jiang Jiang Jian
09d4767947 Merge branch 'mesh/power_save_function' into 'master'
mesh/ps: add duty control and support only transmit/receive on active duty

See merge request espressif/esp-idf!8152
2020-05-06 15:53:49 +08:00
David Cermak
c2053a8e65 esp_netif: fix default connect handler to check dhcpc return value
Closes https://github.com/espressif/esp-idf/issues/5184
2020-05-06 07:26:50 +02:00
Ivan Grokhotkov
a97cd645ad Merge branch 'bugfix/linenoise_stack_alloc' into 'master'
console: linenoise: move allocations from stack to heap, fix calloc result checking (Github PR)

Merges https://github.com/espressif/esp-idf/pull/5161

Closes IDFGH-3144

See merge request espressif/esp-idf!8612
2020-05-06 13:21:56 +08:00
Ivan Grokhotkov
30a6a8f932 Update linenoise.c: calloc returning NULL is not handled
Calloc function tries to allocate 4096 bytes.
If such memory is not available, it returns NULL pointer.
This exception was not handled in the code, causing a dirty crash.
2020-05-06 13:21:56 +08:00
Jiang Jiang Jian
62c36a0372 Merge branch 'feature/enable_wpa3_pmf_by_default' into 'master'
esp_wifi: Enable WPA3 & PMF by default

See merge request espressif/esp-idf!8600
2020-05-06 10:53:13 +08:00
Piyush Shah
62e1d6712b mbedtls: Add config options for chacha20, poly1305 and chachapoly 2020-05-05 16:41:31 +00:00
David Cermak
a8e370eced tcp_transport: unit test for tcp connection timeout 2020-05-05 15:53:09 +02:00
David Cermak
6182e6f303 tcp_transport: close to return error only for socket error or invalid args
Closes https://github.com/espressif/esp-idf/issues/4872
2020-05-05 15:53:09 +02:00
boarchuz
0c7204e934 tcp_transport: Implement connect timeout
Merges https://github.com/espressif/esp-idf/pull/3791
Closes https://github.com/espressif/esp-idf/issues/5004
2020-05-05 15:53:09 +02:00
chenyudong
bdb6565757 mesh/ci: fix MESH_EST_0216 2020-05-05 18:07:31 +08:00
qiyuexia
4522ef8798 mesh: add duty cycle control and support only transmit/receive in actve duty cycle 2020-05-05 18:06:47 +08:00
Ivan Grokhotkov
d73470a8a6 Merge branch 'bugfix/loadable_elf_fixes' into 'master'
cmake: loadable elf fixes

See merge request espressif/esp-idf!8603
2020-05-05 17:02:48 +08:00
David Čermák
35386ba24c Merge branch 'bugfix/ppp_netif_up_after_new' into 'master'
esp-netif: ppp netif to use netif_is_link_up() to update interface state

Closes IDFGH-3044

See merge request espressif/esp-idf!8423
2020-05-05 16:37:47 +08:00
Ivan Grokhotkov
b0f448a972 Merge branch 'feature/console_no_empty_lines' into 'master'
console: allow not returning empty lines (Github PR)

Closes IDFGH-2869

See merge request espressif/esp-idf!8232
2020-05-05 16:12:50 +08:00
Angus Gratton
a0a7051af3 Merge branch 'bugfix/panic_fixes' into 'master'
panic handling fixes

See merge request espressif/esp-idf!8597
2020-05-05 12:16:09 +08:00
Angus Gratton
cecf4622bc Merge branch 'bugfix/secure_boot_v2_fixes' into 'master'
Small secure boot v2 fixes

See merge request espressif/esp-idf!8462
2020-05-05 11:13:30 +08:00
Ivan Grokhotkov
b09ed2d2aa esptool: fix malformed json when no files are flashed 2020-05-04 19:11:26 +02:00
Ivan Grokhotkov
dafd50934d esptool: don't generate flashing metadata in loadable elf build 2020-05-04 19:11:00 +02:00
Felipe Neves
6f5e43e26a heap: added alloc failed hook and configuration options
heap/test: added alloc failed hook tests

docs: added alloc failed hook documentation

heap: add function to register allocation failed hook

docs: allocation failed hook docs improvements
2020-05-04 10:58:38 -03:00
Ivan Grokhotkov
aac3e56a9a newlib: initialize syscall_table_ptr_app in single core mode
ESP32 ECO3 ROM uses syscall_table_ptr_app on both CPUs, so the pointer
needs to be set if running in single core mode.
2020-05-04 10:55:34 +00:00
Nachiket Kukade
107cf56e20 esp_wifi: Enable WPA3 & PMF by default
In wifi station example, set PMF(Protected Management Frames)
configuration to capable. Set WPA3 Feature in menuconfig enabled
by default. This will allow device to establish more secured
connection with AP's that support these protocols.
2020-05-04 16:02:14 +05:30
Ivan Grokhotkov
66889a7a58 esp32s2: return correct CPU number in esp_cache_err_get_cpuid 2020-05-04 10:13:14 +00:00
Ivan Grokhotkov
c5f664d4ac esp_system: remove duplicated esp_digital_reset function
esp_digital_reset was defined both in system_api.c and panic_handler.c
2020-05-04 10:13:14 +00:00
Ivan Grokhotkov
8bdfb265a4 panic handler: fix cache error handling 2020-05-04 10:13:14 +00:00
Ivan Grokhotkov
0a389b1764 esp_system: restore weak esp_reset_reason functions 2020-05-04 10:13:14 +00:00
Shubham Kulkarni
34d41645d3 touch_sensor.c: Fix datatype of argument for timer callback function 2020-05-04 13:26:58 +05:30
Shubham Kulkarni
f2cdebd906 esp_wps.c: Fix datatype for wps task handle 2020-05-04 13:26:58 +05:30
Ivan Grokhotkov
17d60faf17 Merge branch 'bugfix/ci_missed_deprecated_options' into 'master'
Fix missed deprecated Kconfig option caused by tabs in sdkconfig.rename

See merge request espressif/esp-idf!8585
2020-05-04 15:55:24 +08:00
Angus Gratton
d013105256 Merge branch 'feature/twdt_prints_backtrace' into 'master'
Add Task Watchdog backtrace printing

Closes IDF-1072

See merge request espressif/esp-idf!8136
2020-05-04 14:58:53 +08:00
Angus Gratton
bf23e66f2b Merge branch 'bugfix/flash_enc_rom_basic' into 'master'
flash encryption: Fix unncessary efuse burn, remove ROM BASIC efuse on S2

See merge request espressif/esp-idf!8587
2020-05-04 14:56:27 +08:00
Ivan Grokhotkov
dfbf8ce518 Merge branch 'bugfix/display_partition_table' into 'master'
partition_table: do not always display partition table contents on build

See merge request espressif/esp-idf!8289
2020-05-04 14:51:32 +08:00
David Cermak
acdadebfff esp-netif: ppp netif to use netif_is_link_up() to update interface state
Closes https://github.com/espressif/esp-idf/issues/5069
2020-05-04 06:46:35 +00:00
David Čermák
2e06e9c15b Merge branch 'feature/dhcps_config_mask' into 'master'
dhcp sever: Make option netmask configurable

Closes IDFGH-2955

See merge request espressif/esp-idf!8238
2020-05-04 14:22:55 +08:00
David Čermák
6f4ea99f83 Merge branch 'bugfix/mqtt_ref_update' into 'master'
mqtt: cleanup logs and docs

Closes IDFGH-3052

See merge request espressif/esp-idf!8547
2020-05-04 13:41:08 +08:00
Angus Gratton
b2417819fd Merge branch 'bugfix/erase_with_vtaskdelay' into 'master'
spi_flash: Add vTaskDelay while a long erasing

Closes IDF-1561 and IDFGH-261

See merge request espressif/esp-idf!8211
2020-05-04 08:46:08 +08:00
Angus Gratton
158ab5a9b9 Remove "disable ROM BASIC boot mode" from ESP32-S2
Feature removed from ESP32-S2 ROM (was present in S2 Beta ROM)
2020-05-01 16:16:47 +10:00
Angus Gratton
d4d4d7324a efuse: Don't need to burn WR_CRYPT_CNT if CRYPT_CNT is already max
Reduces write cycles, and useful on ESP32 ECO3 as UART_DIS_DL is protected by
the same efuse.

Also fixes accidental macro definition introduced in 7635dce502
2020-05-01 16:16:47 +10:00
Roland Dobai
58bbd99b9c Fix missed deprecated Kconfig option caused by tabs in sdkconfig.rename 2020-04-30 18:23:21 +02:00
David Cermak
78ea8a9ed5 mqtt: clenaup logs and docs
esp_mqtt: Change an error print to use ESP_LOGE instead of ESP_LOGI
Move Sending MQTT connect message log from Info to Debug level
docs: Makes clear that publish API could block
Change the message printed after MQTT connection failure

Closes https://github.com/espressif/esp-idf/issues/5077
(by means of referencing commit 615aeae0c2)
2020-04-30 14:05:36 +00:00
David Cermak
2fce539d1e esp-netif: use dhcp server netmask
Use the configured esp-netif netmask to update the dhcp struct when
starting the server or starting the netif itself.
Use the netmask in dhcps setters and getters.
2020-04-30 14:04:22 +00:00
David Cermak
fa57bdbdbe dhcpserver: make subnet mask configurable
Closes https://github.com/espressif/esp-idf/issues/4988
2020-04-30 14:04:22 +00:00
Island
2ad2d0a701 Merge branch 'bugfix/ble_mesh_node_reset_erase' into 'master'
ble_mesh: Fix node not erase info completely

Closes BLEMESH-195

See merge request espressif/esp-idf!8561
2020-04-30 16:39:57 +08:00
Jiang Jiang Jian
4eec0ea4bb Merge branch 'bugfix/optimization_API_esp_wifi_deauth_sta' into 'master'
bugfix: optimization API esp_wifi_deauth_sta

Closes WIFI-1699

See merge request espressif/esp-idf!8363
2020-04-30 16:20:32 +08:00
lly
eaeb465767 ble_mesh: Fix node not erase info completely
Previously only mesh node info is supported to be stored
in flash. So when trying to reset the node, we only need
to judge if the BLE_MESH_VALID flag is set.
Currently we support storing both node & Provisioner info
in flash, when trying to erase the node info from flash,
the BLE_MESH_NODE flag will be checked. So we need to set
bt_mesh.flags to 0 when all the erase operations are done.
2020-04-30 06:42:54 +00:00
Angus Gratton
d041512022 Merge branch 'feature/mesh_ip_network_example' into 'master'
ESP-MESH: IP internal network example

See merge request espressif/esp-idf!7724
2020-04-30 14:33:16 +08:00
KonstantinKondrashov
bc50bd2806 spi_flash(new driver): Add a Kconfig option - Bypass a block erase and always do sector erase
Closes: IDF-1561
2020-04-30 13:58:13 +08:00
KonstantinKondrashov
304f67e42a spi_flash(LEGACY_IMPL): Add a Kconfig option - Bypass a block erase and always do sector erase
Closes: IDF-1561
2020-04-30 13:58:13 +08:00
KonstantinKondrashov
0f6fe0c8e9 spi_flash: Add into sim/stubs the esp_timer 2020-04-30 13:58:13 +08:00
KonstantinKondrashov
ae89f98d59 spi_flash(new driver): Add vTaskDelay while a long erasing 2020-04-30 13:58:13 +08:00
KonstantinKondrashov
3cb655eaab spi_flash(LEGACY_IMPL): Add vTaskDelay while a long erasing
Added Kconfig options to enable yield operation during flash erase

Closes: https://github.com/espressif/esp-idf/issues/2083
Closes: https://github.com/espressif/esp-idf/issues/4916
Closes: IDFGH-261
2020-04-30 13:58:13 +08:00
Angus Gratton
fdd6bfe3c4 Merge branch 'bugfix/sleep_comments' into 'master'
doc: Specify that sleep wakeup source restrictions apply to all current ESP32 revisions

See merge request espressif/esp-idf!8351
2020-04-30 13:36:58 +08:00
Francesco Giancane
1173ce32f6 endian.h: define non-standard symbols for endian handling
BSDs and Unices defined some non standardised functions and symbols used
for endianness handling: converting from Little Endian to Big Endian,
converting from Host to a specific representation, converting from a
specific representation to Host.

With this commit, a modified version of those symbols provided by
FreeBSD is imported.

The license of the imported code is still 2-Clause BSD.

Signed-off-by: Francesco Giancane <francesco.giancane@accenture.com>
Closes https://github.com/espressif/esp-idf/pull/4784
2020-04-29 23:47:51 +02:00
Francesco Giancane
6f8ce38f99 Introduce <endian.h> compatibility header
Programs and libraries using compiler and system information about
endianness often include the system header `<endian.h>`.

In `xtensa-gcc` compiler with `newlib` distribution, that file is located in
`<machine/endian.h>`; this means that `#include <endian.h>` would fail
at compile time.

This commit fixes the issue by adding a compatibility `<endian.h>`
header which in turn just includes `<machine/endian.h>`.

Signed-off-by: Francesco Giancane <francesco.giancane@accenture.com>
Merges https://github.com/espressif/esp-idf/pull/4784
2020-04-29 23:47:51 +02:00
Ivan Grokhotkov
ece41b04e3 console: make empty line behavior run-time configurable 2020-04-29 23:44:46 +02:00
Michael 'ASAP' Weinrich
c34352549a Added Kconfig for enabling 0 length returns from linenoise 2020-04-29 23:44:46 +02:00
MadnessASAP
dfd4227e7a Don't return NULL on 0 length input
A 0 length string is still a valid input and should be treated as such, a NULL return should be reserved for when errors occur during line editing or EOF is reached.

Merges https://github.com/espressif/esp-idf/pull/4926
2020-04-29 23:44:46 +02:00
Island
18950d5780 Merge branch 'bugfix/ble_mesh_provisioner_check_key' into 'master'
ble_mesh: Check if appkey exist before deleting it

See merge request espressif/esp-idf!8332
2020-04-29 21:12:14 +08:00
Jiang Jiang Jian
922a0fa485 Merge branch 'feature/esp-hid-component' into 'master'
ESP-HID Component

See merge request espressif/esp-idf!6908
2020-04-29 17:24:02 +08:00
Hristo Gochkov
25281ef4de Add HID Support to IDF
- Adds HID Host support in Buedroid
- Adds BLE HID Host and Device support
- Adds some general HID utilities and definitions to help integrate with other stacks and native USB
2020-04-29 17:24:01 +08:00
Ivan Grokhotkov
d311144a00 soc/usb: use new headers in LL, move some code out of LL
* Keep only USB related register operations in the LL.
* Move pad-related logic into the driver.
* Driver is now responsible for enabling the peripheral.
2020-04-29 10:04:13 +02:00
Ivan Grokhotkov
897e69cc9d soc, esp32s2: add usb_wrap peripheral 2020-04-29 10:04:13 +02:00
ronghulin
3c8ed7b8c9 bugfix: optimization API esp_wifi_deauth_sta 2020-04-29 14:31:16 +08:00
David Čermák
570bc3dbbc Merge branch 'bugfix/mdns_remove_mbedtls_dep' into 'master'
mdns: Remove mbedtls dependency

Closes IDFGH-3177

See merge request espressif/esp-idf!8538
2020-04-29 13:47:47 +08:00
Angus Gratton
c41a0c1907 Merge branch 'feature/gdb_stub_task_state' into 'master'
feature/gdb_stub: make task state available on info thread command when in gdb stub.

Closes IDF-720

See merge request espressif/esp-idf!8371
2020-04-29 13:21:31 +08:00
Angus Gratton
5c1d317766 Merge branch 'bugfix/scheduling_time_test_overflow' into 'master'
bugfix/freertos: Fix accumulator overflow on scheduling time test

See merge request espressif/esp-idf!8261
2020-04-29 13:18:44 +08:00
zhangyanjiao
b96652c257 wifi changes:
1. fix the bug for softAP update second channel wrong
2. query country code wrong when policy change from manual to auto
3. change wifi_scan_time_t from union to struct
2020-04-28 20:02:25 +08:00
Jiang Jiang Jian
aad3b0e3a2 Merge branch 'bugfix/coex_fix_wifi_performance_when_ble_conn' into 'master'
Coexistence: Add coexist API to enable BLE connection dynamic priority

See merge request espressif/esp-idf!8466
2020-04-28 19:55:31 +08:00
Island
8ef0b66a3b Merge branch 'bugfix/ble_mesh_compile_error_o2' into 'master'
ble_mesh: Fix compile error when -O2 (performance) is chosen

Closes BLEMESH-187

See merge request espressif/esp-idf!8217
2020-04-28 17:29:09 +08:00
Jiang Jiang Jian
1b5c42b9b0 Merge branch 'bugfix/supplicant_log_enable_issue' into 'master'
wpa_supplicant: Minor bugfix with wpa_supplicant debug logs.

See merge request espressif/esp-idf!8397
2020-04-28 16:29:19 +08:00
baohongde
95f47a2d4d Coexistence: Add coexist API to enable BLE connection dynamic priority 2020-04-28 16:16:27 +08:00
Jiang Jiang Jian
528edf85cd Merge branch 'bugfix/pmf_cert_fixes' into 'master'
esp_wifi: Update wifi lib

Closes WIFI-2251

See merge request espressif/esp-idf!8468
2020-04-28 14:41:12 +08:00
Nachiket Kukade
59e8e407a0 wpa_supplicant: Disable TLSv1.2 by default
Some Enterprise Authentication Servers do not support TLS v1.2.
Move this option to Menuconfig and disable by default.
2020-04-28 10:05:35 +05:30
Jiang Jiang Jian
df5cead7e6 Merge branch 'fixbug/tcp_kill_state_assert' into 'master'
lw-ip:fixbug for tcp kill state assert

Closes WIFI-2195

See merge request espressif/esp-idf!8449
2020-04-28 11:43:29 +08:00
Mahavir Jain
4a558131ea Merge branch 'bugfix/http_client_read' into 'master'
Fix error handling in esp_http_client_read and esp_https_ota_perform

Closes IDFGH-2916 and IDF-1516

See merge request espressif/esp-idf!8166
2020-04-28 06:07:15 +08:00
Darian Leung
b097dd0a79 Add Task Watchdog backtrace printing
This commit makes the Task Watchdog print the backtrace of both
cores when it times out.
2020-04-27 18:11:29 +00:00
Felipe Neves
c78ddb770a docs: added information of task states on fatal errors documentation. 2020-04-27 14:41:55 +00:00
Felipe Neves
c296d01737 gdbstub: added cpu id of running tasks to the output 2020-04-27 14:41:55 +00:00
Felipe Neves
5279e68146 gdbstub: improve format of info thread command output
gdbstub: simplify the state handling on extra thread info
2020-04-27 14:41:55 +00:00
Felipe Neves
9a54a0af13 gdbstub: added task state information on qThreadExtraInfo command 2020-04-27 14:41:55 +00:00
Felipe Neves
140c5e0677 freertos: added task state field inside of TaskSnapshot_t to capture it. 2020-04-27 14:41:55 +00:00
Felipe Neves
5847e0afd2 freertos/test: fix overflow on accumulator used on scheduling time test 2020-04-27 14:20:13 +00:00
Nachiket Kukade
f9970b8e29 esp_wifi: Update wifi lib
PMF Certification fixes -
1. Check return status of decrypt operation. Fixes 5.3.3.1.
2. Allow PMF negotiation for WPA2-Enterprise. Fixes 5.3.3.2, 5.3.3.4.
3. Add NULL check on key before encrypting PMF, fixes crash.

Closes WIFI-2251
2020-04-27 13:32:09 +00:00
Krzysztof Budzynski
c5c026557e Merge branch 'doc/hmac_S2' into 'master'
Doc: Documentation for HMAC module

See merge request espressif/esp-idf!8383
2020-04-27 19:03:01 +08:00
Jiang Jiang Jian
17d7f3cb17 Merge branch 'fixbug/set_dhcp_time_fail' into 'master'
lw-ip:fixbug for set dhcp time fail

Closes WIFI-2152

See merge request espressif/esp-idf!8374
2020-04-27 16:48:34 +08:00
Jiang Jiang Jian
a559bf51ff Merge branch 'bugfix/ble_mesh_time_scene_wrong_name' into 'master'
ble_mesh: Fix time scene wrong macro name

See merge request espressif/esp-idf!8331
2020-04-27 16:19:49 +08:00
lly
c8a7d20946 ble_mesh: Check if appkey exist before deleting it 2020-04-27 06:27:35 +00:00
lly
fab9b944a4 ble_mesh: Add length check for some mesh operations 2020-04-27 14:24:07 +08:00
lly
c77b7394ed ble_mesh: Fix compile error when -O2 (performance) is chosen 2020-04-27 14:24:07 +08:00
Angus Gratton
9300615a13 Merge branch 'bugfix/heap_psram_fill' into 'master'
heap: Only fill new heaps with FREE_FILL_PATTERN if Comprehensive poisoning is on

See merge request espressif/esp-idf!8210
2020-04-27 14:20:41 +08:00
Shubham Kulkarni
21c2019973 esp_https_ota.c: Add fix to return failure if (-1) is returned from esp_http_client_read
Closes https://github.com/espressif/esp-idf/issues/4960
2020-04-27 05:17:04 +00:00
Shubham Kulkarni
4c166085fb esp_http_client.c: In esp_http_client_read, add fix to return (-1) if esp_transport_read fails 2020-04-27 05:17:04 +00:00
Michael (XIAO Xufeng)
9d98111652 Merge branch 'bugfix/spi_bus_lock_missing_semphrstatic' into 'master'
spi: fix config break and reduce overhead of the bus lock on SPI1

Closes IDFGH-3017

See merge request espressif/esp-idf!8221
2020-04-27 12:57:19 +08:00
Jakob Hasse
2da7e65646 Doc: S2 HMAC documentation 2020-04-27 12:25:46 +08:00
lly
75cf2d7a17 ble_mesh: Fix time scene wrong macro name 2020-04-27 04:17:04 +00:00
Island
feb7f9683c Merge branch 'bugfix/ble_mesh_add_missing_cpp' into 'master'
ble_mesh: Add missing #ifdef __cplusplus

Closes BLEMESH-194

See merge request espressif/esp-idf!8310
2020-04-27 11:47:44 +08:00
Island
1e12673b3c Merge branch 'feat/ble_mesh_sensor_model_example' into 'master'
ble_mesh: Add ble mesh sensor model examples

Closes BLEMESH-190

See merge request espressif/esp-idf!8253
2020-04-27 11:47:06 +08:00
Island
71dc5eb276 Merge branch 'doc/ble_mesh_fixes' into 'master'
doc: Fix some ble mesh description

Closes BLEMESH-189

See merge request espressif/esp-idf!8240
2020-04-27 11:43:48 +08:00
lly
91d70cd128 ble_mesh: Add missing #ifdef __cplusplus 2020-04-26 06:50:35 +00:00
lly
77bb7806a0 ble_mesh: Fix client local parameters not initialized 2020-04-26 06:25:08 +00:00
lly
713581ae87 ble_mesh: Continue node info restore even if failure happens
During BLE Mesh Provisioner initialization, the stack will restore
the nodes information if settings storage is enabled.
Previously when a failure happens (e.g. found the same uuid) during
the restore procedure, the information of the following nodes will
not be restored and error will be directly returned.
But this will introduce some problem with user experience, because
some newly provisioned nodes information will not be restored and
Provisioner will not be able to control those nodes.
So we change the operation here, when a failure happens during the
restore procedure, Provisioner will only ignore the information of
the current node and continue restoring other nodes information.
2020-04-26 06:25:08 +00:00
lly
73804ef4d3 ble_mesh: Remove some redundant functions 2020-04-26 06:25:08 +00:00
lly
f37bc1a515 ble_mesh: Notify unprovisioned device beacon to application layer
With this change, if a Provisioner has provisioned the maximum
number of nodes, it can still report the unprovisioned device
beacon from other nodes to the application layer. And this will
be more reasonable compared with the previous implementation.
Previously when the node array of Provisioner is full, no beacon
from unprovisioned devices will be reported, only some warning
logs will be given.
2020-04-26 06:25:08 +00:00
lly
88b0cd918a ble_mesh: Check if assigned node address is duplicated
Previously only check the node address when it is assigned by the
application layer. Here we also check the address when the address
is allocated internally. And this will be useful when some mesh
internal tests are performed.
2020-04-26 06:25:08 +00:00
lly
7486616382 ble_mesh: Update next alloc address when node info is added 2020-04-26 06:25:08 +00:00
lly
a4d9259912 ble_mesh: Fix Provisioner provisioning deadlock 2020-04-26 06:25:08 +00:00
lly
8d57ebf57d ble_mesh: Remove BLE_MESH_MAX_STORED_NODES option
Previously the BLE_MESH_MAX_STORED_NODES option is added for
internal mesh test, which will be a little confusing for the
users to understand.
Here we remove this option, instead the BLE_MESH_MAX_PROV_NODES
will be used for all the cases. For mesh internal test, when
the test function is called to add some nodes info, the info
will be stored in the array of provisioned nodes directly.
2020-04-26 06:25:08 +00:00
lly
ec2324edbe ble_mesh: Associate replay protection list size with nodes count
The replay protection list of Provisioner should be at least equal
to the number of nodes with the precondition that each node contains
only one element.
The help information of replay protection list is updated, and the
maximum number of nodes for Provisioner is adjusted based on the
replay protection list size.
2020-04-26 06:25:08 +00:00
lly
2f6a4140fa doc: Fix some ble mesh description 2020-04-26 06:22:33 +00:00
lly
e8c5f5dc03 ble_mesh: Add some common macros for sensor model 2020-04-26 06:08:44 +00:00
lly
361dd8b29c ble_mesh: Allow empty sensor series column value 2020-04-26 06:08:44 +00:00
lly
561191d50f ble_mesh: Check if same sensor (settings) property id exists 2020-04-26 06:08:44 +00:00
lly
3862f0e784 ble_mesh: Allow empty sensor settings exist 2020-04-26 06:08:44 +00:00
Axel Lin
f4a4549a34 mdns: Remove mbedtls dependency
mdns does not use mbedtls, so remove mbedtls dependency.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
2020-04-26 12:07:28 +08:00
Angus Gratton
bb0a95b17c spi_flash s2: Fix encrypted writes when legacy implementation disabled
ROM function didn't use correct Addr bitlen if legacy was disabled on ESP32-S2
2020-04-24 12:43:47 -03:00
Angus Gratton
dbdce93d23 spi_flash: Use per-chip flash_ops files for legacy API
Looks like when ESP32-S2 Beta support was merged, the separate files
were dropped by accident.
2020-04-24 12:43:47 -03:00
Felipe Neves
95bc186846 flash_encryption: Fix next spi boot crypt counter value after a plaintext flash 2020-04-24 12:43:47 -03:00
Felipe Neves
f7ccc081a5 flash_encryption: replace spi crypt count efuse burning function by a esp_efuse_API
flash_encryption: modify additional efuses burning method to fix them are not being written

flass_encryption: burn efuse to disable boot from RAM space

flash_encryption: added better checking for key generation state plus set read and write protect for them

soc esp32s2: Add register-level bit definitions for read & wrote protect bits

esp32s2: Fixes for flash encryption

- Write efuses in a batch
- Fix some detection of whether existing efuse blocks are read/write protected
2020-04-24 12:43:47 -03:00
Felipe Neves
6f27992430 flash_encryption: return more clear error codes when bootloader encryption fails 2020-04-24 12:43:47 -03:00
Felipe Neves
b3d8847406 flash_encryption: added wdt feed during encryption process to avoid undesired reset. 2020-04-24 12:43:47 -03:00
Felipe Neves
7635dce502 bootloader/flash_encrypt: added esp32s2 flash encryption code on build system and enabled example
flash_enctryption: enabled flash encryption example on esp32s2

bootloader: raise WDT overflow value providing sufficient interval to encrypt app partition

flash_ encrypt: Fixed the TODOs on flash encryption key generation for esp32s2

flash_encryption: added secure boot features to flash enctryption for esp32s2

bootloader: leave only esp32s2 compatible potentially insecure options on menuconfig.

flash_encryption: removed secure boot version 1 from esp32s2 encryption code

flash_encryption:  added  CONFIG_SECURE_FLASH_REQUIRE_ALREADY_ENABLED option for esp32s2

flash_encryption: fixed the count of left plaintext flash

flash_encryption: disable dcache and icache download when using encryption in release mode

flash_encryption:  add cache potentally insecure options for s2 chips

flash_encryption: fixed bug which bricked some chips in relase mode
2020-04-24 12:43:47 -03:00
Ivan Grokhotkov
cd1aba595e Merge branch 'bugfix/mpu_panic' into 'master'
Fix issue with mpu illegal access test

See merge request espressif/esp-idf!8418
2020-04-24 20:54:08 +08:00
Michael (XIAO Xufeng)
77d5e4b4e2 Merge branch 'bugfix/timer_group_intr_enable' into 'master'
Bugfix/timer group intr enable

Closes IDFGH-3082

See merge request espressif/esp-idf!8340
2020-04-24 18:28:36 +08:00
Renz Bagaporo
5abb4f6455 esp_system, esp_common: fixes to some panic handler refactor issues 2020-04-24 16:34:15 +08:00
Renz Bagaporo
4571fb219f soc: change region in mpu test
Previously, the test uses region 3 for the illegal access test
(0x60000000 - 0x7fffffff). This caused issues with there being
peripherals located in that memory range. Change to use region 4
(0x8000000 - 0x9fffffff) instead).
2020-04-24 16:34:15 +08:00
David Cermak
9e58d94a42 esp-mesh: Added example showing internal IP capable mesh network 2020-04-24 07:32:58 +02:00
David Cermak
bcee69ae06 esp-netif: Enable easier configuration of custom DHCP server address 2020-04-24 07:32:58 +02:00
Angus Gratton
b26f93415e secure boot v2: Add anti-FI check that secure boot not enabled yet
Prevent a fault from causing bootloader to trust the provided signature incorrectly.
2020-04-24 15:03:31 +10:00
Angus Gratton
fc4b653729 secure boot v2: Don't check efuse BLK2 if only boot-time signature verification is enabled 2020-04-24 15:03:03 +10:00
Angus Gratton
fc0d6a99f8 secure boot v2: Don't log warnings when BLK2 is empty as expected
If BLK2 is empty then it's OK to continue with a warning (otherwise it may spook users into thinking
something this is wrong, but this is the expected workflow.)

If BLK2 is not empty and doesn't match then we need to fail because it won't be possible to
trust the signature.
2020-04-24 14:43:55 +10:00
Jiang Jiang Jian
79288f25e4 Merge branch 'bugfix/fix_esp32s2_package_recv_issue' into 'master'
esp_wifi: Update esp32s2 phy lib v303

Closes WIFI-2141 and WIFI-2142

See merge request espressif/esp-idf!8321
2020-04-24 11:19:48 +08:00
Ivan Grokhotkov
275ed32a11 Merge branch 'feature/esp32s2_iram_dram_protection' into 'master'
esp32s2: IRAM/DRAM memory protection

See merge request espressif/esp-idf!8156
2020-04-23 21:52:54 +08:00
morris
91e62f4e37 timer_group: update hal api && fix intr_enable
timer group interrupt enable is controled by level_int_ena instead of int_ena

Closes https://github.com/espressif/esp-idf/issues/5103
2020-04-23 19:29:15 +08:00
morris
e0b9f7be6d periph_clk_gating: add reference counter 2020-04-23 19:29:15 +08:00
morris
99f0dc78c8 soc: remove mcpwm description file from esp32s2 2020-04-23 19:26:55 +08:00
xueyunfei
4e2989e40c fixbug for tcp kill state assert 2020-04-23 15:38:49 +08:00
Michael (XIAO Xufeng)
7ec4d64b80 spi: Update documents about the bus lock and how to use SPI Master on SPI1 bus 2020-04-23 12:27:25 +08:00
Ivan Grokhotkov
28efe511f4 Merge branch 'bugfix/semihosting_write' into 'master'
Semihosting fixes for write and the  semihost example

See merge request espressif/esp-idf!8290
2020-04-23 06:26:41 +08:00
Mahavir Jain
44939a6b1e Merge branch 'feature/iram_data_bss' into 'master'
esp32: IRAM_DATA_ATTR and IRAM_BSS_ATTR introduced

See merge request espressif/esp-idf!8377
2020-04-22 21:44:44 +08:00
michael
1ca25688a8 freertos: place xQueueGenericCreateStatic into flash
`xQueueGenericCreateStatic` is placed into flash by the linker script to
reduce IRAM usage.  This will also cause the `xRingbufferCreate` not
not callable when cache is disabled.
2020-04-22 16:06:13 +08:00
michael
fdf983e0c4 spi: fix config break and reduce overhead of the bus lock on SPI1
The SPI bus lock on SPI1 introduces two side effects:

1. The device lock for the main flash requires the
`CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION` to be selected, however this
option is disabled by default in earlier IDF versions. Some developers
may find their project cannot be built by their old sdkconfig files.

2. Usually we don't need the lock on the SPI1 bus, due to it's
restrictions. However the overhead still exists in this case, the IRAM
cost for static version of semaphore functions, and the time cost when
getting and releasing the lock.

This commit:

1. Add a CONFIG_SPI_FLASH_BYPASS_MAIN_LOCK option, which will forbid the
space cost, as well as the initialization of the main bus lock.

2. When the option is not selected, the bus lock is used, the
`CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION` will be selected explicitly.

3. Revert default value of `CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION`
to `n`.

introduced in 49a48644e4.

Closes https://github.com/espressif/esp-idf/issues/5046
2020-04-22 16:06:13 +08:00
Wang Jia Lin
e3f85faee5 Merge branch 'bugfix/fix_spi_flash_clock_config_error' into 'master'
flash: fix spi flash clock config error

Closes IDFGH-3077

See merge request espressif/esp-idf!8384
2020-04-22 12:44:17 +08:00
Martin Vychodil
7491ea677a esp32s2: IRAM/DRAM memory protection
* new mem_prot API
* mem_prot on & locked by default (see Kconfig)
* feature activated in start_cpu0_default()

JIRA IDF-1355
2020-04-21 15:10:58 +02:00
Michael (XIAO Xufeng)
e2fc591a20 Merge branch 'bugfix/esp_flash_revert_qe_clear' into 'master'
esp_flash: fix the regression of non-quad mode by default chip driver, bugs in add_device and deprecate cs_id

See merge request espressif/esp-idf!8260
2020-04-21 17:52:42 +08:00
xueyunfei
b2a3b2a4f4 fixbug for set dhcp time fail 2020-04-21 14:28:39 +08:00
Ivan Grokhotkov
1a7dbe22da Merge branch 'bugfix/wrong_cpp_guard' into 'master'
Bugfix/wrong cpp guard

Closes IDFGH-3129 and IDF-1219

See merge request espressif/esp-idf!8403
2020-04-20 18:47:28 +08:00
Jiang Jiang Jian
80e5eb896c Merge branch 'optimization/DNS_get_function' into 'master'
lw-ip:optimization DNS get function

Closes WIFI-1566

See merge request espressif/esp-idf!8244
2020-04-20 16:52:22 +08:00
morris
5d0860f2e8 fix broken CONFIG_LEGACY_INCLUDE_COMMON_HEADERS 2020-04-20 14:01:09 +08:00
Hrudaynath Dhabe
d8a7cfdde4 wpa_supplicant: Minor bugfix with wpa_supplicant debug logs. 2020-04-19 16:40:06 +05:30
dowster
7b02fdf45a Fix typo with sigmadelta.h #ifdef 2020-04-17 22:52:00 -05:00
Sachin Parekh
1e6c25992e esp32: IRAM_DATA_ATTR and IRAM_BSS_ATTR introduced
Using these attributes, .data and .bss can be placed in IRAM

Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2020-04-17 19:35:23 +05:30
Michael (XIAO Xufeng)
9d9d22c920 esp_flash: deprecate the cs_id member, which is no longer used.
We used to manually specify the CS id. However after the SPI bus lock is
introduced, the lock is responsible to assign the CS lines and provide
the CS id. The esp_flash driver now depends on the ID assigned by the
SPI bus lock, the configuration field is deprecated.
2020-04-17 18:15:33 +08:00
Michael (XIAO Xufeng)
5404e3d434 esp_flash: fix cache exception when CS pin is through IOMUX 2020-04-17 18:15:33 +08:00
Michael (XIAO Xufeng)
11501dbaa9 esp_flash: fix the cleanup when add device fails 2020-04-17 18:15:32 +08:00
Michael (XIAO Xufeng)
dc26065a72 esp_flash: fix the regression of non-quad mode by default chip driver
The issue is introduced in 571864e8ae. The
esp_flash API tries to clear the QE bit when the flash is not working in
quad modes.

However this introduces a regression, compared to earlier versions and
the legacy API. When the chip is not detected, the generic chip driver
is used, which cannot 100% handle the QE bit properly for all flash
vendors. There may be some flash chips (e.g. MXIC) that can be used in
dual modes by legacy API, but output wrong data when the esp_flash API
clears the QE bit in a wrong way.

This commit reverts the QE force clearing behavior, so that it's safer
for the generic chip driver to work under dual modes.
2020-04-17 18:15:31 +08:00
Ivan Grokhotkov
b732abec7f Merge branch 'bugfix/freemodbus_add_cpp_extern' into 'master'
freemodbus: add extern c block into common header for cpp

Closes IDFGH-3046

See merge request espressif/esp-idf!8281
2020-04-17 17:56:51 +08:00
Alex Lisitsyn
b1fe4c4cc6 freemodbus: add extern c block into common header for cpp 2020-04-17 17:56:50 +08:00
Ivan Grokhotkov
9003c01b4b Merge branch 'init_priority_fix' into 'master'
CXX: make __attribute__((init_priority(n))) work

See merge request espressif/esp-idf!8276
2020-04-17 17:56:10 +08:00
chenjianqiang
ec9cc27e08 flash: fix spi flash clock config error
Closes https://github.com/espressif/esp-idf/issues/5099
2020-04-17 16:26:26 +08:00
Mahavir Jain
4e71cb3e68 Merge branch 'bugfix/transport_ssl_reset_state_on_closure' into 'master'
transport_ssl: reset state on connection closure

See merge request espressif/esp-idf!8355
2020-04-16 12:38:58 +08:00
David Čermák
d043674b2b Merge branch 'feature/lwip_napt_forward' into 'master'
lw-IP: NAT support

Closes WIFI-931

See merge request espressif/esp-idf!7681
2020-04-16 03:03:00 +08:00
Andrei Gramakov
283026a761 vfs: semihost driver bugfix 2020-04-15 15:46:47 +02:00
Ivan Grokhotkov
882fd1b880 Merge branch 'bugfix/make_quoting_esptool_port' into 'master'
make: Fix quoting when flashing port is set via sdkconfig file

Closes IDFGH-3103 and IDFGH-3083

See merge request espressif/esp-idf!8352
2020-04-15 20:37:20 +08:00
xiehang
5d20610874 esp_wifi: Update esp32s2 phy lib v303 2020-04-15 20:18:42 +08:00
Mahavir Jain
49ce8d3fe5 transport_ssl: reset state on connection closure
For url redirection cases (HTTP status 301/302), internal
transport ssl connection state must be reinitialized for
successful (new) connection on updated url.

Closes https://github.com/espressif/esp-idf/issues/4598
2020-04-15 15:22:32 +05:30
Angus Gratton
100578a9e9 heap: Only fill new heaps with FREE_FILL_PATTERN if Comprehensive poisoning is on
Significantly speeds up heap initialization at startup when default "Light" heap
poisoning is enabled.

Tip via reddit user LinkeSeitentasche https://www.reddit.com/r/esp32/comments/fnj51a/a_guide_to_improving_esp32_boot_speed/
2020-04-15 07:16:08 +00:00
Angus Gratton
433c1c9ee1 Merge branch 'bugfix/ds_mpi_lock' into 'master'
crypto: DS uses RSA peripheral, added shared lock

See merge request espressif/esp-idf!8274
2020-04-15 15:15:25 +08:00
David Čermák
7993d5c1f7 Merge branch 'bugfix/mqtt_aborts' into 'master'
esp_mqtt_abort_connection: Fixed an issue which could result in a race condition

Closes IDF-1521

See merge request espressif/esp-idf!8205
2020-04-15 14:37:01 +08:00
David Čermák
5e51b5dd09 Merge branch 'bugfix/ws_client_fragmented_send' into 'master'
ws_client: fix fragmented send setting proper opcodes

Closes IDFGH-2938

See merge request espressif/esp-idf!8112
2020-04-15 14:06:42 +08:00
Jiang Jiang Jian
80cee782a6 Merge branch 'bugfix/make_compile_phy_multiple_bin_error' into 'master'
bugfix: fix make compile phy multiple bin error

See merge request espressif/esp-idf!8299
2020-04-15 14:03:27 +08:00