Commit graph

7866 commits

Author SHA1 Message Date
Ivan Grokhotkov 4bbfa6e494 Merge branch 'feature/soc_ledc_caps' into 'master'
soc: add ledc_caps.h, replace target-based ifdefs with caps-based

See merge request espressif/esp-idf!6858
2019-12-30 18:47:11 +08:00
Ivan Grokhotkov 9e93b619d9 Merge branch 'bugfix/coredump_epc_level' into 'master'
core dump: only get EPC/EPS registers up to XCHAL_NUM_INTLEVELS

See merge request espressif/esp-idf!7064
2019-12-30 18:45:59 +08:00
Ivan Grokhotkov f2f008e167 Merge branch 'bugfix/xt_context_save' into 'master'
freertos: save/restore PS and EPC1 around window spilling, fixes setjmp regression

Closes IDFGH-2428

See merge request espressif/esp-idf!7135
2019-12-30 18:05:25 +08:00
Xia Xiaotian b7e3886bf2 Fix ESP32S2BETA WiFi initialization crash issue
ESP32S2BETA does not need to enable WiFi common clock in WiFi library, for
WiFi common clock is not disabled when WiFi is in sleep state.
2019-12-30 16:51:12 +08:00
Ivan Grokhotkov f52952cb45 esp32: panic: do digital reset if cache error interrupt is set
Even if frame->exccause != PANIC_RSN_CACHEERR, it is possible that
the cache error interrupt status is set. For example, this may happen
due to an invalid cache access in the panic handler itself.
Check cache error interrupt status instead of frame->exccause to
decide whether to do CPU reset or digital reset.

Also remove unnecessary esp_dport_access_int_pause from
esp_cache_err_get_cpuid, since the panic handler already calls
esp_dport_access_int_abort on entry.
2019-12-30 09:49:07 +01:00
Angus Gratton 03f6179211 Merge branch 'bugfix/app_partition_sha_values' into 'master'
bootloader_support: Fix for app SHA-256 calculation, chip revision log spam

See merge request espressif/esp-idf!6862
2019-12-30 12:45:30 +08:00
Angus Gratton bc02b128be Merge branch 'feature/add_eth_download_test' into 'master'
ethernet: test download blob && phy addr auto detect

Closes IDF-1238

See merge request espressif/esp-idf!6957
2019-12-30 11:52:40 +08:00
Angus Gratton ba3f47efd6 bootloader_support: fix crash in image verification is SHA doesn't match 2019-12-30 13:48:11 +11:00
Angus Gratton b2ed553bbf bootloader_support: Reduce log spam about chip revisions
* Don't bother checking the chip revision if it looks like the partition
  doesn't really contain an app
* Don't print the "info" level about the revision & min revision unless
  we're in the bootloader (otherwise it gets printed at random times
  during the OTA process)
2019-12-30 13:48:11 +11:00
Angus Gratton 5139934767 bootloader_common: Fix esp_partition_get_sha256(), add unit tests
Regression in 438d513a95

Reported here: https://esp32.com/viewtopic.php?f=13&t=13250&p=52460
2019-12-30 13:47:47 +11:00
Kirill Chalov ab6311c548 Reveiw the file api-reference/peripherals/i2s.rst 2019-12-29 21:05:57 +00:00
Jiang Jiang Jian c8b839b3d5 Merge branch 'bugfix/btdm_revert_changes_of_security_mask' into 'master'
components/bt: Revert changes of security mask

See merge request espressif/esp-idf!7118
2019-12-29 14:12:27 +08:00
Ivan Grokhotkov e4d45608d3 soc: add ledc_caps.h, replace target-based ifdefs with caps-based 2019-12-28 20:33:21 +00:00
Ivan Grokhotkov 3285ed116d heap: make compatible with non-OS builds, remove target dependence 2019-12-27 12:40:06 +01:00
Ivan Grokhotkov 6c0044cc65 Merge branch 'bugfix/rtc_cntl_h_cpp_guards' into 'master'
Add missing extern "C" to rtc_cntl.h

Closes IDFGH-2419

See merge request espressif/esp-idf!7093
2019-12-27 19:21:06 +08:00
Ivan Grokhotkov acca61c714 Merge branch 'bugfix/spiffs_partition_label_usage' into 'master'
spiffs: clarify the usage of partition_label, fix the example

Closes IDFGH-2313

