Commit Graph

2189 Commits

Author SHA1 Message Date
Yulong
3f997d3e8c component/bt: Added the unhandle log to the btc dm case. 2017-06-13 22:37:44 -04:00
Ivan Grokhotkov
0c83e46b08 Merge branch 'bugfix/nvs_max_value_size' into 'master'
nvs: check value size before writing, document limitations

See merge request !796
2017-06-14 09:15:59 +08:00
Ivan Grokhotkov
6e704fc421 Merge branch 'bugifx/cplusplus_guards' into 'master'
add C++ include guards to header files which are missing them

See merge request !799
2017-06-14 09:14:02 +08:00
Ivan Grokhotkov
71d7716a45 Merge branch 'bugfix/esp_event_send_init_check' into 'master'
esp_event_send: check if the event loop is initialized

See merge request !817
2017-06-14 09:11:50 +08:00
Angus Gratton
91593a5237 Merge branch 'bugfix/rmt_driver_interrupts' into 'master'
rmt driver: Fix some issues around interrupts

See merge request !837
2017-06-14 08:35:22 +08:00
Angus Gratton
8bf675786a Merge branch 'feature/freertos_get_priority' into 'master'
freertos: Mark uxTaskPriorityGet() as tested, add SMP task priority unit tests

See merge request !794
2017-06-14 08:31:00 +08:00
Angus Gratton
5d7bffea2b panic handler: Print backtraces with calling address not return address
This seems to clean up some of the more wrong addr2line output results (not
sure why, something to do with optimisations I think - perhaps the return
address may also be a jump target from some earlier line of the code.)
2017-06-14 10:30:04 +10:00
Deng Xin
3d963f1c61 Merge branch bugfix/wps_receive_m2d_fail_process to master
ESP32: Add error wps fail reason enum in esp_event.h
see merge request !226
2017-06-13 21:48:48 +08:00
Ivan Grokhotkov
81f98c0a77 Merge branch 'test/nvs_compatible_test' into 'master'
test: add WIFI NVS compatible test case

See merge request !812
2017-06-13 21:32:50 +08:00
Jiang Jiang Jian
ff8287645b Merge branch 'bugfix/tw13140_fix_assoc_timeout_bug' into 'master'
esp32: update wifi lib to fix assoc timeout issue

See merge request !854
2017-06-13 21:14:33 +08:00
Jiang Jiang Jian
12c1238730 Merge branch 'bugfix/btdm_uuid_convert' into 'master'
component/bt : fix uuid convert warning

See merge request !857
2017-06-13 21:03:55 +08:00
Yulong
2a759a9864 component/bt: Change the osi_mem_dbg_init to the esp_bluedroid_init function. 2017-06-13 08:52:26 -04:00
Tian Hao
063dccd6c0 component/bt : fix uuid convert warning 2017-06-13 20:21:59 +08:00
Liu Zhi Fu
bf4dd5175b esp32: update wifi lib to fix assoc timeout issue
Fix assoc timeout thread-safe issue
2017-06-13 20:08:00 +08:00
Jiang Jiang Jian
1ce18758d4 Merge branch 'bugfix/tw13140_fix_throughput_test_crash_issue' into 'master'
esp32: update wifi lib to fix wifi crash bug

See merge request !840
2017-06-13 18:22:39 +08:00
Jiang Jiang Jian
57d27faee8 Merge branch 'bugfix/btdm_write_API_to_write_char_get_wrong_status_when_server_response_NULL' into 'master'
component /bt: write_API_to_write_char_get_wrong_status_when_server_response_NULL

See merge request !842
2017-06-13 18:18:30 +08:00
Ivan Grokhotkov
cd89a653e4 Merge branch 'bugfix/app_cpu_reset' into 'master'
esp32: don’t reset APP CPU if it was already reset by OpenOCD

See merge request !848
2017-06-13 18:15:47 +08:00
Jiang Jiang Jian
be680a0ef3 Merge branch 'bugfix/btdm_auth_val_error_#12962' into 'master'
component/bt: correct the security demo pair status code.

