Commit graph

6469 commits

Author SHA1 Message Date
Jiang Jiang Jian
887ff7d685 Merge branch 'bugfix/multiple_backports_v3.1' into 'release/v3.1'
multiple backports (v3.1)

See merge request idf/esp-idf!4376
2019-03-01 18:46:10 +08:00
Jiang Jiang Jian
43dc03659e Merge branch 'bugfix/ble_reconn_rescan_readv_crash_v3.1' into 'release/v3.1'
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!4327
2019-03-01 18:05:54 +08:00
Angus Gratton
fb4b035105 ci: Only use "github_sync" tagged runners to talk to GitHub 2019-02-28 22:00:35 +08:00
Angus Gratton
04ed861eb8 ci: Retry submodule sync 2 more times before failing 2019-02-28 22:00:07 +08:00
Ivan Grokhotkov
4e55490602 nvs: add a blob fragmentation test case
Ref. TW12937
2019-02-28 21:58:03 +08:00
Ivan Grokhotkov
7ee102a9f6 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-28 21:58:03 +08:00
Ivan Grokhotkov
70a9e72e06 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-28 21:58:03 +08:00
Ivan Grokhotkov
9cfd94a9d6 esp_timer: improve unit test robustness
1. call esp_timer_get_time and ref_clock_get in the same order on
   start and in the loop

2. disable interrupts when calculating delta between ref_clock
   and esp_timer

3. ensure both functions are in cache before calculating the delta
2019-02-28 21:58:03 +08:00
Ivan Grokhotkov
48416c38c8 soc: define named constants for DPORT_CPUPERIOD_SEL values 2019-02-28 21:58:03 +08:00
Ivan Grokhotkov
beb8347faa 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-28 21:58:03 +08:00
Ivan Grokhotkov
450118fdf8 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-28 21:58:03 +08:00
Ivan Grokhotkov
1e1450bf5d make: fix issues related to EXTRA_COMPONENT_DIRS
1. When one of the COMPONENT_DIRS points to a component directory
(i.e. a directory containing component.mk, not a directory of multiple
components), and there is a subdirectory in it which also contains
a component, the subdirectory was mistakenly added to the list of
components and compiled.

For example:

    main/
        component.mk
        main.c
        test/
            component.mk
            test_main.c

Would compile test_main.c and link libtest.a.

2. When one of the COMPONENT_DIRS points to a component directory, and
the parent directory contained a directory with the same name as
another component, that directory would be mistakenly added to the
COMPONENT_PATHS.

For example:

    esp/
        esp-idf/
        esp32/
            (random stuff)
        mycomponent/
            component.mk
            mycomponent.c
        myproject/
            main/
            Makefile

and Makefile sets EXTRA_COMPONENT_DIRS=$(realpath ../mycomponent),
then "esp32" directory which is at the same level as mycomponent
was added to COMPONENT_PATHS.

3. If EXTRA_COMPONENT_DIRS pointed to a directory with a list of
components, and one of the subdirectories was not a component, but
had the same name as another component, than that directory would be
mistakenly added to COMPONENT_PATHS instead of the real esp32
component directory.

For example:

    my_components/
        my_component/
            component.mk
            my_component.c
        esp32/
            (some random stuff)

and EXTRA_COMPONENT_DIRS would point to my_components/, then "esp32"
directory would be added to COMPONENT_PATHS instead of the real esp32
component directory.
2019-02-28 21:58:03 +08:00
Ivan Grokhotkov
3567b1d0ce kconfig: fix compatibility with very old versions of flex
See 4e762e4918

Closes https://github.com/espressif/esp-idf/issues/2703
2019-02-28 21:58:03 +08:00
Jiang Jiang Jian
2f14aeee00 Merge branch 'bugfix/fix_scan_bugs_and_alloc_eb_fail_v3.1' into 'release/v3.1'
wifi: fix scan bugs and alloc eb fail (backport v3.1)

See merge request idf/esp-idf!4389
2019-02-28 21:31:49 +08:00
Jiang Jiang Jian
42383518b8 Merge branch 'bugfix/enlarge_ethernet_stack_size_v3.1' into 'release/v3.1'
enlarge ethernet task stack size (backport v3.1)

