]> granicus.if.org Git - esp-idf/log
esp-idf
7 years agoapp_update: fix logic error when update ota info
Tian Zhong Xing [Mon, 20 Feb 2017 10:09:32 +0000 (18:09 +0800)]
app_update: fix logic error when update ota info

7 years agoota ops: Rewrite esp_ota_get_next_update_partition() to be more predictable, add...
Angus Gratton [Tue, 21 Feb 2017 03:08:09 +0000 (14:08 +1100)]
ota ops: Rewrite esp_ota_get_next_update_partition() to be more predictable, add unit tests

7 years agounit tests: Use a unit test app partition table, configure spi_flash to use data...
Angus Gratton [Tue, 21 Feb 2017 02:40:42 +0000 (13:40 +1100)]
unit tests: Use a unit test app partition table, configure spi_flash to use data partition

7 years agopartition iterator: Free iterator when reaching end of linked list
Angus Gratton [Mon, 20 Feb 2017 05:02:45 +0000 (16:02 +1100)]
partition iterator: Free iterator when reaching end of linked list

7 years agoota ops: Verify partition argument passed to esp_ota_begin()
Angus Gratton [Mon, 20 Feb 2017 05:02:29 +0000 (16:02 +1100)]
ota ops: Verify partition argument passed to esp_ota_begin()

7 years agoota ops: Add new functions esp_ota_get_next_update_partition / esp_ota_get_running_pa...
Angus Gratton [Mon, 20 Feb 2017 03:02:39 +0000 (14:02 +1100)]
ota ops: Add new functions esp_ota_get_next_update_partition / esp_ota_get_running_partition

* Update OTA example to use these.
* Refactor esp_ota_begin() to return ESP_ERR_OTA_PARTITION_CONFLICT as documented

7 years agospi_flash tests: Refactor mmap tests to be run in any order
Angus Gratton [Mon, 20 Feb 2017 03:24:08 +0000 (14:24 +1100)]
spi_flash tests: Refactor mmap tests to be run in any order

7 years agospi_flash: Add new phys2cache & cache2phys functions to query flash cache mappings
Angus Gratton [Fri, 17 Feb 2017 07:26:43 +0000 (18:26 +1100)]
spi_flash: Add new phys2cache & cache2phys functions to query flash cache mappings

7 years agodocs: Improve/clarify partition, OTA & SPI flash docs
Angus Gratton [Fri, 17 Feb 2017 01:43:55 +0000 (12:43 +1100)]
docs: Improve/clarify partition, OTA & SPI flash docs

Related to #313 https://github.com/espressif/esp-idf/issues/313

7 years agoMerge branch 'feature/btdm_pll_track' into 'master'
Jiang Jiang Jian [Fri, 17 Feb 2017 05:48:26 +0000 (13:48 +0800)]
Merge branch 'feature/btdm_pll_track' into 'master'

component/bt : wide range work temperature for bluetooth RF

1. add PLL track for bluetooth RF for wide range temperature
2. move some initialized codes to cache

See merge request !511

7 years agocomponent/bt : wide range work temperature for bluetooth RF
Tian Hao [Fri, 17 Feb 2017 04:26:28 +0000 (12:26 +0800)]
component/bt : wide range work temperature for bluetooth RF

1. add PLL track for bluetooth RF for wide range temperature
2. move some initialized codes to cache

7 years agoMerge branch 'bugfix/btdm_gatt' into 'master'
Jiang Jiang Jian [Thu, 16 Feb 2017 07:13:05 +0000 (15:13 +0800)]
Merge branch 'bugfix/btdm_gatt' into 'master'

component/bt : fix gatt write memory leak

fix bug of GATT write cause memory leak

See merge request !506

7 years agoMerge branch 'feature/ethernet_phy_power' into 'master'
Jiang Jiang Jian [Thu, 16 Feb 2017 07:12:09 +0000 (15:12 +0800)]
Merge branch 'feature/ethernet_phy_power' into 'master'

ethernet: add a gpio to enable/disable phy power

ethernet board v2 use gpio 17 .

See merge request !495

7 years agoMerge branch 'bugfix/btdm_iphone10_0_2' into 'master'
Jiang Jiang Jian [Thu, 16 Feb 2017 07:10:50 +0000 (15:10 +0800)]
Merge branch 'bugfix/btdm_iphone10_0_2' into 'master'

Bugfix/btdm iphone10 0 2

This connection error caused by iPhone, it think that TX data length must large than 27 when slave support EXTEND_DATA_LENGTH. But this should be allow. Besides,  the problem cannot be found on higher version of Iphone7, apple seemed to have fixed it.
Actually maybe other BLE device have the same problem.

See merge request !509

7 years agoethernet: add pin macro
shangke [Thu, 16 Feb 2017 06:36:46 +0000 (14:36 +0800)]
ethernet: add pin macro

7 years agocomponent/bt : fix connection bug of Iphone7 10.0.2
Tian Hao [Thu, 16 Feb 2017 06:10:44 +0000 (14:10 +0800)]
component/bt : fix connection bug of Iphone7 10.0.2

