Commit graph

5999 commits

Author SHA1 Message Date
Sachin Parekh 7fc6445035 I2S: Enable Power Management locks
Acquires PM_APB_FREQ_MAX lock when carrying any transaction on I2S if
Power Management Framework is enabled.

Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-03-18 08:21:21 +00:00
Sachin Parekh d0234ad24a I2C: Enable Power Management locks
Acquires PM_APB_FREQ_MAX lock when carrying any transaction on I2C if
Power Management Framework is enabled.

Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-03-18 08:21:21 +00:00
chenyudong 7d96b3442a 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-18 14:43:21 +08:00
Jiang Jiang Jian f1e9078cb0 Merge branch 'bugfix/fix_the_bug_cal_PMK_too_long' into 'master'
wifi: fix the bug that calculate PMK too long

Closes IDFGH-524

See merge request idf/esp-idf!4349
2019-03-18 14:26:48 +08:00
zhiweijian 1940ee0910 Component/bt: fix build warning when bluedroid disable log 2019-03-18 14:18:12 +08:00
Ivan Grokhotkov 63dabd1a17 espcoredump: fix test with esp32-2018r1 toolchain 2019-03-18 12:47:29 +08:00
Ivan Grokhotkov 6221f5a819 espcoredump: fix test compilation error with GCC 8 2019-03-18 12:47:22 +08:00
Angus Gratton 2dd3344342 heap: Add integer overflow checks on MALLOC_CAP_32BIT & MALLOC_CAP_EXEC 2019-03-18 01:41:58 +00:00
Renz Christian Bagaporo 234de8de55 cmake: Allow components to present their own images to flash 2019-03-18 03:45:22 +08:00
Jiang Jiang Jian 5beb2802e0 Merge branch 'bugfix/bluetooth_fix_API_esp_bt_gap_set_scan_mode' into 'master'
Modify esp_bt_gap_set_scan_mode() to be able to set connection modes as well as discoverable modes

See merge request idf/esp-idf!2208
2019-03-17 14:19:11 +08:00
Jiang Jiang Jian 8e4b82548a Merge branch 'bugfix/suppress_dhcpserver_debug_output' into 'master'
dhcpserver: suppress send_nak debug output

Closes IDFGH-557

See merge request idf/esp-idf!4491
2019-03-17 14:12:58 +08:00
zhangyanjiao 6408ef9e7c wifi: fix the bug that when call set_config before connecting to an encrypted AP, PMK will be recalculated
Closes https://github.com/espressif/esp-idf/issues/2880
2019-03-15 16:28:58 +08:00
Jiang Jiang Jian b1a81e8167 Merge branch 'bugfix/bb_watchdog_reset' into 'master'
esp32: add WiFi baseband watchdog reset

See merge request idf/esp-idf!4409
2019-03-15 16:12:30 +08:00
Angus Gratton cc9b06d4da Merge branch 'bugfix/esp_sha_signing_sha256' into 'master'
secure boot: Fix esp_sha INT WDT, switch to using mbedTLS API

Closes IDFGH-681

See merge request idf/esp-idf!4440
2019-03-15 14:35:38 +08:00
Ivan Grokhotkov b4d87191ef Merge branch 'bugfix/esp-http-client-event-fixes' into 'master'
Minor bugfixes in esp_http_client and tcp_transport

See merge request idf/esp-idf!4467
2019-03-15 11:45:40 +08:00
Ivan Grokhotkov 416b756ea4 Merge branch 'bugfix/name_conflict_esp32_project_ld' into 'master'
esp32: Rename esp32.common.ld to esp32.project.ld to avoid build errors when downgrading

See merge request idf/esp-idf!4484
2019-03-15 11:42:20 +08:00
Jiang Jiang Jian b8f23fbd42 Merge branch 'bugfix/ble_assert_8192' into 'master'
fix the bug assert(8192 0) in rwble.c 234

See merge request idf/esp-idf!4461
2019-03-14 20:24:33 +08:00
Jitin George 9b0e6e3b49 esp_http_client: Fix header sent event bug 2019-03-14 14:31:28 +05:30
Jitin George d943c8de94 tcp_transport: Fix case sensitive header comparison
Closes https://github.com/espressif/esp-idf/issues/3106
2019-03-14 14:31:28 +05:30
Ivan Grokhotkov ce6b73ca5f Merge branch 'bugfix/console_allow_buffered' into 'master'
console example: use buffered stdout by default

See merge request idf/esp-idf!4476
2019-03-14 15:40:42 +08:00
Tian Hao b39bd0615c fix the bug assert(8192 0) in rwble.c 234 2019-03-14 15:38:23 +08:00
Angus Gratton 7c69f6172b Merge branch 'bugfix/spi_flash_mmap_stale_data_issue' into 'master'
spi_flash: fix stale read issue for memory mapped partition

