Commit graph

1570 commits

Author SHA1 Message Date
Ivan Grokhotkov 153472d70d Merge branch 'bugfix/soc_io_mux_h' into 'master'
esp32: update io_mux_reg.h to latest version

fixes https://github.com/espressif/esp-idf/issues/349

See merge request !546
2017-03-06 22:36:19 +08:00
Ivan Grokhotkov c06cc31d85 Merge branch 'bugfix/partition_and_mmap_issues' into 'master'
Fix partition- and mmap-related issues

- Fix unit tests failing to start up due to a mismatch between sdkconfig flash size and size required by partition table.
- Fix a bug that partition APIs loaded the partition table in reverse order. As such, `esp_partition_next` and `esp_partition_find_first` did not work as expected. Add a test.
- Update the workaround for stale cache reads issue: do Cache_Flush for non-encrypted flash as well. Add a test.

See merge request !555
2017-03-06 15:59:28 +08:00
Ivan Grokhotkov d790300215 spi_flash: fix stale data being read from mmaped region
The issue that cache entries are not invalidated correctly sometimes
can also be reproduced for non-encrypted flash as well.
This change updates the workaround to do Cache_Flush, enabling it for
non-encrypted flash, and adds a unit test.
2017-03-04 17:48:44 +08:00
Ivan Grokhotkov 4bf96e99b3 partition_table: update unit test
- change order of assert arguments to (expected, actual)
- set expected partition count to 3 to match the new partition table
- use the new get_test_partition facility
- check that partitions are listed in correct order
- remove leftover debugging printfs
2017-03-04 17:45:04 +08:00
Ivan Grokhotkov fa09c8af61 spi_flash: fix partitions order
Pointer to the tail of linked list was never set, so partitions were
added to the head, instead of adding them to the tail.
2017-03-04 15:34:03 +08:00
Liu Zhi Fu 99102af79e esp32: update wifi lib to fix mpdu len error
Fix mpdu len error which impact espressif smartconfig
2017-03-03 18:06:05 +08:00
Angus Gratton e7aea584f5 Merge branch 'bugfix/free_iram' into 'master'
uart driver: Remove ISR from IRAM



See merge request !486
2017-03-03 14:08:10 +08:00
Angus Gratton 3db4402f3c uart driver: Remove UART ISR handler from IRAM
Doesn't change example behaviour, as ISR wasn't being registered as
ESP_INTR_FLAG_IRAM.
2017-03-03 16:17:55 +11:00
Angus Gratton 975be7a2c9 Merge branch 'bugfix/github_small_fixes' into 'master'
Merge small bugfix PRs from github

* https://github.com/espressif/esp-idf/pull/389
* https://github.com/espressif/esp-idf/pull/382
* https://github.com/espressif/esp-idf/pull/367
* https://github.com/espressif/esp-idf/pull/366
* https://github.com/espressif/esp-idf/pull/361
* https://github.com/espressif/esp-idf/pull/355
* https://github.com/espressif/esp-idf/pull/350
* https://github.com/espressif/esp-idf/pull/348
* https://github.com/espressif/esp-idf/pull/339
* https://github.com/espressif/esp-idf/pull/46
* https://github.com/espressif/esp-idf/pull/307



See merge request !541
2017-03-03 12:58:22 +08:00
Angus Gratton d6f183fbb9 esp_err: Use separate code path for ESP_ERROR_CHECK assertion
* Minimum code size overhead
* Makes function safe to use when flash cache is disabled

Builds on #339 https://github.com/espressif/esp-idf/pull/339
2017-03-03 15:33:23 +11:00
Angus Gratton 3442d4d463 spi_flash: Add spi_flash_cache_enabled() test function 2017-03-03 15:33:23 +11:00
Angus Gratton 6ee5a1e492 sdmmc: Use slot width as default slot_config width parameter, instead of 4
Ref #361 https://github.com/espressif/esp-idf/pull/361
2017-03-03 14:59:15 +11:00
Derek Gregory a4a790030d component/bt: fix bug where uuid was not reset in btc_gatts_act_create_attr_tab.
Merges #307 https://github.com/espressif/esp-idf/pull/307
2017-03-03 14:59:15 +11:00
lucashutchinson 8ce94d5bd3 ble: Fix ble_adv data truncation
Fixed issue with ble_adv data being truncated after the 31st octet due to an incorrect length passed in a memcpy.

Merges #389 https://github.com/espressif/esp-idf/pull/389
2017-03-03 14:59:15 +11:00
Angus Gratton e08cf27b8a esp_err: add NDEBUG guard, comment about flash cache
Follow-up to 316b040
2017-03-03 14:59:15 +11:00
Neil Kolban e14d65d704 Update to ESP_ERROR_CHECK
See request from ESP_Angus here:
https://esp32.com/viewtopic.php?f=18&t=1179