This connection error caused by iPhone, it think that TX data length must large than 27 when slave support EXTEND_DATA_LENGTH. But this should be allow. Besides,  the problem cannot be found on higher version of Iphone7, apple seemed to have fixed it.
Actually maybe other BLE device have the same problem.

7 years agocomponent/bt : fix gatt write memory leak
Tian Hao [Wed, 15 Feb 2017 12:08:39 +0000 (20:08 +0800)]
component/bt : fix gatt write memory leak

7 years agoMerge branch 'bugfix/openssl_server_example' into 'master'
Ivan Grokhotkov [Wed, 15 Feb 2017 06:34:08 +0000 (14:34 +0800)]
Merge branch 'bugfix/openssl_server_example' into 'master'

Example 10_openssl_server should use TLSv1.2 instead of SSLv3; fixed corrupted HTTP Header

* Merges github PR #214 https://github.com/espressif/esp-idf/pull/214
* Closes #333 https://github.com/espressif/esp-idf/issues/333

See merge request !501

7 years agoopenssl_server example: Roll back to TLS_server_method() for compatibility
Angus Gratton [Wed, 15 Feb 2017 06:18:01 +0000 (17:18 +1100)]
openssl_server example: Roll back to TLS_server_method() for compatibility

Add a comment recommending TLS v1.2.

7 years agoMerge branch 'docs/flash_encryption_disable' into 'master'
Ivan Grokhotkov [Wed, 15 Feb 2017 05:31:08 +0000 (13:31 +0800)]
Merge branch 'docs/flash_encryption_disable' into 'master'

Docs: Document flash encryption disable steps, clean up flash encryption & secure boot docs

Generate clean up of flash encryption & secure boot docs

Including steps for disabling flash encryption (for people who accidentally enable it).

See merge request !500

7 years agoMerge branch 'bugfix/gperf_v3_1' into 'master'
Ivan Grokhotkov [Wed, 15 Feb 2017 05:29:18 +0000 (13:29 +0800)]
Merge branch 'bugfix/gperf_v3_1' into 'master'

kconfig: Remove gperf 3.1+ incompatible kconf_conf_id forward declaration

Forward declaration was unused. gperf 3.1+ changed parameter type from
'unsigned int' to 'size_t'.

Ref github #200 https://github.com/espressif/esp-idf/issues/200#issuecomment-279377753
Fixes #315 https://github.com/espressif/esp-idf/issues/315
Fixes #251 https://github.com/espressif/esp-idf/issues/251

See merge request !498

7 years agoMerge branch 'bugfix/add_espcoredump_to_add_paths_script' into 'master'
Ivan Grokhotkov [Wed, 15 Feb 2017 05:27:18 +0000 (13:27 +0800)]
Merge branch 'bugfix/add_espcoredump_to_add_paths_script' into 'master'

Add espcoredump to the add_path shell helper

Merges PR #335 https://github.com/espressif/esp-idf/pull/335

See merge request !504

7 years agoMerge branch 'bugfix/send_crosscore_iram' into 'master'
Ivan Grokhotkov [Wed, 15 Feb 2017 05:26:56 +0000 (13:26 +0800)]
Merge branch 'bugfix/send_crosscore_iram' into 'master'

esp32: Move esp_crosscore_int_send_yield() to IRAM

Merges PR #257 https://github.com/espressif/esp-idf/pull/257

See merge request !502

7 years agoMerge branch 'bugfix/phy_init_write_nvs_once' into 'master'
Ivan Grokhotkov [Wed, 15 Feb 2017 05:26:22 +0000 (13:26 +0800)]
Merge branch 'bugfix/phy_init_write_nvs_once' into 'master'

phy_init: don’t rewrite valid calibration data

In the default PHY init routine, calibration data is loaded from NVS.
Most of the time the incremental changes to calibration will be fairly
small, so we don’t need to rewrite the existing calibration data stored
in the NVS.

Possible enhancement to be done in the future: expose a function in PHY
library to tell how big was the change in calibration data. If the
change was significant, then calibration data stored in NVS should be
updated.

See merge request !487

7 years agoMerge branch 'bugfix/fix_protection_of_queue_list' into 'master'
Ivan Grokhotkov [Wed, 15 Feb 2017 05:25:51 +0000 (13:25 +0800)]
Merge branch 'bugfix/fix_protection_of_queue_list' into 'master'

freertos: fix protection issue in freertos queue event list

When functions in queue.c calls listLIST_IS_EMPTY() to check queue event list, the queue list is
protected by queue mutex, on the other hand, when xTaskIncrementTick() modify the queue list, the
 queue list is protected by xTaskQueueMutex, this may cause xTaskRemoveFromEventList operate on
the empty queue list and cause problem.
This change works around the problem by reducing the window where the race condition can happen.

See merge request !465

7 years agoMerge branch 'bugfix/OTA_and_flash_encryption_incompatible' into 'master'
Ivan Grokhotkov [Wed, 15 Feb 2017 05:24:10 +0000 (13:24 +0800)]
Merge branch 'bugfix/OTA_and_flash_encryption_incompatible' into 'master'

bootloader_support: fix bug OTA & flash encryption incompatible

