Commit graph

5998 commits

Author SHA1 Message Date
Angus Gratton e5672e5d7f efuse/flash encryption: Reduce FLASH_CRYPT_CNT to a 7 bit efuse field
8th bit is not used by hardware.

As reported https://esp32.com/viewtopic.php?f=2&t=7800&p=40895#p40894
2019-04-09 09:57:18 +10:00
liu zhifu 3e972a3ffe esp32: increase WiFi block scan timeout value
Increase WiFi block scan internal timeout value.
2019-04-08 20:02:14 +08:00
Anurag Kar 8bd09fb0a5 esp_http_server : Test added to check limit on max_open_sockets config option 2019-04-08 11:22:12 +05:30
Anurag Kar e90c90d1f6 esp_http_server : Only accept new connections if server has capacity to handle more
This fix prevents HTTP server from accepting new connections when the total count of connected
sockets has reached the max_open_sockets limit set during configuration. The pending connections
are kept in backlog until atleast one of the connected sockets is closed. The maximum number of
connection requests that can kept in backlog is specified as backlog_conn configuration option.
Note that this modification has no effect when LRU purge is enabled.

Also added sanity check on setting for max_open_sockets during configuration.

Solution suggested by jimparis https://github.com/espressif/esp-idf/issues/3183#issue-421234265

Closes https://github.com/espressif/esp-idf/issues/3183
2019-04-08 11:21:44 +05:30
Jiang Jiang Jian eed94b87e2 Merge branch 'bugfix/coex_bt_disconn_v3.3' into 'release/v3.3'
components/coex: Fix BT disconnecting due to too many reset BB

See merge request idf/esp-idf!4680
2019-04-04 20:53:15 +08:00
Jiang Jiang Jian a218d4b925 Merge branch 'bugfix/btdm_fix_warning_when_disable_logs_v3.3' into 'release/v3.3'
components/bt: Fix warning when disable debug logs or in release mode and improve the code structure

See merge request idf/esp-idf!4619
2019-04-04 18:45:31 +08:00
Jiang Jiang Jian 015f523939 Merge branch 'bugfix/btdm_disconn_with_apple_device_v3.3' into 'release/v3.3'
components/bt: Fix disconnect with apple device(backport 3.3)

See merge request idf/esp-idf!4666
2019-04-04 18:45:13 +08:00
Jiang Jiang Jian 7196573605 Merge branch 'bugfix/heap_caps_int_overflows_v3.3' into 'release/v3.3'
heap: Add integer overflow checks on MALLOC_CAP_32BIT & MALLOC_CAP_EXEC (v3.3)

See merge request idf/esp-idf!4570
2019-04-04 17:59:40 +08:00
Jiang Jiang Jian 4a698ffb75 Merge branch 'bugfix/external_rtc_start_fail_v3.3' into 'release/v3.3'
Bugfix/external rtc start fail (v3.3)

See merge request idf/esp-idf!4663
2019-04-04 17:59:24 +08:00
Shivani Tipnis 3368783bf0 mfg_util: Add changes to mfg_util as per changes in nvs_util
revert changeson this file

Update README for mfg util

Update to correct coding style of script

(cherry picked from commit a88b4048)
2019-04-04 13:46:39 +05:30
baohongde 7e0e514127 components/coex: Fix BT disconnecting due to too many reset BB
Update coex version to 1.1.6
2019-04-04 11:47:45 +08:00
Jiang Jiang Jian 541c267af3 Merge branch 'bugfix/fix_some_sta_certification_issues_v3.3' into 'release/v3.3'
esp32: fix some STA certification issues (backport v3.3)

See merge request idf/esp-idf!4667
2019-04-04 10:27:36 +08:00
baohongde bbfe9f4efa components/bt: Fix disconnect with apple device(backport 3.3)
1. Fix disconnect with apple device
        2. Fix hci_refresh_enc_key_cmd will be ignored
        3. Fix hci_refresh_enc_key_cmd will crash
2019-04-03 17:24:52 +08:00
Shivani Tipnis 1b8dd9f173 nvs_util: Add support to include comments in csv file
Closes https://github.com/espressif/esp-idf/issues/2965

(cherry picked from commit 66e38e9bac)
2019-04-02 12:39:44 +05:30
Liu Zhi Fu dd33cec716 esp32: fix some STA certification issues
Fix following STA WFA certification issues:
1. STA HT2040 coexist
2. Disallow WEP/TKIP with HT rates
3. WPA2 improvement
4. Minor refactor for WiFi internal global variable auth_type
2019-04-02 14:48:43 +08:00
Angus Gratton 1cb29ac446 Merge branch 'feature/nvs_part_util_3.3' into 'release/v3.3'
Add support as per encryption and multipage blob changes in NVS Partition Utility (backport v3.3)

See merge request idf/esp-idf!4626
2019-04-02 13:31:57 +08:00
Angus Gratton d6ceb4a31a Merge branch 'bugfix/http_server_lf_term_hdr_backport_v3d3' into 'release/v3.3'
HTTP Server : Fix for tolerating LF terminated headers (backport v3.3)