See merge request idf/esp-idf!4437
2019-03-14 14:56:12 +08:00
zhangyanjiao fa2998d70b dhcpserver: suppress send_nak debug output
Closes https://github.com/espressif/esp-idf/issues/2924
2019-03-14 14:00:35 +08:00
Angus Gratton 12bdf8e45b esp32: Chunk input blocks for esp_sha() function performance, add perf test 2019-03-14 05:56:06 +00:00
Angus Gratton 1cc726b2a3 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-14 05:56:06 +00:00
Angus Gratton 6a6fbde83d 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-14 05:56:06 +00:00
Angus Gratton 31ca6e399b Merge branch 'bugfix/mdns_add_remove_multiple_srv_master' into 'master'
mdns: fix possible crash if tx packet contained answer to removed service

Closes IDF-498 and IDF-504

See merge request idf/esp-idf!4348
2019-03-14 08:10:23 +08:00
Angus Gratton 974796fa6c Merge branch 'bugfix/remove_malloc_ble_prov' into 'master'
Protocomm BLE: Make changes in handling BLE read/write requests

See merge request idf/esp-idf!4444
2019-03-14 07:08:50 +08:00
Angus Gratton a79c5b8271 esp32: Rename esp32.common.ld to esp32.project.ld to avoid build errors when downgrading
Linker script generator produces build/esp32/esp32.common.ld from
components/esp32/ld/esp32.common.ld.in

This works fine until IDF is downgraded to V3.1 which uses components/esp32/ld/esp32.common.ld and
doesn't track build/esp32/esp32.common.ld at all.

At this point, the linker runs in the build/esp32 directory and "-T esp32.common.ld" picks up the
linker script generated .ld file, which causes mis-builds.

As reported on forums: https://esp32.com/viewtopic.php?f=13&t=9684&p=40105
2019-03-14 09:59:31 +11:00
Konstantin Kondrashov b1b5849c4c rmt/driver: Sped the rmt_driver_isr_default ISR
Used __builtin_ctz function to sped ISR.
2019-03-13 13:50:43 +00:00
Konstantin Kondrashov 3307735bc0 pcnt/driver: Sped the pcnt_intr_service ISR
Used __builtin_ctz function to sped ISR.
2019-03-13 13:50:43 +00:00
Pieter du Preez b8dc48ab18 gpio/driver: Sped the gpio_intr_service ISR up by 1.5 uSeconds (+-50% faster).
Removed as much branching (if statements) from the
gpio_intr_service ISR, as possible and split the while loop into
two. Also forced writing the two status*_w1tc variables only once,
instead of every time after calling the external function hooks.

The measurements below, was done using the following tools:

Toolchain version: crosstool-ng-1.22.0-80-g6c4433a
Compiler version: 5.2.0

Here follows a comparison of the gpio_intr_service ISR's
execution time, using a DS1054 oscilloscope. All the time spent
calling external functions, via the function pointers
gpio_isr_func[gpio_num].fn, were disregarded.

With OPTIMIZATION_FLAGS = -Og, 1.34 uSeconds faster:

3.22 uSec (with this patch)
4.56 uSec (with commit 71c90ac4)

100 - (100 * 4.56 / 3.22) = 42% faster

With OPTIMIZATION_FLAGS = -Os, 1.65 uSeconds faster:

2.89 uSec (with this patch)
4.54 uSec (with commit 71c90ac4)

100 - (100 * 4.54 / 2.89) = 57% faster

Signed-off-by: Konstantin Kondrashov <konstantin@espressif.com>

Merges https://github.com/espressif/esp-idf/pull/2861
2019-03-13 13:50:43 +00:00
Ivan Grokhotkov fa57fb3c1c console/linenoise: support buffered stdout 2019-03-13 20:17:25 +08:00
zhiweijian 296fbca2e7 Component/bt: fix blufi prepare write crash 2019-03-13 17:57:25 +08:00
David Cermak 265e983a45 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 10:22:41 +01:00
David Cermak c87f0cb6ca 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 10:22:41 +01:00
David Cermak 48b5501c25 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 10:22:41 +01:00
David Cermak 021dc5d453 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 10:22:41 +01:00
David Cermak 67051a286b 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 10:22:41 +01:00
Jiang Jiang Jian 75287eb569 Merge branch 'feature/btdm_add_adv_report_flow_control' into 'master'
Component/bt: add BLE adv report flow control