See merge request !841
2017-06-13 18:14:39 +08:00
Tian Hao
808b07799c component/bt : fix task post bug && fix controller init protection
1. fix bluedroid task post to blocking.
2. use semphore protect btdm controller task when be called from higher priority task
2017-06-13 17:14:50 +08:00
Angus Gratton
47e789f538 abort handler: Fix abort stack trace when abort() called in ISR
Previously, this resulted in task stack frames turning up incorrectly in the backtrace, ie

Backtrace: 0x400d22a0:0x3ffb0fa0 0x40085a3c:0x3ffb0fc0 0x400f32c4:0x3ffb0fe0 0x40081965:0x3ffb1010
0x400d22a0: esp_vApplicationIdleHook at /home/esp/esp-idf/components/esp32/./freertos_hooks.c:
52
0x40085a3c: prvIdleTask at /home/esp/esp-idf/components/freertos/./tasks.c:4431
0x400f32c4: i2c_isr_handler_default at /home/esp/esp-idf/components/driver/./i2c.c:598
0x40081965: _xt_lowint1 at xtensa_vectors.o:?

Fix is to implement abort() via an unhandled exception rather than a breakpoint, I think
because of relative priority of exception types.

Another approach would be to assign a software-only INUM to abort()ing and defined a
PANIC_RSN_ABORTED, but this is more complex and interrupt numbers are more scarce than RAM!
2017-06-13 10:19:01 +10:00
Ivan Grokhotkov
cc8af68244 syscalls: fix wraparound of RTC time
This change removes the erroneous cast to uint32_t (which caused time to
wrap around after 1 hour) and splits the multiplication into two terms
to remove the wraparound after 13 days.

Ref. https://esp32.com/viewtopic.php?f=13&t=1908
2017-06-12 15:21:43 +08:00
Ivan Grokhotkov
f327a9b1cf esp32: don’t reset APP CPU if it was already reset by OpenOCD
When ‘reset halt’ command is executed, OpenOCD will take the APP CPU
out of reset and enable the clock. At this point, user can set a
breakpoint on code which will run on APP CPU. Previously, app startup
code would do another reset of APP CPU, thereby removing any breakpoints
which may have been set. This change makes APP CPU reset conditional on
DPORT_APPCPU_CLKGATE_EN bit, which is 0 by default but is set to 1 by
OpenOCD after reset.
2017-06-12 15:16:57 +08:00
zhiweijian
352cc0c7fe Component /bt: write_API_to_write_char_get_wrong_status_when_server_response_NULL 2017-06-12 15:02:21 +08:00
Yulong
411b5ecc43 component/bt: delete the bd_addr to avoid the warning. 2017-06-09 05:07:26 -04:00
Yulong
e07482504a component/bt: Change the btc ESP_BLE_SM_SET_RSP_KEK to ESP_BLE_SM_SET_RSP_KEY 2017-06-09 04:54:56 -04:00
Yulong
4734ba40b0 component/bt: Change the btc layer data copy method. 2017-06-09 04:32:01 -04:00
Angus Gratton
11d2db40f4 spi_flash: Fix SPI flash write alignment/size bugs
* Writing >4 bytes to unaligned offsets would fail
* Writiing data from flash would fail (wrong buffer was used)
* Writing >8192 bytes from RAM would over-write data multiple times

Adds test cases for the above.
2017-06-09 17:33:27 +10:00
Angus Gratton
edd2459934 esp_log_buffer_hex: Make buffer argument a void pointer 2017-06-09 17:16:58 +10:00
Yulong
e5adfb8119 component/bt: correct the security demo pair status code. 2017-06-09 02:37:28 -04:00
Angus Gratton
c77b699463 rmt driver: Manage driver interrupt handler based on which channels are enabled
Previously the first call to rmt_driver_uninstall() would remove the interrupt handler,
even if other channels still had the driver installed.

Adds an OS-level lock to control concurrent registration/deregistration of channels.
2017-06-09 16:11:21 +10:00
Ivan Grokhotkov
e7db29b2a8 Merge branch 'bugfix/btdm_crash_invalid_control_param' into 'master'
component/bt: Fix crash problem while using invalid control parameter

