Commit graph

3227 commits

Author SHA1 Message Date
He Yin Ling
0c40b2ec9d test: collect performance for esp-timer / spinlock 2017-11-16 17:48:48 +08:00
He Yin Ling
9395a702ef test: check and collect performance via CI 2017-11-16 17:48:30 +08:00
Ivan Grokhotkov
7e8c2a9c00 Merge branch 'bugfix/newlib_strptime' into 'master'
newlib: Add strptime(), qsort_r(), nanf() to libc & libc_nano

See merge request !1547
2017-11-16 17:40:27 +08:00
Jiang Jiang Jian
c03d12b9e5 Merge branch 'bugfix/btdm_delete_gattc_cache_write' into 'master'
component/bt: delete gattc cache write operation

See merge request !1543
2017-11-16 17:39:22 +08:00
Jiang Jiang Jian
af367452b0 Merge branch 'bugfix/rebind_pcb_when_ip_changed' into 'master'
lwip: rebind UDP/TCP pcb to valid ip address when ip is changed

See merge request !1535
2017-11-16 17:28:06 +08:00
Jiang Jiang Jian
88e1a374a0 Merge branch 'bugfix/fix_airkiss_macro_typo' into 'master'
Fix an airkiss macro error

See merge request !1532
2017-11-16 17:25:45 +08:00
island
7bd8133639 component/bt: delete api bta_gattc_cache_write 2017-11-16 16:40:18 +08:00
Angus Gratton
7d20e4e422 newlib: Remove out of date libc_discard.list 2017-11-16 17:43:05 +11:00
Angus Gratton
239ac0e17b newlib: Add strptime(), qsort_r(), nanf() to libc & libc_nano
These functions were discarded but not provided in ROM.

Generated from commit 8ad0aa7d6 in newlib script repo. Didn't rebuild most of libc/libc_nano,
only appended the missing object files to the existing archives (should save some git churn).
2017-11-16 17:35:18 +11:00
Jiang Jiang Jian
2d148cd34b Merge branch 'bugfix/heap_region_add' into 'master'
component/heap : fix heap_region_add check bug

See merge request !1523
2017-11-16 13:45:10 +08:00
island
5789a8a6e9 component/bt: delete gattc cache write operation 2017-11-16 11:18:17 +08:00
Tian Hao
e7a9ddcf72 component/heap : fix heap_region_add check bug 2017-11-16 11:10:13 +08:00
XiaXiaotian
eef595501c Fix an airkiss macro error 2017-11-15 21:44:12 +08:00
Liu Zhi Fu
095d163050 lwip: rebind UDP/TCP pcb to valid ip address when ip is changed
This change fix the issue UDP/TCP pcb failed to rebind to correct ip address when ip is changed
2017-11-15 16:15:24 +08:00
Angus Gratton
b83792f504 Merge branch 'doc/esp_wifi_types' into 'master'
docs: Add esp_wifi_types.h items to wifi API reference

See merge request !1320
2017-11-15 15:03:02 +08:00
Ivan Grokhotkov
da141a2c7e Merge branch 'bugfix/touch_pad_register_mismatch' into 'master'
Bugfix/touch pad register mismatch

See merge request !1469
2017-11-15 14:52:13 +08:00
Ivan Grokhotkov
c6d25dd9cc Merge branch 'features/http2_demo' into 'master'
HTTP2 Client Demo

See merge request !1475
2017-11-15 14:51:51 +08:00
Ivan Grokhotkov
fac2e78bfe Merge branch 'bugfix/emac_rx_process' into 'master'
component/emac: fix process rx err

See merge request !1529
2017-11-15 14:51:33 +08:00
Ivan Grokhotkov
a4f9dfc6a4 Merge branch 'bugfix/queue_registry_test' into 'master'
unit tests: fix queue registry test

