Commit graph

5564 commits

Author SHA1 Message Date
zhiweijian 7c6211fe45 Component/bt: fix save keys when auth mode without bond 2018-12-13 15:43:31 +08:00
Jiang Jiang Jian d75ab3208f Merge branch 'test/add_case_to_detect_ds2ds_issue' into 'master'
test: add case to detect ds2ds issue

See merge request idf/esp-idf!3834
2018-12-13 14:49:30 +08:00
Jiang Jiang Jian bfd22a24da Merge branch 'bugfix/btdm_fix_accept_specified_sec_auth' into 'master'
Component/bt: fix accept specified sec auth error

See merge request idf/esp-idf!3770
2018-12-13 11:19:53 +08:00
Ivan Grokhotkov 0cf8d1380e soc/rtc: reset another BBPLL related register
Follow-up to b21ffc8a: an additional register needs to be reset.

Ref. https://github.com/espressif/esp-idf/issues/2711
2018-12-12 12:24:48 +08:00
David Cermak a6b2b73f03 mdns: resolve memory leak when txt record received multiple times 2018-12-11 21:59:44 +01:00
David Cermak 31163f02d5 mdns: skip sending search when finished, not properly locked timer task 2018-12-11 21:56:01 +01:00
wangmengyang 59f34461d7 component/bt: bugfix of bluetooth modem sleep not being able to work with Dynamic Frequency Scaling
1. start an esp_timer on entering sleep to acquire pm_lock before wake up from modem sleep
2. decrease the clock division of XTAL fed to bluetooth low power clock from 32us to 2us period to allow to work under 240MHz Max CPU frequency
3. decrease the minimum sleep duration threshold to allow shorter bluetooth modem sleep period, especially for BLE with short connection interval
4. reconfigure bluetooth baseband(BT-BB) settings after PHY/RF init upon waking up from modem sleep to avoid packet RX/TX performance degradation
2018-12-11 16:49:01 +08:00
Konstantin Kondrashov dde1fd9b94 bootloader: Add support flags for rollback app
Added
* Set actual ota_seq if both ota are init or incorrect.
* Description of rollback
* UT tests

Closes TW15459
2018-12-11 11:54:21 +08:00
Konstantin Kondrashov c0f5e58bdc build: Add trimming PROJECT_VER and PROJECT_NAME vars 2018-12-11 11:23:53 +08:00
Supreet Deshpande 55d5ee1e79 bugfix/ota_magic_byte_issue: Fixes OTA magic byte error
On enabling flash encryption, OTA fails with magic byte error in the second chunk
if the http data is split into two or more chunks and first chunk is less than 16.
2018-12-10 17:16:38 +05:30
Ivan Grokhotkov 230147a169 Merge branch 'bugfix/nvs_test_compile_err' into 'master'
nvs_flash: Fix compilation of host testcases when g++-8.x is used.

See merge request idf/esp-idf!3699
2018-12-10 17:42:43 +08:00
Anton Maklakov 81bf07ed4d test: Fix some unused identifier warnings 2018-12-10 12:34:16 +08:00
Ivan Grokhotkov 26a6b3b243 Merge branch 'feature/unity_set_test_from_gdb' into 'master'
unity: add a hook to run test from gdb session

See merge request idf/esp-idf!3916
2018-12-10 12:25:39 +08:00
Sagar Bijwe fc37dc1944 nvs_flash: Fix compilation of host testcases when g++-8.x is used.
When std::bind is used, it requires inclusion of <functional> header.
This was not mandatory with earlier versions of g++ (4.x), may be because they
had experimental support for c++11.
2018-12-07 09:40:45 +00:00
Ivan Grokhotkov 04c511c9b5 panic: dump some instruction memory on IllegalInstruction exception 2018-12-07 16:50:00 +08:00
Ivan Grokhotkov 6c868c4bee Merge branch 'bugfix/bbpll_wakeup_reset' into 'master'
soc/rtc: reset BBPLL config when enabling it

See merge request idf/esp-idf!3911
2018-12-07 14:21:59 +08:00
Ivan Grokhotkov 8b885fb935 Merge branch 'docs/add_note_for_ulp_set_wakeup_period' into 'master'
ulp: add note regarding limitation of ulp_set_wakeup_period in deep sleep mode