See merge request !832
2017-06-09 12:00:18 +08:00
Angus Gratton
5a1a8b4637 Merge branch 'bugfix/resume_task_cpu1_when_scheduler_disabled' into 'master'
Fix bug waking a task on CPU1 when scheduler is disabled

See merge request !819
2017-06-09 07:10:10 +08:00
Liu Zhi Fu
c1e8988240 esp32: update wifi lib to fix wifi crash bug
Fix a wifi crash bug which happens in throughput test
2017-06-08 20:51:21 +08:00
Angus Gratton
4b58cc12cd rmt driver: When deleting, disable interrupt before freeing data structures
Fixes potential race if RMT interrupt happens while deregistering (unlikely
due to timing of taking semaphore tx_sem, but still possible.)
2017-06-08 16:14:51 +10:00
Angus Gratton
a89e93fc3d i2c driver: When deleting, disable interrupts before freeing data structures
Fixes a potential race if I2C interrupt occurs while driver is being delted.
2017-06-08 15:57:31 +10:00
island
30783d481d component/bt: Fix crash problem while using invalid control parameter
- Fix crash problem while using invalid control parameter to set gatt characteristic or descriptor
2017-06-07 20:18:36 +08:00
Tian Hao
bd309731da component/bt : fix bug of task schedule delayed.
1. BLE RX test mode require quick task reaction, so allow higher priority task schedule from ISR.
2. Maybe other scenario also require this.
2017-06-07 14:58:17 +08:00
Jiang Jiang Jian
99d5959d8a Merge branch 'bugfix/btdm_library' into 'master'
component/bt : revert the bluetooth library

See merge request !827
2017-06-07 14:17:33 +08:00
Jiang Jiang Jian
35f6a2a8af Merge branch 'feature/tw10091_add_sniffer_filter' into 'master'
esp32: add sniffer filter api

See merge request !790
2017-06-07 13:55:35 +08:00
Tian Hao
460c37ddf6 component/bt : revert the bluetooth library
bluetooth library use a old one, so update to the newest.
2017-06-07 13:52:28 +08:00
Jiang Jiang Jian
7da4b42ed1 Merge branch 'feature/btdm_add_connect_event_and_disconnect_event_for_gattc' into 'master'
component/bt: Add disconnect & connect func and event

See merge request !806
2017-06-07 13:45:43 +08:00
Jiang Jiang Jian
82b8b1db1f Merge branch 'bugfix/bt_ble_separation' into 'master'
component/bt: fix the build error when using classic BT, with GATTC, GATTS and SMP disabled

See merge request !822
2017-06-06 20:56:05 +08:00
Jiang Jiang Jian
b78242da58 Merge branch 'bugfix/btdm_rebase_update_param_#9626' into 'master'
component/bt: rebase the btdm_updata_param_bug_#9626 to the new master.

See merge request !808
2017-06-06 20:55:23 +08:00
Liu Zhi Fu
f40be8eb77 esp32: add sniffer filter api
Add sniffer filter to filter specified packets
2017-06-06 19:07:12 +08:00
Yulong
e6acc32df6 component/bt: rebase the btdm_updata_param_bug_#9626 to the new master.
- Added the error code for the time out status.
2017-06-06 05:51:31 -04:00
Yulong
531f751fd3 component/bt: Cherry-pick the btdm_no_doc_for_value_type_github_#118659 to this branch to avoid conflict. 2017-06-06 05:22:17 -04:00
zhiweijian
db96edc5d9 component/bt: Add disconnect & connect func and event
- Add disconnect func for gap
- Add connect event and disconnect event for gattc
2017-06-06 16:53:37 +08:00
Angus Gratton
1cbdb35e1e Merge branch 'bugfix/i2s_channel_setting' into 'master'
bugfix(i2s): fix error when changing channel number in i2s_set_clk function

See merge request !784
2017-06-06 14:40:43 +08:00
Angus Gratton
99454d4a73 Merge branch 'feature/nghttp2_v1_22' into 'master'
nghttp module: Update to v1.22, use submodule instead of in-tree source

