Commit graph

4594 commits

Author SHA1 Message Date
Angus Gratton f0d74b1c64 bootloader: Ensure bootloader never returns to caller
* Fixes some "noreturn" functions in bootloader utils which did return (causing fatal CPU
  exceptions).
* Marks bootloader entry as "noreturn", preventing "user code done" from stalling boot
  Partial fix for https://github.com/espressif/esp-idf/issues/1814 TW20016
  (Comprehensive fix for this issue will be enabling WDT during bootloader, coming shortly.)
2018-07-19 16:24:11 +10:00
Wang Jia Lin de907e8801 Merge branch 'bugfix/rmt_mem_num_maximum_limit_is_not_accurate' into 'master'
bugfix(rmt): Modify the rmt_mem_num maximum limit value from 15 to 8.

See merge request idf/esp-idf!2734
2018-07-18 16:15:14 +08:00
Ivan Grokhotkov c46b8178f2 Merge branch 'bugfix/sdmmc_auto_stop_cmd' into 'master'
sdmmc: enable host auto_stop only for certain commands

See merge request idf/esp-idf!2710
2018-07-18 14:55:45 +08:00
Ivan Grokhotkov 0b78959070 Merge branch 'bugfix/deep_sleep_flush_uart' into 'master'
sleep: fix flushing UARTs when entering deep sleep

See merge request idf/esp-idf!2698
2018-07-18 14:55:13 +08:00
Jiang Jiang Jian d62293165b Merge branch 'bugfix/btdm_using_osi_malloc_instead_of_malloc' into 'master'
component/bt: Using osi_malloc instead of malloc

See merge request idf/esp-idf!2748
2018-07-18 11:09:28 +08:00
Angus Gratton aa4d77467b Merge branch 'bugfix/esp_err_ignore_dirs' into 'master'
esp32: Do not document error codes defined in examples

See merge request idf/esp-idf!2732
2018-07-18 08:29:53 +08:00
Tian Hao cf14826100 fix coex pause cause bluetooth performance decrease
1. it may cause BLE connection unstable
2. it may cause Classic BT connection unstable
3. it may cause BLE/BREDR scan performance decrease
2018-07-17 21:06:57 +08:00
Jiang Jiang Jian 603ce05376 Merge branch 'bugfix/ampdu_duplicate' into 'master'
wifi: fix ampdu duplicate issue

See merge request idf/esp-idf!2742
2018-07-17 20:45:45 +08:00
fuzhibo 54a67d92a4 fix(sleep): swap touchpad num in wakeup status 2018-07-17 20:25:06 +08:00
Ivan Grokhotkov 5376a06d7b Merge branch 'bugfix/range_CONFIG_ESP32_RTC_CLK_CAL_CYCLES' into 'master'
soc/clk: Fix range CONFIG_ESP32_RTC_CLK_CAL_CYCLES

See merge request idf/esp-idf!2719
2018-07-17 19:43:11 +08:00
Ivan Grokhotkov cffaa9f5b5 freertos: add configTASKLIST_INCLUDE_COREID 2018-07-17 10:57:26 +00:00
Dave McNaughton 0fb1945482 Added: display xCoreID in vTaskList
Merges https://github.com/espressif/esp-idf/pull/2064
2018-07-17 10:57:26 +00:00
Ivan Grokhotkov ea452920bb Merge branch 'bugfix/time_ut_wakeup_from_deep_sleep' into 'master'
esp32/test: Reduces a unit test execution time

See merge request idf/esp-idf!2776
2018-07-17 18:39:15 +08:00
zhangyanjiao d90f8c06c2 changes for timers 2018-07-17 16:46:53 +08:00
Wang Jia Lin 5480a6b6e5 Merge branch 'bugfix/clear_intr_status_when_enable_intr' into 'master'
driver(gpio): fix the gpio interrupt false triggering issue

See merge request idf/esp-idf!2498
2018-07-17 15:44:00 +08:00
Wang Jia Lin e7135c53b5 Merge branch 'bugfix/fix_uart_timeout_bug_when_enable_reftick' into 'master'
driver(uart):  Fix uart time_out bug when using ref_tick

See merge request idf/esp-idf!2775
2018-07-17 15:43:47 +08:00
XiaXiaotian 85ad8cfcfc docs: update channel state information document
1. Move channel to the first row of the table.

    2. Remove the condition of HT20/HT40 for they are determined by
    secondary channel.

    3. Clean up the CSI table.
2018-07-17 14:50:30 +08:00
Angus Gratton 5cbc4e976b app_update: Don't double-verify secure boot signature during OTA
esp_image_load() already verifies the signature
2018-07-17 15:33:47 +10:00
Angus Gratton 57b601ab7f secure boot: Pad to avoid data after the signature mapping into the address space
Because address space is mapped in 64KB pages, it was possible for unauthenticated data after the
app .bin to become mapped into the flash cache address space.

This problem is solved by 2 changes:

* "esptool elf2image --secure-pad" will pad the image so that the signature block ends close to the
  64KB boundary. Due to alignment constraints it will be 12 bytes too short after signing (but
  with flash encryption, these 12 bytes are still encrypted as part of the last block and can't be
  arbitrarily changed).
* By default, secure boot now requires all app partitions to be a multiple of 64KB in size.
2018-07-17 15:33:47 +10:00
XiongYu 6d57757840 Modify the rmt_mem_num maximum limit value from 15 to 8. 2018-07-16 19:10:42 +08:00
Konstantin Kondrashov 4df7145564 esp32/test: Reduces a unit test execution time 2018-07-16 14:14:40 +05:00
chenyudong 936b8e1967 wifi: fix ampdu duplicate issue
fix ampdu duplicate issue
2018-07-16 17:10:58 +08:00
Jiang Jiang Jian 70f3933db1 Merge branch 'bugfix/tw23835_add_source_ip_route_for_unicast' into 'master'
lwip: add source ip based route for unicast packet

