Commit graph

5507 commits

Author SHA1 Message Date
Darian Leung 66a0b64e54 freertos: Make xPortGetCoreID() volatile
When xPortGetCoreID() is called twice within a function,
it might only be called once after compilation. This
commit makes the inline assembly of the function volatile.

Closes #3093
2019-03-01 02:05:33 +00:00
Ivan Grokhotkov 9d48cdb6f3 Merge branch 'bugfix/multiple_backports_v3.2' into 'release/v3.2'
multiple backports (v3.2)

See merge request idf/esp-idf!4367
2019-02-28 21:42:19 +08:00
Jiang Jiang Jian 258e9c98be Merge branch 'bugfix/cmake_psram_fix_flag_v3.2' into 'release/v3.2'
cmake: Fix psram workaround compiler flag application (backport v3.2)

See merge request idf/esp-idf!4364
2019-02-28 21:06:11 +08:00
Ivan Grokhotkov c0d32f6e48 nvs: add a blob fragmentation test case
Ref. TW12937
2019-02-28 20:38:31 +08:00
Ivan Grokhotkov 203f75223e 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 20:38:31 +08:00
Ivan Grokhotkov 742f8e7f8a 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 20:38:31 +08:00
Ivan Grokhotkov 7e16a79cf7 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 20:38:31 +08:00
Ivan Grokhotkov 22dc4898d9 soc: define named constants for DPORT_CPUPERIOD_SEL values 2019-02-28 20:38:31 +08:00
Ivan Grokhotkov f78c96a3d7 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 20:38:31 +08:00
Ivan Grokhotkov b4727a8765 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 20:38:31 +08:00
Angus Gratton 56694fb4b6 cmake: Fix psram workaround compiler flag application
Previously, this compiler flag was not being applied
regardless of CONFIG_SPIRAM_CACHE_WORKAROUND setting.

Explanation: add_compile_options() only applies to
source files added after the function is run, or in
subdirectories added after the function is run. In
this case, no new source files were being added after
this function was run.
2019-02-27 16:38:29 +11:00
Supreet Deshpande 58e49d169c esp_http_server/lru_counter_for_timestamp:Added LRU counter for timer
Replaced the os timer in http server by LRU counter. The timestamp is
unnecessary for LRU.
2019-02-25 09:16:28 +00:00
Darian Leung aaaa491c42 freertos: Fix unused variable warning
This commit fixes an unused variable warning when
configASSERT is undefined.
2019-02-22 01:06:44 +08:00
David Cermak 113e829552 mdns: fix memory leak in pbuf if tcpipadapter failed to get netif 2019-02-21 06:43:23 +00:00
David Cermak bb2eb9adeb mdns: fix malfuctional query_txt
when running a query for a single txt, result entries were not created and attached to result structure. this issue was introduced when fixing memory leak in txt structure, which worked correctly for PTR queries, but caused trouble for TXT query.
2019-02-21 06:43:23 +00:00
David Cermak 78116afa01 mdns: fix possible crash when mdns_free called while action queue not empty 2019-02-21 06:43:23 +00:00
David Cermak b865e72aec mdns: fix memory leak when query for service receives multiple ptr entries for one instance
fixes redmine issue 27300
2019-02-21 06:43:23 +00:00
Angus Gratton f1b2457b6c Merge branch 'bugfix/psram_move_qsort_setlocale_flash_v3.2' into 'release/v3.2'
psram: Move newlib qsort() and setlocale() functions from IRAM to flash (backport v3.2)

See merge request idf/esp-idf!4322
2019-02-21 14:42:17 +08:00
Jiang Jiang Jian 46fa5654a7 Merge branch 'bugfix/btdm_fix_connection_params_update_issues_v3.2' into 'release/v3.2'
component/bt:fix connection params update issues (backport v3.2)

See merge request idf/esp-idf!4297
2019-02-21 11:49:16 +08:00
Angus Gratton bf28a1a27b psram: Move newlib qsort() and setlocale() functions from IRAM to flash 2019-02-21 10:32:00 +11:00
Angus Gratton b7beefba9e Merge branch 'bugfix/cmake_stack_protector_v3.2' into 'release/v3.2'
esp32: disable stack protector for startup code (CMake) (backport v3.2)

See merge request idf/esp-idf!4250
2019-02-20 15:40:14 +08:00
Angus Gratton a7f826750b Merge branch 'revert-00d10688' into 'release/v3.2'
Revert "Merge branch 'bugfix/external_rtc_start_fail_3.2' into 'release/v3.2'"

See merge request idf/esp-idf!4293
2019-02-20 15:09:59 +08:00
Angus Gratton 38086ae737 Merge branch 'bugfix/spiram_linker_wildcards_v3.2' into 'release/v3.2'
esp32 psram: Provide library name for ROM libc objects linked as PSRAM workarounds (backport v3.2)

See merge request idf/esp-idf!4153
2019-02-20 14:17:52 +08:00
Jiang Jiang Jian 6173660ff0 Merge branch 'bugfix/coex_lc_protect_v3.2' into 'release/v3.2'
component/esp32 : fix coexist lc protect cause memory corrupted

See merge request idf/esp-idf!4267
2019-02-20 11:14:22 +08:00
Angus Gratton 79b450cfb4 esp32 psram: Provide library name for ROM libc objects linked as PSRAM workarounds
Fixes bug reported on forums where any source file ending in *lock.c or *creat.c
was being linked to IRAM.

https://esp32.com/viewtopic.php?f=13&t=8909&p=37362#p37362
2019-02-20 00:30:25 +00:00
Jiang Jiang Jian c7fbc6dd85 Merge branch 'bugfix/wdt_compability_app_with_old_bootloader_v3.2' into 'release/v3.2'
esp32: Fix wdt settings in esp_restart_noos (backport v3.2)