See merge request !763
2017-06-06 14:38:41 +08:00
Angus Gratton
ae05787a51 Merge branch 'bugfix/make_srcdirs_order' into 'master'
build system: Fix bug where component src subdirs needed listing before parent source dirs

See merge request !778
2017-06-06 14:37:21 +08:00
Jiang Jiang Jian
b0d93fccce Merge branch 'bugfix/btdm_ble_scan_5min_stop_github_#12723' into 'master'
component/bt: Change the duration type from UINT8 to UINT32

See merge request !815
2017-06-06 14:11:05 +08:00
wangmengyang
ca4506fba9 component/bt: fix the build error when using classic BT, with GATTC, GATTS and SMP disabled 2017-06-05 21:01:58 +08:00
jack
ba32dd30a1 bugfix:Fix bug that wdt reset information for CPU1 was not correct 2017-06-05 18:26:14 +08:00
Jeroen Domburg
d4b0f85eb4 Make portENTER_CRITICAL and portENTER_CRITICAL_ISR the same, plus some changes to fix an issue this causes 2017-06-05 15:57:42 +08:00
Angus Gratton
b9fc5ecf68 freertos: Fix crash when waking task on CPU1 with scheduler disabled
xPendingReadyList[1] was never initialised correctly, so if a task is added to this list (ie by xSemaphoreGiveFromISR()
or similar) while scheduler is disabled, then it causes a null pointer dereference.

Bug produces stack traces similar to:
0x40086e87: vListInsertEnd at /home/gus/esp/32/idf/components/freertos/./list.c:130
0x40084ba3: xTaskRemoveFromEventList at /home/gus/esp/32/idf/components/freertos/./tasks.c:3439
0x40083c54: xQueueGiveFromISR at /home/gus/esp/32/idf/components/freertos/./queue.c:2034
0x400f50a0: timer_group0_isr at /home/gus/esp/32/idf/components/freertos/test/./test_suspend_scheduler.c:27
0x40081d7d: _xt_lowint1 at xtensa_vectors.o:?
2017-06-05 16:12:20 +10:00
Angus Gratton
f40ae10a5d freertos: add test case for ISRs waking tasks when scheduler disabled 2017-06-05 16:12:20 +10:00
Ivan Grokhotkov
17da994345 esp_event_send: check if the event loop is initialized
Fixes https://github.com/espressif/esp-idf/issues/668
2017-06-05 11:01:26 +08:00
He Yin Ling
2e7f6a2247 test: add NVS compatible test case and CI job 2017-06-04 10:29:15 +08:00
Yulong
a42bf640bc component/bt: Change the duration type from UINT8 to UINT32 2017-06-03 01:00:10 -04:00
Jiang Jiang Jian
cc46038142 Merge branch 'bugfix/add_dport_protect_in_libphy' into 'master'
Add dport protect in libphy.a

See merge request !803
2017-06-02 19:13:18 +08:00
Jiang Jiang Jian
bd17791fd4 Merge branch 'bugfix/tw12798_dhcp_server_crash' into 'master'
lwip: fix dhcp server crash issue

See merge request !797
2017-06-02 19:09:43 +08:00
Jiang Jiang Jian
0a66f0db4c Merge branch 'bugfix/btdm_bit_against_enums_github_#12289' into 'master'
component/bt: Change the esp_gatt_perm_t & esp_gatt_char_prop_t type from enum t…

See merge request !809
2017-06-02 15:41:01 +08:00
Liu Zhi Fu
cd58f089c2 lwip: fix dhcp server crash issue
Fix long dhcp request packet cause dhcp server crash issue
2017-06-02 14:02:33 +08:00
Jiang Jiang Jian
1eaf88262d Merge branch 'bugfix/btdm_add_open_and_close_event_for_gatts' into 'master'
component/bt: add open and close event for gatts

See merge request !786
2017-06-02 13:53:03 +08:00
Yulong
be3eda0044 component/bt: Change the esp_gatt_perm_t & esp_gatt_char_prop_t type from enum to uint16_t & uint8_t. 2017-06-02 01:48:56 -04:00
XiaXiaotian
66ef886d77 Add dport protect in libphy.a 2017-06-01 19:43:55 +08:00
Jiang Jiang Jian
ab0f7264ee Merge branch 'bugfix/tw12174_connect_ap_fail' into 'master'
Fix the bug that station fails to connect to AP sometimes.

