Commit graph

3950 commits

Author SHA1 Message Date
Angus Gratton 0dd9b899b7 periph_ctrl: Refactor to add periph_module_reset(), avoid potential race in SPI DMA workaround
Also refactor use of direct clock access in unit test ref_clock (probably not a real issue)
2017-10-02 17:48:16 +11:00
Angus Gratton 530bca1813 freertos: Remove obsolete "Enable heap memory debug" option
All heap debugging is now under the Heap component.
2017-10-02 13:43:54 +11:00
Angus Gratton 3fdb1944d3 lwip: Disable IPV4 Link-Local addressing by default
Keeps existing IDF behaviour the same. Can still be enabled via menuconfig.
2017-10-02 10:50:27 +11:00
Angus Gratton 2cc8c91ad8 lwip: Remove undocumented CONFIG_MDNS macro flag
All options that were enabled via CONFIG_MDNS are now in menuconfig, with
the default values set the same as with CONFIG_MDNS enabled (meaning existing
projects that were using CONFIG_MDNS do not need to change).
2017-10-02 10:50:27 +11:00
Angus Gratton 61d2069e1c example: Add UDP multicast example 2017-10-02 10:50:27 +11:00
Angus Gratton 04a2cefb26 lwip: Enable IPV6_ONLY option for UDP sockets (BSD & netconn)
* setsockopt(s, IPV6_ONLY, &one, sizeof(int)) will disable IPV6-only
  mode. Incoming/outgoing IPV4 packets are dropped.

* Otherwise, sockets bound to IPV6_ANY_ADDR can receive unicast packets
  for IPV4 or IPV6.

* sendto() a IPV6-mapped-IPV4 address on a UDP socket works correctly
  (not supported for RAW or TCP sockets.)

* getaddrinfo() option AI_V4MAPPED is implemented.

As well as extending support to TCP & RAW, there is some potential improvement
to dropping incoming packets - the drop happens a bit late in the process and
there is no "ICMP port unreachable" response sent.
2017-10-02 10:50:27 +11:00
Angus Gratton 961180617e lwip: Add IPV6 multicast group membership socket options
As described in RFC2133: IPV6_MULTICAST_IF, IPV6_MULTICAST_HOPS,
IPV6_MULTICAST_LOOP, IPV6_MULTICAST_LOOP, IPV6_DROP_MEMBERSHIP.
2017-10-02 10:50:27 +11:00
Alexey Gerenkov 5795ccc806 freertos: Fixes deadlock in pthread_once for init_routines calling pthread_once 2017-10-01 19:52:48 +03:00
Alexey Gerenkov 54a529f596 freertos: Fixes hangup upon pthread_join on finished thread 2017-10-01 19:52:48 +03:00
Luc 6e0f054884 use localtime_r instead of gmtime to get timezone
on fatfs
2017-09-30 21:44:35 +08:00
wangmengyang 2797966c47 component/bt: increase programming delay for event arbiter to allow for heavy workload 2017-09-30 18:12:45 +08:00
Jeroen Domburg b6a2bd1184 Revert "esp32: New Task Watchdog API"
This reverts commit 616baa239d.
2017-09-30 18:07:19 +08:00
zhiweijian c75da555af Component/bt: fix set scan params and start scan action 2017-09-30 17:01:57 +08:00
zhiweijian 4720196015 Component/bt: fix multi-connection failed
- modify some comments
2017-09-30 16:30:43 +08:00
Yulong 1a07a13727 component/bt: Change the 0x04 to Macro BTA_LE_AUTH_REQ_MITM. 2017-09-30 04:05:21 -04:00
Jiang Jiang Jian a3731902f5 Merge branch 'bugfix/btdm_hci_mode_periph_clk' into 'master'
fix example of controller_hci_uart peripheral clk init

See merge request !1295
2017-09-30 15:57:10 +08:00
Jiang Jiang Jian 91c259b105 Merge branch 'bugfix/btdm_change_pll_track_interrupt' into 'master'
component/bt : change pll track interrupt bits

See merge request !1310
2017-09-30 15:53:58 +08:00
Jiang Jiang Jian c2a4713958 Merge branch 'bugfix/btdm_btc_ble_set_rand_addr' into 'master'
component/bt: Fix bug of function btc_ble_set_rand_addr