See merge request idf/esp-idf!4294
2019-02-20 02:17:09 +08:00
Jiang Jiang Jian 3b5bba1812 Merge branch 'bugfix/fix_psram_eid_v3.2' into 'release/v3.2'
bugfix(psram): fix psram size acquisition method, support esp32-pico chips (backport v3.2)

See merge request idf/esp-idf!4254
2019-02-20 02:13:47 +08:00
zwj b4feb67b5f component/bt:fix connection params update issues 2019-02-19 20:26:36 +08:00
Jiang Jiang Jian 578d7902af Merge branch 'bugfix/btdm_crash_when_inquiry_cancel_v3.2' into 'release/v3.2'
Bugfix/btdm crash when inquiry cancel v3.2

See merge request idf/esp-idf!4277
2019-02-19 17:57:00 +08:00
Ivan Grokhotkov 509884c5ac Revert "Merge branch 'bugfix/external_rtc_start_fail_3.2' into 'release/v3.2'"
This reverts merge request !4272
2019-02-19 12:47:44 +08:00
Konstantin Kondrashov 8a656f006e esp32: Fix wdt settings in esp_restart_noos
Fixed compatibility the new apps with the old bootloaders.

Closes: https://github.com/espressif/esp-idf/issues/2927
2019-02-19 12:43:35 +08:00
Tian Hao 6d6f71bbae 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-19 03:30:02 +00:00
Anurag Kar 6a328992d7 protocomm : typos fixed and descriptions corrected 2019-02-18 08:18:44 +00:00
Anurag Kar b51f109dd7 protocomm unit_tests : test cases updated
Changes:
* Version endpoint test added
* Memory leak test updated to include corner case exceptions in protocomm
2019-02-18 08:18:44 +00:00
Anurag Kar 85e8dea26a protocomm security : memory leaks fixed
List of changes:
* Corner case exceptions are properly handled to ensure release of memory occupied by security infrastructure
* fixed erroneous cleanup of security instance by protocomm_console
2019-02-18 08:18:44 +00:00
Anurag Kar 093c7b176d protocomm : version endpoint behavior simplified
List of changes:
* Version endpoint now sends the set version string instead of verifying the incoming version string. This simplifies fetching version info from the provisioning application.
* esp_prov script updated to expect version string as response.
2019-02-18 08:18:44 +00:00
Anurag Kar 30e39631db wifi_provisioning : context pointer added to wifi_config_t structure and related examples/docs updated
Closes https://github.com/espressif/esp-idf/issues/2874
2019-02-18 08:18:44 +00:00
Anurag Kar a7ff611b10 provisioning framework : 'extern C' directives added for C++ support 2019-02-18 08:18:44 +00:00
Piyush Shah 3e6b402756 protocomm_httpd: Allow applications to pass HTTPD handle
This will be useful if a webserver is already running and the application
does not want protocomm to start a new instance.

Signed-off-by: Piyush Shah <piyush@espressif.com>
2019-02-18 08:18:44 +00:00
baohongde 5568ca2855 components/bt: Add precautions for esp_vhci_host_send_packet (backport 3.2) 2019-02-18 08:15:17 +00:00
baohongde 30f2371917 components/bt: Fix crash when inquiry stop (backport v3.2) 2019-02-18 08:15:17 +00:00
Ivan Grokhotkov 00d1068869 Merge branch 'bugfix/external_rtc_start_fail_3.2' into 'release/v3.2'
Bugfix/external rtc start fail (backport 3.2)

See merge request idf/esp-idf!4272
2019-02-15 17:51:49 +08:00
Jiang Jiang Jian 6f0c70daf6 Merge branch 'bugfix/bugfix/mdns_notask_timer_crash_v3.2' into 'release/v3.2'
mdns: fix crash after init if no memory for task (Backport 3.2)

See merge request idf/esp-idf!4237
2019-02-15 13:49:29 +08:00
Jiang Jiang Jian 219c85cf60 Merge branch 'bugfix/btdm_allow_a2dp_codec_dynamic_allocated_for_v3.2' into 'release/v3.2'
bugfix/btdm_allow_a2dp_codec_dynamic_allocated_for_v3.2(backport v3.2)

See merge request idf/esp-idf!4260
2019-02-15 13:42:39 +08:00
Jiang Jiang Jian 524696d59a Merge branch 'bugfix/fix_some_wifi_bugs_0131_v3.2' into 'release/v3.2'
esp32: fix some WiFi bugs (backport v3.2)

See merge request idf/esp-idf!4217
2019-02-15 12:14:54 +08:00
maojianxin 9a229f4077 soc/rtc: fix RTC_TOUCH_TRIG_EN or RTC_ULP_TRIG_EN should keep RTC_PERIPH power on 2019-02-15 10:58:14 +08:00
Zhang Jun Yi 016c8d8b05 soc/rtc: Bypass touchpad current to external 32k crystal oscillator 2019-02-15 10:55:08 +08:00
Shivani Tipnis 76e4ea7f68 nvs_util: Fix to support write of multiple singlepage big blob data
Closes https://github.com/espressif/esp-idf/issues/3011

(cherry picked from commit ce4944edf01b2a4c997eafe36b66d71f98f2fe29)
2019-02-14 18:05:59 +05:30
Shivani Tipnis 3ec0f415a5 nvs_util: Fix to support write of multiple singlepage big blob data Closes https://github.com/espressif/esp-idf/issues/3011
(cherry picked from commit 21688e3bffee80ddfbef5364a44dd1821e28c776)
2019-02-14 15:57:23 +05:30
Shivani Tipnis f742808333 nvs_util: update test case
(cherry picked from commit 0c72b08872)
2019-02-13 17:12:57 +05:30