Commit graph

1352 commits

Author SHA1 Message Date
Ivan Grokhotkov df2dc908f0 Merge branch 'bugfix/btdm_flash_operation' into 'master'
component/bt : update bt lib to fix flash operation bug

update bt lib to fix flash write bug when bt interrupt happened.

See merge request !434
2017-01-17 15:12:23 +08:00
Ivan Grokhotkov ce8ec337eb Merge branch 'bugfix/release_build' into 'master'
Release build related fixes

- Fix (non-)inlining issue with `spi_flash_guards_` functions in release mode
- Fix assert-related warnings generated in release mode by changing assert definition

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

See merge request !428
2017-01-17 14:24:14 +08:00
Tian Hao f9ac7657e3 component/bt : update bt lib to fix flash operation bug 2017-01-17 13:51:44 +08:00
Ivan Grokhotkov 7776d3e065 time: only define {get,set}_boot_time if FRC1 or RTC is used as time source
Fixes https://github.com/espressif/esp-idf/issues/238
2017-01-17 12:29:09 +08:00
Ivan Grokhotkov 8c25a0fd9d time: workaround for FRC_TIMER_INT_REG write issue
In some cases (when RTC register reads are performed from the APP CPU), a write to FRC_TIMER_INT_REG may be lost on the bus.
Writing to another DPORT register immediately before or after that works around the issue.
We write one dummy value to an address which doesn’t have any register associated with it.

Fixes https://github.com/espressif/arduino-esp32/issues/120
2017-01-17 12:29:09 +08:00
Ivan Grokhotkov c47cc63489 newlib: change definition of assert for release builds
One common pattern of using assert function looks as follows:
    int ret = do_foo();
    assert(ret == 0);   // which reads as: “do_foo should never fail here, by design”
The problem with such code is that if ‘assert’ is removed by the preprocessor in release build,
variable ret is no longer used, and the compiler issues a warning about this.
Changing assert definition in the way done here make the variable used, from language syntax perspective.
Semantically, the variable is still unused at run time (as sizeof can be evaluated at compile time), so the compiler
can optimize things away if possible.
2017-01-17 00:49:38 +08:00
Ivan Grokhotkov 075446318d spi_flash: define spi_flash_guard_{start,stop} with IRAM_ATTR
These functions are marked as inline and are called from functions which are in IRAM.
In release (-Os) builds, the compiler may decide not to inline these functions.
Placing these functions into IRAM explicitly works around this.
2017-01-17 00:42:55 +08:00
Wu Jian Gang dd8681d8fc Merge branch 'bug/fix_some_wifi_lib_bugs' into 'master'
update wifi lib: fix some wifi lib bugs

1. net80211: fix get ap info error(a4614877)

2. tw9358: sta mac same with softap(ea38d32c)

3. tw9221: scan channel error when connected(183d469c)

See merge request !425
2017-01-16 18:57:02 +08:00
XiaXiaotian 3684e6ddfd update wifi lib: fix some wifi lib bugs
1. net80211: fix get ap info error(a4614877)

2. tw9358: sta mac same with softap(ea38d32c)

3. tw9221: scan channel error when connected(183d469c)
2017-01-16 17:20:05 +08:00
shangke 53b0b03e63 esp_event: event stack overflow 2017-01-16 17:06:12 +08:00
Ivan Grokhotkov 0d00a1ba01 vfs: implement reading from UART 2017-01-16 11:33:32 +08:00
Ivan Grokhotkov 7f751fd0fe Merge branch 'bugfix/i2s_bootloader_random_disable' into 'master'
bootloader_random_disable: Restore all SARADC/I2S registers to defaults

Fix for issue with I2S0 not being usable after bootloader_random_enable()

See merge request !415
2017-01-16 10:40:58 +08:00
Ivan Grokhotkov 6538252552 Merge branch 'bugfix/panic_reset_hangs' into 'master'
Panic handler: Use same reset path as esp_restart(), disabling hardware

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

See merge request !417
2017-01-16 10:40:47 +08:00
Ivan Grokhotkov 72da7aa53b Merge branch 'bugfix/fixes_from_github' into 'master'
fixes for github issues

This MR includes commits from several Github PRs, as well some fixes for issues reported on Github and on the forum.

- compile PHY-related code only when WiFi is enabled
- fix macOS setup instructions
- fix some of the Sphinx warnings
- update docs index, improve structure of the readme-
- wifi: fix typos, rename ESP_ERR_WIFI_NOT_START to ESP_ERR_WIFI_NOT_STARTED
- sdmmc: fix explanation of flash voltage regulator configuration efuses
- sdmmc: change idx num of example
- fix i2c_get_period name
- fix esp_log_level_set function name in docs

See merge request !420
2017-01-16 10:26:58 +08:00
Angus Gratton ea19838d3a Build: Handle WiFi & BT enabled/disabled combos gracefully as possible
If using WIFI_INIT_CONFIG_DEFAULT, error message will point out lack
of WiFi. Otherwise linker errors on WiFi symbols should help give a
clue as to what is broken.