github issue:https://github.com/espressif/esp-idf/issues/253

See merge request !464

7 years agoDocs: Mark PDF links as such in the documentation index
Angus Gratton [Tue, 14 Feb 2017 01:56:51 +0000 (12:56 +1100)]
Docs: Mark PDF links as such in the documentation index

Nothing worse than clicking what you think is an internal page link
and finding a PDF downloading!

7 years agoREADME: Add some tips on using menuconfig
Angus Gratton [Tue, 14 Feb 2017 01:56:13 +0000 (12:56 +1100)]
README: Add some tips on using menuconfig

7 years agoflash encryption/secure boot: Restructure documentation
Angus Gratton [Tue, 14 Feb 2017 01:48:28 +0000 (12:48 +1100)]
flash encryption/secure boot: Restructure documentation

Also add steps to disable flash encryption, as some people seem to
accidentally enable it.

Explicitly mark the flash encryption and secure boot as "READ DOCS
FIRST" in menuconfig.

7 years agoesp32: Move esp_crosscore_int_send_yield() to IRAM
Marcin Galczynski [Tue, 17 Jan 2017 17:20:17 +0000 (18:20 +0100)]
esp32: Move esp_crosscore_int_send_yield() to IRAM

7 years agoExample 10_openssl_server should use TLSv1.2 instead of SSLv3; fixed corrupted HTTP...
Malte Janduda [Tue, 10 Jan 2017 20:48:15 +0000 (21:48 +0100)]
Example 10_openssl_server should use TLSv1.2 instead of SSLv3; fixed corrupted HTTP Header

7 years agokconfig: Remove gperf 3.1+ incompatible kconf_conf_id forward declaration
Angus Gratton [Thu, 9 Feb 2017 01:12:28 +0000 (12:12 +1100)]
kconfig: Remove gperf 3.1+ incompatible kconf_conf_id forward declaration

Forward declaration was unused. gperf 3.1+ changed parameter type from
'unsigned int' to 'size_t'.

7 years agoMerge branch 'bugfix/update_wifi_lib_to_include_some_fix_and_optimization' into ...
Jiang Jiang Jian [Mon, 13 Feb 2017 13:22:43 +0000 (21:22 +0800)]
Merge branch 'bugfix/update_wifi_lib_to_include_some_fix_and_optimization' into 'master'

esp32: update wifi lib for some fixes and optimizations

1. Reduce the default static rx buffer size from 25 to 10
2. Adjust ampdu interrupt size to 3, namely, raise 1 interrupt per 3-mpdu
3. Make a copy for all received packets, including AMSDU/AMPDU/MPDU
4. Fix softap mis-forward issue
5. Fix pp q full issue
6. Fix sniffer copy wrong content issue

See merge request !491

7 years agoMerge branch 'bugfix/btdm_blufi' into 'master'
Jiang Jiang Jian [Mon, 13 Feb 2017 06:52:46 +0000 (14:52 +0800)]
Merge branch 'bugfix/btdm_blufi' into 'master'

fix BLUFI bug

fix BLUFI bug with small MTU size

See merge request !493

7 years agoMerge branch 'bugfix/btdm_gatt_memleak' into 'master'
Jiang Jiang Jian [Mon, 13 Feb 2017 06:30:09 +0000 (14:30 +0800)]
Merge branch 'bugfix/btdm_gatt_memleak' into 'master'

component/bt : fix GATT disconnect memory leak bug

fix a bug of memory leak of GATT disconnection

See merge request !496

7 years agoMerge branch 'bugfix/btdm_demo_adv_raw_data' into 'master'
Jiang Jiang Jian [Mon, 13 Feb 2017 06:27:21 +0000 (14:27 +0800)]
Merge branch 'bugfix/btdm_demo_adv_raw_data' into 'master'

component/bt : use real adv data to set raw adv data

Use real advertising data to set raw advertising data in GATT-SERVER demo.

See merge request !492

7 years agocomponent/bt : fix GATT disconnect memory leak bug
Tian Hao [Mon, 13 Feb 2017 06:00:26 +0000 (14:00 +0800)]
component/bt : fix GATT disconnect memory leak bug

7 years agoAdd espcoredump to the add_path shell helper
Lourens Naudé [Sun, 12 Feb 2017 22:48:41 +0000 (22:48 +0000)]
Add espcoredump to the add_path shell helper

7 years agoethernet: add doc
shangke [Sat, 11 Feb 2017 08:42:16 +0000 (16:42 +0800)]
ethernet: add doc

7 years agoethernet: add a gpio to enable/disable phy power
shangke [Sat, 11 Feb 2017 07:19:53 +0000 (15:19 +0800)]
ethernet: add a gpio to enable/disable phy power

7 years agocomponent/bt : use real adv data to set raw adv data
Tian Hao [Fri, 10 Feb 2017 03:02:10 +0000 (11:02 +0800)]
component/bt : use real adv data to set raw adv data

7 years agocomponent/bt : fix BLUFI bug with small MTU size
Tian Hao [Wed, 8 Feb 2017 07:03:57 +0000 (15:03 +0800)]
component/bt : fix BLUFI bug with small MTU size

