Commit Graph

10805 Commits

Author SHA1 Message Date
Morozov-5F
a8837aa378 secure boot v2: Fix crash if signature verification fails in app
sha_handle is "finished" when verify_secure_boot_signature() returns and
should be nulled out.

Alternative version of fix submitted in https://github.com/espressif/esp-idf/pull/6210

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

Signed-off-by: Angus Gratton <angus@espressif.com>
2020-12-31 14:43:47 +05:30
Omar Chebib
c218f669ba panic on RISC-V: Take into account Merge Request comments 2020-12-31 15:46:17 +08:00
Ivan Grokhotkov
5962b1dc56 panic: print register dump on abort for RISC-V
Register values are necessary to perform host-side backtracing on
RISC-V. Print them in case of an abort as well.
2020-12-31 15:46:17 +08:00
Omar Chebib
a90dcfba1a panic: Add support for SoC-level panic
Activate "invalid access to cache raises panic (PRO CPU)" CI unit
test in order to test SoC-level panics.
2020-12-31 15:46:17 +08:00
Omar Chebib
b6a450f824 panic: Add support for SoC-level panic
SoC level exceptions such as watchdog timer and cache errors are now supported.
Such exceptions now triggers a panic, giving more information about how
and when it happened.
2020-12-31 15:46:17 +08:00
Angus Gratton
e20833124e Merge branch 'feature/c3_build_master' into 'master'
C3: build on master

Closes IDF-1757 and IDF-2489

See merge request espressif/esp-idf!11822
2020-12-31 15:06:55 +08:00
XieWenxiang
ba89eeabfa component/bt: fix Blufi sends customer data will congested when connection is broken 2020-12-31 14:45:23 +08:00
Angus Gratton
db4fb49432 esp_common: Fix issue with SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY not visible on c3
Create a common symbol name to use from linker.lf fragments
2020-12-31 15:20:05 +11:00
Marius Vikhammer
eed154a583 esp_system: sync with C3 changes
Fixes interrupt allocation issue
2020-12-31 15:20:05 +11:00
Marius Vikhammer
f54e9269f3 esp_system: Don't compile sleep_mode.c on c3 2020-12-31 15:20:05 +11:00
Marius Vikhammer
68608f804c esp32c3: Misc fixes needed to build & run 2020-12-31 15:20:05 +11:00
Michael (XIAO Xufeng)
7f147e09e9 Merge branch 'fix/efuse_utility_early_logd' into 'master'
efuse: revert EARLY_LOGD to LOGD

See merge request espressif/esp-idf!11828
2020-12-31 11:46:57 +08:00
Marius Vikhammer
0301c66bf0 esp32c3: Disable components that are not yet supported 2020-12-31 09:27:38 +11:00
Marius Vikhammer
3458469204 newlib: Update esp32c3 ROM support, use single init function 2020-12-31 09:27:37 +11:00
Jakob Hasse
a7683fc256 [system/tools]: gdbstub support C3
Closes IDF-1757
Closes IDF-2489
2020-12-31 09:27:00 +11:00
Angus Gratton
62cc864cbe Merge branch 'feature/c3_hw_sup_merge_master' into 'master'
esp_hw_support: merge C3 changes to master

See merge request espressif/esp-idf!11820
2020-12-30 20:06:23 +08:00
Mahavir Jain
7d387cf65e Merge branch 'fix/i2c_pm_lock' into 'master'
i2c: Acquire PM lock after acquiring mutex

See merge request espressif/esp-idf!11704
2020-12-30 15:44:34 +08:00
Michael (XIAO Xufeng)
707b1bd9b1 efuse: revert EARLY_LOGD to LOGD
introduced in 5cc329b9d0
2020-12-30 12:37:44 +08:00
David Cermak
2c50ec2cf9 ci/test: Fix esp_http_client test not to use pointer after free 2020-12-30 05:33:51 +01:00
chaijie
d505474f78 1. Fix CPU switch to 160M issue;
2. increase lightsleep voltage to make sure wakeup successfully;
3. add judgement code to whether wait or not when switch CPU frequency.
2020-12-30 12:32:31 +08:00
Marius Vikhammer
eb788deb03 esp_hw_support: merge C3 changes to master
Merge RTC related C3 changes to master
2020-12-30 12:20:41 +08:00
xiehang
84e44914c0 esp_wifi: Update WiFi lib
1. Fix csa timer issue
2. Fix country code last byte to space instead of NULL
3. Fix softap cannot forward A-MSDU

Closes https://github.com/espressif/esp-idf/issues/6315
2020-12-30 03:34:11 +00:00
Angus Gratton
641b92da75 Merge branch 'feature/add_c3_target_master' into 'master'
tools: merge C3 changes into master

Closes IDF-2364 and IDF-2564

See merge request espressif/esp-idf!11800
2020-12-30 10:39:14 +08:00
Angus Gratton
1760f47681 Merge branch 'feature/newlib_lock_retarget' into 'master'
newlib 3.3.0 _RETARGETABLE_LOCKING support

Closes IDF-2129

See merge request espressif/esp-idf!9141
2020-12-30 09:11:35 +08:00
Ivan Grokhotkov
de798541dc tools: use riscv32-esp-elf toolchain for ESP32-S2 RISC-V ULP
riscv32-esp-elf toolchain (used for ESP32-C3) can also be used for
ESP32-S2 RISC-V ULP coprocessor.

This removes the riscv-none-embed-gcc toolchain which was originally
used for the ULP, and updates the docs and CMake files to use
riscv32-esp-elf.