See merge request !1528
2017-11-15 14:51:18 +08:00
Angus Gratton
c40dc36814 docs: Remove internal header esp_wifi_crypto_types.h from documentation 2017-11-15 17:40:38 +11:00
Angus Gratton
beba74ff61 docs: Add esp_wifi_types.h descriptions 2017-11-15 17:40:38 +11:00
Mahavir Jain
b37e5d64b8 freertos: port: add check for portMUX address validity
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2017-11-15 11:16:45 +05:30
shangke
d46dcaf9e5 component/emac: fix process rx err 2017-11-15 11:04:32 +08:00
Jiang Jiang Jian
ec9d93f4fc Merge branch 'bugfix/btdm_gattc_command_queue_fix' into 'master'
Bugfix/btdm gattc command queue fix

See merge request !1317
2017-11-15 10:54:02 +08:00
Jiang Jiang Jian
957b97720a Merge branch 'bugfix/update_wifi_lib_for_some_fixes' into 'master'
esp32: update wifi lib to fix some wifi bugs

See merge request !1525
2017-11-15 10:12:39 +08:00
Ivan Grokhotkov
8b56345e44 unit tests: fix queue registry test
In the queue registry test, start_sem is given twice to let both tasks
start the test. Each task takes start_sem, does some work, gives done_sem,
and goes on to wait for start_sem again.
It may happen that one task can grab start_sem, add queues to the
registry, give done_sem, then grab start_sem again, delete the queues
from the registry, and give done_sem again. At this point, main test
task takes done_sem twice and proceeds to verify that queues have been
added to the registry. But in fact, the first task has already deleted
its queues from the registry, and the second one might not have added
the queues yet. This causes test to fail.

This changes the test to use separate start semaphores for each task,
to avoid the race condition.
2017-11-14 23:53:08 +08:00
Jiang Jiang Jian
41272c5b94 Merge branch 'bugfix/btdm_modify_logs' into 'master'
component/bt: modify some log

See merge request !1485
2017-11-14 21:13:00 +08:00
Jiang Jiang Jian
a2194ec665 Merge branch 'bugfix/btdm_remove_redundant_open_evt_for_same_app' into 'master'
component/bt: remove redundant open evt while calling gattc_open twice in the same app_id

See merge request !1526
2017-11-14 21:12:05 +08:00
Jiang Jiang Jian
ef2c370a30 Merge branch 'bugfix/btdm_no_ind_ack_for_server_only' into 'master'
component/bt: fix not send indication confirm in case of server only

See merge request !1522
2017-11-14 21:09:26 +08:00
Liu Zhi Fu
3554d190ff esp32: update wifi lib to fix some wifi bugs
1. Fix resend eapol cause crash issue
2. Don't asser the system when the channel is in 14
2017-11-14 20:45:33 +08:00
Jiang Jiang Jian
9e90baf5a0 Merge branch 'bugfix/tw15564_fix_socket_close_crash' into 'master'
Bugfix/tw15564 fix socket close crash

See merge request !1496
2017-11-14 20:40:39 +08:00
Yulong
b07a5f03cf component/bt: Change the gattc prepare write callback params. 2017-11-14 07:00:45 -05:00
Wangjialin
7200b2cc11 bugfix(touch): registers of touchpad 8 and 9 are mismatched
1. All the registers of touch sensor 8 and 9 are mismatched except the ‘dac’ field in touch register of RTC IO
2. To swap the index for sensor 8 and 9 in APIs.
2017-11-14 18:47:56 +08:00
island
2a4af8b83c component/bt: remove redundant open evt while calling gattc_open twice in the same app_id 2017-11-14 17:11:34 +08:00
Darian Leung
d1853dbbc0 FreeRTOS/make Queue Registry and Run Time Stats configurable
This commit makes the configQUEUE_REGISTRY_SIZE and
configGENERATE_RUN_TIME_STATS configurable in menuconfig.

- configQUEUE_REGISTRY_SIZE can now be set in menuconfig.
- The functions vQueueAddToRegistry() and vQueueUnregisterQueue() were made
  SMP compatbile
- pcQueueGetName() was backported from FreeRTOS v9.0.0
- Added test case for Queue Registry functions

