]> granicus.if.org Git - esp-idf/log
esp-idf
7 years agounit tests: Shrink unit test partition table so tests can run on 2MB of flash
Angus Gratton [Thu, 13 Apr 2017 07:37:35 +0000 (17:37 +1000)]
unit tests: Shrink unit test partition table so tests can run on 2MB of flash

7 years agobootloader: Add QIO support for ESP32-D2WD SPI flash
Angus Gratton [Thu, 13 Apr 2017 07:08:53 +0000 (17:08 +1000)]
bootloader: Add QIO support for ESP32-D2WD SPI flash

7 years agospiflash ROM functions: Remove Quad I/O mode enable/disable code from flash ROM functions
Angus Gratton [Wed, 12 Apr 2017 01:31:26 +0000 (11:31 +1000)]
spiflash ROM functions: Remove Quad I/O mode enable/disable code from flash ROM functions

Confusion here is that original ROM has two functions:

* SPIReadModeCnfig() - sets mode, calls enable_qio_mode/disable_qio_mode
* SPIMasterReadModeCnfig() - As above, but doesn't set QIO mode in status register

However we never want to use the ROM method to set/clear QIO mode flag, as not all flash chips work this way. Instead we
do it in flash_qio_mode.c in bootloader.

So in both cases (ROM or "patched ROM") we now call SPIMasterReadModeCnfig(), which is now named
esp_rom_spiflash_config_readmode().

7 years agoesptool: Update to include ESP32-D2WD support (and other SPI flash remapping)
Angus Gratton [Thu, 6 Apr 2017 06:17:23 +0000 (16:17 +1000)]
esptool: Update to include ESP32-D2WD support (and other SPI flash remapping)

7 years agoMerge branch 'bugfix/flash_busy_check_Wait_SPI_Idle' into 'master'
Ivan Grokhotkov [Tue, 11 Apr 2017 12:09:06 +0000 (20:09 +0800)]
Merge branch 'bugfix/flash_busy_check_Wait_SPI_Idle' into 'master'

Bugfix/flash busy check wait spi idle

This branch moves some ROM SPI flash driver to IDF to fix bug in Wait_SPI_Idle() function.
Also it applies code style rules of IDF to integrated ROM driver sources.

See merge request !584

7 years agoMerge branch 'feature/btdm_add_scan_data_len' into 'master'
Ivan Grokhotkov [Tue, 11 Apr 2017 10:22:46 +0000 (18:22 +0800)]
Merge branch 'feature/btdm_add_scan_data_len' into 'master'

bt component: optimize scan feature

1. Add advertising data length and scan response length in scan result
2. Add scan continuously feature
3. Fix non connectable adv topology error
4. Increase BTC queue size

See merge request !644

7 years agobt component: optimize scan feature
island [Tue, 11 Apr 2017 06:20:20 +0000 (14:20 +0800)]
bt component: optimize scan feature

1. Add advertising data length and scan response length in scan result
2. Add scan continuously feature
3. Fix non connectable adv topology error
4. Increase BTC queue size

7 years agospi_flash: Fixed bug in SPI flash ROM driver to work with embedded flash chip
Alexey Gerenkov [Thu, 9 Mar 2017 07:29:00 +0000 (10:29 +0300)]
spi_flash: Fixed bug in SPI flash ROM driver to work with embedded flash chip

1) fixed SPI_read_status: added check for flash busy flag in matrix mode
2) fixed SPI_page_program: enable write before writing data to SPI FIFO
3) SPI flash ROM funcs replacement is controlled via menuconfig option

7 years agoMerge branch 'bugfix/invalid_filter_for_unit_test_ci_runner_config_file' into 'master'
Ivan Grokhotkov [Mon, 10 Apr 2017 07:57:59 +0000 (15:57 +0800)]
Merge branch 'bugfix/invalid_filter_for_unit_test_ci_runner_config_file' into 'master'

CI: fix bug in generating UT CI runner config

the first case ID in filter is incorrect. Should put test case ID but not test case itself to the filter.

See merge request !643

7 years agoCI: fix bug in generating UT CI runner config:
He Yin Ling [Mon, 10 Apr 2017 07:08:15 +0000 (15:08 +0800)]
CI: fix bug in generating UT CI runner config:

the first case ID in filter is incorrect. Should put test case ID but
not test case itself to the filter.

7 years agoMerge branch 'cherry-pick-6181af2a' into 'master'
Ivan Grokhotkov [Mon, 10 Apr 2017 06:20:01 +0000 (14:20 +0800)]
Merge branch 'cherry-pick-6181af2a' into 'master'

Merge branch 'test/reboot_between_unit_test_cases' into 'release/v2.0'

CI: add reset between running each unit test cases

Unit test is designed to detect bug **within** each test case. Therefore we'll reset between each case to provide a clean context. We will later add stress cases to run unit test cases together to detect potential bugs.

See merge request !636

See merge request !642

7 years agoMerge branch 'test/reboot_between_unit_test_cases' into 'release/v2.0'
Ivan Grokhotkov [Wed, 5 Apr 2017 12:52:13 +0000 (20:52 +0800)]
Merge branch 'test/reboot_between_unit_test_cases' into 'release/v2.0'