Some flags are cleaned up and workarounds removed from CMake toolchain
file.
2020-12-29 19:19:18 +00:00
Roland Dobai
548ea1bdd5 tools: Wrap flash binaries into a UF2 file for flashing through USB MSC
@mmoskal This commit adds basic support for UF2 into ESP-IDF.
2020-12-29 18:14:47 +01:00
Ivan Grokhotkov
b7b9ea4361 newlib: add _RETARGETABLE_LOCKING support
This adds support for the retargetable locking implementation in
newlib 3. This feature will be enabled in the future toolchain builds.
With the present version of the toolchain, this code doesn't get used.

When _RETARGETABLE_LOCKING gets enabled, newlib locking implementation
will be modified as follows:

- Legacy ESP-specific _lock_xxx functions are preserved. This is done
  because ROM copies of newlib in ESP32 and ESP32-S2 rely on these
  functions through the function pointer table. Also there is some
  code in IDF which still uses these locking functions.

- New __retarget_lock_xxx functions are introduced. Newlib expects
  these functions to be provided by the system. These functions work
  pretty much the same way as the ESP-specific _lock_xxx functions,
  except one major difference: _lock_acquire receives the lock pointer
  by value, and as such doesn't support lazy initialization.

- Static locks used by newlib are now explicitly initialized at
  startup. Since it is unlikely that these static locks are used at
  the same time, all compatible locks are set to point to the same
  mutex. This saves a bit of RAM. Note that there are still many locks
  not initialized statically, in particular those inside FILE
  structures.
2020-12-29 16:18:04 +01:00
Ivan Grokhotkov
b1c4107275 vfs: zero-initialize struct stat in *_stat and *_fstat handlers
...otherwise some fields will contain garbage values.
This wasn't noticed until HAVE_BLKSIZE got enabled in newlib builds.
2020-12-29 16:18:04 +01:00
Ivan Grokhotkov
7f3b16a99d freertos: always enable static allocation
to use it for newlib locks
2020-12-29 16:18:04 +01:00
David Cermak
0693e172de mdns: Allow resolve its own non-strict answers
the mDNS responder should not repeat questions when replying, however resolvers
must ignore these questions field if they are present. esp-idf mDNS
library does include questions in answering packets (thus not strictly
following the RFC6762) so the resolver did not correctly resolved
another instance host name.

Closes https://github.com/espressif/esp-idf/issues/6190
2020-12-29 13:18:00 +00:00
Anton Maklakov
286f06b274 Merge branch 'bugfix/ci_flasher_args_json_dict_items' into 'master'
ci: fix flasher_args.json parser (iterate over dictionary)

Closes IDFCI-347

See merge request espressif/esp-idf!11787
2020-12-29 21:15:12 +08:00
Mahavir Jain
41aa787166 Merge branch 'fix/wolfssl_domain_name_check' into 'master'
esp_tls_wolfssl : Add domain name check

Closes IDF-2557

See merge request espressif/esp-idf!11737
2020-12-29 17:41:00 +08:00
Angus Gratton
629b4270b4 Merge branch 'feature/c3_mbedtls_merge' into 'master'
mbedtls: merge changes from C3 to master

Closes IDF-2544 and IDF-2114

See merge request espressif/esp-idf!11718
2020-12-29 12:37:08 +08:00
Omar Chebib
fcbc706a66 ci: fix flasher_args.json parser (iterate over dictionary)
Closes IDFCI-347
2020-12-29 12:27:51 +08:00
Angus Gratton
1b0442b963 Merge branch 'feature/unify_rtc_fast_mem_as_heap_config_across_chips' into 'master'
esp_system: make rtc fast memory to heap configuration unified across chips

Closes IDF-2503

See merge request espressif/esp-idf!11693
2020-12-29 11:41:05 +08:00
Marius Vikhammer
1b6891c5d8 mbedtls: merge changes from C3 2020-12-29 10:56:13 +08:00
Angus Gratton
2a5ac66a71 Merge branch 'feature/c3_docs_master_merge' into 'master'
Docs: merge C3 docs changes to master

Closes IDF-2546, IDF-2335, and IDF-2320

See merge request espressif/esp-idf!11722
2020-12-29 07:26:14 +08:00
Jiang Jiang Jian
98d838ef04 Merge branch 'bugfix/fix_espnow_bug_for_esp32c3' into 'master'
esp_wifi: fix the espnow bug for esp32c3

See merge request espressif/esp-idf!11768
2020-12-28 15:38:08 +08:00
Krzysztof Budzynski
d06d421844 Merge branch 'docs/fix_minor_documentation_issue' into 'master'
Docs: Fix minor documentation issue in the header file "sdmmc_cmd.h"

Closes IDFGH-4354

See merge request espressif/esp-idf!11760
2020-12-28 15:22:19 +08:00
Marius Vikhammer
da947d736f Docs: Add C3 support to build_docs 2020-12-28 12:25:03 +08:00
Ivan Grokhotkov
fb7fbdb299 Merge branch 'feature/usb_host_ll' into 'master'
USB Host struct, LL Layer, and types

See merge request espressif/esp-idf!11669
2020-12-27 08:13:43 +08:00
Jiang Jiang Jian
56625eea1e Merge branch 'bugfix/11kv_bugfixes' into 'master'
wpa_supplicant: Remove lock during processing of BTM/RRM packets

Closes WIFI-3182 and WIFI-3175

See merge request espressif/esp-idf!11717
2020-12-25 19:09:27 +08:00
zhangyanjiao
4ebc4eda8c esp_wifi: fix the espnow bug for esp32c3 2020-12-25 18:31:35 +08:00
Jiang Jiang Jian
22fded3acf Merge branch 'bugfix/support_sniffer_capture_fcs_err_packets' into 'master'
esp_wifi: Add FCS failed packets filter

Closes WIFI-3194, IDF-1832, and WIFI-892

See merge request espressif/esp-idf!11700
2020-12-25 18:08:59 +08:00
xiehang
c41f4a122a esp_wifi: ESP32 phy add [sections:phy_iram] 2020-12-25 16:46:36 +08:00
xiehang
0cbb7d503d esp_wifi: Update WiFi lib
1. Refactor wifi_interface_t
2. Faster WiFi station connect improvement, avoid 100ms passive scan
3. Add FCS failed packets filter
4. Update esp32 phy lib to v4660