See merge request idf/esp-idf!2757
2018-07-16 17:01:16 +08:00
hou wen xiang e2b9b70800 driver(uart): Fix uart time_out bug when using ref_tick 2018-07-16 16:56:14 +08:00
Angus Gratton e5d2406b1d Merge branch 'bugfix/spi_cs_setup_fulldup' into 'master'
fix(spi_master): allow to use cs_ena_pretrans in full duplex mode without…

See merge request idf/esp-idf!2576
2018-07-16 16:30:36 +08:00
Angus Gratton fe1ffb3d1c Merge branch 'bugfix/mdns_remove' into 'master'
mdns: Minor fix for mdns_service_remove()

See merge request idf/esp-idf!2760
2018-07-16 16:29:20 +08:00
Angus Gratton e90a920ea8 Merge branch 'bugfix/add_queueset_critical_sections' into 'master'
freertos: Add critical sections to queue sets.

See merge request idf/esp-idf!2761
2018-07-16 15:57:35 +08:00
baohongde 11ca056320 component/bt: Fix bug of remove bond device fail when BLE and BT are connectd at the same time 2018-07-16 15:46:27 +08:00
Jiang Jiang Jian 7f382f461c Merge branch 'feature/support_for_XM25QU64A' into 'master'
feature(flash): set QIO mode for XM25QU64A(1V8_64M_flash)

See merge request idf/esp-idf!2753
2018-07-16 12:16:13 +08:00
Jiang Jiang Jian 8809fabcd5 Merge branch 'bugfix/ledc_duty_and_freq' into 'master'
bugfix(ledc): fix bugs reported from unit-test and github.

See merge request idf/esp-idf!2735
2018-07-16 12:12:48 +08:00
Angus Gratton 68e01045f1 Merge branch 'bugfix/secure_boot_regression_partitions' into 'master'
Fix secure boot & flash encryption regression, don't verify partitions as part of secure boot

See merge request idf/esp-idf!2764
2018-07-16 12:07:56 +08:00
Jiang Jiang Jian 3b19269fcb Merge branch 'feature/wifi_check_wifi_lib_git_commit_id' into 'master'
check WiFi library git commit id in unit test

See merge request idf/esp-idf!2621
2018-07-16 11:45:59 +08:00
Angus Gratton cee6d7d5a9 docs: Add more ReST-isms in secure boot & flash encryption docs
(Original version of these docs were in Markdown.)
2018-07-16 11:52:52 +10:00
Angus Gratton 2ae758ebcb Merge branch 'bugfix/spi_sdio_sdkconfig_include' into 'master'
sdio_example/spi: fix sdkconfig include issue

See merge request idf/esp-idf!2756
2018-07-16 08:00:15 +08:00
Jiang Jiang Jian a22d6607f8 Merge branch 'bugfix/autoip_compilation' into 'master'
LWIP AutoIP Compilation Fixed by defining IP_IS_V4_VAL()

See merge request idf/esp-idf!2758
2018-07-15 15:19:11 +08:00
He Yin Ling be81d2c16d Merge branch 'test/print_debug_info_when_test_failed' into 'master'
tiny-test-fw: print debug info when test failed

See merge request idf/esp-idf!2564
2018-07-13 21:22:29 +08:00
Jiang Jiang Jian 6554bdcbb6 Merge branch 'bugfix/btdm_add_profile_descriptor_list_for_spp' into 'master'
component/bt: Add profile descriptor list for SPP

See merge request idf/esp-idf!2691
2018-07-13 19:20:03 +08:00
Jiang Jiang Jian 8571170abe Merge branch 'feature/btdm_bt_ssp' into 'master'
component/bt: Add Secure Simple Pairing

See merge request idf/esp-idf!2453
2018-07-13 19:19:53 +08:00
Piyush Shah fd8a7666c8 LWIP AutoIP Compilation Fixed by defining IP_IS_V4_VAL() 2018-07-13 15:04:39 +05:30
He Yin Ling f348076920 esp32/test: set 60s timeout for one deep sleep case 2018-07-13 07:04:05 +00:00
Ivan Grokhotkov b354770f42 Merge branch 'bugfix/fixes_from_github' into 'master'
Fixes from Github

See merge request idf/esp-idf!2730
2018-07-13 15:03:50 +08:00
Angus Gratton 8b5a2ccb8d docs: Update Flash Encryption docs to clarify reflashing options 2018-07-13 16:18:07 +10:00
negativekelvin 8a9e3875ed
Fix errors in rtc_gpio_desc values 2018-07-12 23:16:15 -07:00
Darian Leung 21ccecc802 freertos: Add critical sections to queue sets.
Queue sets are not SMP safe. This commit adds
critical sections to queue sets. Unit tests for
queue sets have also been added.
2018-07-13 13:58:54 +08:00
Angus Gratton 6fd6e024fc bootloader: Fix warning building reflashable Secure Boot image 2018-07-13 15:45:15 +10:00
Angus Gratton fb439e48f5 bootloader: Don't verify Partition Table as part of Secure Boot
Partition Tables are still signed for backwards compatibility, but signature is no longer checked as
part of bootloader.