7 years agofreertos: fix protection issue in freertos queue event list
Liu Zhi Fu [Tue, 24 Jan 2017 12:40:14 +0000 (20:40 +0800)]
freertos: fix protection issue in freertos queue event list

When functions in queue.c calls listLIST_IS_EMPTY() to check queue event list, the queue list is
protected by queue mutex, on the other hand, when xTaskIncrementTick() modify the queue list, the
 queue list is protected by xTaskQueueMutex, this may cause xTaskRemoveFromEventList operate on
the empty queue list and cause problem. This commit is to fix this bug.

may cause

7 years agoesp32: update wifi lib for some fixes and optimizations
Liu Zhi Fu [Fri, 10 Feb 2017 02:28:03 +0000 (10:28 +0800)]
esp32: update wifi lib for some fixes and optimizations

1. Reduce the default static rx buffer size from 25 to 10
2. Adjust ampdu interrupt size to 3, namely, raise 1 interrupt per 3-mpdu
3. Make a copy for all received packets, including AMSDU/AMPDU/MPDU
4. Fix softap mis-forward issue
5. Fix pp q full issue
6. Fix sniffer copy wrong content issue

7 years agoMerge branch 'test/get_test_env_config_from_gitlab' into 'master'
Ivan Grokhotkov [Wed, 8 Feb 2017 08:56:38 +0000 (16:56 +0800)]
Merge branch 'test/get_test_env_config_from_gitlab' into 'master'

CI: get test env config from gitlab

Previous design was put test env config on local runners. It's not easy to manage as test runners count growing.

Now we'll put config files for test runners to a Gitlab repository. Test runners will get its config from Gitlab every time before running.

See merge request !480

7 years agoMerge branch 'bugfix/yield_other_core_prio_check_fix' into 'master'
Jeroen Domburg [Wed, 8 Feb 2017 04:19:34 +0000 (12:19 +0800)]
Merge branch 'bugfix/yield_other_core_prio_check_fix' into 'master'

Fix interrupting task on other CPU that has lower prio than current task on current CPU

Fix for a very subtle bug introduced somewhere in december. This bug would cause a cross-core interrupt to only be sent if the activated task has a higher priority than the task currently running on *this* cpu, instead of on the other CPU.

See merge request !475

7 years agophy_init: don’t rewrite valid calibration data
Ivan Grokhotkov [Tue, 7 Feb 2017 07:14:45 +0000 (15:14 +0800)]
phy_init: don’t rewrite valid calibration data

In the default PHY init routine, calibration data is loaded from NVS.
Most of the time the incremental changes to calibration will be fairly
small, so we don’t need to rewrite the existing calibration data stored
in the NVS.

Possible enhancement to be done in the future: expose a function in PHY
library to tell how big was the change in calibration data. If the
change was significant, then calibration data stored in NVS should be
updated.

7 years agoMerge branch 'bugfix/fix_several_wifi_misc_issues' into 'master'
Jiang Jiang Jian [Tue, 7 Feb 2017 03:15:58 +0000 (11:15 +0800)]
Merge branch 'bugfix/fix_several_wifi_misc_issues' into 'master'

esp32: fix several misc wifi issue

1. Fix ssid_str not free issue
2. Fix sniffer not work issue
3. Fix null parameter cause esp_wifi_init crash issue
4. Enable ap ampdu rx interface

See merge request !484

7 years agoesp32: fix several misc wifi issue
Liu Zhi Fu [Mon, 6 Feb 2017 09:56:42 +0000 (17:56 +0800)]
esp32: fix several misc wifi issue

1. Fix ssid_str not free issue
2. Fix sniffer not work issue
3. Fix null parameter cause esp_wifi_init crash issue
4. Enable ap ampdu rx interface

7 years agoFix interrupting task on other CPU that has lower prio than current task on current CPU
Jeroen Domburg [Fri, 27 Jan 2017 09:17:05 +0000 (17:17 +0800)]
Fix interrupting task on other CPU that has lower prio than current task on current CPU

7 years agoMerge branch 'bugfix/esp32_core_dump_wd_uart' into 'master'
Ivan Grokhotkov [Mon, 6 Feb 2017 09:44:08 +0000 (17:44 +0800)]
Merge branch 'bugfix/esp32_core_dump_wd_uart' into 'master'

esp32: Fixes watchdog problem when printing core dump to uart

1) Fixes watchdog problem when printing core dump to uart
2) Also fixes generation of core dumps when flash cache is disabled

See merge request !472

7 years agoMerge branch 'bugfix/ethernet_flow_ctrl' into 'master'
Wu Jian Gang [Mon, 6 Feb 2017 05:42:18 +0000 (13:42 +0800)]
Merge branch 'bugfix/ethernet_flow_ctrl' into 'master'

ethernet:disable flow control when select l2_to_l3_copy_mode

Disable flow control when select l2_to_l3_copy_mode ,because this mode can not touch flow control watermark  .

See merge request !482