CI: add reset between running each unit test cases

Unit test is designed to detect bug **within** each test case. Therefore we'll reset between each case to provide a clean context. We will later add stress cases to run unit test cases together to detect potential bugs.

See merge request !636

7 years agoMerge branch 'feature/parse_unit_test_cases_from_build_files' into 'master'
Ivan Grokhotkov [Mon, 10 Apr 2017 04:20:00 +0000 (12:20 +0800)]
Merge branch 'feature/parse_unit_test_cases_from_build_files' into 'master'

CI: modify unit test parser to get unit test cases from build files

See merge request !545

7 years agoMerge branch 'feature/ci_check_commits' into 'master'
Ivan Grokhotkov [Mon, 10 Apr 2017 04:19:35 +0000 (12:19 +0800)]
Merge branch 'feature/ci_check_commits' into 'master'

CI: check if commit history need revise

Usually we need to cleanup the commit history before MR merged. Sometime we forget to squash before merge.
We can add certain pattern at the beginning of commit message, and add a job in deploy stage to check the patterns.
When we want to push code for review or resolve review comments, we can add this pattern to commit message as a reminder.
This will not block CI tests, checking job will always be put in the last CI stage.

See merge request !629

7 years agoMerge branch 'bugfix/cross_core_int_init_single_core' into 'master'
Ivan Grokhotkov [Mon, 10 Apr 2017 04:19:10 +0000 (12:19 +0800)]
Merge branch 'bugfix/cross_core_int_init_single_core' into 'master'

esp32: initialize cross-core interrupt in single core mode

The software interrupt originally used as the cross-core interrupt is
now also used to yield from a FreeRTOS critical section; therefore it
must be initialized for single core mode as well.

Fixes https://github.com/espressif/esp-idf/issues/496

See merge request !640

7 years agoMerge branch 'bugfix/esp_error_check_release_builds' into 'master'
Ivan Grokhotkov [Mon, 10 Apr 2017 04:18:47 +0000 (12:18 +0800)]
Merge branch 'bugfix/esp_error_check_release_builds' into 'master'

fix warnings generated by ESP_ERROR_CHECK(variable) in release builds

This uses the same pattern as “assert” in release builds to silence the
warning. At the same time, we make sure that if a statement is wrapped
into ESP_ERROR_CHECK, it is executed in release build as well.

Fixes https://github.com/espressif/esp-idf/issues/497

See merge request !641

7 years agoMerge branch 'feature/mdns_afl_fuzz' into 'master'
Ivan Grokhotkov [Mon, 10 Apr 2017 03:55:31 +0000 (11:55 +0800)]
Merge branch 'feature/mdns_afl_fuzz' into 'master'

Feature/mdns afl fuzz

Implement AFL Fuzz for testing MDNS parser stability

See merge request !632

7 years agoCI: check if commit history need revise
He Yin Ling [Fri, 31 Mar 2017 10:52:59 +0000 (18:52 +0800)]
CI: check if commit history need revise

7 years agofix warnings generated by ESP_ERROR_CHECK(variable) in release builds
Ivan Grokhotkov [Fri, 7 Apr 2017 07:24:58 +0000 (15:24 +0800)]
fix warnings generated by ESP_ERROR_CHECK(variable) in release builds

This uses the same pattern as “assert” in release builds to silence the
warning. At the same time, we make sure that if a statement is wrapped
into ESP_ERROR_CHECK, it is executed in release build as well.

7 years agoMerge branch 'bugfix/btdm_task_priority' into 'master'
Ivan Grokhotkov [Fri, 7 Apr 2017 06:56:31 +0000 (14:56 +0800)]
Merge branch 'bugfix/btdm_task_priority' into 'master'

component/bt : modify bluetooth task priority

modify bluetooth task priority to lower than IPC task priority.

See merge request !631

7 years agoesp32: initialize cross-core interrupt in single core mode
Ivan Grokhotkov [Fri, 7 Apr 2017 06:48:08 +0000 (14:48 +0800)]
esp32: initialize cross-core interrupt in single core mode

The software interrupt originally used as the cross-core interrupt is
now also used to yield from a FreeRTOS critical section; therefore it
must be initialized for single core mode as well.

Fixes https://github.com/espressif/esp-idf/issues/496

7 years agoMerge branch 'feature/panic_wdt' into 'master'
Ivan Grokhotkov [Fri, 7 Apr 2017 04:14:30 +0000 (12:14 +0800)]
Merge branch 'feature/panic_wdt' into 'master'

esp32: RWDT is used to reboot system in case of panic handler crash

This branch uses RWDT to reboot system in case of panic handler crash.

See merge request !625

7 years agoMerge branch 'feature/btdm_uart_hci' into 'master'
Ivan Grokhotkov [Fri, 7 Apr 2017 04:13:42 +0000 (12:13 +0800)]
Merge branch 'feature/btdm_uart_hci' into 'master'