See merge request !1297
2017-09-30 15:49:53 +08:00
Jiang Jiang Jian b420c62602 Merge branch 'bugfix/btdm_mem_leak_of_gattc_open_and_close' into 'master'
component/bt: Fix bug of memory leak of gatt open and close

See merge request !1325
2017-09-30 15:48:57 +08:00
Jiang Jiang Jian a8dab7680a Merge branch 'bugfix/btdm_gattc_mutiple_read_bug' into 'master'
component/bt: Fixed the bug of mutiple read can not callback.

See merge request !1286
2017-09-30 15:45:56 +08:00
Jiang Jiang Jian 816fe6cf1f Merge branch 'bugfix/btdm_gattc_get_db_prop_bug' into 'master'
component/bt: Fiexd the bug of the gattc cannot get the db properties.

See merge request !1284
2017-09-30 15:42:45 +08:00
Jiang Jiang Jian f619386967 Merge branch 'bugfix/btdm_fail_to_find_handle_#15534' into 'master'
component/bt: Fix the bug of total attr didn't reset when init the gattc cache.

See merge request !1331
2017-09-30 15:42:07 +08:00
Jeroen Domburg 1b969874b0 Merge branch 'bugfix/explicit_task_wdt_feed' into 'master'
Bugfix/New Task Watchdog API

See merge request !1187
2017-09-30 10:42:15 +08:00
Darian Leung 616baa239d esp32: New Task Watchdog API
Legacy API of task watchdog used the same function esp_task_wdt_feed() to add
and feed a task. This caused issues of implicitly adding a task to the wdt list
if the function was used in shared code.

The new API introduces init, adding, feeding, deleting, deinit functions. Tasks
must now be explicitly added to the task watchdog using their handles. Deletion
must also be explicit using task handles. This resolves the issue of implicit
task additions to the task watchdog due to shared code calling
esp_task_wdt_feed().

Task watchdog is now fully configurable at runtime by calling the init and
deinit functions.

Also added functions to get the handles of idle tasks of the other core. This
helps when adding idle tasks to the watchdog at run time.

Configuring the task watchdog using menu config is still available, however
menu config will only result in calling the init and add functions for idle
tasks shortly after the scheduler starts.

Menu config also allows for using legacy behavior, however the legacy behavior
willcall the new API functions but with slight variations to make them legacy
compatible.

Documentation and example have also been updated

gcov_rtio.c headers updated to prevent error of freertos header files being
included in the wrong order.

Resolves issue TW#13265
2017-09-29 23:10:55 +08:00
Darian Leung ae9041ab71 esp32: Fix task watchdog timer triggering issues TW#14794
The two task watchdog timer bugs are as follows...
1) If only a single task existed on the wdt task list, and esp_task_wdt_feed()
was only called once, the watchdog triggers but fails to print task name
2) If a single task already exists on the task wdt list, and another task calls
esp_task_wdt_feed() once, the watchdog fails to trigger

Problem stemmed from the loop responsible for resetting the watchdog timer
having incorrect loop parameters. The loop failed to traverse the full length
of the task wdt list
2017-09-29 22:12:58 +08:00
baohongde b78da3b715 component/bt: Fix bug of set sec properity error 2017-09-29 18:46:28 +08:00
baohongde b59708ca87 component/bt: Fix bug of function btc_ble_set_rand_addr 2017-09-29 11:46:08 +08:00
Jeroen Domburg e6afe28baf Merge branch 'test/unity_print' into 'master'
test: update the format of TEST_ASSERT macro series in ``unity.c``

See merge request !1327
2017-09-29 11:20:04 +08:00
Jeroen Domburg ca7da78bc7 Merge branch 'feature/malloc_psram' into 'master'
Add logic to make external RAM usable with malloc()

See merge request !1278
2017-09-28 18:19:09 +08:00
Jeroen Domburg 740f8a79f0 Add logic to make external RAM usable with malloc() 2017-09-28 17:17:50 +08:00
baohongde 27e1db508d component/bt: Fix bug of function btc_ble_set_rand_addr 2017-09-28 14:41:31 +08:00
baohongde 68958a2485 component/bt: Fix bug of memory leak of gatt open and close 2017-09-28 14:34:57 +08:00
Yulong f7a2cc37b3 component/bt: Fix the bug of total attr didn't reset when init the gattc cache. 2017-09-28 02:09:02 -04:00
Angus Gratton c65f12bb45 Merge branch 'feature/add_espnow_example' into 'master'
Feature/add espnow example