See merge request idf/esp-idf!3796
2018-12-07 14:07:14 +08:00
Ivan Grokhotkov def2a13297 Merge branch 'bugfix/app_version' into 'master'
app_update: Fix esp_app_desc unused var for Cmake

See merge request idf/esp-idf!3891
2018-12-07 14:06:17 +08:00
Ivan Grokhotkov 423d7b9a65 Merge branch 'bugfix/sysview_cache_err' into 'master'
app_trace: linker fragment fixes

See merge request idf/esp-idf!3835
2018-12-07 14:04:28 +08:00
Ivan Grokhotkov 893cb83343 Merge branch 'bugfix/vfs_unregister_nested' into 'master'
vfs: fix unregister removing top level VFS instead of nested

See merge request idf/esp-idf!3917
2018-12-07 14:03:34 +08:00
Ivan Grokhotkov 4e77efc36b Merge branch 'bugfix/clang_compatibility' into 'master'
clang compatibility fixes

See merge request idf/esp-idf!3912
2018-12-07 14:03:05 +08:00
Konstantin Kondrashov d4cb14bc65 app_update: Fix esp_app_desc unused var for Cmake 2018-12-07 12:04:40 +08:00
Ivan Grokhotkov 61beb16225 vfs: fix unregister removing top level VFS instead of nested
Credits @neoniousTR.

Fixes https://github.com/espressif/esp-idf/pull/2770
2018-12-06 19:43:49 +08:00
Ivan Grokhotkov a646ea7993 unity: add a hook to run test from gdb session 2018-12-06 19:37:51 +08:00
Tian Hao 357f2264e6 fix bug that there's very low ratio to cause BLE assert(32768, 0) in rwble.c at line 222 2018-12-06 16:54:14 +08:00
Ivan Grokhotkov 3150920cb4 heap: __builtin_return_address argument has to be a literal value
Clang does not accept const int as an argument of __builtin_return_address.

Ref LLVM-14
2018-12-06 16:14:14 +08:00
Ivan Grokhotkov 271a2e8e97 console, ulp: don’t use nested functions
These are not supported by clang

Ref LLVM-12
2018-12-06 16:12:47 +08:00
Ivan Grokhotkov b21ffc8a0c soc/rtc: reset BBPLL configuration after enabling it
A workaround to reset BBPLL configuration after light sleep. Fixes the
issue that Wi-Fi can not receive packets after waking up from light
sleep.

Ref. https://github.com/espressif/esp-idf/issues/2711
2018-12-06 14:43:24 +08:00
Jiang Jiang Jian d3b3f1e4a3 Merge branch 'bugfix/ethernet_enable_second_failure' into 'master'
fix ethernet phy init timeout

See merge request idf/esp-idf!3879
2018-12-05 16:12:19 +08:00
Jiang Jiang Jian eb27686416 Merge branch 'bugfix/btdm_bugs_caused_by_coex' into 'master'
component/bt and esp32:  fix two bluetooth bugs that caused by coexist module

See merge request idf/esp-idf!3860
2018-12-05 14:17:14 +08:00
Ivan Grokhotkov 37975c186d Merge branch 'feature/pthread_name_affinity_config' into 'master'
pthread: make affinity and task name configurable

See merge request idf/esp-idf!3878
2018-12-05 13:46:05 +08:00
Ivan Grokhotkov e04fd42176 Merge branch 'feature/refactoring_ota_part' into 'master'
bootloader/app_update: Refactoring otadata part

See merge request idf/esp-idf!3544
2018-12-05 12:59:34 +08:00
Angus Gratton 36be9b36dd Merge branch 'bugfix/fix_menuconfig_for_windows' into 'master'
Fix various errors for menuconfig on Windows

Closes #50

See merge request idf/esp-idf!3848
2018-12-05 11:34:49 +08:00
Konstantin Kondrashov f9522a0eb6 bootloader app_update: Refactoring otadata part 2018-12-05 11:20:03 +08:00
Ivan Grokhotkov 8a7b46aa90 Merge branch 'feature/anti_rollback_exp' into 'master'
esp32: Add firmware version to app