Feature/btdm uart hci

    1. support UART HCI, devolper need not to make a bridge between VHCI and UART.
    2. fix bug of rand/srand called in ISR.
    3. fix bug of BLE rx packets may cause assert.

See merge request !626

7 years agoesp32: RWDT is used to reboot system in case of panic handler crash
Alexey Gerenkov [Wed, 29 Mar 2017 18:09:47 +0000 (21:09 +0300)]
esp32: RWDT is used to reboot system in case of panic handler crash

also fixes TG1WDG protection bug in panic handler

7 years agoCI: revise unit test parser
He Yin Ling [Fri, 24 Mar 2017 10:38:06 +0000 (18:38 +0800)]
CI: revise unit test parser

7 years agoCI: modify unit test parser to parse unit test cases from build files
antti [Thu, 2 Mar 2017 09:51:25 +0000 (17:51 +0800)]
CI: modify unit test parser to parse unit test cases from build files

Previously test cases were parsed from test files

7 years agocomponent/bt : modify bluetooth config style
Tian Hao [Wed, 5 Apr 2017 13:19:15 +0000 (21:19 +0800)]
component/bt : modify bluetooth config style

7 years agoMerge branch 'bugfix/btdm_alarm' into 'master'
Ivan Grokhotkov [Wed, 5 Apr 2017 23:46:01 +0000 (07:46 +0800)]
Merge branch 'bugfix/btdm_alarm' into 'master'

component/bt : modify alarm APIs to be safely accessible from multiple tasks

Improve the osi_alarm module to make the alarm APIs become thread safe.

See merge request !570

7 years agoMerge branch 'bugfix/yield_after_critical_section' into 'master'
Angus Gratton [Wed, 5 Apr 2017 23:17:35 +0000 (07:17 +0800)]
Merge branch 'bugfix/yield_after_critical_section' into 'master'

freertos: Delay context switch from queue/task APIs until exiting critical section

Closes #374: https://github.com/espressif/esp-idf/issues/374

See merge request !610

7 years agocomponent/bt : support UART HCI and fix some bugs
Tian Hao [Fri, 24 Mar 2017 06:57:07 +0000 (14:57 +0800)]
component/bt : support UART HCI and fix some bugs

1. support UART HCI, devolper need not to make a bridge between VHCI and UART.
2. fix bug of rand/srand called in ISR.
3. fix bug of BLE rx packets may cause assert.

7 years agocomponent/bt : add uart(1/2) as HCI IO directly
Tian Hao [Thu, 16 Mar 2017 09:14:20 +0000 (17:14 +0800)]
component/bt : add uart(1/2) as HCI IO directly

7 years agoMerge branch 'bugfix/doc_windows_shell' into 'master'
Ivan Grokhotkov [Wed, 5 Apr 2017 10:25:48 +0000 (18:25 +0800)]
Merge branch 'bugfix/doc_windows_shell' into 'master'

docs: Fix Windows shell path in Windows Setup Guide

Closes #493 https://github.com/espressif/esp-idf/issues/493

See merge request !634

7 years agocomponent/bt : modify alarm APIs to be safely accessible from multiple tasks
Tian Hao [Thu, 9 Mar 2017 12:46:19 +0000 (20:46 +0800)]
component/bt : modify alarm APIs to be safely accessible from multiple tasks

7 years agoAdd AFL fuzz test
me-no-dev [Mon, 3 Apr 2017 13:50:12 +0000 (16:50 +0300)]
Add AFL fuzz test

7 years agodocs: Fix Windows shell path in Step 4
Angus Gratton [Wed, 5 Apr 2017 00:58:34 +0000 (10:58 +1000)]
docs: Fix Windows shell path in Step 4

Closes #493 https://github.com/espressif/esp-idf/issues/493

7 years agofreertos tests: Extend preemption test cases to cross-core wakeup
Angus Gratton [Mon, 3 Apr 2017 01:59:30 +0000 (11:59 +1000)]
freertos tests: Extend preemption test cases to cross-core wakeup

7 years agofreertos tests: Fix accidental "0 delay" in event group tests
Angus Gratton [Tue, 28 Mar 2017 03:16:53 +0000 (14:16 +1100)]
freertos tests: Fix accidental "0 delay" in event group tests

Was a slight race condition where tasks on other CPU may not have finished waking up on BIT_CALL when the unity task
polled the event group state.

7 years agofreertos: Delay context switch from queue/task APIs until exiting critical section
Angus Gratton [Thu, 16 Mar 2017 03:07:50 +0000 (11:07 +0800)]
freertos: Delay context switch from queue/task APIs until exiting critical section

Closes #374: https://github.com/espressif/esp-idf/issues/374

7 years agoimplement fixes for issues found while fuzz testing
me-no-dev [Mon, 3 Apr 2017 13:45:59 +0000 (16:45 +0300)]
implement fixes for issues found while fuzz testing

7 years agoMerge branch 'feature/implement_lwip_critical_protect_with_mutex' into 'master'
Jiang Jiang Jian [Sat, 1 Apr 2017 09:27:20 +0000 (17:27 +0800)]
Merge branch 'feature/implement_lwip_critical_protect_with_mutex' into 'master'