See merge request idf/esp-idf!4369
2019-02-28 18:23:28 +08:00
zhangyanjiao
fb15403515 wifi changes:
1. make menuconfig can set the WiFi mgmt short buffer num
2. fix several scan bugs
2019-02-28 15:40:56 +08:00
Jiang Jiang Jian
98ed70cd91 Merge branch 'doc/btdm_modem_sleep_EVED_mode_for_v3.1' into 'release/v3.1'
doc/btdm_modem_sleep_EVED_mode_for_v3.1(backport v3.1)

See merge request idf/esp-idf!4361
2019-02-27 18:36:04 +08:00
Jiang Jiang Jian
c6ee38eb69 Merge branch 'bugfix/tw28146_make_wifi_iram_optimization_configurable_v3.1' into 'release/v3.1'
esp32: make WiFi IRAM optimization configurable (backport v3.1)

See merge request idf/esp-idf!4041
2019-02-27 17:36:55 +08:00
morris
ed1771c7cc ethernet: enlarge ethernet task stack size
1. In original driver, the stack size for emac driver task "emacT" is only 2048 Bytes, which also can not be changed by user.
2. Each time when invoking "emac_start" function, it will reset emac registers, the driver should reconfig some important registers again.

Closes https://github.com/espressif/esp-idf/issues/3025
2019-02-27 15:21:09 +08:00
wangmengyang
1bd674dc64 component/bt: add more information and description for bluetooth modem sleep
Add remark that "EVED" mode for bluetooth modem sleep is only used for internal test
2019-02-27 10:51:15 +08:00
Liu Zhi Fu
a019517d07 esp32: make WiFi IRAM optimization configurable
With this feature, the WiFi IRAM optimization can be disabled/enabled via menuconfig.
2019-02-26 19:26:02 +08:00
Tian Hao
f57d5db86d 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-25 13:41:51 +00:00
Jiang Jiang Jian
57118e2f10 Merge branch 'bugfix/btdm_backport_v3.1' into 'release/v3.1'
component/bt: backport some MRs to v3.1

See merge request idf/esp-idf!4312
2019-02-21 18:24:45 +08:00
Jiang Jiang Jian
03527e840c Merge branch 'bugfix/btdm_fix_connection_params_update_issues_v3.1' into 'release/v3.1'
component/bt:fix connection params update issues (backport v3.1)

See merge request idf/esp-idf!4298
2019-02-21 11:47:58 +08:00
zhiweijian
191cad0398 Component/bt: fix get attr value API error 2019-02-20 17:57:14 +08:00
zhiweijian
454268da00 Component/bt: fix ble cannot send or receive packet sometimes 2019-02-20 17:56:55 +08:00
zhiweijian
5e048a9ebb Component/bt: add scan window and interval check when set scan params 2019-02-20 17:56:36 +08:00
Jiang Jiang Jian
ce83031571 Merge branch 'bugfix/mdns_crash_free_strdup_3.1' into 'release/v3.1'
mdns: fixed crash on free undefined ptr if strdup is skipped (Backport 3.1)

See merge request idf/esp-idf!4189
2019-02-20 02:15:51 +08:00
Jiang Jiang Jian
298aafd112 Merge branch 'bugfix/coex_lc_protect_v3.1' into 'release/v3.1'
component/esp32 : fix coexist lc protect cause memory corrupted

See merge request idf/esp-idf!4266
2019-02-20 02:11:29 +08:00
zwj
f8f96c368b component/bt:fix connection params update issues 2019-02-19 20:43:28 +08:00
Jiang Jiang Jian
83bd616b6f Merge branch 'bugfix/btdm_crash_when_inquiry_cancel_v3.1' into 'release/v3.1'
Bugfix/btdm crash when inquiry cancel v3.1

See merge request idf/esp-idf!4278
2019-02-18 20:01:34 +08:00
baohongde
6743820bce components/bt: Add precautions for esp_vhci_host_send_packet (backport 3.1) 2019-02-15 17:56:59 +08:00
baohongde
3e06ad6af9 components/bt: Fix crash when inquiry stop (backport 3.1) 2019-02-15 17:53:55 +08:00
Tian Hao
1c6b0bf925 component/esp32 : fix coexist lc protect cause memory corrupted
The bug will cause memory corrupted (the largest range is from 0x3ffc0000 ~ 0x3ffc8000),
some strange error will happen, like IllegalInstruction, LoadProhibited and .etc.
2019-02-15 16:13:30 +08:00
Jiang Jiang Jian
ef2bf23862 Merge branch 'bugfix/fix_some_wifi_bugs_0131_v3.1' into 'release/v3.1'
esp32: fix some wifi bugs  (backport v3.1)