Piggy-backs on changes in !420, ref github #230 #237
2017-01-16 13:03:17 +11:00
Ivan Grokhotkov 27711b7c22 Merge branch 'bugfix/compact_panic' into 'master'
Fix panic register dump format

Fix misplaced a printf somewhere causing an enter to be printed after every register in the panic regdump instead of every 4th register.

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

See merge request !419
2017-01-16 09:28:40 +08:00
Ivan Grokhotkov f20135af54 esp32: compile PHY-related code only when WiFi is enabled
Fixes https://github.com/espressif/esp-idf/issues/230, https://github.com/espressif/esp-idf/issues/237
2017-01-16 02:38:32 +08:00
Neil Kolban 3efbbab2cf wifi: fix typos, rename ESP_ERR_WIFI_NOT_START to ESP_ERR_WIFI_NOT_STARTED 2017-01-16 02:38:31 +08:00
devsaurus d8fb30c930 i2c: fix i2c_get_period name
rename i2s_get_period to i2c_get_period
2017-01-16 02:37:10 +08:00
Lourens Naudé a8b75ed974 log: fix esp_log_level_set function name in docs
Fix documentation and comments to reflect the new esp_log_level_set API (and not deprecated esp_log_set_level)
2017-01-16 02:37:10 +08:00
Jeroen Domburg 08f11e4c53 Fix panic register dump format 2017-01-15 16:49:18 +08:00
me-no-dev dd3f18d2d8 Initial mDNS component and example 2017-01-13 12:12:43 +02:00
Ivan Grokhotkov ca9f62ad77 Merge branch 'feature/esp32_core_dump' into 'master'
esp32 core dump to flash

1.  menuconfig option to select where to store core dump: flash, uart or disable
2. Saving of core dump to flash
3. Partition table definitions files with core dump partition
4. Python scripts to support core dump generation from GDB command line

See merge request !341
2017-01-13 11:51:40 +08:00
Angus Gratton e53d307814 Panic handler: Use same reset path as esp_restart(), disabling hardware
Closes #223 https://github.com/espressif/esp-idf/issues/223
2017-01-13 14:37:36 +11:00
Angus Gratton 7d40f17d1d bootloader_random: Restore all SARADC/I2S registers to reset values
Fix for issue with I2S0 not being usable after bootloader_random_enable()
2017-01-13 12:19:13 +11:00
Alexey Gerenkov ad66fbe5ad esp32: Fixes issues discussed during code review of MR!341
The following issues mentioned during MR!341 review were fixed:
1) Core dump test application description
2) Usage of CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH and CONFIG_ESP32_ENABLE_COREDUMP_TO_UART
3) FLASH_GUARD_START macro usage is fixed in flash API
4) Core dump module logging facility
5) cache util functions doc updated
6) interactive delay before print core dump to uart
7) core dump partion support in build system
2017-01-12 19:38:19 +03:00
XiaXiaotian 6eedbfa9be tw9503: fix ets timer crash bug
1. tw9503: call ets_timer_disarm before calling ets_timer_setfn

2. change CHECK_AP_CONN to CHECK_STA_CONN
2017-01-12 20:43:59 +08:00
Wu Jian Gang 9052c6e9ee Merge branch 'bugfix/btdm_adv_stop' into 'master'
component/bt : fix adv stop bug

fix advertising cannot stop bug.

See merge request !412
2017-01-12 17:32:09 +08:00
Wu Jian Gang ad1790fe3e Merge branch 'feature/btdm_attr_table' into 'master'
component bt:Added the create attribute table method to the new API

GATT Server service table APIs.
Have already modify the style and other things as @jeroen  suggestion in other MR(the MR have been closed)

See merge request !399
2017-01-12 17:31:39 +08:00
Tian Hao 1895460406 component/bt : fix adv stop bug 2017-01-12 16:29:07 +08:00
Tian Hao fec2f534d5 component/bt : gatt server table fix uuid discovery bug 2017-01-12 16:25:09 +08:00
Tian Hao 142756615b component/bt : mv demo name
1. mv demo name
2. fix a docs
2017-01-12 14:44:26 +08:00
Ivan Grokhotkov b24ac487cb newlib: use RTC_STORE registers to keep boot time instead of RTC_SLOW_MEM
This allows RTC_SLOW_MEM to be powered down in deep sleep if no other variables are placed into RTC_SLOW_MEM.
2017-01-12 14:43:34 +08:00
Ivan Grokhotkov 9aa0e29079 deep sleep: keep RTC_SLOW_MEM powered on if data is placed into RTC slow memory 2017-01-12 14:15:30 +08:00
Ivan Grokhotkov e4811216ff deep sleep: fix regression due to moving ets_update_cpu_frequency into IRAM
Deep sleep stub may call ets_update_cpu_frequency, which has been moved from ROM to IRAM.
Restore the ROM version in the linker script, call it ets_update_cpu_frequency_rom, use it in the deep sleep stub.
2017-01-12 14:15:25 +08:00
Jiang Jiang Jian d3a0580bef Merge branch 'bugfix/btdm_dualcore_tmp_solution' into 'master'
component/bt : modify bluedroid task to core0