See merge request idf/esp-idf!4658
2019-04-02 12:19:05 +08:00
maojianxin ce3d20dcd2 Fix external start fail 2019-04-02 12:54:08 +11:00
Zhang Jun Yi 1dc461ba80 soc/rtc: Bypass touchpad current to external 32k crystal oscillator 2019-04-02 12:54:08 +11:00
Jiang Jiang Jian f03382b0ff Merge branch 'feature/btdm_add_mesh_adv_type_and_srv_uuid_for_dup_scan_except_v3.3' into 'release/v3.3'
Component/bt: add mesh beacon adv and svc uuid for duplicate scan exceptional list (backport v3.3)

See merge request idf/esp-idf!4605
2019-04-01 21:49:29 +08:00
Jiang Jiang Jian 2ecd007974 Merge branch 'bugfix/btdm_modify_HCI_GET_CMD_BUF_v3.3' into 'release/v3.3'
Component/bt: modify HCI_GET_CMD_BUF (backport v3.3)

See merge request idf/esp-idf!4598
2019-04-01 21:18:18 +08:00
Anurag Kar ff01bcfd88 HTTP Server : Fix for tolerating LF terminated headers
List of changes:
* When parsing requests, count termination from LF characters only
* Correct memcpy() length parameter in httpd_unrecv() (pointed out by jimparis in GitHub issue thread)
* Use ssize_t to store results of length subtractions during parsing
* Modify some comments to reduce ambiguity

Closes https://github.com/espressif/esp-idf/issues/3182
2019-04-01 15:38:59 +05:30
zhangyanjiao 8442255ccc wifi: increase the block scan time because of changing channel will take at 30ms when BT/WiFi coexist 2019-04-01 14:49:33 +08:00
zhangyanjiao 6d2faf4172 wifi: modify wifi reason code 2019-04-01 11:29:29 +08:00
zhiweijian 826146e985 Component/bt: add mesh beacon adv and svc uuid for duplicate scan exceptional list 2019-03-28 11:13:30 +08:00
Shivani Tipnis 2faf3c9c34 nvs_util: Add support for creation of unique encryption keys
(cherry picked from commit e1f466e708c2c1b825e955ec28b70dc3058f9262)
2019-03-27 18:28:42 +05:30
Shivani Tipnis 3fedc3eb28 nvs_util: Add support for creation of unique encryption keys
(cherry picked from commit 8b88b3303d83f5f03249e7b3410f6ecabaa00396)
2019-03-26 16:14:31 +05:30
Shivani Tipnis 4148beca50 nvs_util: Fix to support write of multiple singlepage big blob data
Closes https://github.com/espressif/esp-idf/issues/3011

(cherry picked from commit 60b5cdde20)
2019-03-26 16:13:15 +05:30
Shivani Tipnis c71b38c467 nvs_util: Fix to support write of multiple singlepage big blob data
Closes https://github.com/espressif/esp-idf/issues/3011

(cherry picked from commit ce4944edf01b2a4c997eafe36b66d71f98f2fe29)
(cherry picked from commit 76e4ea7f68)
2019-03-26 16:11:38 +05:30
Shivani Tipnis 8e2b189252 nvs_util: Fix to support write of multiple singlepage big blob data Closes https://github.com/espressif/esp-idf/issues/3011
(cherry picked from commit 21688e3bffee80ddfbef5364a44dd1821e28c776)
(cherry picked from commit 3ec0f415a5)
2019-03-26 16:10:18 +05:30
baohongde dca83700f2 components/bt: Fix warning when disable debug logs or in release mode and improve the code structure 2019-03-26 14:46:36 +08:00
zhiweijian 88fe438524 Component/bt: modify HCI_GET_CMD_BUF 2019-03-22 14:59:11 +08:00
chenyudong 7f1fd0b8d3 Decouple Wifi and ESP-Mesh to reduce bin size
Do not link mesh code when mesh is not used
2019-03-22 13:01:11 +08:00
Ivan Grokhotkov 3cec8d0122 Merge branch 'bugfix/error_in_bootloader_loadprohibited_v3.3' into 'release/v3.3'
esp_tool: Exclude elf-sha256 from bootloader (backport v3.3)

See merge request idf/esp-idf!4560
2019-03-21 18:22:24 +08:00
Jiang Jiang Jian 6381817006 Merge branch 'bugfix/mesh_memory_leak_v3.3' into 'release/v3.3'
mesh: fix memory leak and group send (backport v3.3)

See merge request idf/esp-idf!4517
2019-03-21 11:45:34 +08:00
Jiang Jiang Jian 6505f82a80 Merge branch 'bugfix/btdm_fix_no_adv_report_when_scaning_with_sleep_enable_v3.3' into 'release/v3.3'
Component/bt: fix no adv report when scaning with sleep enable (backport v3.3)

See merge request idf/esp-idf!4536
2019-03-20 21:40:28 +08:00
Jiang Jiang Jian c05a0ae6c3 Merge branch 'bugfix/btdm_fix_build_warning_when_bluedroid_disable_log_v3.3' into 'release/v3.3'
Component/bt: fix build warning when bluedroid disable log (backport V3.3)