Closes https://github.com/espressif/esp-idf/issues/986
2020-12-25 16:46:01 +08:00
raldone01
6e2dc5d291 Fix minor documentation issue
Merges https://github.com/espressif/esp-idf/pull/6192

Signed-off-by: yiying <yiying@MacBook-Air-Cindy.local>
2020-12-25 15:46:36 +08:00
xiehang
d1222ce158 esp_wifi: Refactor wifi_interface_t 2020-12-25 02:49:12 +00:00
Darian Leung
602a747b31 Add USB Host registers and types and LL layer
This commit adds the register struct, Low Level Layer, and
protocol types for USB Host
2020-12-24 19:43:42 +08:00
Chinmay Chhajed
d73ebb570b Bluedroid: Fixes for some vulnerabilities.
This commit fixes 'Impersonation in Passkey entry protocol'
(CVE-2020-26558) and suggests fixes for other vulnerabilites like
'Impersonation in the Pin Pairing Protocol' (CVE-2020-26555) and
'Authentication of the LE Legacy Pairing Protocol'

CVE-2020-26558 can be easily implemented if the peer device can
impersonate our public key. This commit adds a check by comparing our
and received public key and returns failed pairing if keys are same.

This commit also adds comments suggesting to use secure connection when
supported by all devices.
2020-12-24 10:52:12 +00:00
Ivan Grokhotkov
45afa158ff Merge branch 'bugfix/nvs_str_cmp' into 'master'
NVS: fix string comparison

Closes IDF-2476

See merge request espressif/esp-idf!11523
2020-12-24 18:28:29 +08:00
Angus Gratton
c3ba995f2c Merge branch 'ci/ccomp_performance_tests' into 'master'
unit_test: Refactor all performance tests that rely on cache compensated timer

See merge request espressif/esp-idf!11709
2020-12-24 13:44:52 +08:00
Angus Gratton
7a40b1695c Merge branch 'feature/esp32c3_small_changes' into 'master'
esp32c3: Merge small target support changes

Closes IDF-2361

See merge request espressif/esp-idf!11714
2020-12-24 12:36:12 +08:00
Angus Gratton
8a52f20a79 Merge branch 'feature/freertos_add_xQueueGenericReceive' into 'master'
freertos: add `xQueueGenericReceive` for backward compatibility

See merge request espressif/esp-idf!11169
2020-12-24 12:20:03 +08:00
Mahavir Jain
880a63b2e9 esp_system: make rtc fast memory to heap configuration unified across chips
Closes IDF-2503
2020-12-24 09:46:35 +05:30
Angus Gratton
7f98aedd23 Merge branch 'bugfix/misc_secure_boot_v2' into 'master'
Bugfix/misc secure boot v2

See merge request espressif/esp-idf!11678
2020-12-24 11:56:09 +08:00
Angus Gratton
309d76e986 Merge branch 'feature/support_esp32c3_master_cmake_efuse_to_mater' into 'master'
efuse: Merge C3 efuse changes to master

Closes IDF-2548

See merge request espressif/esp-idf!11719
2020-12-24 11:43:00 +08:00
Angus Gratton
af845b7de2 xtensa: Disable component on esp32c3 2020-12-24 14:18:02 +11:00
Angus Gratton
1741ae941e vfs: Update for esp32c3
From internal commit 6d894813
2020-12-24 14:18:02 +11:00
Angus Gratton
e2d4f0e320 riscv: Place stdatomic file in iram 2020-12-24 14:18:01 +11:00
Angus Gratton
99d93c1227 newlib: Update unit tests for ESP32-C3 2020-12-24 14:18:01 +11:00
Angus Gratton
570ef56d86 wear_levelling: Re-enable for ESP32-C3 2020-12-24 14:18:01 +11:00
Angus Gratton
690dc5d023 sdmmc: Temporarily disable sd_spi test cases
From internal commit 6d894813
2020-12-24 14:18:01 +11:00
Angus Gratton
1449eb8e9f esp_common fpga: Fix bootloader_fill_random() emulation 2020-12-24 14:18:01 +11:00
Marius Vikhammer
4ff8c7ae98 esp_rom/esp_system: Add flag for ROM multiple UART output, esp32c3 console
From internal commit 6d894813
2020-12-24 14:18:01 +11:00
Angus Gratton
544c5e57ce esp32c3: Add tests for esp_sha, stack checker
From internal commit 6d894813
2020-12-24 14:18:01 +11:00
Angus Gratton
adbf182bc5 bootloder_support: esp32c3 only supports XTS-AES-128 flash encryption 2020-12-24 13:40:01 +11:00
Angus Gratton
8fa2cf464a fatfs: Whitespace cleanup 2020-12-24 13:40:01 +11:00
Angus Gratton
61c77d9212 esp_system: Add port-specific esp32c3 files 2020-12-24 13:40:01 +11:00
Angus Gratton
55155c3f82 esp_system: Rename _init_start symbol to _vector_table 2020-12-24 13:40:01 +11:00
Angus Gratton
cfbded2ea1 esp_system: Add extra MMU config step for ESP32-C3 2020-12-24 13:40:01 +11:00
Angus Gratton
01696afc34 esp32c3: Add new esp_sleep_is_valid_wakeup_gpio() function 2020-12-24 13:40:01 +11:00
Angus Gratton
f9e1ee35ad esp_serial_slave_link: Add essl_spi definitions for esp32c3
From internal commit 6d894813
2020-12-24 13:40:01 +11:00
Angus Gratton
a5aac93051 esp_rom: Small changes for esp32c3 support
Updated from internal commit 6d894813
2020-12-24 13:40:01 +11:00
Angus Gratton
ed737becde soc: Move esp32c3 soc_memory_layout.c to soc component
Was incorrectly placed in esp_hw_support
2020-12-24 13:40:01 +11:00
Michael (XIAO Xufeng)
d5e1f43175 Merge branch 'feature/support_ext_flash_c3' into 'master'
esp_flash: support external flash on C3