Closes https://github.com/espressif/esp-idf/issues/1641
2018-07-13 15:45:15 +10:00
Angus Gratton 7b9009ca5c bootloader: Fix secure boot & flash encryption functionality
Fixes regression in 3e0ac4db79.
2018-07-13 15:26:18 +10:00
Liu Zhi Fu 2e1427a239 lwip: add source ip based route for unicast packet
Add source IP based route for unicast packets forwarding.
2018-07-13 12:35:17 +08:00
Ivan Grokhotkov 46639bab85 Merge branch 'bugfix/crlf_auto_conversion' into 'master'
Convert CRLF (Windows line endings) to LF (Unix style), add CI check

See merge request idf/esp-idf!2119
2018-07-13 11:44:57 +08:00
Ivan Grokhotkov 6d46eed8e4 sdmmc: enable host auto_stop only for certain commands
Perviously host send_auto_stop flag would be set for every data
transfer over 1 block long. This caused stop commands to be sent
after CMD53, which shouldn't be done. Fix by adding an explicit list
of commands for which send_auto_stop should be set.
2018-07-13 03:28:10 +00:00
Angus Gratton ffaf08e851 Merge branch 'fix/bootloader_typedef_enum' into 'master'
bootloader: fix missing typedef on enum defintion

See merge request idf/esp-idf!2718
2018-07-13 08:24:28 +08:00
Piyush Shah 5c7eb7e27b mdns: Minor fix for mdns_service_remove()
Send the Goodbye packet while removing an mDNS service as an "Authoritative" packet so
that the listeners remove the service from their records immediately.
2018-07-12 19:18:54 +05:30
hou wen xiang 5402ace528 driver(gpio) : Fixed the gpio related bug for release v3.1. 2018-07-12 20:19:02 +08:00
Angus Gratton a67d5d89e0 Replace all DOS line endings with Unix
Command run was:
git ls-tree -r HEAD --name-only | xargs dos2unix
2018-07-12 19:10:37 +08:00
XiaXiaotian 32bc9f94c0 check WiFi library git commit id in unit test 2018-07-12 17:53:21 +08:00
weyoui 24e7286693 bootloader: fix missing typedef on enum defintion
(MINOR CHANGES)
Closes https://github.com/espressif/esp-idf/pull/2140
2018-07-12 17:43:59 +08:00
Jiang Jiang Jian dc092366bb Merge branch 'bugfix/beacon_info_do_not_update_after_user_scan' into 'master'
Wifi: bugfix of beacon info don't update after user scan

See merge request idf/esp-idf!2749
2018-07-12 17:24:54 +08:00
Ivan Grokhotkov b0c049a6c8 Merge branch 'bugfix/fix_esp_pthread_h_compatible_with_cpp' into 'master'
pthread: fix esp_pthread.h to compatible with c++

See merge request idf/esp-idf!2739
2018-07-12 16:54:18 +08:00
Michael (XIAO Xufeng) 95dbfbe4c0 sdio_example/spi: fix sdkconfig include issue
(MINOR CHANGES)
2018-07-12 15:59:16 +08:00
Angus Gratton 04caff2fb2 Merge branch 'fix/sdio_speed_4bit' into 'master'
fix(sdio): update sdio to better run in 4bit HS mode

See merge request idf/esp-idf!2704
2018-07-12 08:54:03 +08:00
chenjianqiang 542373b6ef feature(flash): support for QIO mode of XM25QU64A 2018-07-11 22:28:01 +08:00
Darian Leung 882b50dd8c driver: Fix memory leak in rtc_isr_deregister()
Closes #2179
2018-07-11 21:34:09 +08:00
Deng Xin 6e42a2b4b9 Wifi: bugfix of beacon info don't update after user scan 2018-07-11 20:02:33 +08:00
Jiang Jiang Jian 1b1477d16a Merge branch 'bugfix/btdm_err_data_report' into 'master'
component/bt: bugfix for erroneous data reporting always enabled

See merge request idf/esp-idf!2709
2018-07-11 20:00:46 +08:00
baohongde 47a164b3ac component/bt: Using osi_malloc instead of malloc 2018-07-11 11:15:41 +00:00
baohongde d7c4ec5235 component/bt: Add profile descriptor list for SPP 2018-07-11 11:14:41 +00:00
morris 5c6e1e6e67 pthread: fix esp_pthread.h to compatible with c++
esp_pthread.h is missing the necessary extern "C"{ ... } wrapper to be compatible with C++. The result is link errors when you call its functions from C++ code, because the compiler generates mangled names.

Closes https://github.com/espressif/esp-idf/issues/2121
Closes https://github.com/espressif/esp-idf/issues/2172
2018-07-11 14:21:09 +08:00
XiaXiaotian c96d80f789 esp32: synchronize header file with that in wifi library 2018-07-11 12:11:06 +08:00
Konstantin Kondrashov ac3508615a soc/clk: Fix range CONFIG_ESP32_RTC_CLK_CAL_CYCLES
Fixed the error division on zero.
Also fixed range CONFIG_ESP32_RTC_CLK_CAL_CYCLES in Kconfig.
Fixed a overflow error by TIMG in the function rtc_clk_cal_internal. This error was due to a limit in values TIMG_RTC_CALI_MAX=0x7FFF (to write the slowclk_cycles) and TIMG_RTC_CALI_VALUE=0x1FFFFFF (to read xtal_cycles). Added assert finctions.

Closes https://github.com/espressif/esp-idf/issues/2147
2018-07-10 11:56:12 +05:00
Roland Dobai 20f80da723 esp32: Do not document error codes defined in examples 2018-07-10 07:57:54 +02:00
baohongde 21af1d7339 component/bt: Add Secure Simple Pairing 2018-07-10 11:18:52 +08:00
Jiang Jiang Jian 9d830a6f7c Merge branch 'bugfix/tw23667_tcp_pcb_purge_assert' into 'master'
lwip: fix the assertion in tcp_pcb_purge()

