Commit graph

5885 commits

Author SHA1 Message Date
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
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
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
Ivan Grokhotkov fa57fb3c1c console/linenoise: support buffered stdout 2019-03-13 20:17: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
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