Closes IDF-2123

See merge request espressif/esp-idf!11648
2020-12-24 10:30:20 +08:00
Michael (XIAO Xufeng)
4d9df27c2f Merge branch 'bugfix/flash_mmap_output_psram_arg' into 'master'
mmap: fixed the issue mmap cannot be called with pointers to psram

See merge request espressif/esp-idf!11537
2020-12-24 10:28:03 +08:00
Angus Gratton
30a96d22e1 Merge branch 'feature/esp32c3_soc_changes' into 'master'
soc: Apply esp32c3 updates

See merge request espressif/esp-idf!11712
2020-12-24 09:20:24 +08:00
Angus Gratton
b7f4c46a82 soc: Update esp32c3 soc headers
From internal commit 6d894813
2020-12-24 10:47:34 +11:00
Jiang Jiang Jian
413d3ab6dd Merge branch 'bugfix/fix_csi_bug_for_esp32s2' into 'master'
esp_wifi: fix the bug that esp32s2 can't get CSI info

Closes WIFI-2837 and WIFI-1311

See merge request espressif/esp-idf!11573
2020-12-23 23:50:54 +08:00
Aditya Patwardhan
39b446f9fe esp_tls_wolfssl : Add domain name check 2020-12-23 18:10:36 +05:30
jiangguangming
867255bbab efuse: Add support ESP32-C3
Updated:
- CSV eFuse table
- Kconfig
- efuse_table_gen.py
- UTs
- espefuse.py

efuse/c3: Fix the burn order of BLOCKs (MAX->0)

efuse/c3: Support efuse API with keys, protection, purpose bits

tool/ci: Adds test_efuse_table_on_host for esp32s3 and esp32c3
2020-12-23 18:39:18 +08:00
zhangyanjiao
e040168a9f esp_wifi: fix the bug that esp32s2 can't get CSI info
Closes https://github.com/espressif/esp-idf/issues/5857

Closes https://github.com/espressif/esp-idf/issues/1855
2020-12-23 16:18:11 +08:00
Jiang Jiang Jian
788e9fa49a Merge branch 'feature/lightsleep_related_iram_opt' into 'master'
components/pm: Add sleep related code iram opt chioce

See merge request espressif/esp-idf!11290
2020-12-23 14:45:43 +08:00
Liu Ning
57aa65eeed components/pm: Add sleep related code iram opt chioce 2020-12-23 14:45:36 +08:00
Jiang Jiang Jian
52e66cb143 Merge branch 'bugfix/fix_spp_vfs_dynamic_memory_bugs' into 'master'
component_bt/fix spp vfs demo crash when use dynamic memory

See merge request espressif/esp-idf!11502
2020-12-23 12:36:44 +08:00
ChenJianxing
1780d9d2b5 esp_wifi: optimize phy version log 2020-12-23 10:47:25 +08:00
Angus Gratton
6d6510c39b soc: Move esp32c3 soc_memory_layout.c to soc component
Was incorrectly placed in esp_hw_support
2020-12-23 11:49:16 +11:00
Angus Gratton
705d797b41 Merge branch 'feature/esp32c3_drivers' into 'master'
driver: Add esp32c3

Closes IDF-2363

See merge request espressif/esp-idf!11650
2020-12-23 08:43:31 +08:00
Angus Gratton
04c681443e hal esp32c3: Add placeholder rtc_io_ll.h 2020-12-23 09:53:24 +11:00
Angus Gratton
1cc206f393 driver: Only build dedic_gpio driver on supported chips 2020-12-23 09:53:24 +11:00
Armando
2d37bfa126 driver: Add adc_digi single conversion mode
- add lock for single read and continuous read APIs
- update onetime read start singal delay for hardware limitation[*]
- move adc_caps to soc_caps.h
- update license dates

[*] There is a hardware limitation. If the APB clock frequency is high, the
step of this reg signal: ``onetime_start`` may not be captured by the
ADC digital controller (when its clock frequency is too slow). A rough
estimate for this step should be at least 3 ADC digital controller
clock cycle.
2020-12-23 09:53:24 +11:00
Angus Gratton
fa892eb017 soc: Explain units for rtc_clk_cal() function, fix typo 2020-12-23 09:53:24 +11:00
Angus Gratton
75dede2344 esp_hw_support: Add esp32c3 regi2c headers 2020-12-23 09:53:24 +11:00
Angus Gratton
8e0d423a5e driver: Add rtc_io hold/wakeup c3 support
Temporary implementation, should be moved to HAL

Copied from internal commit 3ef01301ff
2020-12-23 09:53:24 +11:00
Cao Sen Miao
e338a2e3df rtc: add function to en/disable the rtc clock 2020-12-23 09:53:24 +11:00
Angus Gratton
f09b8ae7a4 driver: Add esp32c3 ADC driver
Based on internal commit 3ef01301fffa552d4be6d81bc9d199c223224305
2020-12-23 09:53:24 +11:00
Angus Gratton
27a9cf861e driver: Add esp32c3 drivers (except ADC/DAC) and update tests
Some ESP32-C3 drivers are still pending.

Based on internal commit 3ef01301fffa552d4be6d81bc9d199c223224305
2020-12-23 09:53:24 +11:00
Jiang Jiang Jian
fcfb7cea4a Merge branch 'bugfix/sync_baidu_fix_to_master' into 'master'
esp_wifi: Sync baidu fix to master