7 years agoethernet:disable flow control when select l2_to_l3_copy_mode
shangke [Mon, 6 Feb 2017 03:19:16 +0000 (11:19 +0800)]
ethernet:disable flow control when select l2_to_l3_copy_mode

7 years agoOTA: Always clean up OTA handle regardless of esp_ota_end() result
Angus Gratton [Thu, 2 Feb 2017 23:07:30 +0000 (10:07 +1100)]
OTA: Always clean up OTA handle regardless of esp_ota_end() result

As reported on forum: http://esp32.com/viewtopic.php?f=14&t=1093

7 years agoCI: get test env config from gitlab
He Yin Ling [Thu, 2 Feb 2017 13:59:00 +0000 (21:59 +0800)]
CI: get test env config from gitlab

Previous design was put test env config on local runners. It's not easy
to manage as test runners count growing. Now we'll put config files for
test runners to a Gitlab repository. Test runners will get its config
from Gitlab every time before running.

7 years agoesp32: Fixes watchdog problem when printing core dump to uart
Alexey Gerenkov [Thu, 19 Jan 2017 17:24:55 +0000 (20:24 +0300)]
esp32: Fixes watchdog problem when printing core dump to uart

Also fixes generation of core dumps when flash cache is disabled

7 years agoMerge branch 'bugfix/esp32_core_dump_esptool_search_path' into 'master'
Ivan Grokhotkov [Wed, 1 Feb 2017 05:59:40 +0000 (13:59 +0800)]
Merge branch 'bugfix/esp32_core_dump_esptool_search_path' into 'master'

esp32: Fixed search path for esptool

@igrokhotkov @angus Could you review the fix?

See merge request !474

7 years agoMerge branch 'bugfix/esp32_core_dump_doc' into 'master'
Ivan Grokhotkov [Wed, 1 Feb 2017 05:59:15 +0000 (13:59 +0800)]
Merge branch 'bugfix/esp32_core_dump_doc' into 'master'

esp32: Fixed and updated core dump docs

See merge request !473

7 years agoMerge branch 'feature/openssl_option' into 'master'
Angus Gratton [Fri, 27 Jan 2017 00:37:02 +0000 (08:37 +0800)]
Merge branch 'feature/openssl_option' into 'master'

components/openssl: refactor openssl debugging and assert function

1. add openssl option at menuconfig
2. remove SSL_ERR to reduce complexity
3. add more functions about debugging and assert

According these, our coders and customers may use and debug the OpenSSL code easily.

See merge request !400

7 years agoMerge branch 'bugfix/encrypted_partition_flag' into 'master'
Angus Gratton [Fri, 27 Jan 2017 00:34:08 +0000 (08:34 +0800)]
Merge branch 'bugfix/encrypted_partition_flag' into 'master'

Use PART_FLAG_ENCRYPTED value in gen_esp32part.py

Currently paritions marked as encrypted by gen_esp32part.py are not
recognized as such and encrypted writes don't work.

This is part of espressif/esp-idf#253

Merges Pull Request #293 https://github.com/espressif/esp-idf/pull/293

See merge request !470

7 years agoMerge branch 'feature/custom_partition_table_csv_path' into 'master'
Angus Gratton [Fri, 27 Jan 2017 00:33:41 +0000 (08:33 +0800)]
Merge branch 'feature/custom_partition_table_csv_path' into 'master'

Allow providing custom PARTITION_TABLE_CSV_PATH

Provide direct absolute path to CSV, without project_path

Github pull request #296: https://github.com/espressif/esp-idf/pull/296

See merge request !469

7 years agoMerge branch 'bugfix/spi_multiple_cs_fix' into 'master'
Angus Gratton [Fri, 27 Jan 2017 00:33:16 +0000 (08:33 +0800)]
Merge branch 'bugfix/spi_multiple_cs_fix' into 'master'

Add missing variable initialisation to make SPI work for multiple CS

Ref https://github.com/espressif/esp-idf/pull/277
From PR: "I am not especially familiar with this platform or with esp-idf -- so review with care.

The spi-master driver would not work for me when the number of devices on a bus exceeded 1 (caused device hang). I believe this is because cur_cs is not properly set (anywhere), and yet is used. This is likely just not noticed because 0 is presumably the correct value when there's only 1 device (and I'm guessing multi-device setup is not tested as thoroughly).

Simply setting cur_cs to the correct slot value resolves the problem and multiple devices on a single bus behave correctly in my test environment."

Looks like a small oversight on my side.

See merge request !468

7 years agoesp32: Fixed search path for esptool
Alexey Gerenkov [Thu, 26 Jan 2017 15:01:55 +0000 (18:01 +0300)]
esp32: Fixed search path for esptool

7 years agoesp32: Fixed and updated core dump docs
Alexey Gerenkov [Thu, 26 Jan 2017 15:47:10 +0000 (18:47 +0300)]
esp32: Fixed and updated core dump docs

7 years agoMerge branch 'bugfix/fix_two_wifi_datapath_issues' into 'master'
Jiang Jiang Jian [Thu, 26 Jan 2017 13:52:28 +0000 (21:52 +0800)]
Merge branch 'bugfix/fix_two_wifi_datapath_issues' into 'master'