See merge request !802
2017-06-01 19:40:02 +08:00
zhiweijian
f5a59f4f78 component/bt: add open and close event for gatts
1.added open event and close event for gatts.
2.used esp_log_buffer_char/hex for gattc scan result.
2017-06-01 15:01:54 +08:00
XiaXiaotian
d2f24f1b81 Fix the bug that station fails to connect to AP sometimes. 2017-05-31 20:27:02 +08:00
jack
fc130fba86 fix bug that files missing commit in MR 773 2017-05-31 19:37:39 +08:00
Ivan Grokhotkov
06accaf851 add C++ include guards to header files which are missing them
Fixes https://github.com/espressif/esp-idf/issues/628
2017-05-31 17:20:17 +08:00
Ivan Grokhotkov
a25a4a0a7c nvs: check value size before writing, document limitations
Writing values longer than half of the page size (with header taken into
account) causes fragmentation issues. Previously it was suggested on the
forum that using long values may cause issues, but this wasn’t checked
in the library itself, and wasn’t documented. This change adds necessary
checks and introduces the new error code.

Documentation is also fixed to reflect the fact that the maximum length
of the key is 15 characters, not 16.
2017-05-31 12:59:24 +08:00
Angus Gratton
4947c953d3 freertos: Mark uxTaskPriorityGet() as tested
Also adds some SMP-aware dynamic task priority unit tests
2017-05-29 16:19:00 +10:00
Angus Gratton
d718cbd873 Merge branch 'bugfix/deep_sleep_example_stub_delay' into 'master'
sdkconfig: set CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 by default

See merge request !758
2017-05-29 12:11:56 +08:00
Angus Gratton
2b1365a51b Merge branch 'feature/docs_gen-dxd' into 'master'
docs: Automatically generate API reference list / Doxygen directives

See merge request !723
2017-05-29 07:08:53 +08:00
Jiang Jiang Jian
636d2b384e Merge branch 'bugfix/ble_comfirm_reply_not_work_#12881' into 'master'
component/bt: Added the esp_ble_passkey_reply BTC_GAP_BLE_PASSKEY_REPLY_EVT &BTC…

See merge request !793
2017-05-27 14:40:26 +08:00
Yulong
e9fae704e3 component/bt: Merge the new master to avoid conflict. 2017-05-26 22:47:56 -04:00
Yulong
9679c238aa component/bt: Added the esp_ble_passkey_reply BTC_GAP_BLE_PASSKEY_REPLY_EVT &BTC_GAP_BLE_CONFIRM_REPLY_EVT
event.
2017-05-26 05:26:15 -04:00
Jiang Jiang Jian
826e96248d Merge branch 'bugfix/btdm_ble_crash_read_long_char_#12338' into 'master'
component/bt: Change the fragement method to avoid crash when the data transmit should fragement.

See merge request !789
2017-05-26 14:40:47 +08:00
Jiang Jiang Jian
87a5bd0179 Merge branch 'bugfix/btdm_value_relate_to_internal' into 'master'
fix bugs of some constant value not equal internal define but quotes internal define

See merge request !787
2017-05-26 14:24:52 +08:00
Jiang Jiang Jian
adac20dc36 Merge branch 'bugfix/tw12643_board_no_response' into 'master'
fix close socket block issue

See merge request !781
2017-05-26 14:11:53 +08:00
Yulong
e40810adbb compoennt/bt: change the remaining_length compare with the max_packet_size value when the data packet should fragment and dispatch. 2017-05-25 23:09:50 -04:00
Yulong
81ff34742b component/bt: Change the fragement method to avoid crash when the data transmit should fragement. 2017-05-25 09:59:03 -04:00
Tian Hao
0c6d966bff component/bt : fix bugs of some constant value not equal internal define but quotes internal define 2017-05-25 16:12:48 +08:00
Yulong
66bb6a2f2b component/bt: squash the branch of the early commit
component/bt: squash the branch of the early commit