See merge request idf/esp-idf!4565
2019-03-20 21:22:33 +08:00
Angus Gratton f72df315f7 heap: Add integer overflow checks on MALLOC_CAP_32BIT & MALLOC_CAP_EXEC 2019-03-20 18:30:25 +11:00
chenyudong e7a263938b mesh: fix memory leak and group send
fix a bug in group send
fix esp_mesh_set_router when router_t not initialized
fix mesh memory leak with invalid option
2019-03-20 15:13:28 +08:00
zhiweijian 3ed0f8e113 Component/bt: fix build warning when bluedroid disable log 2019-03-20 15:02:57 +08:00
zhiweijian 7e1ccb56a7 Component/bt: fix blufi prepare write crash 2019-03-20 14:23:11 +08:00
Konstantin Kondrashov 50a0b00afa esp_tool: Exclude elf-sha256 from bootloader
Closes: IDFGH-690
2019-03-20 12:19:23 +08:00
zhiweijian 7a530be302 Component/bt: fix no adv report when scaning with sleep enable 2019-03-18 17:09:00 +08:00
zhangyanjiao b692bda09b wifi: fix the bug that when call set_config before connecting to an encrypted AP, PMK will be recalculated 2019-03-18 14:45:33 +08:00
Jiang Jiang Jian e4a83f856e Merge branch 'bugfix/mdns_add_remove_multiple_srv_master_3.3' into 'release/v3.3'
mdns: fix possible crash if tx packet contained answer to removed service (backport 3.3)

See merge request idf/esp-idf!4480
2019-03-17 15:41:34 +08:00
Jiang Jiang Jian e25152a031 Merge branch 'bugfix/esp_sha_signing_sha256_v3.3' into 'release/v3.3'
secure boot: Fix esp_sha INT WDT, switch to using mbedTLS API  (backport v3.3)

See merge request idf/esp-idf!4512
2019-03-17 14:40:21 +08:00
Jiang Jiang Jian 885aec7aba Merge branch 'bugfix/bb_watchdog_reset_v3.3' into 'release/v3.3'
esp32: add WiFi baseband watchdog reset

See merge request idf/esp-idf!4486
2019-03-15 18:49:32 +08:00
Jiang Jiang Jian a3a58546bc Merge branch 'bugfix/console_allow_buffered_v3.3' into 'release/v3.3'
console example: use buffered stdout by default (backport v3.3)

See merge request idf/esp-idf!4508
2019-03-15 16:11:30 +08:00
Angus Gratton 0176f912b6 esp32: Chunk input blocks for esp_sha() function performance, add perf test 2019-03-15 17:34:06 +11:00
Angus Gratton 615376d14a secure boot: Use mbedtls_sha256() not esp_sha()
Latter is probably compiled into most firmwares already, saves some size.

Ref https://github.com/espressif/esp-idf/issues/3127
2019-03-15 17:34:06 +11:00
Angus Gratton fe516fb7c2 esp32 hwcrypto: Prevent esp_sha() from disabling interrupts for extended period
* Closes https://github.com/espressif/esp-idf/issues/3127
* Closes IDFGH-681

Also reported at https://esp32.com/viewtopic.php?f=13&t=9506
2019-03-15 17:34:06 +11:00
Angus Gratton f5c805160b Merge branch 'bugfix/remove_malloc_ble_prov_v3.3' into 'release/v3.3'
(backport v3.3) Protocomm BLE: Make changes in handling BLE read/write requests

See merge request idf/esp-idf!4496
2019-03-15 14:29:18 +08:00
Ivan Grokhotkov 50ceb45e6f console/linenoise: support buffered stdout 2019-03-15 11:31:22 +08:00
Hrishikesh Dhayagude bd0984226e Protocomm BLE: Make changes in handling BLE read/write requests
1. Remove unwanted malloc during BLE send response
2. Populate the missing parameters in the response - handle, offset, auth_req
2019-03-14 12:53:52 +05:30
Tian Hao f330bb50b2 fix the bug assert(8192 0) in rwble.c 234 2019-03-14 11:43:16 +08:00
Liu Zhi Fu 16755a2c51 esp32: add WiFi baseband watchdog reset
When WiFi enter into a special status (11b weak mode), then reset
Wifi baseband to recover to normal mode.
2019-03-14 09:28:37 +08:00
David Cermak 936b99d756 mdns: fix possible crash when probing on particular interface with duplicated service instances due to naming conflicts on network
Issue: MDNS server initially sends probing packets to resolve naming confilicts with already registered service instances. In case of a conflict, instance name is altered and probing restarts. Original instance however wasnnot removed from the structure and upon service removal only one entry was removed and a dangling service might have been kept in the structure to bring about a crash.
Resolution: Keep only one instance of a service in the probing structure.