See merge request espressif/esp-idf!11188
2020-12-22 22:10:41 +08:00
Mahavir Jain
96288d82d4 Merge branch 'bugfix/build_issue_with_rtc_gpio_desc_configuration' into 'master'
Fix build issue with rtc gpio desc configuration

Closes IDFGH-4470 and IDFGH-4167

See merge request espressif/esp-idf!11699
2020-12-22 21:04:24 +08:00
kapil.gupta
f14da2ecc0 wpa_supplicant: Remove lock during processing of btm/rrm packets
Lock is not required during btm/rrm action frames processing and
taking it may cause inconsistant behavior since wifi task
posts the events to this task.
2020-12-22 16:56:41 +05:30
Cao Sen Miao
83f6eaf0d2 ci: make flash performance test alternative 2020-12-22 16:46:04 +08:00
Marius Vikhammer
0a95151a75 unit_test: Refactor all performance tests that rely on cache compensated timer
There is no ccomp timer on C3, which means our performance tests will start
failing again due to variance caused by cache misses.

This MR adds TEST_PERFORMANCE_CCOMP_ macro that will only fail
performance test if CCOMP timer is supported on the target
2020-12-22 18:56:24 +11:00
xiehang
32dd739da4 esp_wifi: Update wifi lib
1. Add check CSA state before CSA timer process
2. Change wifi scan duration from 120ms to 100ms
3. Using deport reg instead of ahb
4. Check TID in ieee80211_recv_bar()
5. Revert to report specific reason code when receiving deauth during 4-way-handshark
6. Fix the bug that tx ampdu parameter is not from peer device
2020-12-22 15:48:24 +08:00
Michael (XIAO Xufeng)
ad6ed3fd2e mmap: fixed the issue mmap cannot be called with pointers to psram 2020-12-22 13:42:42 +08:00
Michael (XIAO Xufeng)
7f3e61cf63 esp_flash: add support for external flash on C3 2020-12-22 13:31:04 +08:00
ronghulin
b4e4fd7a67 bugfix: fix some wifi bugs
1. fix max tx power to 20dBm
2. fix the issue that the esp_wifi_sta_get_ap_info can't get country

Closes https://github.com/espressif/esp-idf/issues/6267
2020-12-22 11:51:13 +08:00
Island
7ed95d13b1 Merge branch 'feat/ble_mesh_support_ble_scan' into 'master'
ble_mesh: stack: Add BLE scan callback when mesh is enabled

Closes BLEMESH-252

See merge request espressif/esp-idf!10918
2020-12-22 10:46:59 +08:00
Sachin Parekh
6e1f53bce3 i2c: Acquire PM lock after acquiring mutex 2020-12-22 00:50:19 +05:30
Jiang Jiang Jian
f13ace5253 Merge branch 'bugfix/wifi_bugs_fixes' into 'master'
esp_wifi: Fix some wifi bugs.

Closes WIFI-3105, WIFI-3166, and WIFI-3174

See merge request espressif/esp-idf!11651
2020-12-21 23:41:51 +08:00
baohongde
3b0fc48ab4 components/bt: Shutdown Bluetooth before esp_restart. 2020-12-21 20:08:10 +08:00
Mahavir Jain
953418dbb4 Merge branch 'bugfix/missing_coreinfo_in_vtasklist' into 'master'
freertos: Fix missing affinity info in vTaskList

Closes IDFGH-4239 and IDFGH-4241

See merge request espressif/esp-idf!11606
2020-12-21 19:43:40 +08:00
lly
ac93a38990 ble_mesh: stack: Support reporting normal ble adv packets 2020-12-21 09:08:25 +00:00
lly
a6ebe48e6e ble_mesh: stack: Add a btc file for ble coex functions
Previously if starting/stopping BLE advertising when BLE Mesh
is enabled, the corresponding events will be notified through
the callback registered by esp_ble_mesh_register_prov_callback().

With this commit, the func esp_ble_mesh_register_ble_callback()
needs to be invoked for resgitering the callback used for BLE
coexistence related functionalities (i.e. ADV/SCAN).
2020-12-21 09:08:25 +00:00
lly
1bb3f693d5 ble_mesh: stack: Move ble scan funcitons to a single file 2020-12-21 09:08:25 +00:00
lly
9be0120d94 ble_mesh: stack: Optimize handling received mesh adv packets 2020-12-21 09:08:25 +00:00
kapil.gupta
903198ad7f esp_wifi: Fix some wifi bugs.
1. Send encrypted mgmt frames in pmf connection
2. Remove dependecy of SHA256 AKM on PMF
3. Fix null pointer dereference
4. Set TTLS default phase2 method as MSCHAPV2.
2020-12-21 14:27:10 +05:30
boarchuz
06d6146445 fix rtc_gpio_desc_t compilation error
Closes https://github.com/espressif/esp-idf/pull/6029
Closes https://github.com/espressif/esp-idf/issues/6301
Closes IDFGH-4470
Closes IDFGH-4167
2020-12-21 13:54:52 +05:30
Angus Gratton
778b54bbcb Merge branch 'bugfix/correct_logging_timestamp_format' into 'master'
log: correct timestamp formatting to unsigned integer type

Closes IDFGH-4393

See merge request espressif/esp-idf!11605
2020-12-21 15:08:30 +08:00
Supreet Deshpande
c4cf6d6d26 Secure boot v2: Fixes the issue of passing the flash calculated digest for ota verification. 2020-12-21 11:32:37 +05:30
Supreet Deshpande
e517b4953f Secure Boot v2: Fix the double padding of the image length during flash encryption
Fixes https://github.com/espressif/esp-idf/issues/6236
2020-12-21 11:32:37 +05:30
Mahavir Jain
ec4de5bd38 Merge branch 'feature/upgrade_mbedtls_to_v2.16.9' into 'master'
mbedtls: upgrade to v2.16.9 release