- configGENERATE_RUN_TIME_STATS can now be enabled in menuconfig. CCOUNT or
  esp_timer can be selected as the FreeRTOS run time clock in menuconfig as
  well, although CCOUNT will overflow quickly.
- Run time stats collection (in vTaskSwitchContext) and generation (in
  uxTaskGetSystemState) have been made SMP compatible. Therefore
  vTaskGetRunTimeStats() now displays the run time usage of each task as a
  percentage of total runtime of both CPUs

Squash
2017-11-14 15:50:31 +08:00
Ivan Grokhotkov
8e180f6155 fatfs: update to R0.13a
- Remove ASCII-only configuration, CP437 is used instead
- Add dynamic code page configuration

See components/fatfs/src/00history.txt for FATFS changelog.
2017-11-14 12:57:55 +08:00
Yulong
1d13b58c62 component/bt: Added the queue event when the gattc command is full. 2017-11-13 22:44:27 -05:00
island
38b287593c component/bt: fix not send indication confirm in case of server only 2017-11-14 11:43:57 +08:00
Ivan Grokhotkov
09d2791cfd Merge branch 'feature/spi_variable_len' into 'master'
feat(spi_master): add new feature allow use variable command and address field length for the same device.

See merge request !1322
2017-11-14 00:08:50 +08:00
Ivan Grokhotkov
31d0c8eec5 Merge branch 'feature/emac_apll' into 'master'
feat(emac): add support for emac to use internal (APLL) clock outputs.

See merge request !1518
2017-11-14 00:07:35 +08:00
Ivan Grokhotkov
5404252e80 Merge branch 'bugfix/uart_fifo_bug_workaround' into 'master'
bugfix(uart): workaround for uart fifo reset issue

See merge request !1499
2017-11-13 17:46:42 +08:00
Wangjialin
4052803e16 bugfix(uart): workaround for uart fifo reset issue
Reported from github:
https://github.com/espressif/esp-idf/issues/1219
https://github.com/espressif/esp-idf/issues/1202

After providing a simple code to digital team, they confirmed that this is a hardware bug.

Root cause:
The fifo reset signal is incorrectly connected
If we want to reset tx fifo of UART2, we have to set txfifo_rst bit of both UART1 and UART2
If we want to reset rx fifo of UART2, we have to set rxfifo_rst bit of both UART1 and UART2

Workaround:
we don't use fifo rst bit in driver.

Documentation:
Digital team would update TRM and give more explanation about this issue.
2017-11-13 15:23:00 +08:00
Yulong
2be5e73090 rebase the origin to the local 2017-11-13 02:20:02 -05:00
Yulong
8352eb6fa2 component/bt: Added the prepare write check. 2017-11-13 02:12:33 -05:00
Frank Sautter
f324458b6a feat(emac): add support for emac to use internal (APLL) clock outputs. 2017-11-13 14:18:58 +08:00
Liu Zhi Fu
48ca949fd4 lwip: fix socket close crash issue
When lwip_close free the socket resource (netconn etc), any work
related to these resource (netconn etc) must be aborted.
2017-11-13 06:00:52 +00:00
He Yin Ling
e64b9ecaf4 Merge branch 'bugfix/ut_only_test_app_core_sleep_on_dual_core' into 'master'
test: only test app core sleep on dual core

See merge request !1517
2017-11-13 13:35:07 +08:00
Jiang Jiang Jian
004c391591 Merge branch 'feature/adjust_task_stack_size_according_to_nano' into 'master'
esp32/lwip: adjust task stack size according 'nano' print

See merge request !1510
2017-11-13 11:18:20 +08:00
Angus Gratton
36692dbac7 docs: Add esp_wifi_types.h items to wifi API reference
Previously only items defined esp_wifi.h in esp_wifi_crypto_types.h
were including in documentation reference.
2017-11-10 11:00:44 -08:00
Angus Gratton
bd9c5d9adc Merge branch 'feature/fatfs_kconfig_options' into 'master'
fatfs: expose some configuration values in Kconfig