See merge request espressif/esp-idf!7092
2019-12-27 19:20:46 +08:00
Ivan Grokhotkov 83d63b4673 unity: re-enable test case exit by longjmp 2019-12-27 11:27:01 +01:00
Ivan Grokhotkov 891eb3b020 freertos: save/restore PS and EPC1 around window spilling
Since in b0491307, which has introduced the optimized window spill
procedure, _xt_context_save did not work correctly when called from
_xt_syscall_exc. This was because unlike _xt_lowint1, _xt_syscall_exc
does not save PS and EPC1. The new version of _xt_context_save
modified PS (on purpose) and EPC1 (accidentally, due to window
overflow exceptions), which resulted in a crash upon 'rfi' from the
syscall.

This commit adds restoring of PS and EPC1 in _xt_context_save. It also
slightly reduces the number of instructions used to prepare PS for
window spill.

Unit test for setjmp/longjmp (which were broken by this regression)
is added.

Closes https://github.com/espressif/esp-idf/issues/4541
2019-12-27 11:27:01 +01:00
Mahavir Jain e0b667804f Merge branch 'fix/test_flash_timeout_sdio_throughput' into 'master'
Fix several CI issues

See merge request espressif/esp-idf!7101
2019-12-26 20:25:31 +08:00
Mahavir Jain 3be94b6952 Merge branch 'bugfix/can_critical_section_logs' into 'master'
can: Fix critical section ESP_LOG functions

Closes IDFGH-2270 and IDF-1067

See merge request espressif/esp-idf!7081
2019-12-26 16:22:17 +08:00
Mahavir Jain 9738bc58ed Merge branch 'bugfix/can_semaphore_take_in_critical' into 'master'
can: Fix semaphore take in critical section

Closes IDFGH-2115

See merge request espressif/esp-idf!7083
2019-12-26 16:15:07 +08:00
baohongde 3977ba7bc6 components/bt: Revert changes of security mask 2019-12-25 20:03:16 +08:00
zhangyanjiao 56c309b40b fix the bugs in ESP-NOW:
1. fix the bug when modifying the channel info of peer node
2. fix the crash when modifying peer node between unencrypted and encrypted
3. fix the bug for fetch peer
4. modify the esp_wifi_set_channel() function
5. fix the bug that the channel parameter doesn't work when adding peer node

Closes https://github.com/espressif/esp-idf/issues/2833
Closes https://github.com/espressif/esp-idf/issues/4311
2019-12-25 11:46:27 +08:00
liu zhifu 97e7bdd161 esp_wifi: fix WiFi timer bug 2019-12-25 09:10:45 +08:00
liu zhifu e1eeef2276 esp_wifi: fix a WiFi receiving bug
Support WiFi/BT MAC register writting when the WiFi/BT common clock is disabled.
2019-12-24 21:32:03 +08:00
Michael (XIAO Xufeng) 2ffe0aca12 esp_flash: increase the timeout for block erase 2019-12-24 16:50:09 +08:00
Michael (XIAO Xufeng) 72cf67cba3 sdio_slave_hal: fix the TAG non-static issue
(MINOR CHANGE)
2019-12-24 16:50:09 +08:00
Michael (XIAO Xufeng) 41e37ebabe ci: decrease the performance threshold for sdio throughput 2019-12-24 16:50:08 +08:00
Jack 3f22448fdf Fixes ESPNOW unicast packet Tx failure 2019-12-24 11:59:18 +08:00
Jiang Jiang Jian a3501deb22 Merge branch 'bugfix/fix_the_bugs_for_bandwidth' into 'master'
fix the bugs for bandwidth

Closes WIFI-1306

See merge request espressif/esp-idf!6965
2019-12-24 11:43:44 +08:00
morris 7baf7ce273 ethernet: optimise tx and rx 2019-12-24 11:18:31 +08:00
morris fce6a9c735 ethernet: test ethernet download 2019-12-24 11:18:30 +08:00
morris 197d5d7378 ethernet: support phy addr auto detect 2019-12-24 11:18:30 +08:00
Ivan Grokhotkov f687cedebe Merge branch 'bugfix/wa_dport_and_intr' into 'master'
esp32: Fix for DPORT

See merge request espressif/esp-idf!7070
2019-12-24 01:30:56 +08:00
Ivan Grokhotkov 750818de72 spiffs: clarify the usage of partition_label, fix the example
* If esp_vfs_spiffs_register is called with an explicit partition
  label, other SPIFFS functions (info, format, unregister) must be
  called with the same label.

* On the other hand, if label was NULL in the call to
  esp_vfs_spiffs_register and the first matching partition was used,
  calls to the rest of the SPIFFS functions should be done with NULL
  partition_label argument.

Fix the Doxygen documentation. Update the example accordingly, in case
a user modifies "partition_label" value in esp_vfs_spiffs_conf_t conf
initializer.

