Commit graph

2762 commits

Author SHA1 Message Date
Yulong
371c55138e component/bt: Added the new feature of the l2cap layer from the bluedroid new version 7.1.1 2017-09-06 04:25:57 -04:00
michael
73ba29e6df refactor(intr): remove useless tags in the debug log. 2017-09-06 15:20:04 +08:00
michael
c82e51cf79 fix(intr): always assign the same intr to a same source, disable the source only when all the handlers disabled.
also document handlers sharing a same source.

TW#13454, https://github.com/nodemcu/nodemcu-firmware/issues/1874

Breaking change: handles assigned to a same source should have the same flag now.
2017-09-06 15:20:01 +08:00
krzychb
672390c458 Mass replacement of http with https urls, fixed broken urls 2017-09-06 08:16:01 +02:00
Alexey Gerenkov
5dea0fca15 esp_pthread_init constructor attr was removed 2017-09-06 10:30:23 +08:00
Alexey Gerenkov
5094965e98 According to comments 2017-09-06 10:30:23 +08:00
Ivan Grokhotkov
e3b86e7bdb pthread: handle statically initialized mutexes 2017-09-06 10:30:23 +08:00
Alexey Gerenkov
20942421c3 According to review comments 2017-09-06 10:30:23 +08:00
Alexey Gerenkov
8859dab10c Cleanup 2017-09-06 10:30:23 +08:00
Alexey Gerenkov
bf8ff8c98b 1) Thread detach functionality added
2) Recursive mutexes support
3) C++ test updated
2017-09-06 10:30:23 +08:00
Alexey Gerenkov
c631c6b358 1) Mux API was added
2) C++ test for threading and mux functions
2017-09-06 10:30:23 +08:00
Alexey Gerenkov
0b09c7006d pthread: Initial version of thread API 2017-09-06 10:30:23 +08:00
Jeroen Domburg
604308f4ab Merge branch 'bugfix/soft_reboot_psram' into 'master'
Fix rebooting when external RAM is active