esp32: udpate wifi lib to fix two datapath issues

1. fix ampdu<->mpdu<->ampdu switch may cause rx slow issue by put mpdu into ampdu reorder queue
2. fix each ac first sending always fail issue by adding retry

See merge request !471

7 years agoFreeRTOS: esp_crosscore_int_send_yield() should be in IRAM
Angus Gratton [Thu, 26 Jan 2017 07:31:15 +0000 (18:31 +1100)]
FreeRTOS: esp_crosscore_int_send_yield() should be in IRAM

Possible for xQueueGenericSendFromISR -> xTaskRemoveFromEventQueueList
-> taskYIELD_OTHER_CORE code path to occur while cache is off.

7 years agoOTA: Fix issues with encrypted OTA
Angus Gratton [Thu, 26 Jan 2017 07:30:32 +0000 (18:30 +1100)]
OTA: Fix issues with encrypted OTA

- OTA source can write non-16-byte multiples of data
- Assumption that empty ota_data is 0xFFFFFFFF untrue when encrypted

7 years agoesp32: udpate wifi lib to fix two datapath issues
Liu Zhi Fu [Thu, 26 Jan 2017 07:35:04 +0000 (15:35 +0800)]
esp32: udpate wifi lib to fix two datapath issues

1. fix ampdu<->mpdu<->ampdu switch may cause rx slow issue by put mpdu into ampdu reorder queue
2. fix each ac first sending always fail issue by adding retry

7 years agoFlash encryption: Temporary fix for issue with stale cache reads
Angus Gratton [Thu, 26 Jan 2017 07:29:18 +0000 (18:29 +1100)]
Flash encryption: Temporary fix for issue with stale cache reads

Seems doing certain kinds of short reads while flash encryption is
enabled will return stale data. This fixes it, but is probably a
little heavy-handed performance wise.

7 years agoOTA: Improve verification of OTA image before writing, incl. secure boot
Angus Gratton [Thu, 26 Jan 2017 05:18:58 +0000 (16:18 +1100)]
OTA: Improve verification of OTA image before writing, incl. secure boot

Verify 0xE9 magic byte on first write, verify entire image before
switching.

Enable verification for secure boot signature (was using invalid ifdef
guard)

7 years agoOTA: Fall back to factory partition if ota data partition is invalid
Angus Gratton [Thu, 26 Jan 2017 05:19:45 +0000 (16:19 +1100)]
OTA: Fall back to factory partition if ota data partition is invalid

7 years agobootloader_support: fix bug OTA & flash encryption incompatible
Tian Zhong Xing [Tue, 24 Jan 2017 10:30:13 +0000 (18:30 +0800)]
bootloader_support: fix bug OTA & flash encryption incompatible

ota data partition should be encrypted unconditionally when flash encrypt enable

7 years agoMerge branch 'feature/add_build_at_job_in_ci' into 'master'
Ivan Grokhotkov [Thu, 26 Jan 2017 02:46:45 +0000 (10:46 +0800)]
Merge branch 'feature/add_build_at_job_in_ci' into 'master'

CI: add job to check build esp-at in esp-idf

Add a job to check if latest IDF breaks `esp-at` build.

As `esp-at` is an application and has its own CI, we don't save binary as artifacts.

See merge request !462

7 years agocomponents/openssl: Add more debugging information at platform level
Dong Heng [Thu, 26 Jan 2017 02:12:58 +0000 (10:12 +0800)]
components/openssl: Add more debugging information at platform level

7 years agoUse PART_FLAG_ENCRYPTED value in gen_esp32part.py
Deomid Ryabkov [Tue, 24 Jan 2017 14:42:02 +0000 (14:42 +0000)]
Use PART_FLAG_ENCRYPTED value in gen_esp32part.py

Currently paritions marked as encrypted by gen_esp32part.py are not
recognized as such and encrypted writes don't work.

This is part of espressif/esp-idf#253

7 years agoAdd missing variable initialisation.
Dermot Duffy [Sat, 21 Jan 2017 15:39:36 +0000 (15:39 +0000)]
Add missing variable initialisation.

Signed-off-by: Jeroen Domburg <jeroen@espressif.com>
7 years agoMerge branch 'lwip/optimize_dhcpc_taken_time' into 'master'
Jiang Jiang Jian [Wed, 25 Jan 2017 13:39:17 +0000 (21:39 +0800)]
Merge branch 'lwip/optimize_dhcpc_taken_time' into 'master'

lwip: optimize the dhcp client

1. modify the discover retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,8,15,15)s.
2. add DHCP_DOES_ARP_CHECK to menuconfig for users to specify if do a ARP check on the offered address.
   If enable, one more second will be taken.

See merge request !459

7 years agoMerge branch 'bugfix/btdm_debug_gatt_attr_table' into 'master'
Ivan Grokhotkov [Wed, 25 Jan 2017 03:48:09 +0000 (11:48 +0800)]
Merge branch 'bugfix/btdm_debug_gatt_attr_table' into 'master'

component/bt: Fix Gatt table read_req bug and advertising channel 39 not available bug

1. Fix Gatt table read request bug
2. Fix advertising channel 39 not available bug