lwip: implement lwip critical session with mutex

Currently lwip critical session is based on interrupt, now replace it with mutex

See merge request !595

7 years agoMerge branch 'feature/tw11250_optimize_tcpip_adapter_layer' into 'master'
Jiang Jiang Jian [Sat, 1 Apr 2017 09:26:34 +0000 (17:26 +0800)]
Merge branch 'feature/tw11250_optimize_tcpip_adapter_layer' into 'master'

optimize tcpip adapter layer

Support thread-safe tcpip adapter layer

See merge request !621

7 years agocomponent/bt : modify bluetooth task priority
Tian Hao [Sat, 1 Apr 2017 09:17:57 +0000 (17:17 +0800)]
component/bt : modify bluetooth task priority

7 years agooptimize tcpip adapter layer
Liu Zhi Fu [Wed, 29 Mar 2017 03:07:41 +0000 (11:07 +0800)]
optimize tcpip adapter layer

7 years agolwip: implement lwip critical session with mutex
Liu Zhi Fu [Mon, 20 Mar 2017 08:30:35 +0000 (16:30 +0800)]
lwip: implement lwip critical session with mutex

Currently lwip critical session is based on interrupt, now replace it with mutex

7 years agoMerge branch 'feature/tw10169_optimize_dhcp_renew_rebind_timer' into 'master'
Jiang Jiang Jian [Sat, 1 Apr 2017 08:04:13 +0000 (16:04 +0800)]
Merge branch 'feature/tw10169_optimize_dhcp_renew_rebind_timer' into 'master'

lwip: optimize dhcp renew/rebind timer

This MR is used to replace MR581 since MR581 use a bad branch name.

See merge request !585

7 years agoMerge branch 'bugfix/flash_op_deadlock' into 'master'
Ivan Grokhotkov [Fri, 31 Mar 2017 08:02:26 +0000 (16:02 +0800)]
Merge branch 'bugfix/flash_op_deadlock' into 'master'

spi_flash: fix race condition in s_flash_op_complete access

Flash operation complete flag was cleared by the CPU initiating flash operation. If the other core was running an ISR, then IPC task could be late to enter the loop to check `s_flash_op_complete` by the time next flash operation started. This would cause a deadlock, as the IPC task would still be waiting for `s_flash_op_complete` to be set (which was already cleared by the next flash operation), while the flash operation task would be blocked waiting for IPC task to set `s_flash_op_can_start`.

If the flag is cleared on the CPU waiting on this flag, then the race condition can not happen.

See merge request !615

7 years agoMerge branch 'bugfix/spi_timing_issues' into 'master'
Jeroen Domburg [Fri, 31 Mar 2017 02:44:37 +0000 (10:44 +0800)]
Merge branch 'bugfix/spi_timing_issues' into 'master'

Fix timing adjustment needed for higher speeds of SPI master bus.

Ref https://github.com/espressif/esp-idf/issues/363 . It was found out the master SPI driver didn't exactly calculate the delay compensation needed, breaking 20 and 26MHz full-duplex mode. This fixes these use cases. We also found out 40MHz full-duplex routed over the GPIO matrix does not work because of a hardware quirk; this MR adds a check/error for that case until we find a workaround.

See merge request !547

7 years agoMerge branch 'feature/static_tx_buffer_if_psram' into 'master'
Jiang Jiang Jian [Thu, 30 Mar 2017 13:45:39 +0000 (21:45 +0800)]
Merge branch 'feature/static_tx_buffer_if_psram' into 'master'

Add WiFi static and dynamic tx buffer choice

If static tx buffer is selected, WiFi tx buffers are allocated when WiFi is initialized and released

    when WiFi is de-initialized. If dynamic tx buffer is selected, WiFi tx buffer is allocated when tx

    data is delivered from LWIP to WiFi and released when tx data is sent out by WiFi.

    The size of each static tx buffers is fixed to about 1.6KB and the size of dynamic tx buffers is

    depend on the length of the data delivered from LWIP.

    If PSRAM is enabled, "STATIC" should be selected to guarantee enough WiFi tx buffers.

    If PSRAM is disabled, "DYNAMIC" should be selected to improve the utilization of RAM.

See merge request !580

7 years agoAdd WiFi static and dynamic tx buffer choice
XiaXiaotian [Tue, 14 Mar 2017 13:03:41 +0000 (21:03 +0800)]
Add WiFi static and dynamic tx buffer choice

    If static tx buffer is selected, WiFi tx buffers are allocated when WiFi is initialized and released

    when WiFi is de-initialized. If dynamic tx buffer is selected, WiFi tx buffer is allocated when tx

    data is delivered from LWIP to WiFi and released when tx data is sent out by WiFi.

    The size of each static tx buffers is fixed to about 1.6KB and the size of dynamic tx buffers is

    depend on the length of the data delivered from LWIP.

    If PSRAM is enabled, "STATIC" should be selected to guarantee enough WiFi tx buffers.

    If PSRAM is disabled, "DYNAMIC" should be selected to improve the utilization of RAM.