See merge request idf/esp-idf!3461
2018-12-05 11:10:04 +08:00
Angus Gratton 441e2d5011 Merge branch 'bugfix/register_structs_stdint' into 'master'
soc: Add "#include <stdint.h>" to all register structs

See merge request idf/esp-idf!3875
2018-12-05 08:05:56 +08:00
Anton Maklakov deaecf164d make: fix unexpected operator warning 2018-12-05 07:54:59 +08:00
Renz Christian Bagaporo d411175e47 mbedtls, cmake: set host as unix when building in msys 2018-12-05 07:54:59 +08:00
zhiweijian 5c5799fa51 Component/bt: fix auth_mode error when reconnection in SMP 2018-12-04 18:05:25 +08:00
morris dc043109d7 ethernet: phy init timeout
When ethernet enable again after disable it before, phy init will report timeout.
The cause of this problem is that the enabling of emac clock is too late, and should be placed before phy init.
2018-12-04 17:13:48 +08:00
Jeroen Domburg d6ee27e313 Merge branch 'feat/spi_check_length_buffer' into 'master'
spi: add checks for slave buffer valid and master length

See merge request idf/esp-idf!3744
2018-12-04 11:48:32 +08:00
Angus Gratton 7f32995a4c soc: Add "#include <stdint.h>" to all register structs
Closes https://github.com/espressif/esp-idf/issues/2239

TW24912
2018-12-04 11:17:38 +11:00
Tian Hao a9429ee5da component/bt and esp32: fix two bluetooth bugs that caused by coexist module
1. Fix interrupt watchdog timeout in bluetooth "btdm_bb_isr"
    2. Fix BLE assert(512) or assert(1536)  in rwble.c at line 222
    3. Update librtc.a to fix BLE assert(512) in rwble.c at line 222

    The #1 and #2 occurs random.
    The #3 bug occurs in certain scenario:
    	1. If Wifi start softap and BLE is working
    	2. If wifi start station, but do not use normal station operation, such
    		as just use espnow, while BLE is working
    	3. Any other scenario, that wifi works without use software coexist
    		operation, while BLE is working(such as do advertising and ...)

    4. update libcoexist.a version to v1.1.2
2018-12-03 19:41:43 +08:00
Konstantin Kondrashov 3b9cb25fe1 esp32: Add firmware version to app
Added a new structure esp_app_desc_t. It has info about firmware:
version, secure_version, project_name, time/date build and IDF version.
Added the ability to add a custom structure with a description of the firmware.

The esp_app_desc_t is located in fixed place in start of ROM secotor. It is located after structures esp_image_header_t and esp_image_segment_header_t.

app_version is filed from PROJECT_VER variable (if set in custom make file) or PROJECT_PATH/version.txt or git repo (git describe).

Add API to get app_desc from partition.
2018-12-03 16:52:04 +08:00
Mahavir Jain 588ecaae09 ulp: add note regarding limitation of ulp_set_wakeup_period in deep sleep mode 2018-12-03 11:41:10 +05:30
Angus Gratton 3bc970c5f4 Merge branch 'bugfix/partitions_tools_style_check' into 'master'
Remove parttool exemption from style check

See merge request idf/esp-idf!3847
2018-12-03 12:25:39 +08:00
Angus Gratton 554cf77963 Merge branch 'bugfix/convert_to_cmake' into 'master'
Fix minor issue with convert_to_cmake script

See merge request idf/esp-idf!3666
2018-12-03 11:39:12 +08:00
Jiang Jiang Jian 6bd497f9ed Merge branch 'feature/btdm_ble_full_scan_support' into 'master'
component/bt: Added the ble full scan supported feature.

See merge request idf/esp-idf!3820
2018-11-30 21:53:21 +08:00
Jiang Jiang Jian e07c5a22f2 Merge branch 'doc/RF_calibration' into 'master'
doc: add documentation for RF calibration