See merge request idf/esp-idf!4423
2019-03-13 16:58:07 +08:00
zhiweijian d5e78e79d3 Component/bt: add api to clean gattc cache 2019-03-13 15:23:33 +08:00
Ivan Grokhotkov 7541d23523 Merge branch 'feat/spi_master_variable_dummy' into 'master'
spi_master: add support for variable dummy length in a same device

See merge request idf/esp-idf!4360
2019-03-13 15:15:58 +08:00
Ivan Grokhotkov e77540b695 Merge branch 'test/spi_sio_test' into 'master'
spi: add test for sio mode

See merge request idf/esp-idf!3416
2019-03-13 15:15:43 +08:00
Hrishikesh Dhayagude d9ce0bb705 Modify esp_bt_gap_set_scan_mode() to be able to set connection modes as well as discoverable modes
The current API is insufficient to allow the users to set different combinations of connection and discoverable mode

Users should be able to choose the device modes independently:
1. Connectable-
  i. Non-connectable mode
  ii. Connectable mode

2. Discoverable-
  i. Non-discoverable mode
  ii. Limited discoverable mode
  iii. General discoverable mode
2019-03-13 11:24:00 +05:30
Mahavir Jain 16adb9d62a spi_flash: add test case for stale read issue on memory mapped partition 2019-03-13 05:38:01 +00:00
Mahavir Jain 2752654043 spi_flash: fix stale read issue for memory mapped partition
On flash program operation (either erase or write), if corresponding address has
cache mapping present then cache is explicitly flushed (for both pro and app cpu)

Closes https://github.com/espressif/esp-idf/issues/2146
2019-03-13 05:38:01 +00:00
Angus Gratton fa5bc5d58b Merge branch 'bugfix/ssid_passwords_null_terminated' into 'master'
wifi: Specify that SSID & Password fields should be NULL terminated strings

See merge request idf/esp-idf!4468
2019-03-13 13:29:09 +08:00
Angus Gratton 710bcbd447 Merge branch 'feature/freertos_check_mutex_owner' into 'master'
freertos: check that mutex is released by owner task

See merge request idf/esp-idf!4012
2019-03-13 13:15:34 +08:00
Angus Gratton 961e433395 Merge branch 'bugfix/spi_flash_exclude_encrypted' into 'master'
esp_partition: disable encrypted reads/writes if flash encryption is disabled

See merge request idf/esp-idf!4099
2019-03-13 13:15:24 +08:00
Angus Gratton f44dcf4878 Merge branch 'bugfix/macros_trailing_semicolon' into 'master'
Remove trialing semicolon from function-like macros

See merge request idf/esp-idf!4397
2019-03-13 13:15:12 +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
Liu Zhi Fu 674d234283 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-13 11:09:30 +08:00
Angus Gratton 79d37b75f3 wifi: Specify that SSID & Password fields should be NULL terminated strings
Closes https://github.com/espressif/esp-idf/issues/1176
2019-03-13 11:44:41 +11: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
zhiweijian d5f15a45ca Component/bt: add BLE adv report flow control 2019-03-12 11:10:26 +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 37144dfa07 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-11 14:40:54 +00:00
Ivan Grokhotkov d539183b40 esp32: use binary semaphore instead of mutex in dport tests 2019-03-11 14:40:54 +00:00
Ivan Grokhotkov 13523c95b4 freertos: check that mutex is released by owner task
Mutex type semaphores should be acquired and released by the same task.
Add a check to xQueueGenericSend for this condition.
2019-03-11 14:40:54 +00:00
Hrishikesh Dhayagude ce065f1a4f 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-11 19:39:26 +05:30
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
Alexey Gerenkov 4fc14e8eb6 vfs: Adds semihosting VFS driver 2019-03-08 15:08:10 +03: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
Darian Leung 59d1ecc78b esp32: Remove trialing semicolon from function-like macros
This commit removes trailing semicolons following a while(0) from
function-like macros in IDF. This will force those macros to be called
with a semicolon when called.
2019-02-28 21:58:47 +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
michael b812520b19 spi_master: add support for variable dummy length in a same device
Resolves https://github.com/espressif/esp-idf/issues/2741
2019-02-27 02:13:33 +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
Angus Gratton 52565ce1a1 Merge branch 'bugfix/btdm_fix_connection_params_update_issues' into 'master'
component/bt: fix connection params issues

See merge request idf/esp-idf!4276
2019-02-20 14:18:11 +08:00
Jiang Jiang Jian c960bcb5e6 Merge branch 'bugfix/coex_lc_protect' into 'master'
component/esp32 : fix coexist lc protect cause memory corrupted

See merge request idf/esp-idf!4265
2019-02-20 02:11:37 +08:00