See merge request espressif/esp-idf!11596
2020-12-21 13:09:38 +08:00
Jiang Jiang Jian
21e6706e07 Merge branch 'feature/support_esp32c3_wifi' into 'master'
esp_wifi: add esp32c3 wifi lib

See merge request espressif/esp-idf!11610
2020-12-21 12:27:33 +08:00
Jiang Jiang Jian
bba4325ce5 Merge branch 'bugfix/btdm_clear_llcp_rsp_timeout_after_reject' into 'master'
btdm bugfix: clear the timer after remote reject when respond the parameters update

Closes BCI-101

See merge request espressif/esp-idf!11667
2020-12-21 12:13:32 +08:00
Krzysztof Budzynski
8e4c73b1d1 Merge branch 'bugfix/minor_docs_fixes' into 'master'
minor docs fixes

See merge request espressif/esp-idf!11430
2020-12-21 11:31:00 +08:00
Angus Gratton
06bdaba0e8 Merge branch 'tuning/heap_tlsf_sl_tune' into 'master'
heap: increase the second level list length to reduce the fragmentation to acceptable level.

See merge request espressif/esp-idf!11668
2020-12-21 08:54:32 +08:00
David Čermák
1b1c42440b Merge branch 'feature/enable_lwip_checksums' into 'master'
lw-IP: Add Kconfig options to enable/disable checksum validation for IP/UDP/ICMP

Closes IDFGH-4349

See merge request espressif/esp-idf!11429
2020-12-19 02:44:47 +08:00
ryan kurte
85083ddc3d lwip: Added debug config options for DHCP and TCP 2020-12-18 16:38:59 +00:00
ryan kurte
5d91a27a1e lwip: Added KConfig option to control checksum validation on IP/UDP/ICMP
This maintains the current default, but could be swapped if desired

Merges https://github.com/espressif/esp-idf/pull/6187
2020-12-18 16:38:59 +00:00
suren.gabrielyan
f33772c960 mDNS: Fix of collision detection during txt length calculation
Closes https://github.com/espressif/esp-idf/issues/6114
2020-12-18 15:38:30 +00:00
Angus Gratton
c3cc5b17e0 Merge branch 'feature/esp32c3_spi_flash' into 'master'
spi_flash: Add esp32c3 support

Closes IDF-2362

See merge request espressif/esp-idf!11639
2020-12-18 14:02:04 +08:00
Krzysztof Budzynski
3474daecb1 Merge branch 'bugfix/doxygen_warnings' into 'master'
Docs: fix doxygen warnings

See merge request espressif/esp-idf!11643
2020-12-18 13:44:07 +08:00
Angus Gratton
3b37c87535 Merge branch 'bugfix/delete_gdbstub_h' into 'master'
esp_system: remove remaining use of old gdbstub header

Closes IDFGH-4444

See merge request espressif/esp-idf!10717
2020-12-18 13:03:24 +08:00
Renz Bagaporo
32dc37fbe8 esp_system: remove remaining use of old gdbstub header
Closes https://github.com/espressif/esp-idf/issues/6274
2020-12-18 09:32:24 +08:00
Felipe Neves
89d461df2a heap: increase the sl to reduce the fragmentation to acceptable level. 2020-12-17 12:52:56 -03:00
gengyuchao
247484c454 bugfix: clear the timer after remote reject when respond the parameters update 2020-12-17 22:19:44 +08:00
Mahavir Jain
b85c534130 mbedtls: upgrade to v2.16.9 release
For details release notes please refer to:
https://github.com/ARMmbed/mbedtls/releases/tag/v2.16.9
2020-12-17 14:15:41 +05:30
Angus Gratton
06ec032c0c spi_flash: Simplify init-time size check 2020-12-17 15:34:13 +11:00
Cao Sen Miao
0736c91d68 soc: Remove cache constants from soc.h 2020-12-17 15:34:13 +11:00
Angus Gratton
d4c9a45675 spi_flash: Add ESP32-C3 support
Based on internal commit 3ef01301fff
2020-12-17 15:34:13 +11:00
Renz Bagaporo
84d3b0f81d otatool: let fail early on exception
otatool gives a 'target has no otadata' error instead of the real cause
(because of wrong port specified, for example)
2020-12-17 11:25:32 +08:00
Renz Bagaporo
a926039575 esptool_py: simplify serial tool script 2020-12-17 11:25:32 +08:00
Renz Bagaporo
55684fab72 esptool_py: use serial script for monitor 2020-12-17 11:25:32 +08:00
Renz Bagaporo
dec7b86721 app_update: support port and baud env variables for otatool targets
Closes https://github.com/espressif/esp-idf/issues/5280
2020-12-17 11:25:32 +08:00
Renz Bagaporo
ca6c093d1a esptool_py: make script generic for serial ops 2020-12-17 11:25:32 +08:00
wangcheng
386a8e37f1 components/bt:fix exl200, add btdm_disable_adv_delay, fix RPA addr update error. 2020-12-17 10:57:54 +08:00
wangcheng
cc7dbc6177 components/bt: Fixed the problem of early release of pointer(p_ccb) in funcion 2020-12-17 10:54:56 +08:00
Jiang Jiang Jian
c2364e133d Merge branch 'bugfix/free_acl_rx_buf_in_em' into 'master'
Free ACL RX Buf in EM when disconnection

Closes BT-1083 and BT-1152

See merge request espressif/esp-idf!11590
2020-12-16 18:02:44 +08:00
Wei Tian Hua
6b7c878581 Free ACL RX Buf in EM when disconnection 2020-12-16 18:02:39 +08:00
Ivan Grokhotkov
792dc6ebb8 Merge branch 'feature/linux_target' into 'master'
build system: Add Linux target

Closes IDF-2145