See merge request idf/esp-idf!3828
2018-11-30 21:50:29 +08:00
yulong 0f3eb977cd component/bt: Added the ble full scan supported feature.
1. Add the full scan swith in the menuconfig;
2. Change the bt lib in order to support ble full scan
2018-11-30 20:48:42 +08:00
Renz Christian Bagaporo a3b581bd8c parttool: remove exemption from style check 2018-11-30 16:39:55 +08:00
Xia Xiaotian 59761b0fcb doc: add documentation for RF calibration
Add an API to erase phy namespace of NVS
2018-11-30 16:26:56 +08:00
zhangyanjiao e621e0af8b wifi: add code for setting wifi log level and module 2018-11-30 15:24:22 +08:00
Angus Gratton 7458c1c1e2 Merge branch 'feature/ulp-assembler-version-check' into 'master'
Check assembler version

See merge request idf/esp-idf!3156
2018-11-30 14:57:01 +08:00
Angus Gratton a34a27010b Merge branch 'feature/partition_tools' into 'master'
Partition level tools

See merge request idf/esp-idf!3355
2018-11-30 14:15:51 +08:00
Ivan Grokhotkov ba844caa8a app_trace: fix linker fragment not included in Make build 2018-11-30 11:05:43 +08:00
Ivan Grokhotkov 46a948dafa app_trace: require timer driver to be in IRAM
Closes https://github.com/espressif/esp-idf/issues/2760
2018-11-30 11:05:43 +08:00
Wangjialin 924daf7b84 bugfix(i2c): reduce speed of I2C master bus reset routine and release SDA
closes https://github.com/espressif/esp-idf/issues/2494
closes https://github.com/espressif/esp-idf/pull/2493
closes https://github.com/espressif/esp-idf/pull/2496

1. Change bus reset to handle interrupted READ sequences.
2. Slow down I2C to 100khz during reset
3. If a SLAVE device was in a read operation when the bus was interrupted, the SLAVE device is controlling SDA.The only bit during the 9 clock cycles of a byte READ the MASTER(ESP32) is guaranteed control over, is during the ACK bit period.
If the SLAVE is sending a stream of ZERO bytes, it will only release SDA during the ACK bit period. The master(ESP32) cannot generate a STOP unless SDA is HIGH. So, this reset code synchronizes the bit stream with, Either, the ACK bit, Or a 1 bit.
2018-11-30 10:08:28 +08:00
chuck todd e55f9c1e98 1. Slow down I2C to 100khz During Reset
I am stealing this delay coding from @jeremyherbert #2493 pr.

2. Change Bus Reset to handle interrupted READ sequences.

The current code does not handle interrupted READ cycles.

 If a SLAVE device was in a read operation when the bus was interrupted, the SLAVE device is controlling SDA.

The only bit during the 9 clock cycles of a byte READ the MASTER(ESP32) is guaranteed control over, is during the ACK bit period.

If the SLAVE is sending a stream of ZERO bytes, it will only release SDA during the ACK bit period. The master(ESP32) cannot generate a STOP unless SDA is HIGH.

So, this reset code synchronizes the bit stream with, Either, the ACK bit, Or a 1 bit.

3. fix typo

correct `sda_id` to `sda_io` in `i2c_master_clear_bus()` @ryan-ma found it.  This typo was generated when I manually edited this patch on GitHub, I should have done a Copy/Paste operation!
2018-11-30 10:08:28 +08:00
jeremy 34c1d25c7f reduce speed of i2c master bus reset routine and release sda 2018-11-30 10:08:28 +08:00
morris 2b165f99c4 i2c_tool: add i2c_tool example test
1. add example test for i2c-tools
2. make command line arguments number configurable
2018-11-30 10:08:28 +08:00
He Yin Ling 582e89eca3 test: add test case to receive ds2ds packet 2018-11-29 23:06:16 +08:00
Ivan Grokhotkov 499fdbd33d Merge branch 'feature/fatfs_alloc_extram_option' into 'master'
fatfs: add option to prefer ext. RAM for internal buffers

See merge request idf/esp-idf!3821
2018-11-29 22:59:01 +08:00
Ivan Grokhotkov bbeb62547e fatfs: add option to prefer ext. RAM for internal buffers 2018-11-29 19:26:46 +08:00
Mahavir Jain 907b1a9032 mbedtls: align CMake build with corresponding component.mk 2018-11-29 16:23:06 +05:30
houchenyao 147447b13e test: components/driver: i2c case 2018-11-29 18:27:58 +08:00
He Yin Ling add7c49a26 Merge branch 'test/driver_i2s' into 'master'
component/driver:add i2s case