See merge request !1415
2017-11-11 02:48:15 +08:00
Angus Gratton
4468825028 Merge branch 'bugfix/TW#16106_esp_heap_trace.h_C++_include_guards' into 'master'
freertos/add C++ include guards for esp_heap_caps.h

See merge request !1516
2017-11-11 02:47:10 +08:00
He Yin Ling
be405d69d8 test: ut only test app core reset on dual core 2017-11-10 17:53:59 +08:00
Jiang Jiang Jian
e24ea6207b Merge branch 'bugfix/btdm_osi_alarm' into 'master'
component/bt: use esp_timer instead of FreeRTOS timer to implement osi_alarm in bluedroid

See merge request !1506
2017-11-10 15:34:11 +08:00
Jiang Jiang Jian
b8694eeeb9 Merge branch 'bugfix/tw16339_sta_cant_connect_ap_in_channel_14' into 'master'
Bugfix/tw16339 sta cant connect ap in channel 14

See merge request !1514
2017-11-10 15:31:19 +08:00
He Yin Ling
b1d13ded1a test: only test app core sleep on dual core 2017-11-10 13:26:11 +08:00
Darian Leung
fff482acd9 freertos/add C++ include guards for esp_heap_caps.h 2017-11-10 12:01:30 +08:00
wangmengyang
53273172fe component/bt: modify the implementation and interface of osi_alarm module
1. use esp_timer instead of FreeRTOS timer to implement osi_alarm in bluedroid
2. Remove two APIs: osi_alarm_now() and osi_alarm_time_diff() and modify the hci layer logic that use them
3. Implement osi_alarm_get_remaining_ms()
4. Move the definition of struct alarm_t in source file "alarm.c"
5. Add definition of module error code
2017-11-10 11:53:55 +08:00
Ivan Grokhotkov
7632c6a80c Merge branch 'test/UT_reset_check' into 'master'
Test/ut reset check

See merge request !1086
2017-11-10 11:30:46 +08:00
Ivan Grokhotkov
3eedf3ed18 Merge branch 'bugfix/to_docs_from_github' into 'master'
Documentation bugfixes from the github

See merge request !1501
2017-11-10 11:13:25 +08:00
Ivan Grokhotkov
d1f6030921 Merge branch 'bugfix/from_github' into 'master'
Bug fixes from Github

See merge request !1487
2017-11-10 11:13:04 +08:00
Ivan Grokhotkov
cfe1f4724c Merge branch 'bugfix/cas_for_pthread_once' into 'master'
pthread: Fix pthread_once to use atomic compare and set

See merge request !1497
2017-11-10 11:12:46 +08:00
Liu Zhi Fu
2041ba9add esp32: fix station can't connect esp32 softap in channel 14
Channel 14 only supports HT20 while ESP32 softap channel 14 is HT40, fix it.
2017-11-10 10:55:08 +08:00
Ivan Grokhotkov
8e04b86153 Merge branch 'bugfix/tg_wdt_reboot_uart_garbage' into 'master'
bootloader: wait for UART FIFO to be empty before switching frequency