Closes https://github.com/espressif/esp-idf/issues/4450
2019-12-23 18:20:14 +01:00
zhangyanjiao 7416c37fe1 fix the bug for getting channel and bandwidth 2019-12-23 20:06:13 +08:00
Jiang Jiang Jian 698350ff1f Merge branch 'bugfix/fix_performance_issues_new' into 'master'
improve wifi performance

Closes WIFI-265, WIFI-1349, WIFI-23, WIFI-296, WIFI-397, WIFI-1255, WIFI-1256, and FCS-175

See merge request espressif/esp-idf!6928
2019-12-23 17:38:43 +08:00
Ivan Grokhotkov c029888bf1 Merge branch 'fix/spi_ut_esp32s2beta' into 'master'
spi: re-enable the unit tests for esp32s2beta

Closes IDF-1020

See merge request espressif/esp-idf!6327
2019-12-23 15:10:31 +08:00
morris 888316fc64 bootloader_support: refactor to better support multi target 2019-12-23 05:45:17 +00:00
suda-morris ba7c67ece8 bootloader won't have dependency on wifi 2019-12-23 05:45:17 +00:00
michael 2dd12ae5f8 spi: fix speed test issues on esp32s2beta
Also support performance value for different targets.
2019-12-23 10:23:01 +08:00
michael 3d1ec3f451 intr_alloc: fix the issue intr_enable/disable cannot be used in ISR in
esp32s2beta.

This issue is reported in config freertos_compliance_s2.
2019-12-23 10:23:00 +08:00
michael 262ba6f825 spi: fix iomux, timing and address phase issues for esp32s2beta 2019-12-23 10:23:00 +08:00
michael 11fa11000f spi: re-enable the unit tests for esp32s2beta 2019-12-23 10:22:59 +08:00
Jack 1e47b01563 improve wifi performance 2019-12-22 19:34:53 +08:00
KonstantinKondrashov 9432ebddf9 esp32: Add UT for DPORT 2019-12-21 14:10:38 +00:00
KonstantinKondrashov c4dcf6f917 esp32: Fix esp_dport_access_reg_read 2019-12-21 14:10:38 +00:00
KonstantinKondrashov 1687c53700 freertos: Fix save_context. Add RSYNC after WSR
RSYNC waits for all previously fetched WSR.* instructions to be performed before inter-
preting the register fields of the next instruction.
2019-12-21 14:10:38 +00:00
boarchuz 5dc10a4191
Add missing extern "C" to rtc_cntl.h
Related: https://github.com/espressif/arduino-esp32/issues/3149
2019-12-21 12:12:54 +11:00
Felipe Neves 8795b2681c heap: added test case for realloc to verify if successive realloc in IRAM still ends there. 2019-12-20 13:48:09 -03:00
Felipe Neves 4909fdfe02 heap_caps: small fixes on comments plus cleaning 2019-12-20 13:35:56 -03:00
Felipe Neves 31145f38fa heap_caps: added special case for realloc when previous area is an diram_iram ptr, this will force a malloc/copy/free 2019-12-20 13:35:56 -03:00
Felipe Neves ce9f84fba9 heap_caps: enable check of pointer on diram_iram for both S2 and non-S2 platform 2019-12-20 13:35:56 -03:00
Felipe Neves d9ab33118e heap/multi_heap_poisoning: include heap_private.h only when no host heap tests 2019-12-20 13:35:56 -03:00
Felipe Neves 4a392932f1 heap/heap_caps: added special case for esp32s2 when handling memory allocated (and aliased) from IRAM 2019-12-20 13:35:56 -03:00
Felipe Neves ecc4955c68 heap/test_malloc_caps: changed malloc caps test to deal with esp32 and esp32s2 memory differencies. 2019-12-20 13:35:56 -03:00
Felipe Neves cf95ea40d4 heap/test_leak: changed requested memory on leak checks to match the threshold 2019-12-20 13:35:56 -03:00
Felipe Neves d1b76d13bb exp_expression_with_stack: added check for null pointer after obtaining a mutex in test 2019-12-20 13:28:29 -03:00
Felipe Neves f0e82311a5 esp_expression_with_stack: fix wrong top of stack calculation plus documentation update 2019-12-20 13:23:47 -03:00
Felipe Neves e4fb50e6f3 expression_with_stack_xtensa: fixed stack pointer to avoid its overflow on heap block metadata. 2019-12-20 13:18:13 -03:00
Felipe Neves fab50ccf7c expression_with_stack_xtensa: call esp watchpoint function using a callx4 to fix range problem of call4 function 2019-12-20 13:18:13 -03:00
Felipe Neves 674cb1c21c esp_expression_with_stack: added fake stack frame plus some cleanup on main macro 2019-12-20 13:18:13 -03:00
Felipe Neves 5e18cd4e13 esp_expression_with_stack: added watchpoint on stack parameter before use it 2019-12-20 13:18:13 -03:00
Felipe Neves dfea4196a2 docs: added esp-expression-with-stack on documentation 2019-12-20 13:18:13 -03:00
Felipe Neves 002f38c7f5 expression_with_stack_xtensa: protected switch stacks function to compile only on window ABI supported platform 2019-12-20 13:18:13 -03:00
Felipe Neves 11266ef05d expression_with_stack_xtensa: renamed and moved assembly helpes of esp_expression_wit_stack to xtensa component 2019-12-20 13:18:13 -03:00
Felipe Neves 7b90f34c5a esp_expression_with_stack: renamed macro and functions to have esp_ prefix 2019-12-20 13:18:13 -03:00
Felipe Neves 98b76617be test_shared_stack_printf: moved the test stack inside the heap 2019-12-20 13:18:13 -03:00
Felipe Neves debcc68c41 esp_common: added a macro to allow call functions using user allocated stack 2019-12-20 13:18:13 -03:00
Darian Leung 4c3d49e3f0 can: Fix semaphore take in critical section
This commit fixes can_reconfigure_alerts() which
could lead to a call to xSemaphoreTake() whilst
inside a critical section.