7 years agoMerge branch 'feature/add_scan_time_config' into 'master'
Jiang Jiang Jian [Thu, 30 Mar 2017 12:56:30 +0000 (20:56 +0800)]
Merge branch 'feature/add_scan_time_config' into 'master'

wifi scan: add wifi scan type and time config

See merge request !586

7 years agowifi scan: add wifi scan type and time config
XiaXiaotian [Thu, 16 Mar 2017 08:20:19 +0000 (16:20 +0800)]
wifi scan: add wifi scan type and time config

7 years agoMerge branch 'bugfix/windows_install_paths' into 'master'
Angus Gratton [Thu, 30 Mar 2017 02:51:01 +0000 (10:51 +0800)]
Merge branch 'bugfix/windows_install_paths' into 'master'

Fix expansion of PATH on Windows setup

Was accidentally expanding in context of setup script, not at runtime.

See merge request !624

7 years agodoc: Fix some Windows Setup Guide links
Angus Gratton [Thu, 30 Mar 2017 00:29:03 +0000 (11:29 +1100)]
doc: Fix some Windows Setup Guide links

7 years agowindows: Don't expand PATH when generating setup
Angus Gratton [Wed, 29 Mar 2017 23:58:58 +0000 (10:58 +1100)]
windows: Don't expand PATH when generating setup

Ref #467 https://github.com/espressif/esp-idf/issues/467

7 years agoMerge branch 'bugfix/git_porcelain_arg' into 'master'
Ivan Grokhotkov [Wed, 29 Mar 2017 09:37:34 +0000 (17:37 +0800)]
Merge branch 'bugfix/git_porcelain_arg' into 'master'

make: remove version parameter from git status porcelain option

Version parameter was added in git 2.11, while default git on macOS is
currently 2.10. According to the latest git docs, if the version
parameter is not provided, it defaults to ‘v1’, so removing it doesn’t
change the format.

See merge request !616

7 years agoMerge branch 'bugfix/cpu1_isr_stack_location' into 'master'
Ivan Grokhotkov [Wed, 29 Mar 2017 04:05:31 +0000 (12:05 +0800)]
Merge branch 'bugfix/cpu1_isr_stack_location' into 'master'

Fix finding location of ISR stack space for CPU1

Up to now, the CPU1 interrupts erroneously used the area *after* the ISR stack region, leading to bugs in BT Classic. This fixes that.

See merge request !618

7 years agoMerge branch 'feature/mdns_dnssd_metaquery' into 'master'
Angus Gratton [Wed, 29 Mar 2017 01:29:31 +0000 (09:29 +0800)]
Merge branch 'feature/mdns_dnssd_metaquery' into 'master'

mdns: add simple dns-sd meta query support

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

See merge request !619

7 years agoMerge branch 'bugfix/example_naming' into 'master'
Angus Gratton [Wed, 29 Mar 2017 00:50:49 +0000 (08:50 +0800)]
Merge branch 'bugfix/example_naming' into 'master'

examples: Standardise naming of files, symbols, etc. in examples

* Use "example" in all example function & variable names,
  ie use i2c_example_xxx instead of i2c_xxx for example functions.
  Closes #198 https://github.com/espressif/esp-idf/issues/198
* Mark example functions, etc. static
* Replace uses of "test" & "demo" with "example"
* Split the UART example into two
* Rename "main" example files to end with "_main.c" for disambiguation

See merge request !601

7 years agomdns: add simple dns-sd meta query support
negativekelvin [Tue, 14 Feb 2017 04:53:46 +0000 (21:53 -0700)]
mdns: add simple dns-sd meta query support

tabs to spaces

match domain

7 years agoFix finding location of ISR stack space for CPU1
Jeroen Domburg [Tue, 28 Mar 2017 07:50:10 +0000 (15:50 +0800)]
Fix finding location of ISR stack space for CPU1

7 years agomake: remove version parameter from git status porcelain option
Ivan Grokhotkov [Tue, 28 Mar 2017 06:22:27 +0000 (14:22 +0800)]
make: remove version parameter from git status porcelain option

Version parameter was added in git 2.11, while default git on macOS is
currently 2.10. According to the latest git docs, if the version
parameter is not provided, it defaults to ‘v1’, so removing it doesn’t
change the format.

7 years agoFix timing adjustment needed for higher speeds of SPI master bus.
Jeroen Domburg [Thu, 2 Mar 2017 10:46:59 +0000 (18:46 +0800)]
Fix timing adjustment needed for higher speeds of SPI master bus.

7 years agoMerge branch 'bugfix/windows_setup' into 'master'
Angus Gratton [Tue, 28 Mar 2017 02:49:08 +0000 (10:49 +0800)]
Merge branch 'bugfix/windows_setup' into 'master'

Windows setup improvements

* Tweak Makefile to significantly reduce startup time on Windows (also reduced on other platforms, but less obvious.)
* Revise windows setup installation script to fix various issues, use latest toolchain.
* Tweak Windows config docs

See merge request !597

7 years agospi_flash: fix race condition in s_flash_op_complete access
Ivan Grokhotkov [Mon, 27 Mar 2017 17:02:58 +0000 (01:02 +0800)]
spi_flash: fix race condition in s_flash_op_complete access