See merge request !1511
2017-11-09 17:14:13 +08:00
Yulong
ee43527108 compoent/bt: Modify bta_gattc_utils.c The value pointer copy is overwritten when a write event occurs. 2017-11-09 14:47:11 +08:00
Yulong
e6b2c19eea component/bt: Fix the write value not store in the queue command bug. 2017-11-09 14:47:11 +08:00
Yulong
68833fe94c component/bt: Change the bta_gattc_pop_command_to_send function to static. 2017-11-09 14:47:11 +08:00
Yulong
0ae5320f50 component/bt: Added the gattc command queue support. 2017-11-09 14:47:11 +08:00
Yulong
7a27e3c74d component/bt: added the queue to store the gattc commands. 2017-11-09 14:47:11 +08:00
Yulong
1ceef12238 compoent/bt: Modify bta_gattc_utils.c The value pointer copy is overwritten when a write event occurs. 2017-11-09 01:44:16 -05:00
Ivan Grokhotkov
afa9a85396 bootloader: wait for UART FIFO to be empty before switching frequency 2017-11-09 13:17:58 +08:00
Anton Maklakov
bb4838314c doc: Add internal links for chapters and fix typos
Used 'git grep -i -E "see *\`[^\`]+\`[^_]"' to find the invalid links
2017-11-09 11:45:13 +08:00
Liu Zhi Fu
710055025e esp32/lwip: adjust task stack size according 'nano' print
1. Adjust tcpip/main/event/timer task stack size according 'nano' print
2. If 'nano' print is disabled the task stack size reduces 512 bytes
2017-11-09 10:09:42 +08:00
Ivan Grokhotkov
f22c681c1c soc/rtc: raise core voltage when 80MHz flash frequency is used
To achieve reliable operation with GD flash at 80MHz, need to raise
core voltage.
This causes the following current consumption increase:

At 80MHz: from 29mA to 33mA
At 160MHz: from 41mA to 47mA

Test conditions: 2 cores running code from IRAM, remaining peripherals
clock gated.
2017-11-08 21:13:02 +08:00
Jiang Jiang Jian
793ea56204 Merge branch 'bugfix/fail_to_scan_all_matched_ap' into 'master'
Wifi: bugfix/fail_to_scan_all_matched_ap

See merge request !1493
2017-11-08 17:39:29 +08:00
Yulong
8ca40818eb component/bt: Fix the write value not store in the queue command bug. 2017-11-08 04:23:12 -05:00
Anton Maklakov
27c1fc52ba Added .command_timeout_ms = 0 to SDSPI_HOST_DEFAULT() too 2017-11-08 12:52:50 +08:00
Seppe Stas
a106dc183d Clean up documentation of esp_wifi_set_country
Signed-off-by: krzychb
2017-11-07 20:26:22 +01:00
Jiang Jiang Jian
dfe4e68cc3 Merge branch 'bugfix/btdm_lib_update_for_psram' into 'master'
component/bt: update toolchain and add compile options to build libbtdm_app.a to support PSRAM

See merge request !1491
2017-11-07 20:01:14 +08:00
Ivan Grokhotkov
5f9ac5fadb Merge branch 'doc/freertos_port_comments' into 'master'
freertos: Update comments in "port" section (portMUX/etc)

See merge request !1431
2017-11-07 19:31:21 +08:00
Ivan Grokhotkov
744896bde2 Merge branch 'bugfix/hardware_mpi_sign' into 'master'
hwcrypto mpi: Fix losing sign when multiplying by -1 (github PR)

Contribution from github: https://github.com/espressif/esp-idf/pull/1181/

See merge request !1471
2017-11-07 19:30:31 +08:00
Mahavir Jain
158ecdcfd5 pthread: Fix pthread_once to use atomic compare and set
Earlier recursive mutex was being used for this but since
SCOMPARE1 is already being saved/restored during context
switch, atomic compare and set can be used for this.

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2017-11-07 14:28:43 +05:30
wangmengyang
016a49f8e3 component/bt: update toolchain and add compile options to build libbtdm_app.a to support PSRAM 2017-11-07 16:08:47 +08:00
houchenyao
f80824a2d8 test: support test for UT cases expect to reset 2017-11-07 12:19:39 +08:00
Ivan Grokhotkov
1613044aef Merge branch 'bugfix/restart_reconfigure_flash_pins' into 'master'
esp32: reconfigure SPI flash pins in esp_restart

See merge request !1492
2017-11-07 12:08:52 +08:00
Ivan Grokhotkov
a45e9c806d Merge branch 'bugfix/new_task_watchdog_API_false_trigger' into 'master'
feat/New Task Watchdog API