See merge request !1263
2017-09-28 07:43:29 +08:00
michael 7370f2913d test: update the format of TEST_ASSERT macro series in `unity.c` 2017-09-27 19:56:46 +08:00
Jeroen Domburg 58a5d883f4 Merge branch 'test/spi_master_internal_connect' into 'master'
test(spi_master): add test case for 3 DMA issues with internal connection by gpio mux.

See merge request !1217
2017-09-27 17:00:31 +08:00
Angus Gratton a3a4a20518 Merge branch 'bugfix/bt_sdp_server_continuation' into 'master'
bluedroid: Add continuation offset check to SDP server

See merge request !1323
2017-09-27 11:13:54 +08:00
michael fcd0f52e21 test(spi_master): add test case for 3 DMA issues with internal connection by gpio mux.
3 issues are:
1. RX buffer not aligned (start and end)
2. not setting rx_buffer
3. setting rx_length != length

also add spi release code here.
2017-09-27 10:44:28 +08:00
Angus Gratton c9241b4310 bluedroid: Add continuation offset check to SDP server
Fix for CVE-2017-0785
https://android.googlesource.com/platform/system/bt/+/818cf6f%5E%21/#F0
2017-09-27 09:49:04 +10:00
krzychb e69691427c Extended description of the Pulse Counter API and removed redundant comments from the example 2017-09-26 22:44:46 +02:00
Deomid Ryabkov 882f164e7c Fix multi_heap_get_info alias 2017-09-26 15:00:47 +01:00
Ivan Grokhotkov 73e8afc5b9 soc: place constant data from rtc_clk.c into DRAM
In release mode, switches in rtc_clk_bbpll_set would be converted to
jump tables. These tables would be placed into .rodata, which caused
rtc_clk_cpu_freq_set to be unusable while cache is disabled. This
manifested itself in crashes when exiting from light sleep:

https://esp32.com/posting.php?mode=reply&f=13&t=3089#pr14590
2017-09-26 17:08:49 +08:00
Ivan Grokhotkov 7d436c9a44 Merge branch 'bugfix/timestamp' into 'master'
fix(global, log): correct the CCOUNT register when switching CPU clock during boot 2nd and before scheduler.

See merge request !1296
2017-09-26 16:15:42 +08:00
Ivan Grokhotkov b7a79ab67e Merge branch 'bugfix/bind_dhcp_server_udp_to_ip_of_ap' into 'master'
Fix the bug that if one device is in station+softap mode, other device can not get IP address after connecting to the softap.

See merge request !1314
2017-09-26 16:06:55 +08:00
Ivan Grokhotkov 545421be47 Merge branch 'feature/support_wifi_country_api' into 'master'
esp32: support wifi country code

See merge request !1300
2017-09-26 16:05:49 +08:00
Ivan Grokhotkov bbab9ecf23 Merge branch 'feature/docs_update_sigmadelta_api' into 'master'
Updated sigma delta API documenation and example

See merge request !1319
2017-09-26 16:05:18 +08:00
michael 9d9e771933 fix(global, log): fix esp_log(_early)_timestamp readings after startup by correct the CCOUNT register when switching CPU clock.
TW#13332, Closes #700
2017-09-26 15:18:17 +08:00
Liu Zhi Fu 762f8da078 esp32: support wifi country code
1. Add completed support for WiFi country code
2. Modify esp_wifi_set_country API
2017-09-26 13:36:53 +08:00
Angus Gratton 01aad8f386 Merge branch 'feature/docs_updating_idf' into 'master'
Added a section how to update existing local esp-idf repository and load specifi…

See merge request !1273
2017-09-26 10:34:38 +08:00
Ivan Grokhotkov fd02668d8b Merge branch 'feature/record_more_info_of_scanned_ap' into 'master'
Record more information of scanned AP

See merge request !1289
2017-09-26 10:13:48 +08:00