component/bt: Added the set static random address callback to the bt project.

component/bt: fixed the set static random address error.

component/bt: fixed the set static random address error.
2017-05-25 02:13:27 -04:00
Jiang Jiang Jian
2aadbee43c Merge branch 'bugfix/i2c_read_size' into 'master'
component/driver : fix i2c slave read size bug

See merge request !770
2017-05-25 10:55:28 +08:00
Ivan Grokhotkov
3c583a7655 sdkconfig: set CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 by default
To increase the chances that the examples work out of the box, this
change is raising the default deep sleep wakeup delay to 1ms.
If GPIO15 is low at startup, ROM code takes less time to execute
(because no logging is performed), so more time may be needed to allow
flash chip to become ready.
2017-05-25 10:51:39 +08:00
wangmengyang
cdea87168c component/bt: bugfix for A2DP in dropping of media packet when data buffer size goes beyond threshold 2017-05-24 15:08:46 +08:00
XiaXiaotian
c0fa8a0354 fix close socket block issue
LWIP rx task receives NULL buffer pointer only when closing socket.
    So, do not need to close it again.
2017-05-23 21:08:03 +08:00
Wangjialin
f68c5baea6 bugfix(i2s): fix error when changing changel number in i2s_set_clk function 2017-05-23 19:32:10 +08:00
Jiang Jiang Jian
ba55461686 Merge branch 'bugfix/ble_gatt_server_example_receive_prepare_write' into 'master'
component/bt: gatt_server example receive prepare write

See merge request !741
2017-05-23 13:57:39 +08:00
Liu Zhi Fu
365b66b95b esp32: update wifi lib to fix ota fail bug
Fix ota fails on dual core
2017-05-23 11:38:45 +08:00
Ivan Grokhotkov
55fb4c54c8 Merge branch 'bugfix/release_coproc_regs_taskdelete' into 'master'
Release coprocessor registers when a task is deleted.

See merge request !765
2017-05-22 11:05:47 +08:00
zhiweijian
4ffb4911e1 gatt_server example receive prepare write 2017-05-22 10:33:36 +08:00
Angus Gratton
99771a255f build system: Fix bug where component src subdirs needed listing before parent source dirs
Triggered on make 3.81, happens sometimes on Linux and always(?) on macOS. May depend on the order the OS' filesystem
resolves wildcards in.

Includes a revert to the LWIP component to verify this is properly fixed.

See also https://github.com/espressif/esp-idf/issues/632
2017-05-22 11:45:55 +10:00
krzychb
30edcca1fb docs: Generate Doxygen directives for API documentation
This is to resolve issue reported in https://github.com/espressif/esp-idf/issues/130.
2017-05-19 18:26:02 +02:00
Ivan Grokhotkov
a38cecefa7 Merge branch 'bugfix/fix_dport_access_in_isr' into 'master'
Fix Dport access in interrupts

Dport accesses would re-enable interrupts unconditionally, breaking things when called in an ISR. This saves and restores the interrupt status, fixing this.

This fixes a crash in the SPI slave driver, and possibly other things.

See merge request !772
2017-05-19 19:08:34 +08:00
wangmengyang
25b07ed79a component/bt: bugfix for handling HCI_Host_Number_Of_Completed_Packets in BT controller 2017-05-19 17:36:02 +08:00
Jeroen Domburg
fded7b4270 Dport accesses would re-enable interrupts unconditionally, breaking things when called in an ISR. This saves and restores the interrupt status, fixing this. 2017-05-19 15:25:02 +08:00
Ivan Grokhotkov
972d1d9242 Merge branch 'feature/ci_test_config_autogen' into 'master'
CI: auto generate configs for test jobs

Currently CI test jobs are static configured by several pre-generated config files.
This approach have several disadvantages:

1. not flexible to select test cases to run, which is important feature of @bot
2. difficult to update test as we need to pre-generate quite a lot files
3. need to maintain extra config files in IDF
4. not flexible to support new test apps or chips, can't use some new features of test bench

Therefore we'll add assign_test stage between build and test, to generate configs for test jobs.

See merge request !738
2017-05-19 11:56:45 +08:00