See merge request idf/esp-idf!2657
2018-07-10 10:16:47 +08:00
Wangjialin ab44c6ecc2 bugfix(ledc): fix bugs reported from unit-test and github.
1. In ledc_set_duty_and_update, return if duty updated. Close https://github.com/espressif/esp-idf/issues/2082
2. fix ledc_set_freq function for low speed mode.
2018-07-10 02:22:23 +08:00
Anton Maklakov 27311811e0 Merge branch 'bugfix/gcc8_complation_errors' into 'master'
Warnings and errors detected by GCC8

See merge request idf/esp-idf!2703
2018-07-09 22:55:52 +08:00
Jiang Jiang Jian 3e7a5c4f50 Merge branch 'bugfix/wifi_channel_state_information_data_type' into 'master'
esp32: Change channel state information(CSI) data type from unsigned char to signed char

See merge request idf/esp-idf!2694
2018-07-09 21:28:09 +08:00
Alexey Gerenkov c2dc09304c gcc8_newlib3: Compilation warnings and errors not specific to newlib v3 2018-07-09 13:22:24 +03:00
Ivan Grokhotkov 82047ff181 Merge branch 'bugfix/smartconfig_ack' into 'master'
smartconfig_ack.c : Fixed the declaration of remote_ip in sc_ack_send_task()

See merge request idf/esp-idf!2689
2018-07-09 16:20:22 +08:00
Chris Morgan 3e1633354a ssl_pm_reload_crt() - Fix verify_mode checking to match openssl documentation https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_verify.html
Merges https://github.com/espressif/esp-idf/pull/2162
2018-07-09 14:41:56 +08:00
Le-Andrew a8da9c1b96 Fixed typos on booleans.
Merges https://github.com/espressif/esp-idf/pull/2067
2018-07-09 14:36:06 +08:00
wangmengyang 1ade9a34d2 component/bt: bugfix for erroneous data reporting always enabled 2018-07-09 13:45:55 +08:00
Jiang Jiang Jian f22a74b85c Merge branch 'bugfix/btdm_invalid_sco_handle' into 'master'
component/bt: bugfix of invalid SCO handle in HCI number_of_completed_packets event

See merge request idf/esp-idf!2707
2018-07-09 12:10:02 +08:00
Jiang Jiang Jian 6bf435217e Merge branch 'bugfix/disable_lwip_trust_ip_by_default' into 'master'
lwip: disable ETHARP_TRUST_IP_MAC by default

See merge request idf/esp-idf!2652
2018-07-09 10:03:30 +08:00
michael c34672e7dc fix(sdmmc): disable all pulldowns used by sdmmc host 2018-07-06 18:17:51 +08:00
michael 597eda5f0b fix(sdio_slave): improve sdio slave for high speed and 4 bit mode 2018-07-06 18:17:50 +08:00
michael 823ebba0f0 fix(sdio_slave): fix minor issues like return value of send function, output arg, etc. 2018-07-06 18:17:49 +08:00
Ivan Grokhotkov d92c1d02e7 Merge branch 'bugfix/bootloader_entry_addr_decoding' into 'master'
bootloader: move iram_seg 1k up to have better looking idf_monitor output

See merge request idf/esp-idf!2699
2018-07-05 16:18:33 +08:00
Ivan Grokhotkov 934df45473 Merge branch 'bugfix/xthal_get_interrupt_volatile' into 'master'
xtensa: make XTHAL_GET_INTERRUPT, XTHAL_GET_CCOUNT volatile

See merge request idf/esp-idf!2681
2018-07-05 16:18:18 +08:00
Liu Zhi Fu 49c236d613 lwip: fix the assertion in tcp_pcb_purge()
Fix the assertion in tcp_pcb_purge().
2018-07-05 14:29:03 +08:00
wangmengyang 0ede362f84 component/bt: bugfix of invalid SCO handle in HCI number_of_completed_packets event 2018-07-05 12:00:41 +08:00
Ivan Grokhotkov 6d46220456 Merge branch 'feature/clock_gettime' into 'master'
newlib: Add function clock_gettime()

See merge request idf/esp-idf!2610
2018-07-04 18:09:04 +08:00
Angus Gratton c445da47de Merge branch 'feature/CAN_driver' into 'master'
CAN driver, examples, and docs

See merge request idf/esp-idf!2098
2018-07-04 17:33:24 +08:00
Ivan Grokhotkov 6ee3cf67bd Merge branch 'feature/nvs_part_gen_improvements' into 'master'
Feature/nvs part gen improvements

See merge request idf/esp-idf!2555
2018-07-04 17:33:13 +08:00
Darian Leung 1d2727f4c8 CAN Driver
The following commit contains the first version of the ESP32 CAN Driver.

closes #544
2018-07-04 14:01:57 +08:00
Ivan Grokhotkov 5551b3f616 bootloader: move iram_seg 1k up to have better looking idf_monitor output
When 2nd stage bootloader loads the ROM bootloader, it prints a
message similar to "entry 0x40080xxx", which idf_monitor decodes
(using application ELF file) as one of the reset vectors (xxx is <
400h). This moves the iram_seg of bootloader 1k up to prevent overlap
of bootloader .text and application vectors, making the output look
nicer. There is still a chance that the entry point decodes as some
symbol in application ELF file, but at least it won't have
"Exception" in its name.
2018-07-04 12:33:11 +08:00
Ivan Grokhotkov 10c2cddddf sleep: fix flushing UARTs when entering deep sleep
Since 94250e42a0, UART output is suspended when entering sleep mode
(deep or light sleep). This makes sense for light sleep, where sleep
normally takes small amount of time, and flushing the UART would add
a lot of latency. But this breaks existing behaviour for deep sleep,
where UART output was previously sent out before entering sleep mode.