See merge request !463

7 years agocomponent/bt: Fix Gatt table read_req bug and advertising channel 39 not available bug
Island [Tue, 24 Jan 2017 10:38:50 +0000 (18:38 +0800)]
component/bt: Fix Gatt table read_req bug and advertising channel 39 not available bug

7 years agoAllow providing custom PARTITION_TABLE_CSV_PATH
Deomid Ryabkov [Wed, 21 Dec 2016 18:18:42 +0000 (18:18 +0000)]
Allow providing custom PARTITION_TABLE_CSV_PATH

Provide direct absolute path to CSV, without project_path

7 years agocomponents/openssl: fixes for github issues 219
Dong Heng [Tue, 24 Jan 2017 09:36:32 +0000 (17:36 +0800)]
components/openssl: fixes for github issues 219

"SSL_write" doesn't send large buffers correctly

7 years agoCI: add job to check build esp-at in esp-idf
He Yin Ling [Tue, 24 Jan 2017 07:05:39 +0000 (15:05 +0800)]
CI: add job to check build esp-at in esp-idf

7 years agolwip: optimize the dhcp client
qiyueixa [Sun, 22 Jan 2017 12:32:39 +0000 (20:32 +0800)]
lwip: optimize the dhcp client

1. modify the discover retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,8,15,15)s.
2. add DHCP_DOES_ARP_CHECK to menuconfig for users to specify if do a ARP check on the offered address.
   If enable, one more second will be taken in obtaining IP address.
3. update wifi libs

7 years agoMerge branch 'feature/spi_flash_write_16bytes' into 'master' v2.0-rc1
Ivan Grokhotkov [Fri, 20 Jan 2017 12:09:48 +0000 (20:09 +0800)]
Merge branch 'feature/spi_flash_write_16bytes' into 'master'

SPI Flash: Allow 16 byte aligned encrypted writes

Also includes some improved documentation

See merge request !456

7 years agospi_flash: Move FLASH_PAGE_SIZE constant into esp_spi_flash.h
Angus Gratton [Fri, 6 Jan 2017 00:24:24 +0000 (11:24 +1100)]
spi_flash: Move FLASH_PAGE_SIZE constant into esp_spi_flash.h

7 years agodocs: spi_flash: Add flash encryption ops, remove boilerplate
Angus Gratton [Fri, 6 Jan 2017 00:17:29 +0000 (11:17 +1100)]
docs: spi_flash: Add flash encryption ops, remove boilerplate

7 years agospi_flash_write_encrypted: Allow 16-byte aligned block writes
Angus Gratton [Wed, 4 Jan 2017 06:53:15 +0000 (17:53 +1100)]
spi_flash_write_encrypted: Allow 16-byte aligned block writes

As each 32 byte write has two identical 16 byte AES blocks, it's
possible to write them separately.

7 years agospi_flash: Flush flash cache if flash_mmap()ing a written-to page
Angus Gratton [Thu, 5 Jan 2017 04:51:02 +0000 (15:51 +1100)]
spi_flash: Flush flash cache if flash_mmap()ing a written-to page

Without this, it's possible for stale information to be read from
cache via mmap, even if the MMU table entry had been invalidated
prior to writing flash (if  the same MMU table entry was re-used after
writing flash.)

7 years agospiflash: Add spi_flash_read_encrypted() function
Angus Gratton [Wed, 4 Jan 2017 06:37:15 +0000 (17:37 +1100)]
spiflash: Add spi_flash_read_encrypted() function

7 years agoMerge branch 'feature/deploy_tags' into 'master'
Ivan Grokhotkov [Fri, 20 Jan 2017 11:38:02 +0000 (19:38 +0800)]
Merge branch 'feature/deploy_tags' into 'master'

ci: deploy code and docs for tags

Currently deploy happens only for the master branch.
This change is needed to support tags in release branches.

See merge request !458

7 years agoci: deploy code and docs for release branches
Ivan Grokhotkov [Fri, 20 Jan 2017 07:46:09 +0000 (15:46 +0800)]
ci: deploy code and docs for release branches

Currently deploy happens only for the master branch.
This change is needed to support release branches.

7 years agoMerge branch 'bugfix/misc_fixes' into 'master'
Ivan Grokhotkov [Fri, 20 Jan 2017 09:53:12 +0000 (17:53 +0800)]
Merge branch 'bugfix/misc_fixes' into 'master'

Misc fixes (including Github PRs)

Collection of single commit fixes, including several from Github.

See merge request !457

7 years agoMerge branch 'feature/docs_gh_link_roles' into 'master'
Ivan Grokhotkov [Fri, 20 Jan 2017 09:47:34 +0000 (17:47 +0800)]
Merge branch 'feature/docs_gh_link_roles' into 'master'

docs: use custom roles to generate GitHub links

This change replaces direct links to GitHub master branch with
auto-generated links using docutils custom roles.
These auto-generated links point to the tree or blob for the git commit
ID (or tag) of the repository. This is needed to ensure that links don’t
become broken when files in master branch are moved around or deleted.

The following roles are introduced:

```
- :idf:`path` - points to directory inside ESP-IDF
- :idf_blob:`path` - points to file inside ESP-IDF
- :idf_raw:`path` - points to raw view of the file inside ESP-IDF
- :component:`path` - points to directory inside ESP-IDF components dir
- :component_blob:`path` - points to file inside ESP-IDF components dir
- :component_raw:`path` - points to raw view of the file inside ESP-IDF
  components dir
- :example:`path` - points to directory inside ESP-IDF examples dir
- :example_blob:`path` - points to file inside ESP-IDF examples dir
- :example_raw:`path` - points to raw view of the file inside ESP-IDF
  examples dir
```

A check is added to the CI build script, which searches RST files for
presence of hard-coded links (identified by tree/master, blob/master,
or raw/master part of the URL).
This check can be run manually: cd docs && make gh-linkcheck

Additionally, Sphinx linkcheck build type is used to create new CI test,
which check for broken links. This test has to be triggered explicitly,
because including it in normal build process (when the commit is not yet
deployed to Github) will not work. It can be triggered in a regular
fashion using a combination of cron and Curl, similar to stress tests.

See merge request !455

7 years agodocs: use custom roles to generate GitHub links
Ivan Grokhotkov [Thu, 19 Jan 2017 08:16:06 +0000 (16:16 +0800)]
docs: use custom roles to generate GitHub links

This change replaces direct links to GitHub master branch with
auto-generated links using docutils custom roles.
These auto-generated links point to the tree or blob for the git commit
ID (or tag) of the repository. This is needed to ensure that links don’t
become broken when files in master branch are moved around or deleted.

The following roles are introduced:

- :idf:`path` - points to directory inside ESP-IDF
- :idf_blob:`path` - points to file inside ESP-IDF
- :idf_raw:`path` - points to raw view of the file inside ESP-IDF
- :component:`path` - points to directory inside ESP-IDF components dir
- :component_blob:`path` - points to file inside ESP-IDF components dir
- :component_raw:`path` - points to raw view of the file inside ESP-IDF
  components dir
- :example:`path` - points to directory inside ESP-IDF examples dir
- :example_blob:`path` - points to file inside ESP-IDF examples dir
- :example_raw:`path` - points to raw view of the file inside ESP-IDF
  examples dir

A check is added to the CI build script, which searches RST files for
presence of hard-coded links (identified by tree/master, blob/master,
or raw/master part of the URL).
This check can be run manually: cd docs && make gh-linkcheck

Additionally, Sphinx linkcheck build type is used to create new CI test,
which check for broken links. This test has to be triggered explicitly,
because including it in normal build process (when the commit is not yet
deployed to Github) will not work. It can be triggered in a regular
fashion using a combination of cron and Curl, similar to stress tests.

7 years agoMerge branch 'feature/esptool_v20_beta' into 'master'
Angus Gratton [Fri, 20 Jan 2017 07:45:03 +0000 (15:45 +0800)]
Merge branch 'feature/esptool_v20_beta' into 'master'

Update esptool.py to v2.0-beta1

* Minor bug fixes, no major functionality changes from the esp-idf perspective.
* Now tracks master branch of esptool repo (finally!)
* Supports Python 3, although our other esp-idf Python tools don't yet support Python 3.

See merge request !396

7 years agogatts_demo: re-enter advertising after client disconnects
Mike Ryan [Thu, 12 Jan 2017 00:40:37 +0000 (16:40 -0800)]
gatts_demo: re-enter advertising after client disconnects

In the existing tree, after a connected client disconnects the device
will never re-enter the advertising state. Additional clients will not
be able to discover or connect to the device. This patch forces the
device back into the advertising state upon disconnection.

Resolves Pull Request #217 https://github.com/espressif/esp-idf/pull/217

7 years agoAdd missing bit from LEDC interrupt state struct.
Dermot Duffy [Sat, 31 Dec 2016 01:09:54 +0000 (01:09 +0000)]
Add missing bit from LEDC interrupt state struct.

Resolves #191 https://github.com/espressif/esp-idf/pull/191

7 years agonetconn_gethostbyname: Fix race reporting success
Jan Schmidt [Fri, 20 Jan 2017 03:17:03 +0000 (14:17 +1100)]
netconn_gethostbyname: Fix race reporting success

If the DNS request is dispatched and performed very quickly,
then it can complete before tcpip_callback() actually returns,
in which case we'll destroy the actual err_t error value passed
in the message. Use a local variable for the tcpip_callback
error code so that can't happen.

Resolves #269 https://github.com/espressif/esp-idf/pull/269

7 years agogpio: Attach gpio intr to the isr_server on the right core.
Jan Schmidt [Thu, 19 Jan 2017 12:46:41 +0000 (23:46 +1100)]
gpio: Attach gpio intr to the isr_server on the right core.

Make sure GPIO interrupts get attached to the core that
the ISR service routine is running on, otherwise they
don't arrive.

7 years agoesp_panic.h: Add C++ include guards
Angus Gratton [Tue, 17 Jan 2017 23:57:53 +0000 (10:57 +1100)]
esp_panic.h: Add C++ include guards