Closes IDF-498
2019-03-13 16:10:27 +01:00
David Cermak c88cc4950e mdns: enable pcbs before starting service thread to avoid updating pcb's internal variables from concurent tasks
possible race condition: user task runs mdns_init, which enables pcbs while mdns-task already created could execute enable/disable of the same pcbs if an appropriate system event received
2019-03-13 16:10:16 +01:00
David Cermak 54e5e440b1 mdns: fix possible deadlock on mdns deinit calling mdns_free()
mnds_free() initiates stop and delete timer tasks, which after locking the mutex could lead to a dead lock in case timer task executed before deleting the task, as it would wait indefinitelly for unlocking the mutex. This condition is fixed by calling _mdns_stop_timer without locking the mutex, because there's no need to protect any data when stopping and deleting the timer task

Closes https://github.com/espressif/esp-idf/issues/1696
2019-03-13 16:10:03 +01:00
David Cermak e8bcda3512 mdsn: fix race condition in updating packet data from user task when failed to allocate or queue a new service
Issue: mdns_service_add API allocates and queues an action to be processed in mdns task context; when allocation or queueing fails, allocated structure needs to be freed. Function _mdns_free_service did not only fee all the structures, but also updates packet data.
Resolution: Moved removal of packet data outside of _mdns_free_service function.
2019-03-13 16:09:51 +01:00
David Cermak 35a30072f4 mdns: fix possible crash when packet scheduled to transmit contained service which might have been already removed
packets scheduled to transmit are pushed to action queue and removed from tx_queue_head structure, which is searched for all remaining services and while service is removed, then service questions/asnwers are also removed from this structure. This update fixes possible crash when packet is pushed to action queue, and when service is removed, its answers are removed from tx_queue_head, but not from action queue. this could lead to a crash when the packet is poped from action queue containing questions/answers to already removed (freed) service

Closes IDF-504
2019-03-13 16:09:41 +01:00
zhiweijian a1546e0714 Component/bt: add BLE adv report flow control 2019-03-13 14:58:32 +08:00
Angus Gratton e18c7cb98d Merge branch 'bugfix/mdns_incorrect_semaphore_use' into 'master'
mdns: use binary semaphore instead of mutex when searching

See merge request idf/esp-idf!4464
2019-03-13 13:11:45 +08:00
Angus Gratton 8120efc6ed Merge branch 'bugfix/modify_dhcpserver_and_tcpip_adapter' into 'master'
modify the behavior for dhcpserver and tcpip_adapter

Closes IDFGH-557 and IDFGH-563

See merge request idf/esp-idf!4453
2019-03-13 12:54:55 +08:00
Ivan Grokhotkov eef0b5090a mdns: use binary semaphore instead of mutex when searching
mdns_search_once_t::lock is used to synchronize tasks (taken by one
task and given by the other) so it should not be a mutex.
Convert to semaphore, and rename to indicate its purpose.
2019-03-12 09:33:06 +01:00
Renz Christian Bagaporo d0b2d5ec95 cmake: Fix for Python files executed directly, not via PYTHON variable
A problem if the Python interpreter used for idf.py (or set via PYTHON
variable) didn't match
"/usr/bin/env python" (or the associated executable for .py files, on
Windows).

Closes https://github.com/espressif/esp-idf/issues/3160
Possibly also fix for https://github.com/espressif/esp-idf/issues/2936

Adds build system test to catch any future direct execution of Python in
the standard build process.
2019-03-12 13:31:44 +08:00
Angus Gratton 2f83aea8f3 Merge branch 'bugfix/freemodbus_remove_critical_section' into 'master'
freemodbus: Fix remove critical_sections

See merge request idf/esp-idf!4289
2019-03-12 06:30:50 +08:00
Ivan Grokhotkov fc4823c885 Merge branch 'bugfix/coredump_improvements_refactoring_delete_include' into 'master'
esp32: coredump refactoring fix bug (remove duplicated include)

See merge request idf/esp-idf!4328
2019-03-11 19:00:39 +08:00
Angus Gratton af1ea9b1b9 efuse: When Virtual eFuses are enabled, seed the virtual values as part of startup code 2019-03-11 15:20:40 +11:00
zhangyanjiao 27cc0d1f91 modify the behavior for dhcpserver and tcpip_adapter:
1. dhcp_server: suppress send_offer debug output
2. tcpip_adapter: zero-initialize system_event_t structures
3. tcpip_adapter: pass client IP address along with SYSTEM_EVENT_AP_STAIPASSIGNED

Closes https://github.com/espressif/esp-idf/issues/2924
Closes https://github.com/espressif/esp-idf/issues/2949
2019-03-11 12:11:05 +08:00
He Yin Ling 8f3fe52b5a test: temp disable spi master slave mode test 2019-03-10 06:21:37 +00:00
Jiang Jiang Jian 09e72776dc Merge branch 'bugfix/autoip_memoey_leak_debug' into 'master'
fix the bug in auto Ip memory leak