use tmp solution to resolve the dual core bug.

Run bluedroid all task on core0.

See merge request !408
2017-01-12 11:50:18 +08:00
Jiang Jiang Jian 2126f6c8b7 Merge branch 'feature/wpa2_example' into 'master'
wpa2 enterprise: add example for wpa2 enterprise



See merge request !410
2017-01-12 11:49:52 +08:00
Island 9f151d745e component/bt : Optimize Gatt attr table and fix some bugs
1. Optimize GATT attribute table structure
2. fix read/write bugs
3. add docs
2017-01-12 11:49:15 +08:00
Ivan Grokhotkov aece3d6fc6 Merge branch 'bugfix/mbedtls_tests' into 'master'
fix mbedtls unit tests, fix IDF_VER when building a project outside ESP-IDF tree

- mbedTLS test needs about 5% more time to run (in debug mode) when building with 5.2.0, compared to 4.8.5. Increase the timeout to let the test pass.
- when doing `git describe` in IDF_VER definition, `-C $(IDF_PATH)` is needed to get the version of ESP-IDF, and not the project being built (which may not even be in git)

See merge request !411
2017-01-12 09:47:15 +08:00
Alexey Gerenkov 50b3ce616f esp32: Adds documentation and comments to core dump feature files 2017-01-11 20:51:28 +03:00
Alexey Gerenkov 39ddc7b836 esp32: Fixes several issues in core dump feature
1) PS is fixed up to allow GDB backtrace to work properly
2) MR!341 discussion: in core dump module: esp_panicPutXXX was replaced by ets_printf.
3) MR!341 discussion: core dump flash magic number was changed.
4) MR!341 discussion: SPI flash access API was redesigned to allow flexible critical section management.
5) test app for core dump feature was added
6) fixed base64 file reading issues on Windows platform
7) now raw bin core file is deleted upon core loader failure by epscoredump.py
2017-01-11 20:51:28 +03:00
Alexey Gerenkov 23f836659d esp32: Add core dump printing to UART feature 2017-01-11 20:51:28 +03:00
Alexey Gerenkov 4a3e160888 esp32: Add core dump saving to flash feature
Complimentary changes:
1) Partition table definitions files with core dump partition
2) Special sub-type for core dump partition
3) Special version of spi_flash_xxx
4) espcoredump.py is script to get core dump from flash and print useful info
5) FreeRTOS API was extended to get tasks snapshots
2017-01-11 20:51:28 +03:00
XiaXiaotian ff4a5a1406 wpa2 enterprise: add example for wpa2 enterprise 2017-01-11 21:56:17 +08:00
Ivan Grokhotkov d6842e537c mbedtls: give SHA test slightly more time to run 2017-01-11 21:30:23 +08:00
Ivan Grokhotkov 5fbea86a9e Merge branch 'feature/config_wifi_bt' into 'master'
Clean up WiFi & Bluetooth config options

* Splits "WiFi" configuration out from ESP32 configuration submenu to its own menu.
* Renames "BT" to "Bluetooth", enabling Bluetooth is now in this option not the ESP32 submenu.

* Also disables compiling/linking of BT stack if Bluetooth is disabled, saves some build time.

See merge request !397
2017-01-11 18:38:30 +08:00
Ivan Grokhotkov 8eb9f947e8 Merge branch 'feature/toolchain_update' into 'master'
update toolchain version, rebuild newlib

- This MR updates the toolchain version used in the ESP-IDF
- Compiler version check and warning is added to project.mk
- Newlib is rebuilt to include wcsftime function
- libstdc++ build uses correct newlib headers (so we won't get undefined reference to `__impure_ptr` anymore)

See merge request !387
2017-01-11 18:37:45 +08:00
Wu Jian Gang 61da8595ca Merge branch 'bugfix/fix_remove_wifi_auto_reconnect' into 'master'
esp32: fixs about auto-reconnect and ap ssid configuration

1. Remove auto-reconnect
2. Use strnlen instead strlen to calculate ssid len in wifi lib

See merge request !407
2017-01-11 18:10:44 +08:00
XiaXiaotian 2d8a8bc141 esp32: fixs about auto-reconnect and ap ssid configuration
1. Remove auto-reconnect
2. Use strnlen instead strlen to calculate ssid len in wifi lib
2017-01-11 17:21:10 +08:00
Tian Hao 1eed54c7cd component/bt : modify bluedroid task to core0 2017-01-11 17:19:25 +08:00