Merges #339 https://github.com/espressif/esp-idf/pull/339
2017-03-03 14:59:15 +11:00
Anne Jan Brouwer ec31b39989 Added missing platform.h to mbedtls ssl.h
There was a missing definition of mbedtls_time_t

See for example:
https://travis-ci.org/SHA2017-badge/Firmware/jobs/202459377

Merges #348 https://github.com/espressif/esp-idf/pull/348
2017-03-03 14:59:15 +11:00
Angus Gratton da723ca11d lwip: Use strlcpy() instead of memcpy() to copy hostname to static buffer 2017-03-03 14:59:15 +11:00
alarruskain 3119f936ab lwip: Fix hostname set in tcpip_adapter_lwip
Hostname for each interface is not correctly stored in "hostinfo" variable.

Merges #350 https://github.com/espressif/esp-idf/pull/350
2017-03-03 14:59:15 +11:00
Daniel Campora c08a2871e6 sdmmc: Add width field to the slot config.
Therefore if the width is set to 1, you can choose to only
configure the CLK, DAT0 and CMD pins.

Merges #361 https://github.com/espressif/esp-idf/pull/361
2017-03-03 14:59:15 +11:00
Ivan Grokhotkov 7754647e71 Merge branch 'bugfix/separate_ethernet_and_wifi' into 'master'
Allow separate ethernet & wifi configuration

If only 1/2 of ethernet & WiFi are enabled in config, the other interface is no longer linked into the firmware.

* Fixes bug where enabling Ethernet but not WiFi would fail to compile.
* Also means that enabling WiFi but not Ethernet no longer links some unused ethernet interface functions.


See merge request !525
2017-03-03 11:53:32 +08:00
Ivan Grokhotkov ccbc6183c3 Merge branch 'bugfix/freertos_event_groups' into 'master'
FreeRTOS: Fix cross-core event group sync

As above

Also includes fixes which allowed removing some semi-hacky bits from the event group unit tests - specifically, higher priority tasks will always be started immediately even if they run on the opposite core.

See merge request !535
2017-03-03 11:45:59 +08:00
Ivan Grokhotkov ea12a1de85 Merge branch 'bugfix/rsa4096' into 'master'
mbedtls: Use two MPI multiplications when multiply operands too large

Allows RSA4096 via hardware crypto operations.

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

See merge request !477
2017-03-03 11:41:11 +08:00
Ivan Grokhotkov 4ecd26ce77 Merge branch 'feature/fatfs_dynamic_pdrv' into 'master'
FATFS enable support for multiple drives

Current implementation has drive numbers and paths hardcoded to support
only one FATFS drive. Arduino has it's own SPI driver to allow
compatibility and flexibility. With the MR it is possible to have up to
```_VOLUMES``` drives connected (SPI, SDMMC and others) at the same
time and accessed through VFS

See merge request !478
2017-03-03 11:40:37 +08:00
Ivan Grokhotkov f280d8db13 Merge branch 'bugfix/openssl_debuging_error' into 'master'
components/openssl : Fix compilation error when openssl debugging is enabled



See merge request !512
2017-03-03 11:29:37 +08:00
Ivan Grokhotkov 7a186ba1b0 Merge branch 'feature/freertos_kconfig' into 'master'
freertos kconfig: Add max task length name, move task stack overflow watchpoint

* Allow setting task name length via kconfig
* Move task stack overflow watchpoint out of internals debugging submenu, place next to other stack overflow checks.
* Thread local pointer feature should depend on Ethernet or WiFi

See merge request !531
2017-03-03 11:29:05 +08:00
Ivan Grokhotkov 8911e666a0 Merge branch 'feature/docs_partition_ota_flash' into 'master'
Partition/SPI/OTA docs & OTA new functionality

* Update partition, SPI flash & OTA docs to reflect functionality changes
* Refactor OTA implementation to perform checks mentioned in API doc
* Add new functions to OTA API: esp_ota_get_running_partition() & esp_ota_get_next_update_partition() functions
* Add spi_flash_cache2phys() & spi_flash_phys2cache() functions to support esp_ota_get_running_partition()


See merge request !513
2017-03-03 11:27:01 +08:00
Ivan Grokhotkov 848494b20f Merge branch 'feature/enable_qio_directly' into 'master'
Enable SPI flash Quad I/O in bootloader

Bootloader checks flash ID, enables Quad I/O mode based on flash type.

See merge request !479
2017-03-03 11:25:52 +08:00
Ivan Grokhotkov 65b7b22c09 esp32: update io_mux_reg.h to latest version
fixes https://github.com/espressif/esp-idf/issues/349
2017-03-02 19:35:28 +08:00
Liu Zhi Fu abdd8feebb esp32: menuconfig adds some WiFi options
1. Add options to enable/disable AMPDU
2. Add options to enable/disable WIFI NVS
3. Add options to configure WiFi RX/TX buffer number
2017-03-02 18:13:49 +08:00
Jiang Jiang Jian 3b8c9a407f Merge branch 'feature/add_user_set_mac' into 'master'
Feature/add user set mac