Closes https://github.com/espressif/esp-idf/issues/2145
2018-07-04 12:11:25 +08:00
Xia Xiaotian eda05b6ce8 esp32: Change channel state information(CSI) data type from unsigned char to signed char 2018-07-04 11:39:14 +08:00
Angus Gratton a3c43251b4 Merge branch 'feature/fix_rs485_test' into 'master'
driver: fix rs485 test

See merge request idf/esp-idf!2690
2018-07-04 09:13:52 +08:00
Alexey Gerenkov 13384221a7 host_file_io: Fixes uninitialized 'offset' and 'whence' fseek args 2018-07-03 19:34:13 +03:00
Alex Lisitsyn 9ba0808228 driver: fix rs485 test 2018-07-03 13:26:28 +02:00
Sachin Parekh e5049021ed smartconfig_ack.c : Fixed the declaration of remote_ip in sc_ack_send_task()
remote_ip was declared to be a pointer to an address that was
overwritten in later stage thus changing the address pointed by remote_ip

esp_smartconfig.h : Fixed a typo. station_config to wifi_config_t

Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2018-07-03 16:28:24 +05:30
Angus Gratton 909eec9c3b Merge branch 'feature/uart_add_rs485_interface_support' into 'master'
driver: add rs485 half duplex interface support to uart driver

See merge request idf/esp-idf!2415
2018-07-03 14:34:33 +08:00
Angus Gratton 52f4ff6220 Merge branch 'feature/spi_little_endien' into 'master'
feature(spi): provide macro to write multi-byte data straightly

See merge request idf/esp-idf!2634
2018-07-03 14:32:41 +08:00
Konstantin Kondrashov e274940a46 newlib: Add some functions from _POSIX_TIMERS
clock_gettime();
clock_settime();
clock_getres();