See merge request !1207
2017-09-05 15:43:30 +08:00
Angus Gratton
74d5f85c53 Merge branch 'feature/build_warn_undefined_vars' into 'master'
Add --warn-undefined-variables to MAKEFLAGS (github #138)

See merge request !1214
2017-09-05 15:39:48 +08:00
Angus Gratton
9471ce9135 dhcpserver: Move DHCP option names to a separate header
Avoids naming conflicts. Resolves TW13826.
2017-09-05 17:28:40 +10:00
Angus Gratton
48333aea48 bluedroid: Move fixed_queue.h to implementation of hci_layer.c
Avoids pulling types like list_node into the public interface.

Closes https://github.com/espressif/esp-idf/issues/948
2017-09-05 17:14:40 +10:00
Angus Gratton
1be6bf6790 dhcpserver: Move list_node to implementation not public interface
Was unused in the public interface.

Closes https://github.com/espressif/esp-idf/issues/948
2017-09-05 17:14:23 +10:00
Alex Burr
93cc3a77cb uart: Add api call to switch on hardware support for 'software' flow control.
Cherry-picks https://github.com/espressif/esp-idf/pull/890
2017-09-05 16:30:21 +10:00
krzychb
ba42c46cb3 Touch Pad driver overview 2017-09-05 08:28:44 +02:00
Deomid Ryabkov
1ea082a053 Expand vars before splitting fields
This allows making entire partition table line a variable.

Merges https://github.com/espressif/esp-idf/pull/841
2017-09-05 16:23:54 +10:00
Angus Gratton
f17bbff4b5 Merge branch 'feature/tcp_msl_menuconfig' into 'master'
components/lwip: Expose TCP_MSL in menuconfig. (github #783)

See merge request !1175
2017-09-05 14:18:36 +08:00
Angus Gratton
8670844acf build system: Restore ifdef/ifndef in Makefiles, clean up examples build 2017-09-05 16:11:03 +10:00
Deomid Ryabkov
9903ea1c11 Add --warn-undefined-variables to MAKEFLAGS
Fix warnings where undefined vars are used.

Make Kconfig emit "FOO=" for unset bool options
To ensure make variables are always defined, even if empty.

When writing auto.conf, include symbols disabled by dependency to make sure all make variables are always defined.

Fixes espressif/esp-idf#137

Cherry-picked from https://github.com/espressif/esp-idf/pull/138
2017-09-05 16:10:46 +10:00
Angus Gratton
167f2cf9e1 Merge branch 'bugfix/nvs_item_crc_check' into 'master'
nvs: check CRC of items on full pages

See merge request !1200
2017-09-05 12:09:40 +08:00
Angus Gratton
5361c08989 heap: Support adding new heap regions at runtime
To facilitate this, the list of registered heap regions is now a linked list
(allowing entries to be appended at runtime.)
2017-09-05 14:07:02 +10:00
Ivan Grokhotkov
8433fed7f4 Merge branch 'bugfix/core_dump_loop' into 'master'
esp32: Fixes infinite loop caused by exception during core dumping

See merge request !1210
2017-09-05 11:40:31 +08:00
Angus Gratton
74a017e1e4 Merge branch 'bugfix/mbedtls_net_failures' into 'master'
mbedtls: Don't assign ctx->fd until connect() or bind() has succeeded

See merge request !1211
2017-09-05 11:28:43 +08:00
Ivan Grokhotkov
9362d66812 Merge branch 'feature/adc_calibration' into 'master'
Bugfix/ added esp_adc_cal include guards

See merge request !1192
2017-09-05 11:23:05 +08:00
Ivan Grokhotkov
c007213fed Merge branch 'bugfix/deep_sleep_wakeup_stub' into 'master'
deep sleep: don't use protected DPORT access in wake stub

See merge request !1194
2017-09-05 11:22:52 +08:00
Alexey Gerenkov
fb8b0c534a esp32: Fixes infinite loop caused by exception during core dumping 2017-09-05 11:15:27 +08:00
Ivan Grokhotkov
51e8f439b8 Merge branch 'bugfix/cpu_clk_disable_spi' into 'master'
spi_master, sdmmc: fix regressions due to peripherals being disabled by default

See merge request !1193
2017-09-05 10:41:51 +08:00
Angus Gratton
d531b56d93 Merge branch 'bugfix/spinlock_performance' into 'master'
freertos: Reduce CPU spinlock (portmux) overhead

See merge request !497
2017-09-05 09:16:10 +08:00
Angus Gratton
8ce09c2c1c mbedtls: Don't assign ctx->fd until connect() or bind() has succeeded
Avoid leaking closed file descriptors via ctx->fd

Reported: https://esp32.com/viewtopic.php?f=13&t=2910&sid=8568b1fd93a4c8d5760628a638efc48b#p13620
2017-09-05 11:08:35 +10:00
Angus Gratton
11a87ca811 Merge branch 'bugfix/bootloader_ota_sel' into 'master'
Fix bootloader OTA regression

See merge request !1205
2017-09-05 07:25:08 +08:00
Ivan Grokhotkov
e93c33050e ethernet: enable EMAC module clock on initialization 2017-09-04 22:43:52 +08:00
Ivan Grokhotkov
b38186dc43 sdmmc: use periph_ctrl to enable peripheral when initializing the host 2017-09-04 22:43:52 +08:00
Ivan Grokhotkov
956a28a95c driver: add periph_ctrl support for SDMMC, SDIO slave, CAN, EMAC 2017-09-04 22:43:51 +08:00
michael
b834fcf78a fix(spi_master): this fix the SPI MOSI output missing bug. 2017-09-04 22:43:51 +08:00
Jiang Jiang Jian
f254555a41 Merge branch 'feature/btdm_add_set_local_MTU_API_for_gatt' into 'master'
component/bt: add set local MTU API

See merge request !1152
2017-09-04 21:32:23 +08:00
Alexey Gerenkov
cf29dd47a9 apptrace lock acquire function was re-designed to minimize waiting time with disabled IRQs 2017-09-04 20:44:11 +08:00
Jeroen Domburg
0e74ec67be Fix rebooting when PSRAM is active 2017-09-04 19:00:47 +08:00
Ivan Grokhotkov
9da1bf1a45 Merge branch 'bugfix/lwip_send_timeout' into 'master'
match sys tick with lwip_send_timeout

See merge request !1203
2017-09-04 18:19:59 +08:00
Angus Gratton
a19aaf2072 esp32: Update wifi lib to use new spinlock implementation 2017-09-04 19:11:51 +10:00
Angus Gratton
4486d4cb10 portmux: Add vPortCPUAcquireMutexTimeout() function
Refactor app_trace locking to use this function.
2017-09-04 19:11:51 +10:00
Angus Gratton
397c0bfb4b freertos scheduler test: Free timer group interrupt handle when test finishes 2017-09-04 19:11:51 +10:00
Angus Gratton
5c996a1b29 freertos: Inline vPortCPUAcquireMutex/vPortCPUReleaseMutex into implementations
Further improves performance:
No contention -> 134 cycles
Recursion -> 117 cycles
Contention -> 323 cycles
2017-09-04 19:11:51 +10:00
Angus Gratton
db58a2732b freertos: vPortCPUReleaseMutex() no longer returns a value
Unlocking a never-locked mutex is an assertion failure in debug mode.

In release mode, this further improves performance:
No-Contention ->  153 cycles
Recursion No-Contention -> 138 cycles
Contention -> 378 cycles
2017-09-04 19:11:51 +10:00
Angus Gratton
4d42b2d100 freertos spinlock/portmux: Reduce spinlocking overhead
Ref TW7117

Microbenchmarks in unit tests:

(All numbers in cycles per benchmarked operation):

Release mode
No lock contention lock/unlock -       301 -> 167 (-45%)
Recursive no contention lock/unlock -  289 -> 148 (-49%)
Lock contention two CPUs (lock/unlock) 699 -> 400 (-43%)

Debug mode
No lock contention lock/unlock -       355 -> 203 (-43%)
Recursive no contention lock/unlock -  345 -> 188 (-46%)
Lock contention two CPUs (lock/unlock) 761 -> 483 (-36%)
2017-09-04 19:11:51 +10:00
Angus Gratton
f2952de3a5 freertos spinlocks/portmux: Add combination unit tests & microbenchmarks 2017-09-04 19:11:51 +10:00
Angus Gratton
f487bb19d7 Merge branch 'bugfix/ci_build_examples_more' into 'master'
CI build_examples: Fix build flakiness

See merge request !1191
2017-09-04 16:02:12 +08:00
Angus Gratton
c275ad4ca4 build system: Add dependencies to component clean steps
Build directory must exist, component_project_vars.mk must be generated if it is going to be.
2017-09-04 17:40:15 +10:00
Angus Gratton
3dfcc312c8 ota_ops: Fix get_selected_boot_partition() in case there is no factory partition
get_selected_boot_partition() now follows the same basic logic as the bootloader to find the
default boot partition.
2017-09-04 17:37:28 +10:00
Angus Gratton
1cd2ce2471 bootloader: Fix regression preventing OTA updates
Regression introduced in 43e231c.

Thanks to @yanbe for pointing out issue in https://github.com/espressif/esp-idf/pull/955

This is a different fix, tries to keep the behaviour that 43e231c was aiming to correct (unnecessarily testing an
invalid slot more than once.)
2017-09-04 17:37:28 +10:00
zhangyanjiao
547b7b0246 match sys tick with lwip_send_timeout 2017-09-04 14:52:16 +08:00
Ivan Grokhotkov
c0269bc1cd nvs: check CRC of items on full pages
Previously NVS did check CRC values of key-value pairs on the active
page, but the check for full pages was missing. This adds the necessary
check and a test for it.
2017-09-04 14:37:33 +08:00
Jeroen Domburg
c0510c4266 Merge branch 'feature/psram_in_address_space' into 'master'
Feature/psram in address space

See merge request !1069
2017-09-04 14:18:23 +08:00
Jeroen Domburg
153275b743 Merge branch 'bugfix/uart_5mbaud' into 'master'
Fix off-by-one in 5MBaud arg checking; propagate errors better

See merge request !1184
2017-09-04 12:06:33 +08:00
Jeroen Domburg
34372a091c Add initial SPI RAM support. This adds support for an ESP-PSRAM32 chip connected to the default flash pins and GPIO 16 and 17. The RAM is mapped to address 0x3F800000, but otherwise ignored by esp-idf as of yet. 2017-09-04 12:05:49 +08:00
zhiweijian
f1c4eda373 Component/bt: add set local MTU API
- add esp_ble_gatt_set_local_mtu( ) API
- modify esp_ble_gattc_config_mtu(esp_gatt_if_t gattc_if, uint16_t conn_id)
- modify  gattc demo
2017-09-01 21:55:28 +08:00
Jiang Jiang Jian
3a1de7dba3 Merge branch 'bugfix/btdm_fix_connection_parameters_update' into 'master'
component/bt: fix connection parameters update

See merge request !1099
2017-09-01 20:15:30 +08:00
Ivan Grokhotkov
b9ff771e2c deep sleep: don't use protected DPORT access in wake stub 2017-09-01 18:35:42 +08:00
Jeroen Domburg
518edac42f Add GD chip into qio data, so (at least my) ESP-WROVER uses QIO mode succesfully. 2017-09-01 16:53:05 +08:00
Ivan Grokhotkov
5666fc0a56 Merge branch 'feature/esp_timer_improvements' into 'master'
esp_timer improvements

See merge request !1172
2017-09-01 16:14:01 +08:00
Jeroen Domburg
fe140fe347 Fix off-by-one in 5MBaud arg checking; propagate errors better 2017-09-01 12:15:28 +08:00
Darian Leung
4fbeaba77f Bugfix/ added esp_adc_cal include guards 2017-09-01 12:07:37 +08:00
Ivan Grokhotkov
f31efb697c newlib: rename esp_setup_time_syscalls to esp_set_time_from_rtc
This function no longer sets up syscalls, and new name reflects its
purpose better.
2017-09-01 10:36:14 +08:00
Ivan Grokhotkov
d2acf1ce77 sleep: add light sleep, factor out APIs common for deep/light sleep 2017-09-01 10:36:14 +08:00
Ivan Grokhotkov
65b046f17f dport access: introduce pause/resume instead of deinit 2017-09-01 10:36:14 +08:00
Ivan Grokhotkov
f8b719d911 soc/rtc: add sleep flag to control powerdown of VDD_SDIO 2017-09-01 10:36:14 +08:00
Ivan Grokhotkov
06af8cd086 esp_timer: return signed timestamp (int64_t)
Since timestamps are 64-bit, loosing one bit of range due to sign does
not present an issue, however for applications doing calculations on
timestamps, signed return type is more convenient.
2017-09-01 10:34:36 +08:00
Ivan Grokhotkov
c5632d3012 esp32: use ref_clock in esp_timer and delay tests 2017-09-01 10:34:36 +08:00
Ivan Grokhotkov
1af6384349 esp_timer: lock-free implementation of esp_timer_get_time
The implementation of esp_timer_get_time used a critical section, which
resulted in a call time of ~1.8us. To make esp_timer_get_time more
useable as a high-resolution time source, this change replaces the lock
with polling. Call time is reduced to ~0.7us.
2017-09-01 10:34:36 +08:00
Ivan Grokhotkov
c743bdac88 soc/rtc: round APB clock frequency to nearest MHz 2017-09-01 10:34:36 +08:00
Ivan Grokhotkov
d24e0dcc2c Merge branch 'bugfix/ci_build_examples' into 'master'
ci: fix example builds and unit tests

See merge request !1188
2017-09-01 10:33:38 +08:00
Ivan Grokhotkov
d4e950d311 Merge branch 'feature/cxx_exceptions' into 'master'
Partial support for C++ exceptions

See merge request !930
2017-09-01 00:27:41 +08:00
Ivan Grokhotkov
b76a672aed ci: disable sd card tests 2017-08-31 23:50:56 +08:00
Ivan Grokhotkov
c92fba3261 Merge branch 'feature/timeradd' into 'master'
feat(time): enable the macro timeradd, timersub, timerclear, etc.

See merge request !1177
2017-08-31 13:57:19 +08:00
Ivan Grokhotkov
0a5a705ca8 Merge branch 'bugfix/log_tag_change_level' into 'master'
bugfix(log): fix the log tag to update existing rather than add new tag when calling ``esp_log_level_set``

See merge request !1153
2017-08-31 10:45:55 +08:00
Ivan Grokhotkov
1cfe96b1d7 Merge branch 'bugfix/i2s_dac_channel' into 'master'
fix(i2s_dac): fix the disable function which only disables DAC_CHANNEL_1.

See merge request !1169
2017-08-31 10:45:30 +08:00
Ivan Grokhotkov
b4857fc159 Merge branch 'bugfix/memory_issues_pr838' into 'master'
vfat, i2s, mdns: Fix two memory leaks, one double free (github #838)

See merge request !1173
2017-08-31 10:45:19 +08:00
Ivan Grokhotkov
e57a664798 Merge branch 'feature/freertos_interrupt_backtrace_opt' into 'master'
freertos: introduce CONFIG_FREERTOS_INTERRUPT_BACKTRACE

See merge request !1167
2017-08-31 10:45:06 +08:00
Angus Gratton
96f9ae3e30 Merge branch 'bugfix/minor_prs_github' into 'master'
Minor bugfixes and corrections from github

See merge request !1181
2017-08-31 07:11:30 +08:00
Angus Gratton
4f812eb29c Remove redundant code line from uart.c
Merges part of https://github.com/espressif/esp-idf/pull/650
2017-08-30 17:55:00 +10:00
Simon Werner
c8d8fb58e7 Fixed incorrect value in comments for GPIO_NUM_33.
Merges https://github.com/espressif/esp-idf/pull/676
2017-08-30 17:55:00 +10:00
Deomid Ryabkov
3e6c515d5b Using a 128-bit UUID is not an error
Merges https://github.com/espressif/esp-idf/pull/713
2017-08-30 17:55:00 +10:00
Geza Husi
eb8bd937c6 deep_sleep: RTC-GPIO pin calculation incorrect
Merges https://github.com/espressif/esp-idf/pull/822
2017-08-30 17:55:00 +10:00
Lacy Rhoades
c61b3e89f1 Typo fixes
Merges https://github.com/espressif/esp-idf/pull/831
2017-08-30 17:55:00 +10:00
phuzi
762d5fcb4c Update documentation for esp_avrc_api
Updated documentation for esp_err_t esp_avrc_ct_send_passthrough_cmd to show both pressed and released key states

Merges https://github.com/espressif/esp-idf/pull/846
2017-08-30 17:55:00 +10:00
Stephen Casner
1e3dd2a4fa Add missing debug log message for out-of-sockets case
Merges https://github.com/espressif/esp-idf/pull/903
2017-08-30 17:55:00 +10:00
Deomid Ryabkov
8c1acb0363 Provide a default for CONFIG_BT_RESERVE_DRAM
...when BT is not built

Merges https://github.com/espressif/esp-idf/pull/910
2017-08-30 17:55:00 +10:00
devsaurus
92535158e7 components/lwip: Expose TCP_MSL in menuconfig.
Merges https://github.com/espressif/esp-idf/pull/783
2017-08-30 16:44:53 +10:00
michael
8f994b9dce feat(time): enable the macro timeradd, timersub, timerclear, etc.
TW#14488

Closes https://github.com/espressif/esp-idf/issues/867
2017-08-30 14:08:14 +08:00
Henrik Maier
95fe7929c0 Fix spinlock bug for uart_set_rts and uart_set_dtr
Merges https://github.com/espressif/esp-idf/pull/649
2017-08-30 15:32:23 +10:00
Angus Gratton
ef60d73fe4 Merge branch 'bugfix/mdns_tcpip_threadsafe' into 'master'
mdns: Use LwIP IPC for low-level API calls

See merge request !925
2017-08-30 13:28:51 +08:00
Henrik Maier
58ba8a2a24 tcpip_adapter: Fix bug which prevents setting a static IP address for Ethernet interface
Merges https://github.com/espressif/esp-idf/pull/657
2017-08-30 14:50:22 +10:00
Ivan Grokhotkov
a25eb825e1 Merge branch 'bugfix/dport_protect_crypto' into 'master'
add protection for crypto registers in DPORT

See merge request !928
2017-08-30 11:45:35 +08:00
Ivan Grokhotkov
547ef83020 Merge branch 'feature/disable_some_perip_clk_when_cpu_start' into 'master'
Disable some peripheral clocks when cpu starts

See merge request !1089
2017-08-30 11:43:38 +08:00
zhiweijian
1a9b02ccbc component/bt: fix connection parameters update
- update connection parameters timeout due to master update illegal connection parameters
- slave returns error status when slave check the connection parameters
- slave connection parameters update callback get that interval_max is equal to interval_min
2017-08-30 11:29:25 +08:00
Quentin Thérond
b6b36bd9dd mdns: fix leak after _mdns_create_service if we have a malloc error. 2017-08-30 12:11:57 +10:00
Quentin Thérond
88e71a680e vfs: fix double free. 2017-08-30 12:11:57 +10:00
Quentin Thérond
36eccee213 i2s: fix leak in i2s_create_dma_queue if we have a malloc issue. 2017-08-30 12:11:03 +10:00
Jeroen Domburg
a1b5813049 Merge branch 'feature/adc_calibration' into 'master'
esp_adc_cal component

See merge request !1084
2017-08-30 10:00:19 +08:00
Angus Gratton
8bd6feedd4 Merge branch 'bugfix/docs_updates' into 'master'
Removed redundant 'Logging to Host' and docs cleaning

See merge request !1158
2017-08-30 09:43:00 +08:00
Angus Gratton
b4eda4c4f7 Merge branch 'feature/disable_rom_console' into 'master'
esp32: Add KConfig option to disable BASIC ROM Console fallback on first boot

See merge request !1134
2017-08-30 07:56:00 +08:00
krzychb
8c3169b6be Removed redundant 'Logging to Host' and docs cleaning 2017-08-29 20:47:10 +02:00
Darian Leung
88b05f9391 esp_adc_cal: Added ADC calibration component
Added component containg API that is able to correct raw ADC readings
into a voltage in mV. Also provided a helper function that combines
the process of getting the raw ADC1 reading then converting it to a
voltage in mV. In doing so, the adc1_get_voltage() function of the ADC
driver has been deprecated. Instead there is now adc1_get_raw to obtain
the raw ADC1 reading, and adc1_to_voltage() that gets the raw reading
and converts all in one function. Functions using the deprecated
adc1_get_voltage() have also been updated to use adc1_get_raw().

Conversion is based on ADC characteristics. The characteristics are based
on the ADC's v_ref, herefore the appropriate structure and functions have
been provided to obtain the ADC characteristics.

The existing ADC driver has also been modified by adding a function to
route the internal ADC reference voltage to a GPIO allowing users to measure
it manually.

Relevant documentation has also been updated
2017-08-29 18:43:14 +08:00
michael
9ec3757349 fix(i2s_dac): fix the disable function which only disables DAC_CHANNEL_1. 2017-08-29 15:31:39 +08:00
Ivan Grokhotkov
9a764f3108 Merge branch 'bugfix/freertos_xportgetcoreid_iram' into 'master'
freertos: make sure xPortGetCoreID is placed into IRAM

See merge request !1165
2017-08-29 13:32:37 +08:00
Ivan Grokhotkov
71fa25c560 Merge branch 'bugfix/vfs_uart_read_write_lock' into 'master'
vfs_uart: fix write operation blocked by a read

See merge request !1164
2017-08-29 13:32:24 +08:00
Angus Gratton
7a18575af8 flash encryption: Also always disable ROM BASIC console when enabling flash encryption 2017-08-29 14:52:00 +10:00
Angus Gratton
1e22bcdfde esp32: Add KConfig option to disable ROM Console fallback on first boot 2017-08-29 14:52:00 +10:00
Jeroen Domburg
881aa43b69 Merge branch 'bugfix/struct_h_extern_c' into 'master'
fix(struct_h): add extern "C" protection to *_struct.h header files.

See merge request !1162
2017-08-29 11:24:34 +08:00
Jeroen Domburg
edbeee8326 Merge branch 'bugfix/spi_def_typo_lsbfirst' into 'master'
bugfix(spi_master): fix the definition of ``SPI_DEVICE_BIT_LSBFIRST``.

See merge request !1154
2017-08-29 11:24:31 +08:00
XiaXiaotian
4776f73ca4 Disable some peripheral clocks when cpu starts
All peripheral clocks are default enabled after chip is powered on.
    When CPU starts, if reset reason is CPU reset, disable those clocks
    that are not enabled before reset. Otherwise, disable all those
    useless clocks.
    These peripheral clocks must be enabled when the peripherals are
    initialized and disabled when they are deinitialized.
2017-08-29 11:18:42 +08:00
Jeroen Domburg
4da7ee1295 Merge branch 'bugfix/ringbuf_fix_assert_0byte_payload' into 'master'
Fix faulty ringbuffer assert

See merge request !1163
2017-08-29 11:15:34 +08:00
Ivan Grokhotkov
99a4b6b2db freertos: introduce CONFIG_FREERTOS_INTERRUPT_BACKTRACE
The code in xtensa_vectors.S did not handle XT_DEBUG_BACKTRACE
consistently: #if was used in one case, and #ifdef in another. This makes
the checks consistent, and also introduces a Kconfig option to enable
backtrace.
2017-08-29 08:54:26 +08:00
Angus Gratton
3c992f872f Merge branch 'bugfix/secure_boot_enable' into 'master'
Fix regression when enabling secure boot

See merge request !1120
2017-08-29 08:44:13 +08:00
Ivan Grokhotkov
eb1b4f971b freertos: make sure xPortGetCoreID is placed into IRAM
In some cases, xPortGetCoreID was not inlined, and ended up in flash.
Since this function is used in many situations when cache is disabled,
that caused exceptions. Adding IRAM attribute to fix that.
2017-08-29 08:31:36 +08:00
Ivan Grokhotkov
13ef3938a6 vfs_uart: fix write operation blocked by a read
vfs_uart used same locks for read and write operations on a single UART.
If read operation was blocking (i.e. carried out via UART driver), the
lock was held by reading task until it received a line. During this time,
other tasks trying to write to the same UART would get blocked.

This change introduces separate read/write locks, and adds a test.

Another vfs_uart test if fixed (it was disabled since the
CONFIG_NEWLIB_STDOUT_ADDCR option was removed).
2017-08-29 08:27:36 +08:00
Jeroen Domburg
d0bf9e61da Fix an assert that erroneously triggered when popping a zero-byte payload from the end of the ringbuffer 2017-08-28 19:31:26 +08:00
michael
c7173e0d08 fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
Ivan Grokhotkov
3161854efb Merge branch 'bugfix/spi_hd_rx' into 'master'
fix(spi_dma_rx): add check to avoid using SPI half-duplex mode DMA with both MOSI and MISO phases.

See merge request !1111
2017-08-28 17:36:58 +08:00
Ivan Grokhotkov
82763a02af Merge branch 'feature/ets_timer' into 'master'
esp_timer: add high-resolution timer api

See merge request !1090
2017-08-28 16:38:11 +08:00
michael
cfd95b62cb feat(log): add tags only when no one exist, otherwise refresh linked list and cache. 2017-08-28 16:25:40 +08:00
michael
940f5fcb89 refactor(log): replace the tag uncached list with standard SLIST.
NOTE: split the header modify outside.
2017-08-28 16:25:39 +08:00
michael
28c4ba1288 doc(log): document the log macros. 2017-08-28 16:25:39 +08:00
Jeroen Domburg
a589411a3c Place uart_tx_wait_idle in IRAM 2017-08-28 11:35:27 +08:00
Ivan Grokhotkov
d8b66e5088 soc: release interrupts which are not reserved by timers any more 2017-08-28 11:35:27 +08:00
Ivan Grokhotkov
42e9d49bb1 newlib: implement gettimeofday using of esp_timer 2017-08-28 11:35:27 +08:00
Ivan Grokhotkov
857a29872d esp_timer: add high resolution software timer API 2017-08-28 11:35:26 +08:00
Ivan Grokhotkov
a4fe12cb6d Merge branch 'bugfix/sdmmc_test' into 'master'
sdmmc: don't use high speed mode with SD over SPI

See merge request !1149
2017-08-28 11:32:20 +08:00
Jeroen Domburg
ce03879300 Merge branch 'bugfix/uart_wait_idle_iram' into 'master'
Place uart_tx_wait_idle in IRAM

See merge request !1157
2017-08-28 10:55:58 +08:00
Ivan Grokhotkov
b636f81619 Merge branch 'bugfix/spi_command' into 'master'
fix(spi_master): fix the command field to make it more intuitive to use.

See merge request !1119
2017-08-28 10:29:56 +08:00
michael
0cb14f1648 fix(spi_dma_rx): add check to avoid using SPI half-duplex mode DMA with both MOSI and MISO phases. 2017-08-26 02:15:30 +08:00
michael
dd1e6ea296 typo(spi_master): fix the definition of `SPI_DEVICE_BIT_LSBFIRST`.
also fix the documentation of spi_device_transmit.
2017-08-26 02:04:37 +08:00
Jeroen Domburg
3e4627479b Place uart_tx_wait_idle in IRAM 2017-08-25 17:46:28 +08:00
Jiang Jiang Jian
4654278b1b Merge branch 'bugfix/btdm_controller_hci_fc' into 'master'
component/bt: bugfix for hci acl flow control

See merge request !1151
2017-08-25 16:16:47 +08:00
Ivan Grokhotkov
631f552489 sdmmc: don't use high speed mode with SD over SPI
Disabling due to limitation of SPI driver (max 26MHz for full-duplex
mode over GPIO matrix)
2017-08-25 14:33:19 +08:00
Angus Gratton
703d143619 hwcrypto: Fix bug with concurrent SHA access
If two different types of SHA hashes were active in the hardware
concurrently, a race condition meant the SHA unit could be incorrectly
reset leading to all-zero results.
2017-08-25 16:08:03 +10:00
Angus Gratton
0ea4cd67dd mbedtls: Remove "unsafe" warning, enable AES by default & make SHA/MPI optional 2017-08-25 16:08:03 +10:00
Angus Gratton
afb6119504 dport access: Fix WDT bug (permanent locking) in non-pinned tasks
If scheduler switches cores in narrow window during esp_dport_access_stall_other_cpu_start(), could cause the stall
interrupt to occur on the running CPU - halting the CPU until WDT cleans up.

Related to https://github.com/espressif/esp-idf/issues/630
2017-08-25 16:08:03 +10:00
Angus Gratton
50e0a54630 esp32 hwcrypto: Use spinlock instead of lock to protect AES
More than doubles performance of mbedTLS AES self-tests.
2017-08-25 16:08:03 +10:00
Angus Gratton
2624e10055 esp32 hwcrypto: Use AES registers directly 2017-08-25 16:08:03 +10:00
Angus Gratton
e256fb6d96 hwcrypto: Use DPORT-safe accesses with AES 2017-08-25 16:08:03 +10:00
Angus Gratton
99c663a6e9 mbedtls tests: utility tests for APB corruption
Used when running mbedTLS self-tests to verify DPORT protection is working correctly.
2017-08-25 16:08:03 +10:00
Angus Gratton
d0c300c52d hwcrypto: SHA acceleration using safe DPORT reads 2017-08-25 16:08:03 +10:00
Angus Gratton
7be002ec0f hwcrypto bignum/MPI: Batch safe DPORT reads to improve performance 2017-08-25 16:08:02 +10:00
Angus Gratton
cb31222e8b dport access: Add _DPORT_REG_SET_BIT & _DPORT_REG_CLR_BIT 2017-08-25 16:08:02 +10:00
Angus Gratton
dc8c33892e dport access: Fix nested calls to DPORT_STALL_OTHER_CPU_START() 2017-08-25 16:08:02 +10:00
Ivan Grokhotkov
08287852ab esp32: add protection for DPORT registers of RSA 2017-08-25 16:08:02 +10:00