1. Add menuconfig for user to set mac address of wifi, bt and ethernet.
2. Add the number of MAC address generated from efuse for user to choose.
3. Add MAC address derive method.

See merge request !542
2017-03-02 17:34:14 +08:00
Jiang Jiang Jian 6451c57e52 Merge branch 'bugfix/tw10169_dhcp_release_cause_tcp_abort' into 'master'
Bugfix/tw10169 dhcp release cause tcp abort

Modify the DHCP timer granularity from 1 minutes to 1 second.

See merge request !539
2017-03-02 17:28:11 +08:00
Jeroen Domburg 432b25f755 Merge branch 'feature/in_isr_context' into 'master'
Add xPortInIsrContext function + unit test

As title states.

See merge request !533
2017-03-02 17:17:23 +08:00
Jeroen Domburg 6739d5b99f Add xPortInIsrContext function + unit test. This function returns true when the current CPU runs in an interrupt handler context. 2017-03-02 17:00:32 +08:00
XiaXiaotian d3eede2110 mac address: add the number of MAC address generated from efuse for user to choose
1. Add the number of MAC address generated from efuse for user to choose.

2. Add MAC address derive method.
2017-03-02 15:54:35 +08:00
Ivan Grokhotkov ecbe5a66f2 Merge branch 'bugfix/rng_disabled_wifi_stop_2' into 'master'
esp32: Fix hardware rng after esp_wifi_stop (second implementation)

Ensures hardware RNG remains enabled at all times.

Reworked  version of !534

See merge request !536
2017-03-02 10:51:30 +08:00
wangmengyang 6d061ec903 component/bt: modify the bluetooth read_efuse_mac interface 2017-03-01 21:04:12 +08:00
XiaXiaotian fabe0493c2 mac address: add user set mac address
add menuconfig for user to set mac address of wifi, bt and ethernet.
2017-03-01 20:51:49 +08:00
Liu Zhi Fu 66199b1efe Check DHCP rebind timer before checking dhcp release timer in cause they have the same value.
lwip: modify dhcp timer granularity from 60s to 1s

Current DHCP granularity is 60 seconds, it's not accurate, it can cause DHCP release/rebind/renew timer
timeout at the same time, also it may renew/rebind/release at wrong time, thus cause problem.
2017-03-01 20:50:58 +08:00
XiaXiaotian 23f933a78d mac address: add user set mac address
add menuconfig for user to set mac address of wifi, bt and ethernet.
2017-03-01 20:42:46 +08:00
Liu Zhi Fu 3b3c3210a6 lwip: fix bool options default value wrong issue
menuconfig options with bool type should use 'y/n' to use the default value,
instead of '1/0'
2017-03-01 13:37:36 +08:00
Angus Gratton 4d67a2ba8b esp32 phy_init: Move DPORT Wifi clock masks to macro values
Amended fix for c642079 !534
2017-03-01 12:11:57 +11:00
Angus Gratton 98f8594151 esp32 dport_reg.h: Fix typo in register bit names 2017-03-01 12:01:07 +11:00
Ivan Grokhotkov c025dfbfa7 Merge branch 'bugfix/mmap_instr' into 'master'
spi_flash: fix mmap not working for SPI_FLASH_MMAP_INST

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

See merge request !528
2017-02-28 17:14:38 +08:00
Ivan Grokhotkov f3687f7177 spi_flash: fix memory leak when spi_flash_mmap arguments are invalid
Check src_addr and size first, then allocate new_entry.
2017-02-28 15:11:54 +08:00
Angus Gratton 2230b2c8bc freertos tests: Enable test_freertos_task_delete 2017-02-28 15:47:15 +11:00
Angus Gratton 8de26e434c freertos: Schedule tasks immediately when they are created on opposite core 2017-02-28 15:47:15 +11:00
Angus Gratton 20212ee823 freertos: Fix cross-core usage of event groups
Fixes & re-enabled broken unit tests
Adds per-event-group spinlock instead of single global lock
2017-02-28 12:06:36 +11:00
Angus Gratton d0f8fb9b93 freertos Kconfig: Thread local storage pointer feature required for WiFi or Ethernet 2017-02-28 10:59:23 +11:00
XiaXiaotian f36c909528 update phy and rtc lib
1. RTC V214: modify APLL function for the chip of ECO version.

2. Add API phy_close_rf() and use it in esp_phy_deinit() instead of pm_close_rf().

3. RTC V213: fix BT will not work when BT-init is called more than once.
2017-02-27 19:54:22 +08:00