See merge request espressif/esp-idf!10076
2020-12-16 16:25:38 +08:00
Marius Vikhammer
dc0e80a4c8 Docs: fix doxygen warnings 2020-12-16 14:37:14 +08:00
Jakob Hasse
7b223c3337 NVS: fix string comparison
Closes IDF-2476
2020-12-16 13:53:17 +08:00
Axel Lin
93c79c4516 freertos_hooks: Fix unbalance lock in deregistration for cpu functions
Current code exits the deregistration for cpu functions with spinlock held when
cpuid >= portNUM_PROCESSORS. Fix it.

Fixes: 9d63e1da4a ("New Task Watchdog API (Revert of Revert)")
Signed-off-by: Axel Lin <axel.lin@gmail.com>
2020-12-16 09:10:38 +08:00
Ivan Grokhotkov
25a4a61665 Merge branch 'bugfix/nvs_coverage_script' into 'master'
NVS: fixed coverage-report target in Makefile

See merge request espressif/esp-idf!11218
2020-12-16 00:30:07 +08:00
Ivan Grokhotkov
632a33cef8 Merge branch 'fix/nvs_flash_api_docs' into 'master'
nvs_flash: fix nvs initialization API documentation

See merge request espressif/esp-idf!11621
2020-12-15 19:56:55 +08:00
Ivan Grokhotkov
829d94ad01 Merge branch 'fix/rtc_fast_memory_force_on_in_use_for_heap' into 'master'
fix: RTC_FAST_MEM always power on if used for heap

See merge request espressif/esp-idf!11555
2020-12-15 18:45:20 +08:00
ChenJianxing
1ffb12e6fd esp_wifi: add esp32c3 wifi lib 2020-12-15 17:13:10 +08:00
Anton Maklakov
df544dee30 tools: Redirect some warnings to stderr 2020-12-15 12:41:20 +07:00
Aditya Patwardhan
163d5f314a nvs_flash: fix nvs initialization API documentation 2020-12-15 08:11:49 +05:30
Axel Lin
29b6b0ce0d freertos: Fix missing affinity info in vTaskList
Show affinity info if CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID is set.

Closes https://github.com/espressif/esp-idf/pull/6099
Closes https://github.com/espressif/esp-idf/issues/6097

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2020-12-14 16:50:07 +05:30
Jakob Hasse
00819a3022 NVS flash: host-based unit test of nvs::Page
* General tests like page loading from flash
* Rough test of fixed-size data types
* Rough test of blob read
* Added coverage target in cmake, also accessible
  via `idf.py coverage`
* Fixed unsigned comparison in comp. enum table
* introducing temporary LINUX_TARGET define
2020-12-14 18:53:14 +08:00
Jakob Hasse
c233ce0449 spi_flash: mocking should be possible now
The following three headers will be mockes:
* esp_flash.h
* esp_spi_flash.h
* esp_partition.h
* counter functions live in own header
* add spi_flash sim dir for esp_err.h to Unity
* modified gen_esp_err_to_name.py to ignore
  sim/ dir in spi_flash component

Add cmock .yaml config file
Add spi hal header until soc can mock the hal
  layer as well.
2020-12-14 18:53:14 +08:00
Jakob Hasse
52093fa4ef linux: added linux target
* add toolchain file
* add linux to preview targets
* add stub for dfu number in cmake
* excluded unity runner per default
* Added esp_attr.h and esp_partition.h linux stubs
* component.cmake check list for emptyness
* added switch for linux in unity cmake file
* Added Linux host example app
2020-12-14 18:53:14 +08:00
Mahavir Jain
a46dfd316e log: correct timestamp formatting to unsigned integer type
Closes https://github.com/espressif/esp-idf/issues/6226

Closes IDFGH-4393
2020-12-14 15:03:55 +05:30
Jiang Jiang Jian
a16d1e8f1a Merge branch 'fixbug/baidu_tcp_recv_assert' into 'master'
lw-ip:fixbug/baidu tcp recv assert

Closes WIFI-2802

See merge request espressif/esp-idf!11287
2020-12-14 16:48:24 +08:00
Angus Gratton
7eed079473 Merge branch 'Bugfix/esp_event' into 'master'
Bugfix/esp_event fix misuse of recursive semaphore take/give calls for profiling_mutex

Closes IDFGH-4246

See merge request espressif/esp-idf!11454
2020-12-14 16:32:58 +08:00
Ivan Grokhotkov
e0e6194c95 Merge branch 'bugfix/coredump_plain_partition_on_encrypted_flash' into 'master'
coredump: Core dump is encrypted if the partition itself is encrypted

Closes IDF-458

See merge request espressif/esp-idf!11424
2020-12-14 15:40:05 +08:00
Michael (XIAO Xufeng)
40b08e33c9 Merge branch 'bugfix/touch_sensor_reading_error_in_light_sleep_process' into 'master'
driver(touch): fix touch sensor false trigger in sleep mode

See merge request espressif/esp-idf!10983
2020-12-14 14:51:51 +08:00
Krzysztof Budzynski
dc73031f7f Merge branch 'doc/esp_partition_documentation' into 'master'
SPI Flash: fix doc error in esp_partition.h

See merge request espressif/esp-idf!10506
2020-12-11 16:36:44 +08:00
Angus Gratton
8929a9cdb1 Merge branch 'feature/aes_hal' into 'master'
AES: refactor and add HAL layer

See merge request espressif/esp-idf!10979
2020-12-11 15:39:49 +08:00
Angus Gratton
f50dd23872 Merge branch 'feature/merge_esp32c3_bootloader_support' into 'master'
esp32c3: add initial bootloader and target component support

Closes IDF-2435 and IDF-2436

See merge request espressif/esp-idf!11433
2020-12-11 15:36:28 +08:00
Angus Gratton
3e6313ffc1 Merge branch 'bugfix/enable_verify_app_test_s2' into 'master'
bootloader_support: re-enable S2 unit test