Closes https://github.com/espressif/esp-idf/issues/4277
2019-12-20 22:00:33 +08:00
Darian Leung b6af587975 can: Fix critical section ESP_LOG functions
This commit removes any function calls within
the CAN driver that result in a call to ESP_LOG
whilst inside a critical section.

These function calls are either moved outside
critical sections (e.g., intr_alloc and gpio
functions), or substituted (e.g., assert()).

Closes https://github.com/espressif/esp-idf/issues/4412
2019-12-20 20:58:48 +08:00
Konstantin Kondrashov 98495e5939 sntp: Add API to set update interval
Closes: https://github.com/espressif/esp-idf/issues/4437
Closes: IDFGH-2298
2019-12-20 18:26:23 +08:00
Angus Gratton 28314f9bb0 Merge branch 'bugfix/parttool_regression' into 'master'
parttool: Fix regression when parsing binary partition data

See merge request espressif/esp-idf!7075
2019-12-20 17:33:21 +08:00
Jiang Jiang Jian e977cc24ff Merge branch 'bugfix/fix_ble_mesh_adv_buf_unref' into 'master'
ble_mesh: Fix adv buf unref and link_id in exceptional list

See merge request espressif/esp-idf!6828
2019-12-20 17:11:08 +08:00
Angus Gratton 8f15664be0 parttool: Fix regression when parsing binary partition data
Regression in a91de43537
2019-12-20 19:09:10 +11:00
Jiang Jiang Jian abe26a1c02 Merge branch 'bugfix/ble_mesh_client_check_remain_time' into 'master'
ble_mesh: Client model check timer remaining time

See merge request espressif/esp-idf!7010
2019-12-20 15:21:26 +08:00
Mahavir Jain ba0a22f59d Merge branch 'fix/run_esptool_absolute_path' into 'master'
project_include.cmake: Make esptool_py_custom_target callable from other directories

See merge request espressif/esp-idf!7062
2019-12-20 14:05:53 +08:00
Angus Gratton f0680b99b3 Merge branch 'bugfix/mdns_netif_local' into 'master'
mdns: fix preset of esp_netif ptr for local interfaces

Closes WIFI-1538

See merge request espressif/esp-idf!7009
2019-12-20 12:53:50 +08:00
lly fbdaed0248 ble_mesh: Add unlock when failed to create alarm 2019-12-20 12:25:01 +08:00
lly 619e606356 ble_mesh: Rename ble mesh lock/unlock functions
Rename BLE Mesh internal lock/unlock functions, also seperate
the list, buf and atomic lock/unlock functions
2019-12-20 12:23:10 +08:00
Angus Gratton 3faa2a48d1 Merge branch 'test/uart_unit_tests' into 'master'
driver: test: Fix for 'uart read write' test failure, use some more verbose macros

See merge request espressif/esp-idf!6996
2019-12-20 12:15:45 +08:00
Angus Gratton 8099a90d46 Merge branch 'bugfix/parttool_backtraces' into 'master'
parttool: Avoid unnecessary exception backtrace for legitimate errors