See merge request idf/esp-idf!2117
2018-11-29 14:41:09 +08:00
Wang Jia Lin 62cc522f36 Merge branch 'feature/rmt_add_api_get_free_channel' into 'master'
feature(rmt):   Add API get rmt channel's status.

See merge request idf/esp-idf!2440
2018-11-29 11:59:39 +08:00
houchenyao 44fdca94e9 test: components/driver: i2s case 2018-11-29 11:32:40 +08:00
Angus Gratton 759185b16c Merge branch 'bugfix/bt_ut_build_all' into 'master'
Fix unit test cmake build for BT

See merge request idf/esp-idf!3767
2018-11-29 09:52:55 +08:00
Ivan Grokhotkov 21b3919369 Merge branch 'bugfix/vfs_open_write_close_perf_test' into 'master'
Fix VFS unit test failure ("Open & write & close through VFS passes performance test")

Closes #44

See merge request idf/esp-idf!3759
2018-11-29 09:40:54 +08:00
Ivan Grokhotkov 1d2673eda5 Merge branch 'bugfix/uart_select_buffer' into 'master'
VFS: select() on UART should return immediately when data is buffered

See merge request idf/esp-idf!3803
2018-11-29 09:30:19 +08:00
Per Malmberg 71f57931bd #2743 - Implemented ability to core affinity and thread name for pthreads and thus also for std::thread. 2018-11-28 20:43:09 +01:00
Roland Dobai 738c56e84a Fix VFS_OPEN_WRITE_CLOSE_TIME unit test issue
Closes idf/esp-idf#44
2018-11-28 20:36:08 +01:00
Ivan Grokhotkov 98884b4f6c Merge branch 'bugfix/sysview_trace_taskid' into 'master'
freertos: fix task ID sent to the trace

See merge request idf/esp-idf!3807
2018-11-29 01:45:36 +08:00
Jiang Jiang Jian 7312294648 Merge branch 'bugfix/btdm_rf_reg' into 'master'
fix bug to unsupport rf reg access from hci cmd

See merge request idf/esp-idf!3787
2018-11-28 21:21:20 +08:00
Jiang Jiang Jian a134141320 Merge branch 'mesh/feature_channel_switch' into 'master'
mesh: add channel switch function

See merge request idf/esp-idf!3772
2018-11-28 20:11:38 +08:00
Wang Jia Lin cc5673435b Merge branch 'bugfix/fix_uart_read_bug_when_using_dual_core' into 'master'
bugfix(uart): fix uart read error bug when using dual core.

See merge request idf/esp-idf!3521
2018-11-28 16:17:13 +08:00
Renz Christian Bagaporo 5e08698039 make: use otatool and parttool for build 2018-11-28 15:57:20 +08:00
Renz Christian Bagaporo bceec35d0e cmake: use otatool and parttool for build 2018-11-28 15:57:20 +08:00
Renz Christian Bagaporo 8ca6904d55 ota: implement otatool functionality 2018-11-28 15:57:20 +08:00
Renz Christian Bagaporo 88c81c67b7 partition_table: implement new parttool functionality 2018-11-28 15:57:20 +08:00
kooho da223fad4e driver(rmt): Add API get rmt channel's status.
closes https://github.com/espressif/esp-idf/issues/1175
closes https://github.com/espressif/esp-idf/issues/2599
closes https://github.com/espressif/esp-idf/issues/2452
2018-11-28 07:20:45 +00:00
Anton Maklakov 87e8757569 bt: Fix unit tests build with CMake 2018-11-28 15:19:04 +08:00
He Yin Ling 19910c8729 Merge branch 'test/driver_mcpwm' into 'master'
test/mcpwm_case

See merge request idf/esp-idf!1831
2018-11-28 13:56:05 +08:00
Ivan Grokhotkov 8eb40bea51 freertos: pass TCB rather than the array to trace functions 2018-11-28 12:26:34 +08:00
Wang Jia Lin 70554e8caa Merge branch 'doc/uart_lightsleep_wakeup_doc' into 'master'
doc(uart):  update the comment of uart_set_wakeup_threshold