See merge request espressif/esp-idf!11521
2020-12-11 14:36:55 +08:00
morris
c39476d699 esp_rom: added esp_rom_install_uart_printf 2020-12-11 11:45:10 +08:00
morris
3f287800eb bootloader_support: added esp32-c3 support 2020-12-11 11:45:10 +08:00
morris
8330b2541a esp32c3: added target component 2020-12-11 11:44:01 +08:00
morris
65aebef596 esp32c3: added 2nd bootloader project linker file 2020-12-11 11:44:01 +08:00
Angus Gratton
7472d76db0 Merge branch 'bugfix/after_ligth_sleep_esp_timer_forms_one_event' into 'master'
esp_timer: Add an option skip_unhandled_events

See merge request espressif/esp-idf!10969
2020-12-11 06:04:58 +08:00
fuzhibo
985e94139d driver(touch): fix touch sensor false trigger in sleep mode 2020-12-10 17:43:14 +08:00
Marius Vikhammer
457ce080ae AES: refactor and add HAL layer
Refactor the AES driver and add HAL, LL and caps.

Add better support for running AES-GCM fully in hardware.
2020-12-10 09:04:47 +00:00
Jakob Hasse
60dfd87e65 SPI Flash: fix doc error in esp_partition.h 2020-12-10 17:03:56 +08:00
Marius Vikhammer
0c3714de1c bootloader_support: re-enable S2 unit test
Re-enable "Verify unit test app image"
2020-12-10 08:04:09 +00:00
fuzhibo
f4aedfd017 fix: RTC_FAST_MEM always power on if used for heap 2020-12-10 14:45:41 +08:00
Michael (XIAO Xufeng)
49022d4d92 Merge branch 'fix/adc_hal_reading_efuse_in_critical' into 'master'
adc: fixed efuse called in critical section issue

See merge request espressif/esp-idf!11519
2020-12-10 14:09:09 +08:00
Jakob Hasse
ff03bbce78 NVS: fixed coverage-report target in Makefile 2020-12-10 03:51:16 +00:00
Angus Gratton
e4407468bc Merge branch 'feature/flash_binary_partition_with_name' into 'master'
buildsystem: flash binary to a named partition

Closes IDF-2387

See merge request espressif/esp-idf!11342
2020-12-10 06:24:15 +08:00
Mahavir Jain
1584ccf834 Merge branch 'feature/http_error_code' into 'master'
Feature/support 401, 403 response error code for HTTP server

Closes IDFGH-3511

See merge request espressif/esp-idf!11473
2020-12-09 23:45:38 +08:00
liqigan
478cef9b75 fix spp vfs demo crash when use dynamic memory 2020-12-09 19:46:43 +08:00
KonstantinKondrashov
aa96c9a4d8 esp_timer: Add an option to skip unhandled events for periodic timers
- Added an option to skip unhandled events for periodic timers. Useful for light sleep.
- Added doc about this case
- Added Test a latency between a call of callback and real event (14-16us). and UT to check skip_unhandled_events.
- Fixed for esp_timer_dump() if name of timer is NULL
- Refactored timer_process_alarm()
- Added the delete function after using in UTs
2020-12-09 17:19:19 +08:00
David Čermák
bf294fd1ae Merge branch 'bugfix/crt_bundle_bad_md' into 'master'
esp_crt_bundle: allow weak hash algorithm for trusted certificate

Closes IDFGH-4266

See merge request espressif/esp-idf!11376
2020-12-09 16:16:35 +08:00
Liu Han
669d9820fc esp_http_server: Add some response error code, such as 401, 403 etc.
Closes https://github.com/espressif/esp-idf/issues/5466
2020-12-09 06:22:01 +00:00
Island
4605a8ac80 Merge branch 'optimize/ble_mesh_miscellaneous' into 'master'
Optimize/ble mesh miscellaneous

See merge request espressif/esp-idf!11500
2020-12-08 19:35:46 +08:00
Michael (XIAO Xufeng)
04d6b115ae adc: fixed efuse called in critical section issue 2020-12-08 17:41:49 +08:00
Angus Gratton
c0e0be6ac3 Merge branch 'bugfix/bootloader_dont_trigger_address_decoding' into 'master'
bootloader: avoid printing load addresses with '0x'

See merge request espressif/esp-idf!11445
2020-12-08 15:19:58 +08:00
lly
fb531815b0 ble_mesh: stack: Move bt_mesh_rand to mesh_common.c 2020-12-08 15:13:04 +08:00
lly
19c3f38b36 ble_mesh: stack: Remove useless BT_DBG_ENABLED in a few files 2020-12-08 15:13:04 +08:00
lly
b77563abb0 ble_mesh: Replace zephyr integer types with C99 types [Zephyr] 2020-12-08 15:13:04 +08:00
lly
162e11cff3 ble_mesh: stack: Update ARRAY_SIZE definition 2020-12-08 15:13:04 +08:00
Omar Chebib
02ddecb69f buildsystem: flash binary to a named partition
Changed optional value parameter 'encrypted' to a named parameter
called 'ALWAYS_PLAINTEXT'. This flag can be passed to:
- esptool_py_flash_target
- esptool_py_flash_target_image
Fix wrong identation.
2020-12-08 12:16:02 +08:00
Michael (XIAO Xufeng)
f174cc35a8 Merge branch 'test/disable_sdio_single_core_tests' into 'master'
ci: disable some sdio_slave tests on single core config

Closes IDFCI-233 and IDFCI-240

See merge request espressif/esp-idf!11492
2020-12-08 11:48:13 +08:00
Marius Vikhammer
7e0f362149 esp_crt_bundle: add additional unit tests
Add unit test for:
 * Trusted certificate with weak hash algorithm signature
 * Certificate with wrong signature

Merges https://github.com/espressif/esp-idf/pull/6117
2020-12-08 10:11:31 +08:00