See merge request espressif/esp-idf!7022
2019-12-20 12:14:23 +08:00
Angus Gratton 0cc98b8d76 secure boot: Fix bootloader build system target for bootloader digest
Closes https://github.com/espressif/esp-idf/issues/4513
2019-12-20 15:09:15 +11:00
Angus Gratton 15e67a49f4 Merge branch 'bugfix/nvs_flash_iterator' into 'master'
NVS: BUGFIX iterator corrupting entries.

Closes IDFGH-2229

See merge request espressif/esp-idf!6789
2019-12-20 11:40:23 +08:00
Jiang Jiang Jian 546aa18c84 Merge branch 'bugfix/fix_wifi_stop_memory_leak' into 'master'
esp_wifi/supplicant: fix some WiFi stop memory leak

Closes WIFI-1488

See merge request espressif/esp-idf!7043
2019-12-20 11:07:13 +08:00
Ivan Grokhotkov 37a8ff9040 core dump: only get EPC/EPS registers up to XCHAL_NUM_INTLEVELS 2019-12-19 16:47:57 +01:00
Amit Sheth 8f3987099e project_include.cmake: Make esptool_py_custom_target callable from other directories 2019-12-19 17:53:09 +05:30
Marius Vikhammer 7c0e3765ec websocket: added missing event data
user_context was missing from websocket event data, added. Also added the websocket client handle to the event data.

Removed  unused event data struct.

Closes: IDF-1271
2019-12-19 17:36:37 +08:00
Ivan Grokhotkov 9addf631e5 Merge branch 'bugfix/mdns_deinit_event_crash' into 'master'
mdns: fixed crash on event during deinit

Closes WIFI-1485

See merge request espressif/esp-idf!6951
2019-12-19 15:42:05 +08:00
Jakob Hasse 38aa21fd15 WIFI: added log for wifi test, increased timeout 2019-12-19 14:53:28 +08:00
Angus Gratton 852462f4e2 test: Fix possible race in pthread C++ test
Also use TEST_ASSERT_EQUAL to get better debugging

Debugging intermittent UT failures on S2 release config

In the old version, the 300ms delay in between the two kinds of test
was supposed to keep the tasks in lockstep so it didn't matter that
global_sp was protected by two muxes.

However it seems like sometimes they could get out of sync -
I think because of a race in the sleep_until test. If the
second counter ticks over at that exact moment sleeping starts,
then the task doesn't sleep and will immediately keep running
 for the next iteration, possibly racing the other tasks.
2019-12-19 15:55:51 +11:00
Angus Gratton 505a82488a Merge branch 'bugfix/esp_log_from_critical' into 'master'
intr_alloc: don't call ESP_LOG from a critical section

Closes FCS-268

See merge request espressif/esp-idf!7047
2019-12-19 08:47:19 +08:00
Mahavir Jain e8db1c4da0 Merge branch 'feature/enable_i2s_tests_on_esp32s2beta' into 'master'
Enable i2s and freertos test/s on esp32s2beta

See merge request espressif/esp-idf!6790
2019-12-18 17:51:54 +08:00
Ivan Grokhotkov 2b6c85e182 intr_alloc: don't call ESP_LOG from a critical section
Calling ESP_LOG from a critical section leads to abort() in 4.1, and
may also randomly abort() in earlier versions.

Closes FCS-268
2019-12-18 10:11:24 +01:00
liu zhifu fde2f33912 esp_wifi/supplicant: fix some WiFi stop memory leak 2019-12-18 13:51:27 +08:00
Angus Gratton 30372f5a4f Merge branch 'docs/esp_netif_programmer_manual' into 'master'
esp netif: formal fixes (docs and c++ sentinels again)

Closes IDFGH-2265

See merge request espressif/esp-idf!6819
2019-12-18 13:12:36 +08:00
Jakob Hasse 5249d33c1f NVS: bugfix nvs_set_str/blob checks write mode 2019-12-18 09:06:45 +08:00
Jakob Hasse bb1cd9a440 NVS: BUGFIX non-matching type iterator works
Closes IDFGH-2229
2019-12-18 09:06:45 +08:00
David Cermak eaa2f12d67 mdns: fixed crash on event during deinit
mdns library deinitialization destroys internal structures including action queue. if an event (e.g. network update) received
after some essential stucture is destoyed, an unexpected behavour might be introduced (e.g. crash of adding the event notification
to the action queue which was already destroyed

Closes WIFI-1485
2019-12-17 18:18:22 +00:00
David Cermak 74d768fe6d ci: updated mqtt weekend test for qemu support
Added default sdkconfig for qemu build for the mqtt publish example,
Added environment configuration for running the same test on target
or in qemu
Updated missing example tests per latest ttfw refactoring
2019-12-17 14:06:40 +01:00