See merge request idf/esp-idf!4395
2019-03-08 19:54:25 +08:00
aleks 13e1c0b32f esp32: coredump header (fix linker.lf)
remove duplicated include from components/esp32/incliude/esp_core_dump.h
espcoredump/incliude/esp_core_dump.h:
fix signature of the functions esp_core_dump_to_uart() and esp_core_dump_to_uart();
add espcoredump into COMPONENT_PRIV_REQUIRES list
fix linker.lf file
2019-03-08 09:49:37 +00:00
Angus Gratton 3a410d6a3d Merge branch 'bugfix/httpd_sess_ctx' into 'master'
esp_http_server: Provide apps an option to let http_server ignore sess_ctx changes

See merge request idf/esp-idf!4417
2019-03-08 06:55:44 +08:00
aleks aaa1cb6eec freemodbus: change critical sections to semaphore mutex
revert changes made in mbrtu.c, mbascii.c
change critical section type to semaphore mutex instead of spin lock

Closes: https://github.com/espressif/esp-idf/issues/3009
2019-03-07 09:59:40 +01:00
Konstantin Kondrashov 1ef7d093e1 freemodbus: Fix remove critical_sections
Closes: https://github.com/espressif/esp-idf/issues/3009
2019-03-07 08:00:45 +00:00
xiehang b88b9f4e03 fix the bug in auto Ip memory leak
Closes https://jira.espressif.com:8443/browse/WIFI-266
2019-03-06 14:44:06 +08:00
Jiang Jiang Jian c1e50c8a27 Merge branch 'bugfix/btdm_fix_iOS_and_win10_compatibility_error_for_HID' into 'master'
Component/bt: fix iOS and win10 compatibility error  for HID

See merge request idf/esp-idf!4396
2019-03-06 14:11:38 +08:00
Ivan Grokhotkov 42c906140e Merge branch 'bugfix/level5_intr_alloc' into 'master'
esp32: esp_intr_alloc: Fixed issue with level 5 not being called

Closes IDFGH-616

See merge request idf/esp-idf!4405
2019-03-06 11:18:36 +08:00
Ivan Grokhotkov d474018725 Merge branch 'feature/gdbstub_task_list' into 'master'
Add support for listing tasks to gdb in gdbstub

Closes IDFGH-498

See merge request idf/esp-idf!4357
2019-03-06 11:12:46 +08:00
Ivan Grokhotkov c22e572ad0 gdbstub: minor cleanup
1. Add Kconfig options to control task listing support.
2. Convert magic values (-1, -2) to named constants.
3. Convert spaces to tabs to match the rest of the file.
4. Rename getAllTasksHandle to getTaskInfo to reflect its purpose.
5. Add some curly braces for single line statements.
2019-03-05 12:11:45 +08:00
X-Ryl669 b797f05558 Add support for listing tasks to gdb in gdbstub
…and changing the active task and fetching each task's stack

Merges https://github.com/espressif/esp-idf/pull/2828
2019-03-05 12:00:22 +08:00
XiaXiaotian b9b401ee39 Decouple WiFi and BT with coexist to reduce bin size
1. Do not link WiFi code when only BT or BLE is used and WiFi is not
used.

2. Do not link coexist code when CONFIG_SW_COEXIST_ENABLE is disabled.
2019-03-05 10:38:14 +08:00
Jiang Jiang Jian bf2c46674d Merge branch 'bugfix/fix_some_wifi_bugs_0301' into 'master'
esp32: fix some WiFi bugs

See merge request idf/esp-idf!4399
2019-03-05 10:35:22 +08:00
Piyush Shah f28f4016cb esp_http_server: Provide apps an option to let http_server ignore sess_ctx changes
By default, if a URI handler changes the http session context,
the webserver internally clears the older context after the handler
returns. However, if applications want to change this behavior and
manage the allocation/de-allocation/freeing themselves and let the
server handle only the "socket close" case, this commit provides such
an option.
2019-03-05 00:21:03 +05:30
Ivan Grokhotkov dace2d6bc5 Merge branch 'bugfix/uart_fix_critical_section_api_from_isr' into 'master'
uart: use correct critical section API from ISR context

See merge request idf/esp-idf!4301
2019-03-04 16:24:22 +08:00
Ivan Grokhotkov b3ee815ec1 Merge branch 'feature/esp_http_client_global_ca_store' into 'master'
esp_http_client: add support for using certs from global ca store

See merge request idf/esp-idf!4302
2019-03-04 16:24:07 +08:00
Christian Hoene 025deab4d2 esp32: esp_intr_alloc: Fixed issue with level 5 not being called
Closes https://github.com/espressif/esp-idf/issues/3039
Merges https://github.com/espressif/esp-idf/issues/3040
2019-03-01 17:11:51 +11:00
Liu Zhi Fu 2f547ca7c8 esp32: fix some WiFi bugs
Fix following WiFi bugs:
1. Fix the bug that STA incorrectly deletes BA when receiving DelBA request
2. Add out of memory check
3. Fix the bug that STA incorrectly receives packets when scanning in connected status
2019-03-01 11:25:36 +08:00
Jiang Jiang Jian ebdcbe8c60 Merge branch 'doc/crc_apis_usage' into 'master'
Add CRC APIs usage