Closes https://github.com/espressif/esp-idf/issues/1302
2018-07-03 07:28:29 +05:00
Alex Lisitsyn a9fca0c775 driver: add rs485 half duplex interface support to uart driver (fix after review)
An existing UART driver does not support RS485 half duplex mode.
This task adds this functionality to ESP_IDF UART driver.
driver/uart.c/h: updated to add support of RS485 half duplex mode
examples/peripherals/uart_echo_rs485/main/rs485_example.c: added test example
components/driver/test/test_uart.c: added test of RS485 half duplex mode
docs/en/api-reference/peripherals/uart.rst: updated documentation
test_uart.c: suppress GCC warnings about discarded const qualifiers
uart.rst: remove sphinx warning - "Duplicate explicit target name"
simple change in uart.h file
update (test_uart.c) after rebase from master
update uart.rst, uart.c, rs485_example.c
Update example description in file Readme.md
update uart.c/h, uart.rst, test_uart.c according to review results
update uart.h (uart_set_rx_timeout() description
test_uart.c remove ignore tag
uart.c/h: fix param errors
test_uart.c: Remove GCC warning supress
uart.rst: fix the notes
rs485_example.c: fix output
uart.c: remove reset using UART_RXFIFO_RST from driver.
readme.md: Update example description

The tests are completed using RS485 adapters hardware connected to two ESP32 WROVER KITs.

TW#13812
Closes https://github.com/espressif/esp-idf/pull/667
Closes https://github.com/espressif/esp-idf/pull/1006
2018-07-02 15:24:58 +02:00
Alex Lisitsyn a952eb1a92 driver: add rs485 half duplex interface support to uart driver (fix indentation after review)
An existing UART driver does not support RS485 half duplex mode.
This task adds this functionality to ESP_IDF UART driver.
driver/uart.c/h: updated to add support of RS485 half duplex mode
examples/peripherals/uart_echo_rs485/main/rs485_example.c: added test example
components/driver/test/test_uart.c: added test of RS485 half duplex mode
docs/en/api-reference/peripherals/uart.rst: updated documentation
test_uart.c: suppress GCC warnings about discarded const qualifiers
uart.rst: remove sphinx warning - "Duplicate explicit target name"
simple change in uart.h file
update (test_uart.c) after rebase from master
update uart.rst, uart.c, rs485_example.c
Update example description in file Readme.md
update uart.c/h, uart.rst, test_uart.c according to review results
update uart.h (uart_set_rx_timeout() description
test_uart.c remove ignore tag
uart.c/h: fix param errors
test_uart.c: Remove GCC warning supress
uart.rst: fix the notes
rs485_example.c: fix output

The tests are completed using RS485 adapters hardware connected to two ESP32 WROVER KITs.

TW#13812
Closes https://github.com/espressif/esp-idf/pull/667
Closes https://github.com/espressif/esp-idf/pull/1006
2018-07-02 15:24:58 +02:00
Alex Lisitsyn ef5dc73f6f driver: add rs485 half duplex interface support to uart driver (update after review)
An existing UART driver does not support RS485 half duplex mode.
This task adds this functionality to ESP_IDF UART driver.
driver/uart.c/h: updated to add support of RS485 half duplex mode
examples/peripherals/uart_echo_rs485/main/rs485_example.c: added test example
components/driver/test/test_uart.c: added test of RS485 half duplex mode
docs/en/api-reference/peripherals/uart.rst: updated documentation
test_uart.c: suppress GCC warnings about discarded const qualifiers
uart.rst: remove sphinx warning - "Duplicate explicit target name"
simple change in uart.h file
update (test_uart.c) after rebase from master
update uart.rst, uart.c, rs485_example.c
Update example description in file Readme.md
update uart.c/h, uart.rst, test_uart.c according to review results
update uart.h (uart_set_rx_timeout() description
test_uart.c remove ignore tag
uart.c/h: fix param errors
test_uart.c: Remove GCC warning supress
uart.rst: fix the notes
rs485_example.c: fix output

The tests are completed using RS485 adapters hardware connected to two ESP32 WROVER KITs.

TW#13812
Closes https://github.com/espressif/esp-idf/pull/667
Closes https://github.com/espressif/esp-idf/pull/1006
2018-07-02 15:24:58 +02:00
Alex Lisitsyn d096b3abb8 driver: add rs485 half duplex interface support to uart driver (remove ignore tag to check ut case)
An existing UART driver does not support RS485 half duplex mode.
This task adds this functionality to ESP_IDF UART driver.
driver/uart.c/h: updated to add support of RS485 half duplex mode
examples/peripherals/uart_echo_rs485/main/rs485_example.c: added test example
components/driver/test/test_uart.c: added test of RS485 half duplex mode
docs/en/api-reference/peripherals/uart.rst: updated documentation
test_uart.c: suppress GCC warnings about discarded const qualifiers
uart.rst: remove sphinx warning - "Duplicate explicit target name"
simple change in uart.h file
update (test_uart.c) after rebase from master
update uart.rst, uart.c, rs485_example.c
Update example description in file Readme.md
update uart.c/h, uart.rst, test_uart.c according to review results
update uart.h (uart_set_rx_timeout() description
test_uart.c remove ignore tag

The tests are completed using RS485 adapters hardware connected to two ESP32 WROVER KITs.

TW#13812
Closes https://github.com/espressif/esp-idf/pull/667
Closes https://github.com/espressif/esp-idf/pull/1006
2018-07-02 15:24:58 +02:00
Alex Lisitsyn b76693fe20 driver: add rs485 half duplex interface support to uart driver (update after review)
An existing UART driver does not support RS485 half duplex mode.
This task adds this functionality to ESP_IDF UART driver.
driver/uart.c/h: updated to add support of RS485 half duplex mode
examples/peripherals/uart_echo_rs485/main/rs485_example.c: added test example
components/driver/test/test_uart.c: added test of RS485 half duplex mode
docs/en/api-reference/peripherals/uart.rst: updated documentation
test_uart.c: suppress GCC warnings about discarded const qualifiers
uart.rst: remove sphinx warning - "Duplicate explicit target name"
simple change in uart.h file
update (test_uart.c) after rebase from master
update uart.rst, uart.c, rs485_example.c
Update example description in file Readme.md
update uart.c/h, uart.rst, test_uart.c according to review results
update uart.h (uart_set_rx_timeout() description

The tests are completed using RS485 adapters hardware connected to two ESP32 WROVER KITs.

TW#13812
Closes https://github.com/espressif/esp-idf/pull/667
Closes https://github.com/espressif/esp-idf/pull/1006
2018-07-02 15:24:58 +02:00
Alex Lisitsyn 51e9cf6848 driver: add rs485 half duplex interface support to uart driver (update after review)
An existing UART driver does not support RS485 half duplex mode.
This task adds this functionality to ESP_IDF UART driver.
driver/uart.c/h: updated to add support of RS485 half duplex mode
examples/peripherals/uart_echo_rs485/main/rs485_example.c: added test example
components/driver/test/test_uart.c: added test of RS485 half duplex mode
docs/en/api-reference/peripherals/uart.rst: updated documentation
test_uart.c: suppress GCC warnings about discarded const qualifiers
uart.rst: remove sphinx warning - "Duplicate explicit target name"
simple change in uart.h file
update (test_uart.c) after rebase from master
update uart.rst, uart.c, rs485_example.c
Update example description in file Readme.md
update uart.c/h, uart.rst, test_uart.c according to review results

The tests are completed using RS485 adapters hardware connected to two ESP32 WROVER KITs.

TW#13812
Closes https://github.com/espressif/esp-idf/pull/667
Closes https://github.com/espressif/esp-idf/pull/1006
2018-07-02 15:24:58 +02:00
Ivan Grokhotkov 32ff393afa Merge branch 'bugfix/bt_os_abstraction_layer' into 'master'
bt: fix OS abstraction layer for correct critical section API usage

See merge request idf/esp-idf!2676
2018-07-02 18:42:07 +08:00
Ivan Grokhotkov 59c96ae331 Merge branch 'bugfix/spi_flash_deadlock' into 'master'
spi_flash: raise priority of the task performing spi_flash operation

See merge request idf/esp-idf!2609
2018-07-02 18:39:16 +08:00
Ivan Grokhotkov 3238531c70 Merge branch 'bugfix/rom_libgcc_functions' into 'master'
Fix linking of libgcc math functions to ROM

See merge request idf/esp-idf!2640
2018-07-02 18:38:44 +08:00
Piyush Shah e7ddd47716 nvs_partition_generator: Add support for base64 representation of Binary data 2018-07-02 15:40:21 +05:30
Piyush Shah 8369bd244b nvs_partition_generator: Modifications to enable using the utility as a Python library
And also use directly as an executable
2018-07-02 15:39:52 +05:30
Anton Maklakov 1f3320ebdf wpa_supplicant: fix errors for GCC 8 support
components/wpa_supplicant/port/include/os.h:259:29: error: 'strncpy' output truncated before terminating nul copying 3 bytes from a string of the same length [-Werror=stringop-truncation]
 #define os_strncpy(d, s, n) strncpy((d), (s), (n))
                             ^~~~~~~~~~~~~~~~~~~~~~
components/wpa_supplicant/src/wpa2/eap_peer/eap.c:410:3: note: in expansion of macro 'os_strncpy'
   os_strncpy(sm->blob[0].name, CLIENT_CERT_NAME, BLOB_NAME_LEN);
   ^~~~~~~~~~
2018-07-02 09:05:00 +00:00
Anton Maklakov f42b91fe46 spi_flash: fix errors for GCC 8 support
components/spi_flash/partition.c: In function 'load_partitions':
components/spi_flash/partition.c:179:66: error: argument to 'sizeof' in 'strncpy' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
         strncpy(item->info.label, (const char*) it->label, sizeof(it->label));
                                                                  ^
2018-07-02 09:05:00 +00:00
Anton Maklakov 714a9bda92 fatfs: fix errors for GCC 8 support and some indentation
components/fatfs/src/ff.c: In function 'f_fdisk':
components/fatfs/src/ff.c:5995:5: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
     for (n = 16; n < 256 && sz_disk / n / cluster_size > 1024; n *= 2) ;
     ^~~
components/fatfs/src/ff.c:5996:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  if (n == 256) n--;
  ^~
2018-07-02 09:05:00 +00:00
Anton Maklakov 2a810a318f ipc: fix errors for GCC 8 support
components/esp32/ipc.c: In function 'esp_ipc_init':
components/esp32/ipc.c:82:31: error: '%d' directive writing between 1 and 11 bytes into a region of size 5 [-Werror=format-overflow=]
         sprintf(task_name,"ipc%d",i);
                               ^~
components/esp32/ipc.c:82:27: note: directive argument in the range [-2147483648, 1]
         sprintf(task_name,"ipc%d",i);
                           ^~~~~~~
components/esp32/ipc.c:82:9: note: 'sprintf' output between 5 and 15 bytes into a destination of size 8
         sprintf(task_name,"ipc%d",i);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-07-02 09:05:00 +00:00
Anton Maklakov 93f6700be7 newlib: fix errors for GCC 8 support
components/newlib/include/sys/reent.h:405:11: error: unnecessary parentheses in declaration of '_sig_func' [-Werror=parentheses]
   void (**(_sig_func))(int);
           ^
2018-07-02 09:05:00 +00:00
Michael (XIAO Xufeng) 3d23fe9a61 feature(spi): provide macro to write multi-byte data straightly
resolves https://github.com/espressif/esp-idf/issues/2062
2018-07-02 15:34:47 +08:00
Liu Zhi Fu c84a2b9027 lwip: disable ETHARP_TRUST_IP_MAC by default
Disable ETHARP_TRUST_IP_MAC by default because:
1. The LAN peer may not be trustful
2. The LAN peer may has problem to update its ARP entry
2018-07-02 13:38:29 +08:00
Ivan Grokhotkov ae006fed83 esp32: force pure math functions from libgcc to be linked from ROM 2018-07-02 12:49:57 +08:00
Ivan Grokhotkov 40b5f10611 esp32: fix addresses of some libgcc functions in ROM ld script 2018-07-02 12:49:57 +08:00
Ivan Grokhotkov da179e0098 xtensa: make XTHAL_GET_INTERRUPT, XTHAL_GET_CCOUNT volatile
INTERRUPT and CCOUNT registers will change outside of program control.
Making the inline assembly used to read these registers volatile
indicates this fact to the compiler.

Fixes https://github.com/espressif/esp-idf/issues/2127
2018-07-02 11:31:19 +08:00
Angus Gratton 6d1995b9d2 Merge branch 'bugfix/lwip_socket_leak_accept_enfile' into 'master'
lwip: Fix leak when accept() fails due to max socket limit

See merge request idf/esp-idf!2585
2018-07-02 09:02:21 +08:00
Mahavir Jain bd177a34c6 bt: fix OS abstraction layer for correct critical section API usage
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-07-01 19:07:51 +05:30
Ivan Grokhotkov f9f2937694 spi_flash: raise priority of the task performing spi_flash operation
The fix is for the situation when cache disabling mechanism causes
a deadlock with user tasks. Situation is as follows:

1. spi_flash operation is started from low-priority task on CPU0
2. It uses IPC to wake up high-priority IPC1 task on CPU1, preventing
   all other tasks on CPU1 from running. This is needed to safely
   disable the cache.
3. While the task which started spi_flash operation is waiting for IPC1
   task to acknowledge that CPU1 is not using cache anymore, it is
   preempted by a higher priority application task ("app0").
4. Task app0 busy-waits for some operation on CPU1 to complete. But
   since application tasks are blocked out by IPC1 task, this never
   happens. Since app0 is busy-waiting, the task doing spi flash
   operation never runs.

The more or less logical soltion to the problem would be to also do
cache disabling on CPU0 and the SPI flash operation itself from IPC0
task. However IPC0 task stack would need to be increased to allow doing
SPI flash operation (and IPC1 stack as well). This would waste some
memory. An alternative approach adopted in this fix is to call FreeRTOS
functions to temporary increase the priority of SPI flash operation task
to the same level as the IPC task.

Fixes https://github.com/espressif/arduino-esp32/issues/740
Fixes https://github.com/espressif/esp-idf/issues/1157
2018-07-01 20:44:42 +08:00
Jiang Jiang Jian abbccb7acd Merge branch 'bugfix/coex_bug' into 'master'
esp32: fix coex bug

See merge request idf/esp-idf!2603
2018-06-30 22:29:18 +08:00
Jiang Jiang Jian b1fa1ba617 Merge branch 'bugfix/btdm_fix_gattc_register_multi_srvc_chg' into 'master'
Component/bt: fix register multi service change when register multi gattc

See merge request idf/esp-idf!2625
2018-06-30 11:30:41 +08:00
Jiang Jiang Jian b727113fc1 Merge branch 'bugfix/btdm_delete_deprecated_files' into 'master'
Component/bt: delete deprecated files

See merge request idf/esp-idf!2583
2018-06-29 19:37:03 +08:00
Jiang Jiang Jian 53ce5fd106 Merge branch 'bugfix/btdm_bt_remove_device_disconnect' into 'master'
component/bt: Fix bug of BT and BLE remove bond device

See merge request idf/esp-idf!2562
2018-06-29 19:29:57 +08:00
Jiang Jiang Jian fe0dc407da Merge branch 'bugfix/btdm_bad_pointer_of_bt_gap' into 'master'
component/bt: Fix some bad point calculations of BT GAP

See merge request idf/esp-idf!2655
2018-06-29 19:25:13 +08:00
Tian Hao e3df7d97a7 esp32: fix coex bug
1. fix BLE connection missing in coex mode
    2. modify other parameters to make coex priority more reasonable
    3. fix modem sleep procedure trap cause Wifi disable RF when BT is
    working. Such cause that BR/EDR is difficult to be connected, BLE
    connection stability decrease and so on.
    4. modify BR/EDR coexist duration to imrove BR/EDR connect success
    ratio.
    5. Due to the hardware coexist bug, BLE scan interval/window should
    be less than 0x100(about 160ms). Therefore, it will cause BLE cannot
    scan any advertising packet while WiFi have higher priority
    behaviour(such like RX beacon, scan, TX/RX VO packets and etc.).
2018-06-29 16:28:11 +08:00
Jiang Jiang Jian 824782d6f9 Merge branch 'feature/optimize_wifi_memory' into 'master'
Optimize WiFi memory

See merge request idf/esp-idf!2650
2018-06-29 15:24:09 +08:00
Jiang Jiang Jian 0e4b28e893 Merge branch 'bugfix/btdm_fix_stop_adv_error_in_dual_core' into 'master'
component/bt: fix stop adv error in dual core

See merge request idf/esp-idf!2561
2018-06-29 15:06:49 +08:00
Jiang Jiang Jian 1124e073d7 Merge branch 'bugfix/btdm_fix_no_adv_packet' into 'master'
component/bt: fix no adv packets

See merge request idf/esp-idf!2647
2018-06-29 14:59:01 +08:00
zhiweijian d1c3c8494b Component/bt: fix register multi service change when register multi gattc 2018-06-29 06:54:16 +00:00
Jiang Jiang Jian 34797d8d52 Merge branch 'bugfix/btdm_respond_error_when_receives_unsupported_request' into 'master'
component/bt: Fix bug: Respond with the Error Response when receiving a request…

See merge request idf/esp-idf!2591
2018-06-29 14:47:12 +08:00
Jiang Jiang Jian 9510f77f7a Merge branch 'bugfix/btdm_rm_assert_in_isr' into 'master'
bugfix/btdm_rm_assert_in_isr

See merge request idf/esp-idf!2633
2018-06-29 14:24:28 +08:00
Jiang Jiang Jian a1a2a2009d Merge branch 'bugfix/prevent_btsleep_dfs_coex' into 'master'
prevent Dynamic Frequency Scaling to be used together with bluetooth modem sleep

See merge request idf/esp-idf!2645
2018-06-29 14:23:40 +08:00
baohongde be8ec6b8d2 component/bt: Fix some bad point calculations of BT GAP
In response to: https://github.com/espressif/esp-idf/issues/2103
2018-06-29 11:40:46 +08:00
Liu Zhi Fu d3388c9a31 Optimize WiFi memory
Optimize wifi memory (b987c01d)
1. Decrease WiFi task stack size by 512 Bytes
2. Modify WiFi NVS configuration array from static to dynamic
3. Move interrupt/RX relating variables from .bss segment to .data segment
4. Modify WiFi management short buffer from static to dynamic
5. Remove some useless WiFi buffer space
2018-06-28 21:24:44 +08:00
wangmengyang 04ea784011 prevent Dynamic Frequency Scaling when using bluetooth modem sleep
This constraint will be elimiated after the issue is fixed
2018-06-28 18:08:18 +08:00
zwj 077380a352 component/bt: fix no adv packets 2018-06-28 17:49:41 +08:00
wangmengyang cfea04b6b3 component/bt: fix the cornered case caused by singular finetime correction value upon waking up from sleep
1. revert previous changes that adds 1-slot margin for first master Tx event, since this bugfix can handle that case
2018-06-27 20:21:39 +08:00
wangmengyang 02a620811d component/bt: remove the call of assert in time conversion functions which can be caused in ISR 2018-06-27 17:23:23 +08:00
He Yin Ling e75628b4d7 Merge branch 'bugfix/pcnt_event_edge_case' into 'master'
test: fix pcnt unit test fail

See merge request idf/esp-idf!2614
2018-06-27 10:00:53 +08:00
Angus Gratton cff573cbe9 Merge branch 'bugfix/conn_stress_test_test_during_sleep' into 'master'
Bugfix/btdm_le_conn_initiating_assert

See merge request idf/esp-idf!2595
2018-06-27 08:12:49 +08:00
Jiang Jiang Jian a698035fa9 Merge branch 'mesh/bugfix' into 'master'
mesh: update libs

See merge request idf/esp-idf!2580
2018-06-26 17:06:19 +08:00
houchenyao 1878109a7f bugfix: fix pcnt case "PCNT interrupt method test(control IO is high)" 2018-06-26 13:35:14 +08:00