See merge request !1380
2017-11-07 10:43:56 +08:00
Deng Xin
092e99c05d Wifi: bugfix/fail_to_scan_all_matched_ap
fail to scan all matched ap in fast scan mode
2017-11-06 21:31:45 +08:00
Ivan Grokhotkov
5f6be9b4ce esp32: reconfigure SPI flash pins in esp_restart 2017-11-06 16:44:26 +08:00
Darian Leung
637ba2e8bb freertos: Test untested functions
Test cases were added for the following functions
- xTaskNotify(), xTaskNotifyGive(), xTaskNotifyFromISR(), vTaskNotifyGiveFromISR(),
- xTaskNotifyWait(), ulTaskNotifyTake()
- vTaskDelayUntil()

The following function was made smp compatible and tested as well
- eTaskGetState()
2017-11-06 15:31:01 +08:00
Angus Gratton
2c72223a4e Merge branch 'bugfix/protect_spiflash_regions' into 'master'
spi_flash: Abort on writes to dangerous regions (bootloader, partition table, app)

See merge request !1452
2017-11-04 12:40:21 +08:00
Angus Gratton
670733df9f spi_flash: Abort on writes to dangerous regions (bootloader, partition table, app)
Can be disabled or made into a failure result in kconfig if needed.
2017-11-03 15:52:27 -07:00
Jiang Jiang Jian
abacf8d2a0 Merge branch 'bugfix/rtc_and_restart_fixes' into 'master'
rtc_clk and esp_restart fixes

See merge request !1458
2017-11-04 01:34:38 +08:00
Liu Zhi Fu
13621852dd esp32: add wifi lib which is compiled with psram gcc
Add psram wifi lib because it doesn't impact the WiFi throughput once the psram is not enabled in IDF menuconfig
2017-11-03 23:02:35 +08:00
Frederik Merz
20ccec1061 Disable all UART CLKs that are not console 2017-11-03 19:03:00 +08:00
Philip Ashmore
d72bef02e9 Added .command_timeout_ms = 0 to SDMMC_HOST_DEFAULT() in components/driver/include/driver/sdmmc_host.h 2017-11-03 17:15:44 +08:00
Siarhei Volkau
6e24566186 components/mdns: wrong Message compression detect
Old behavior assumes message compressed when any of 2 most significant bits are set,
But in fact Message compressed only when both those bits are set to 1.

Also maximal label length should be 63 bytes.
2017-11-03 16:52:22 +08:00
jeanleflambeur
8712fd3ccf Update esp_err.h
Renamed the internal rc to __err_rc to avoid clashes with local variables.
This code would not do the expected thing with the original ESP_ERROR_CHECK macro:

esp_err_t my_func(esp_err_t x)
{
  assert(x == 23);
}

esp_err_t rc = 23; //some value that is important fo the user
ESP_ERROR_CHECK(my_func(rc));

The macro will expand to:
esp_err_t rc = (my_func(rc));

And the code will assert, as my_func will receive a random value - whatever is in the internal macro rc temp variable. This is due to the C weirdness of allowing this code:

int x = x; //x has a random value.
2017-11-03 16:45:28 +08:00
Dmitry4Bh
a0cedb1f44 Fix type conversion error in components/lwip/api/pppapi.c
Pointer tcpip_api_call *m  should be converted to pppapi_msg* instead of pppapi_msg_msg*
in pppapi_do_ppp_set_default(), pppapi_do_ppp_free() and so on.

It solve this issue https://github.com/espressif/esp-idf/pull/1028
so there is no need to patch ip4.c because now netif_defauilt is setted correctly.
Also it prevents memory corruption when pppapi_free() is called.
2017-11-03 16:42:56 +08:00
Tom Vijlbrief
58b411a5fe fix makefile for multiple source files 2017-11-03 16:40:15 +08:00
Wangjialin
cea7dfbe90 psram: improve clock signal generation, increase drive strength
Also check the chip type when initializing.
2017-11-03 16:30:10 +08:00
Wangjialin
d034bc9ca0 bootloader: add configuration of flash pins and VDDIO boost 2017-11-03 16:29:56 +08:00