See merge request idf/esp-idf!4351
2019-03-01 10:03:03 +08:00
zhiweijian d71df18d92 Component/bt: fix iOS and win10 compatibility error for HID 2019-02-28 20:39:12 +08:00
michael 12a6664afa spi test: describe the wiring of param test in the comments 2019-02-28 19:43:58 +08:00
Jiang Jiang Jian d82c80a07b Merge branch 'bugfix/wifi_modify_wifi_kconfig' into 'master'
esp32: modify WiFi Kconfig in order to achieve better compatility and performance

See merge request idf/esp-idf!4164
2019-02-28 18:21:16 +08:00
XiaXiaotian ae69a8adc0 esp32: modify WiFi Kconfig in order to achieve better compatility
and performance
2019-02-28 16:57:56 +08:00
Konstantin Kondrashov 509e1264b9 efuse: Fix to pass CI tests 2019-02-28 07:31:29 +00:00
Konstantin Kondrashov c9cd06c886 efuse: Reduce the size of esp_efuse_desc_t to 4 bytes 2019-02-28 07:31:29 +00:00
Konstantin Kondrashov 1d7b901aeb efuse: Add MAX_BLK_LEN define for changing len of field
Added docs, improved efuse_table_gen.py, and minor fixes

Checking the generated files for compliance with the coding scheme.
2019-02-28 07:31:29 +00:00
Konstantin Kondrashov 95b6273c7c efuse: Fix docs and script 2019-02-28 07:31:29 +00:00
Konstantin Kondrashov cc094ba789 efuse: Fix python coding style
Set python's scripts attribute chmod
Add compatibility with Python3 for efuse_table_gen.py
2019-02-28 07:31:29 +00:00
Konstantin Kondrashov 303d17792a efuse: Add a write/read protection 2019-02-28 07:31:29 +00:00
Konstantin Kondrashov b8141f3ad8 efuse: Fix make/cmake build systems and docs 2019-02-28 07:31:29 +00:00
Konstantin Kondrashov 9822055851 efuse: Add support coding scheme to script
Added support using BLK1 and BLK2 in custom table.
Added change size key in BLK1 and BLK2 if coding scheme was changed.
2019-02-28 07:31:29 +00:00
Konstantin Kondrashov 693a5c209b efuse: Add API efuse
Added support 3/4 coding scheme
2019-02-28 07:31:29 +00:00
Konstantin Kondrashov d82023bf06 soc: Add support efuse 2019-02-28 07:31:29 +00:00
Konstantin Kondrashov ed179ade8d esp32: Add using efuse component 2019-02-28 07:31:29 +00:00
Konstantin Kondrashov 7626145e6d bootloader: Add support efuse component 2019-02-28 07:31:29 +00:00
Jiang Jiang Jian c05a39de02 Merge branch 'bugfix/fix_scan_bugs_and_alloc_eb_fail' into 'master'
wifi: fix scan bugs and alloc eb fail

See merge request idf/esp-idf!4373
2019-02-28 13:34:51 +08:00
Ivan Grokhotkov f746b0d761 Merge branch 'bugfix/pthread_thread_size' into 'master'
pthread: Transform the units of the stack size to the FreeRTOS domain

Closes IDFGH-603

See merge request idf/esp-idf!4375
2019-02-28 10:24:34 +08:00
Angus Gratton 19fd436e88 Merge branch 'esp_http_server/lru_counter_for_timestamp' into 'master'
esp_http_server/lru_counter_for_timestamp:Added LRU counter for timer

See merge request idf/esp-idf!4205
2019-02-28 07:04:21 +08:00
Roland Dobai 314c77609e pthread: Transform the units of the stack size to the FreeRTOS domain
Closes https://github.com/espressif/esp-idf/issues/3015
2019-02-27 12:21:23 +01:00
zhangyanjiao 4ea4d4744c wifi:
1. make menuconfig can set the WiFi mgmt short buffer num
2. fix several scan bugs
2019-02-27 18:31:32 +08:00
Jeroen Domburg a52ba8df7d Merge branch 'bugfix/make_get_coreid_volatile' into 'master'
freertos: Make xPortGetCoreID() volatile

See merge request idf/esp-idf!4359
2019-02-27 17:58:57 +08:00
Jiang Jiang Jian 484d8ab7ed Merge branch 'bugfix/btdm_fix_remove_bonded_device_warnning' into 'master'
Component/bt: fix remove bonded device warnning

See merge request idf/esp-idf!3704
2019-02-27 17:54:37 +08:00
Jiang Jiang Jian 9a1bbcfa1a Merge branch 'bugfix/ble_reconn_rescan_readv_crash' into 'master'
component/bt : fix bug that there's low ratio crash when BLE do re-connect/re-scan/re-adv