Flash operation complete flag was cleared by the core initiating flash
operation. If the other core was running an ISR, then IPC task could
be late to enter the loop to check s_flash_op_complete by the time next
flash operation started. If the flag is cleared on the CPU waiting on
this flag, then the race condition can not happen.

7 years agoexamples: Standardise naming of files, symbols, etc. in examples
Angus Gratton [Wed, 22 Mar 2017 04:36:11 +0000 (12:36 +0800)]
examples: Standardise naming of files, symbols, etc. in examples

* Use "example" in all example function & variable names,
  ie use i2c_example_xxx instead of i2c_xxx for example functions.
  Closes #198 https://github.com/espressif/esp-idf/issues/198
* Mark example functions, etc. static
* Replace uses of "test" & "demo" with "example"
* Split the UART example into two
* Rename "main" example files to end with "_main.c" for disambiguation

7 years agoMerge branch 'feature/doc_boards_and_modules' into 'master'
Angus Gratton [Mon, 27 Mar 2017 06:39:12 +0000 (14:39 +0800)]
Merge branch 'feature/doc_boards_and_modules' into 'master'

doc: add dev module and boards by Espressif

Overview, picture, link to schematic, ref. design, etc. for the following development module and boards:

- ESP-WROOM-32
- ESP32 Core Board V2 / ESP32 DevKitC
- ESP32 Demo Board V2
- ESP32 WROVER KIT V1 / ESP32 DevKitJ V1
- ESP32 WROVER KIT V2

See merge request !560

7 years agoMerge branch 'feature/ulp_toolchain' into 'master'
Ivan Grokhotkov [Mon, 27 Mar 2017 05:54:51 +0000 (13:54 +0800)]
Merge branch 'feature/ulp_toolchain' into 'master'

ULP coprocessor toolchain integration

- build system support for ULP coprocessor toolchain
- documentation for ULP coprocessor instruction set
- documentation for ULP code execution flow, loading programs, exchanging data
- example: counting pulses using ULP

See merge request !394

7 years agoulp: add build system integration and example
Dmitry Yakovlev [Mon, 9 Jan 2017 04:38:20 +0000 (07:38 +0300)]
ulp: add build system integration and example

7 years agodocs: Mention the 'examples' dir in the setup docs
Angus Gratton [Tue, 21 Mar 2017 07:37:17 +0000 (15:37 +0800)]
docs: Mention the 'examples' dir in the setup docs

7 years agowindows config: Update Windows setup script, pre-installed image, instructions.
Angus Gratton [Tue, 21 Mar 2017 03:17:19 +0000 (11:17 +0800)]
windows config: Update Windows setup script, pre-installed image, instructions.

Add notes about MSYS2 package mirrors & HTTP proxies for users in China.

Closes #260 https://github.com/espressif/esp-idf/issues/260
Closes #281 https://github.com/espressif/esp-idf/issues/281
Closes #200 https://github.com/espressif/esp-idf/issues/200
Closes #430 https://github.com/espressif/esp-idf/pull/430
Accomplishes similar goals to #264 https://github.com/espressif/esp-idf/pull/264

7 years agoMerge branch 'bugfix/reset_mac_cause_bt_cannot_rx_data' into 'master'
Jiang Jiang Jian [Fri, 24 Mar 2017 09:02:26 +0000 (17:02 +0800)]
Merge branch 'bugfix/reset_mac_cause_bt_cannot_rx_data' into 'master'

Reset WIFI mac when wifi start and update wifi lib

1. reset wifi mac when wifi start

2. roll back rx hung workaround for beacon timeout

3. fix amsdu ap interface wrong issue

4. fix amsdu header parse error

5. fix amsdu flag wrong issue

6. PHY: V350, fix BT rssi bug

7. RTC: V225, fix bt will be not work when wifi is reset

See merge request !606

7 years agofix compile bug
XiaXiaotian [Fri, 24 Mar 2017 00:41:34 +0000 (08:41 +0800)]
fix compile bug

1. split some unused rtc functions that calls phy function

2. make check bt idle more safe when reset wifi mac

7 years agoMerge branch 'feature/add_auth_type_for_wpa2_enterprise' into 'master'
Ivan Grokhotkov [Fri, 24 Mar 2017 07:56:21 +0000 (15:56 +0800)]
Merge branch 'feature/add_auth_type_for_wpa2_enterprise' into 'master'

wpa2: add authenticate type for wpa2 enterprise

See merge request !588

7 years agoMerge branch 'bugfix/spi_flash_lock_period' into 'master'
Ivan Grokhotkov [Fri, 24 Mar 2017 07:55:42 +0000 (15:55 +0800)]
Merge branch 'bugfix/spi_flash_lock_period' into 'master'

SPI flash operations lock for shorter periods

Based on bug report here:
https://esp32.com/viewtopic.php?f=13&t=1489&p=6816#p6773

Long SPI flash erase (and possibly write/read) cycles block all tasks on both CPUs for an extended period, and can lead to WiFi dissassociation (and general priority inversion.)