See merge request idf/esp-idf!4219
2019-02-15 12:15:04 +08:00
Angus Gratton
cf5dbadf4f Merge branch 'bugfix/backtrace_from_interrupts_backport_v3.1' into 'release/v3.1'
Make backtrace work across interrupts (backport v3.1)

See merge request idf/esp-idf!4182
2019-02-13 16:53:39 +08:00
Angus Gratton
72c88db3a8 Merge branch 'fix/nvs_host_test' into 'release/v3.1'
Fix/nvs host test

See merge request idf/esp-idf!4223
2019-02-04 14:28:26 +08:00
Jiang Jiang Jian
cfe10825cf Merge branch 'bugfix/btdm_fix_write_char_crash_after_disconnection_v3.1' into 'release/v3.1'
Component/bt: fix write char crash after disconnection (backport v3.1)

See merge request idf/esp-idf!4211
2019-02-01 21:29:15 +08:00
Liu Zhi Fu
be115ec3ab esp32: fix some WiFi bugs
Fix following WiFi bugs:
1. Fix a crash bug which is caused by WiFi static TX buffer alloc/free.
2. Fix the bug that iphone fails to connect to ESP32 AP by enabling AP BAR receiving.
3. Fix the bug that ESP32 station fails to connect some APs, such as Xiaomi hotspot etc,
   after reset.
2019-01-31 21:42:49 +08:00
Shivani Tipnis
dbfe5b5886 Fix/Nvs host test extra argument passed
(cherry picked from commit 7b2cae15ba37420700d19fad55062dadc32241e5)
2019-01-31 18:47:07 +05:30
zhiweijian
e94b130ede Component/bt: fix write char crash after disconnection 2019-01-31 12:22:10 +00:00
He Yin Ling
5412ccbcb1 Merge branch 'feature/add_ipv6_related_change_v3.1' into 'release/v3.1'
modify test case to support ipv6 (backport v3.1)

See merge request idf/esp-idf!4073
2019-01-31 14:31:26 +08:00
Jiang Jiang Jian
fa9e6713ae Merge branch 'bugfix/tw28445_wps_thread_safe_v3.1' into 'release/v3.1'
esp32: fix WPS thread-safe (backport v3.1)

See merge request idf/esp-idf!4196
2019-01-31 10:44:07 +08:00
Darian Leung
2ccfa6bd44 freertos: Make backtrace work across interrupts (backport v3.1)
This commit adds the ability for backtracing to trace from the itnerrupt to the
task stack, and across nested interrupts. Test cases have also been added.

See merge request !4084
Note: "Test backtrace from abort" reset reason modified by removing abort as a reason.
2019-01-30 22:13:28 +08:00
Liu Zhi Fu
188f86e946 esp32: fix WPS thread-safe
Fix WPS thread-safe bug
2019-01-30 13:48:15 +08:00
Jiang Jiang Jian
6220de03da Merge branch 'bugfix/coex_update_phy_to_fix_interrupt_wdt_v3.1' into 'release/v3.1'
esp32: update libphy.a to fix interrupt watchdog when WiFi and BT run at the same time and both enable modem sleep (backport v3.1)

See merge request idf/esp-idf!4193
2019-01-30 12:02:12 +08:00
David Cermak
31716a4960 mdns: fixed crash on free undefined ptr after skipped strdup
Shortcircuit evaluation may cause skip of _mdns_strdup_check of any further question field, which after clear_rx_packet freed undefined memory.
Fixes https://ezredmine.espressif.cn:8765/issues/28465
2019-01-29 19:27:46 +01:00
XiaXiaotian
10cac76d79 esp32: update libphy.a to fix interrupt watchdog when WiFi and BT run at
the same time and both enable modem sleep
2019-01-29 11:10:05 +08:00
huchaoru
778566042b modify test case to support ipv6 2019-01-26 13:07:06 +00:00
Jiang Jiang Jian
0e2eccfad0 Merge branch 'bugfix/btdm_fix_crash_adv_scan_coex_v3.1' into 'release/v3.1'
fix crash when adv and scan coex and optimize duplicate scan

See merge request idf/esp-idf!4147
2019-01-25 12:04:55 +08:00