See merge request idf/esp-idf!4324
2019-02-27 17:37:46 +08:00
Mahavir Jain 27e00cf7aa esp_http_client: add support for using certs from global ca store
Closes https://github.com/espressif/esp-idf/issues/3062
2019-02-27 14:19:06 +05:30
Mahavir Jain e9652e8ef3 uart: use correct critical section API (portENTER_CRITICAL_ISR) from ISR context 2019-02-27 08:36:47 +00:00
Angus Gratton 42f64e9a93 Merge branch 'bugfix/tw28146_make_wifi_iram_optimization_configurable' into 'master'
esp32: make WiFi IRAM optimization configurable

See merge request idf/esp-idf!4037
2019-02-27 16:33:05 +08:00
Ivan Grokhotkov 37b55a5eb5 esp32: print ELF file SHA256 in panic handler 2019-02-27 13:30:25 +08:00
Ivan Grokhotkov ea52a19c00 build system: include SHA256 hash of ELF file into app_desc structure 2019-02-27 13:30:25 +08:00
Angus Gratton 80f02cd0ea Merge branch 'bugfix/bootloader_freq_check_runtime' into 'master'
bootloader: check previously used clock frequency at run time

See merge request idf/esp-idf!3827
2019-02-27 13:22:47 +08:00
Angus Gratton fab11e1cec Merge branch 'bugfix/cmake_psram_fix_flag' into 'master'
cmake: Fix psram workaround compiler flag application

See merge request idf/esp-idf!4335
2019-02-27 13:20:21 +08:00
Ivan Grokhotkov 1bc831f074 Merge branch 'bugfix/esp_timer_monotonic_test' into 'master'
esp_timer: fix occasional failures in "esp_timer_get_time returns monotonic values" test

See merge request idf/esp-idf!4340
2019-02-27 11:08:53 +08:00
Darian Leung 3576e54d79 freertos: Make xPortGetCoreID() volatile
When xPortGetCoreID() is called twice within a function,
it might only be called once after compilation. This
commit makes the inline assembly of the function volatile.

Closes #3093
2019-02-26 20:59:49 +08:00
Liu Zhi Fu 711173b3d6 esp32: make WiFi IRAM optimization configurable
With this feature, the WiFi IRAM optimization can be disabled/enabled via menuconfig.
2019-02-26 19:55:57 +08:00
jack 299e4ca716 Add CRC APIs usage 2019-02-26 18:12:14 +08:00
Ivan Grokhotkov 8cc6226051 soc: define named constants for DPORT_CPUPERIOD_SEL values 2019-02-26 17:07:59 +08:00
Ivan Grokhotkov 178e5b25e6 bootloader: check previously used clock frequency at run time
In the situation when bootloader was compiled for 240MHz, and app was
compiled for 160MHz, and the chip is a revision 0 chip, the
bootloader will assume that the application has also been running at
240MHz. This will cause the chip to lock up later. Modify this to use
a run time check of DPORT_CPUPERIOD_SEL, which indicates which of the
PLL frequencies was used.

Closes https://github.com/espressif/esp-idf/issues/2731.
2019-02-26 17:02:34 +08:00
Ivan Grokhotkov dda0208614 soc/rtc_clk: don’t clear DPORT_CPUPERIOD_SEL when switching to XTAL
This is not necessary since RTC_CNTL_SOC_CLK_SEL is set before this.
2019-02-26 17:02:34 +08:00
Ivan Grokhotkov 140b6e3893 Merge branch 'bugfix/nvs_hash_blocks_eager_cleanup' into 'master'
nvs: do eager cleanup of HashListBlocks

See merge request idf/esp-idf!4337
2019-02-26 12:28:10 +08:00
Angus Gratton da390618c2 cmake: Fix psram workaround compiler flag application
Previously, this compiler flag was not being applied
regardless of CONFIG_SPIRAM_CACHE_WORKAROUND setting.

Explanation: add_compile_options() only applies to
source files added after the function is run, or in
subdirectories added after the function is run. In
this case, no new source files were being added after
this function was run.
2019-02-26 04:07:51 +00:00
Angus Gratton 3952d25a99 Merge branch 'feature/add_api_get_rmt_idle_level' into 'master'
feature(rmt):  fixed some RMT related issues.

See merge request idf/esp-idf!3864
2019-02-26 11:57:10 +08:00
Angus Gratton ca72c3e97b Merge branch 'bugfix/fix_dig_gpio_unable_hold_bug' into 'master'
bugfix(gpio):  fixed digital gpio unable hold bug during deep-sleep.

See merge request idf/esp-idf!3877
2019-02-26 11:56:27 +08:00
Angus Gratton 280d39aedd Merge branch 'bugfix/i2s_pdm_adc_use_apll' into 'master'
bugfix(i2s): allow to use apll in pdm/adc/dac mode

See merge request idf/esp-idf!3800
2019-02-26 11:47:49 +08:00
Angus Gratton b966ef9fcd Merge branch 'bugfix/update_ledc_register_and_fix_fade_scale' into 'master'
Bugfix (ledc):  Fixed ledc fade scale  bug

See merge request idf/esp-idf!4109
2019-02-26 11:46:28 +08:00
Angus Gratton f614f5bfa9 Merge branch 'feature/http_server_err_handling' into 'master'
http_server : Add feature for invoking user configurable handlers during server errors