This MR inserts preemption breaks into large operations (all erases, writes every 8KB, reads every 16KB).

Overhead of a single spi_flash_guart_start()/spi_flash_guard_end() cycle measured at approx 67us (assuming no preemption.)

See merge request !600

7 years agoMerge branch 'feature/ci_tags_release_branches' into 'master'
Ivan Grokhotkov [Fri, 24 Mar 2017 07:55:15 +0000 (15:55 +0800)]
Merge branch 'feature/ci_tags_release_branches' into 'master'

CI support for testing & deploying release tags & branches

For CI testing & deployment of release branches:
* Test release tags as well as branches
* Swap gitlab submodule URLs to github when testing release tags or branches.

These changes are already pushed to the release/v2.0 branch.

See merge request !604

7 years agoMerge branch 'bugfix/esp32_core_dump_issues' into 'master'
Ivan Grokhotkov [Fri, 24 Mar 2017 06:41:07 +0000 (14:41 +0800)]
Merge branch 'bugfix/esp32_core_dump_issues' into 'master'

bugfix: ESP32 Core Dump reported issues

This MR fixes the following issues:
1.  fixed path to esptool when there is no compiled python module for it
2. GDB inernal failure handling was added

See merge request !599

7 years agoesp32: Move heap_alloc_caps to IRAM
Angus Gratton [Fri, 24 Mar 2017 02:41:45 +0000 (10:41 +0800)]
esp32: Move heap_alloc_caps to IRAM

Rest of malloc() path was already in IRAM

7 years agoesp32: make soc header compatible with assembler
Ivan Grokhotkov [Sat, 18 Mar 2017 09:27:19 +0000 (17:27 +0800)]
esp32: make soc header compatible with assembler

7 years agodriver/rtc: add APIs to enable/disable hold function
Ivan Grokhotkov [Sun, 19 Mar 2017 15:59:19 +0000 (23:59 +0800)]
driver/rtc: add APIs to enable/disable hold function

7 years agoMerge branch 'feature/ci-use-local-registry' into 'master'
Ivan Grokhotkov [Thu, 23 Mar 2017 12:58:23 +0000 (20:58 +0800)]
Merge branch 'feature/ci-use-local-registry' into 'master'

ci: allow passing Hub account or registry name from the environment

This change allows to set registry name or Hub account name using CI Variables. Needs all runners to be updated to gitlab-ci-runner v1.8+ in order for the auth feature to work.

See merge request !605

7 years agoMerge branch 'bugfix/minor_fixes' into 'master'
Angus Gratton [Thu, 23 Mar 2017 09:57:28 +0000 (17:57 +0800)]
Merge branch 'bugfix/minor_fixes' into 'master'

Minor fixes and PRs cherry-picked from Github

See merge request !602

7 years agoMerge branch 'bugfix/nvs_init_check_empty_pages' into 'master'
Ivan Grokhotkov [Thu, 23 Mar 2017 09:57:15 +0000 (17:57 +0800)]
Merge branch 'bugfix/nvs_init_check_empty_pages' into 'master'

Error handling in NVS initialization

Previously nvs_flash_init worked under an assumption that there should always be at least one free page available. This is true during normal operation, but in some cases (such as when changing application partition table from a non-OTA to an OTA one), NVS partition may get truncated, which will cause empty pages to be lost.

This MR adds error checks for this condition, and updates code which calls `nvs_flash_init` to check for the return code.
For most examples, a simple `ESP_ERROR_CHECK` is added around `nvs_flash_init`. For NVS examples and the OTA example, more robust error handling is added.

This change also removes nvs_flash_init calls from examples which don't use NVS.

See merge request !582

7 years agoMerge branch 'bugfix/idf_monitor' into 'master'
Angus Gratton [Thu, 23 Mar 2017 09:56:56 +0000 (17:56 +0800)]
Merge branch 'bugfix/idf_monitor' into 'master'

idf_monitor: Small fixes (baud rate, EOL, /dev/tty.X on macOS, Ctrl-T on failure)

* "make monitor" now passed the configured baud rate.
  Closes #436 https://github.com/espressif/esp-idf/issues/436
* Pass toolchain prefix from sdkconfig into monitor tool
* Allow setting EOL in idf_monitor.py, use CRLF by default
* Detect if /dev/tty.X is used on macOS, warn and replace with /dev/cu.X
* If a build fails or gdb exits, ignore Ctrl-T (allowing Ctrl-T Ctrl-A/F to be same key sequence everywhere)
* Add a note about winpty on Windows.
  Ref https://github.com/espressif/esp-idf/commit/02fdf8271de3a6db2ab9d4d6f023c160c84ebdbe#commitcomment-21369196
* Fix problems with Console.cancel() not existing in older pyserial
* Print more user-friendly symbols for "start of iram" and "start of flash"

See merge request !594

7 years agotw11087: fix wifi restore exception
XiaXiaotian [Thu, 23 Mar 2017 09:47:48 +0000 (17:47 +0800)]
tw11087: fix wifi restore exception