See merge request idf/esp-idf!3556
2018-11-28 11:35:56 +08:00
houchenyao 11faab2c5d test: components/driver: pwm case 2018-11-28 10:42:32 +08:00
qiyuexia 1692896e5e mesh: add channel switch function
1. add network channel switch function.
   - users can obtain the new channel through the event MESH_EVENT_CHANNEL_SWITCH.
   - the entire network will be moved to the same channel as the router without user intervention.
   - if no router is in the network, users can call esp_mesh_switch_channel() on the root side to
     move the entire network to their desired channel.
2. support not configuring the network channel.
3. support not configuring the router BSSID even if the router is hidden.
4. add allow_channel_switch to mesh configuration.
   - if the channel is not specified, this value will be ignored.
   - if the channel is specified and this value is set, when "fail" (mesh_attempts_t) times of parent selection
     or look for networks are reached, device will change to perform a full channel scan for networks that could join.
   - if the channel is specified and this value is set to 0, when a root is not elected, channel switch is not allowed.
     but when a root appears, the root performs a full channel scan during the process of connecting to the router,
     so even allow_channel_switch is set to 0, the root may still switch channel and eventually the entire network
    changes channel.
5. add allow_router_switch to mesh router configuration.
   - if the BSSID of router is not specified, this value will be ignored.
   - if the BSSID of router is specified and this value is set, when the router of this specified BSSID fails to be found
     after "fail" (mesh_attempts_t) times, the entire network is allowed to switch to another router with the same SSID.
6. modify the root to perform a full channel scan when esp_wifi_connect().
7. support handling beacon without DS Paramter Set.
2018-11-27 23:36:01 +08:00
kooho a9c1124763 driver(uart): fixed uart read error bug when using dual core.
closes https://github.com/espressif/esp-idf/issues/2204
2018-11-27 20:53:26 +08:00
Roland Dobai 957cf0ab84 VFS: select() on UART should return immediately when data is buffered 2018-11-27 13:39:00 +01:00
Renz Christian Bagaporo bec3bb3ba4 make, cmake: display ulp assembler version 2018-11-27 19:40:50 +08:00
Renz Bagaporo b35c745c4f ulp: check assembler version 2018-11-27 19:25:22 +08:00
Renz Christian Bagaporo 0908fba1a3 mbedtls: import mbedtls project w/o modification 2018-11-27 13:59:26 +08:00
Renz Christian Bagaporo 37d30c7a6e cmake: separate app from idf lib project
mbedtls: import mbedtls using unmodified cmake file
2018-11-27 13:59:24 +08:00
Angus Gratton 81231fcc4b Merge branch 'feature/i2s_tx_descriptor_auto_clear' into 'master'
i2s: add (optional) support to clear tx descriptor in underflow case

See merge request idf/esp-idf!2397
2018-11-27 13:45:51 +08:00
Tian Hao f3bfdeaeec fix bug to unsupport rf reg access from hci cmd
Always return 0 when read rf register and do nothing when write rf register
2018-11-27 12:00:06 +08:00
Angus Gratton c765035b3a Merge branch 'update/nvs_part_gen' into 'master'
nvs_util: Add changes to nvs part gen util

See merge request idf/esp-idf!3531
2018-11-26 14:26:08 +08:00
michael cfba157fdd spi_slave: add valid check for DMA buffers
The DMA cannot receive data correctly when the buffer address is not
WORD aligned. Currently we only check whether the buffer is in the DRAM
region.

The DMA always write in WORDs, so the length arguments should also be
multiples of 32 bits.

A check is added to see whether the buffer is WORD aligned and has valid
length.
2018-11-26 03:49:26 +00:00
michael 435adaa22a spi_master: add check for trans len
The driver decide whether use MOSI/MISO phases according to the buffer
address together with the SPI_TRANS_USE_*DATA. However someone may assue
that these phases will be skipped when the ``length``/``rxlength`` is
set to 0. In fact it is a feature that ``rxlength`` is allowed to be
set to 0 when tx and rx have the same length, and the driver fill the
``rxlength`` to ``length``.

An error check is added when the rxlength is 0 but there is data to be
sent.
2018-11-26 03:49:26 +00:00