See merge request idf/esp-idf!4229
2019-02-26 11:12:06 +08:00
Ivan Grokhotkov d3724dc35d esp_timer: fix occasional failures in "monotonic values" test
1. ref_clock used in unit tests occasionally produces time off by ~100
microseconds shortly after being started. Add a delay to let
ref_clock stabilise, until the cause is found.

2. Reduce roundoff error accumulation which would occasionally cause
the test to fail, by choosing an overflow value which can be divided
by APB frequency.

3. Move time sampling part of the test into an IRAM function to
reduce variations due to cache behavior.

4. Remove calculation of "standard deviation" in the test, as what was
calculated was not actually standard deviation, and it did not add any
useful information.
2019-02-26 02:01:29 +00:00
Ivan Grokhotkov dae40f4ff1 nvs: add a blob fragmentation test case
Ref. TW12937
2019-02-26 01:58:20 +00:00
Ivan Grokhotkov 02a76abb8b nvs: do eager cleanup of HashListBlocks
Previously when HashList was removing items, HashListBlocks were
removed lazily. This resulted in empty HashListBlocks dangling around
in full pages, even when all items have been erased. These blocks
would only be deleted when NVS was re-initialized
(nvs_flash_deinit/nvs_flash_init).

This change does eager cleanup instead, based on the code from
@negativekelvin offered in
https://github.com/espressif/esp-idf/issues/1642#issuecomment-367227994.

Closes https://github.com/espressif/esp-idf/issues/1642.
2019-02-26 01:58:20 +00:00
Supreet Deshpande 4c8e997289 esp_http_server/lru_counter_for_timestamp:Added LRU counter for timer
Replaced the os timer in http server by LRU counter. The timestamp is
unnecessary for LRU.
2019-02-25 10:08:15 +00:00
Roland Dobai aa9d302814 VFS: Implement poll() based on select()
Closes https://github.com/espressif/esp-idf/issues/2945
2019-02-25 10:34:27 +01:00
Anurag Kar 1af5d0d87c https_server : Missing uri_match_fn paramater added to default config 2019-02-25 09:13:39 +00:00
Anurag Kar 28412d8cb6 http_server : Added feature for invoking user configurable handlers during server errors
Added APIs :
  * httpd_resp_send_err()        : for sending HTTP error responses for error codes given by httpd_err_code_t. It uses TCP_NODELAY option to ensure that HTTP error responses reach the client before socket is closed.
  * httpd_register_err_handler() : for registering HTTP error handler functions of type httpd_err_handler_func_t.

The default behavior, on encountering errors during processing of HTTP requests, is now to send HTTP error response (if possible) and close the underlying socket. User configurable handlers can be used to override this behavior for each error individually (except for 500 Internal Server Error).

Also fixed some typos.

Closes https://github.com/espressif/esp-idf/issues/3005
2019-02-25 09:13:39 +00:00
Ivan Grokhotkov 5ec58c316d Merge branch 'bugfix/multiple_can_bugs' into 'master'
CAN: Add functions to clear queues and fix multiple bugs

See merge request idf/esp-idf!4279
2019-02-25 15:43:56 +08:00
Tian Hao d877ca4438 component/bt : fix bug that there's low ratio crash when BLE do re-connect/re-scan/re-adv
fix 3 bugs:
1. do BLE connect (both of slave and master), it mgiht cause crash due to there's much interrupts happens effect ble code running, for example, wifi run on the same core as bluetooth controller and wifi run throughtput test.
2. do BLE scan stop or adv stop or connection stop, it might cause ASSERT or crash due to memory corrupted in controller memory poll.
3. minor bug fix, not really effect bluetooth.
2019-02-22 06:24:03 +00:00
Angus Gratton 7f28bce42e newlib: When using psram, link setlocale() to flash not IRAM 2019-02-22 03:28:41 +00:00
Angus Gratton bd97b139eb newlib: When using psram, link qsort to flash not IRAM 2019-02-22 03:28:41 +00:00
Ivan Grokhotkov 4ae2c4c282 Merge branch 'feature/coredump_improvements_refactoring' into 'master'
coredump: improvements, refactoring (separate FLASH and UART functionality)

See merge request idf/esp-idf!4207
2019-02-21 11:04:19 +08:00
Angus Gratton 5b945cb611 Merge branch 'bugfix/mdns_service_memory_leak' into 'master'
mdns: fix memory leak when query for service plus various other fixes

See merge request idf/esp-idf!4270
2019-02-21 06:03:48 +08:00
Angus Gratton 40a55823a9 Merge branch 'feature/anti_rollback_efuse' into 'master'
Support anti-rollback

See merge request idf/esp-idf!3682
2019-02-20 16:11:00 +08:00
Angus Gratton 91f97d121f Merge branch 'revert-23a03cf6' into 'master'
Revert "Merge branch 'bugfix/external_rtc_start_fail' into 'master'"

See merge request idf/esp-idf!4292
2019-02-20 15:09:35 +08:00