1. stop wifi before restore wifi

7 years agoReset WIFI mac when wifi start and update wifi lib
XiaXiaotian [Thu, 23 Mar 2017 03:33:46 +0000 (11:33 +0800)]
Reset WIFI mac when wifi start and update wifi lib

1. reset wifi mac when wifi start

2. roll back rx hung workaround for beacon timeout

3. fix amsdu ap interface wrong issue

4. fix amsdu header parse error

5. fix amsdu flag wrong issue

6. PHY: V350, fix BT rssi bug

7. RTC: V225, fix bt will be not work when wifi is reset

7 years agoidf_monitor: Use ANSI color codes for all output we inject into stderr
Angus Gratton [Thu, 23 Mar 2017 02:41:14 +0000 (10:41 +0800)]
idf_monitor: Use ANSI color codes for all output we inject into stderr

7 years agobuild system: Add explicit DEBUG_FLAGS variable, pass to assembler also
Angus Gratton [Tue, 21 Mar 2017 08:46:48 +0000 (16:46 +0800)]
build system: Add explicit DEBUG_FLAGS variable, pass to assembler also

7 years agoci: allow passing Hub account or registry name from the environment
Ivan Grokhotkov [Wed, 22 Mar 2017 13:59:40 +0000 (21:59 +0800)]
ci: allow passing Hub account or registry name from the environment

7 years agoci: Swap github/gitlab submodules for release branches & tags also
Angus Gratton [Wed, 22 Mar 2017 10:39:28 +0000 (18:39 +0800)]
ci: Swap github/gitlab submodules for release branches & tags also

7 years agoci: Also run deployment steps for tags of form vX.Y (with optional -suffix)
Angus Gratton [Wed, 22 Mar 2017 10:25:28 +0000 (18:25 +0800)]
ci: Also run deployment steps for tags of form vX.Y (with optional -suffix)

7 years agounit test: Measure test wall time with CCOUNT, so it includes time w/ interrupts off
Angus Gratton [Wed, 22 Mar 2017 03:50:05 +0000 (11:50 +0800)]
unit test: Measure test wall time with CCOUNT, so it includes time w/ interrupts off

7 years agospi_flash: Split large SPI flash operations into parts, allowing preemption
Angus Gratton [Wed, 22 Mar 2017 03:48:33 +0000 (11:48 +0800)]
spi_flash: Split large SPI flash operations into parts, allowing preemption

* Erase range operations allow preemption after each block or sector.
* Write operations allow preemption every 8KB of data.
* Reado operations allow preemption every 16KB of data.

7 years agoethernet: Fix typo in log message
rudi ;-) [Thu, 2 Mar 2017 22:41:18 +0000 (23:41 +0100)]
ethernet: Fix typo in log message

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

7 years agofreertos: Add config parameters to customize FreeRTOS behaviour.
Daniel Campora [Mon, 20 Mar 2017 21:32:01 +0000 (22:32 +0100)]
freertos: Add config parameters to customize FreeRTOS behaviour.

The options are:
    - SUPPORT_STATIC_ALLOCATION
    - ENABLE_STATIC_TASK_CLEAN_UP_HOOK
    - TIMER_TASK_PRIORITY
    - TIMER_TASK_STACK_DEPTH
    - TIMER_QUEUE_LENGTH

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

7 years agocomponent/bt: allow to use alternative Bluetooth stack by disabling Bluedroid
Matthias Ringwald [Tue, 7 Mar 2017 17:20:33 +0000 (18:20 +0100)]
component/bt: allow to use alternative Bluetooth stack by disabling Bluedroid

Merges #408 https://github.com/espressif/esp-idf/pull/440

7 years agoFix late argument verification in emac-main
alarruskain [Mon, 13 Mar 2017 12:31:01 +0000 (13:31 +0100)]
Fix late argument verification in emac-main

Prevent crash when emac_phy_power_enable is not set.

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

7 years agobuild: Check for .git, but it doesn't have to be a directory, so that esp-idf will...
Edmund Huber [Mon, 20 Mar 2017 06:11:13 +0000 (23:11 -0700)]
build: Check for .git, but it doesn't have to be a directory, so that esp-idf will work as a submodule

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

7 years agoesp32: esp_wifi.h: Replace a non-working #error statement with a working _Static_asse...
Edmund Huber [Sun, 19 Mar 2017 18:34:35 +0000 (11:34 -0700)]
esp32: esp_wifi.h: Replace a non-working #error statement with a working _Static_assert statement

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

7 years agobuild: pass more arguments to git describe so that it always works even if detached...
Edmund Huber [Sun, 19 Mar 2017 19:06:37 +0000 (12:06 -0700)]
build: pass more arguments to git describe so that it always works even if detached branch, etc

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

7 years agoREADME: Remove link typo
rudi ;-) [Fri, 17 Mar 2017 20:23:44 +0000 (21:23 +0100)]
README: Remove link typo

link typo removed char > from end of the link
products/hardware/esp32/overview

Merges #439 https://github.com/espressif/esp-idf/issues/450
Closes #437 https://github.com/espressif/esp-idf/issues/437