Commit graph

5656 commits

Author SHA1 Message Date
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
chenjianqiang a0beff99d2 bugfix(psram): fix psram size acquisition method
1. Use BIT[7:5] of EID to determine psram size
2. Add ID support for 16Mbit psram
3. Remove module reset on SPI1
4. Confirmed with the vendor that only the old 32Mbit psram need special clock timing. For other psram chips, we should use standard QPI mode.
2018-11-28 17:05:37 +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
Angus Gratton fa59b1b1c9 Merge branch 'bugfix/fix_cmake_args_issue' into 'master'
Fix CMAKE_ARGS issue for ULP build

See merge request idf/esp-idf!3776
2018-11-26 07:58:09 +08:00
Ivan Grokhotkov 5aa7abb216 Merge branch 'bugfix/spiram_80m_clk_config' into 'master'
clk: fix regression in clock setting for SPIRAM with 80MHz config

See merge request idf/esp-idf!3724
2018-11-25 22:25:19 +08:00
Jiang Jiang Jian a0468b2bd6 Merge branch 'feature/btdm_add_update_duplicate_scan_exceptional_list_apis' into 'master'
Component/bt: add update duplicate scan exceptional list APIs

See merge request idf/esp-idf!3763
2018-11-25 18:58:53 +08:00
zhiweijian 18a27b88c7 Component/bt: fix accept specified sec auth error 2018-11-23 20:14:03 +08:00
Jiang Jiang Jian 64d038c0d5 Merge branch 'bugfix/fix_some_wifi_bugs_1121' into 'master'
esp32: fix some wifi bugs

See merge request idf/esp-idf!3756
2018-11-23 17:08:25 +08:00
Mahavir Jain 765bf674d0 i2s: add (optional) support to clear tx descriptor in underflow case
It has been observed that, in case of underflow (data unavailability) in
I2S transmission, previously filled up tx descriptors continue to get
transmitted on line, causing noise in case of audio use case.

This change adds optional `tx_desc_auto_clear` field during I2S driver intialization
than can zero initialize tx descriptor in case of underflow situation in
interrupt handler itself.

Closes: https://github.com/espressif/esp-idf/issues/1789
2018-11-23 14:31:09 +05:30
zhiweijian dd3d89db49 Component/bt: add update duplicate scan exceptional list APIs 2018-11-23 16:46:17 +08:00
Renz Christian Bagaporo 3a02a12aa4 cmake: remove unecessary info passed to bootloader build 2018-11-23 16:08:47 +08:00
Renz Christian Bagaporo 552f17e260 ulp: fix passing ulp srcs due to cmake_args bug 2018-11-23 16:08:41 +08:00
Liu Zhi Fu f874b52f0a esp32: fix some wifi bugs
Fix some WiFi bugs:
1. Enable RX BAR
2. Fix the bug that ESP32 AP negotiates with iphone to 11g
3. Fix the bug that ESP32 STA has ap_loss because CMCC AP contains two SSID
2018-11-23 05:41:41 +00:00
kooho 33138a3dec driver(i2c): enable I2C master hardware filter by default. 2018-11-23 10:27:59 +08:00
Jiang Jiang Jian e199587a11 Merge branch 'bugfix/btdm_move_func_into_iram' into 'master'
components/bt: Move function in interrupt into IRAM

See merge request idf/esp-idf!3757
2018-11-22 19:17:37 +08:00
baohongde 7e142f9d22 components/bt: Move function in interrupt into IRAM
1. Move function in interrupt into IRAM
2. Delete unused code, saving 240B DRAM and some code size
2018-11-22 15:59:53 +08:00
Ivan Grokhotkov 09a01f68ba Merge branch 'bugfix/calloc_recursive' into 'master'
newlib: disable some optimizations for syscalls.c

See merge request idf/esp-idf!3774
2018-11-22 15:24:17 +08:00
Ivan Grokhotkov 8deb885ce3 newlib: disable some optimizations for syscalls.c
Don’t allow the compiler to convert malloc + memset into calloc,
causing a recursive call in _calloc_r. Fixes crash when building with
-O2 optimization level.
2018-11-22 12:19:49 +08:00
qiyueixa 86fedc3cbb utest: increase IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME to 50000 2018-11-21 19:14:07 +08:00
qiyueixa 6c3b5ae5a1 mesh: bugfix
1. fix failture of mesh stop caused by block-sending.
2. fix when FIXED_ROOT is set, 2nd layer devices can not receive mesh event ESP_ERR_MESH_NO_PARENT_FOUND.
3. fix when FIXED_ROOT is set and the root turns off mesh function, 2nd layer devices do not look for new parents.
4. add APIs esp_mesh_disconnect() and esp_mesh_connect().
5. disconnect from parent/router when the DSSS channel in received beacon is different from the home channel.
6. remove nvs task to release 3k bytes memory.
2018-11-21 19:13:41 +08:00
Shivani Tipnis 0c72b08872 nvs_util: update test case 2018-11-21 13:40:24 +05:30
Shivani Tipnis 582c547191 Update README 2018-11-21 12:55:47 +05:30
Shivani Tipnis c44f15441f Closes https://github.com/espressif/esp-idf/issues/2472 2018-11-21 12:55:47 +05:30
Shivani Tipnis 9db1987892 nvs_util: Add changes to nvs part gen util
nvs_util: Add changes to nvs part gen util

nvs_host_test: Add test case for keygen and keyfile paratmeters
2018-11-21 12:55:47 +05:30
Jiang Jiang Jian 0d7f2d77c2 Merge branch 'feature/btdm_add_set_long_adv_data_api' into 'master'
Component/bt: add set long adv data api

See merge request idf/esp-idf!3722
2018-11-21 11:31:13 +08:00
Jiang Jiang Jian e7f9e3f6f6 Merge branch 'bugfix/add_connected_event_after_softap_finish_4_way' into 'master'
wifi: add connected event after softap finish 4 way

See merge request idf/esp-idf!3661
2018-11-20 20:04:12 +08:00
Jiang Jiang Jian 69c9e050b0 Merge branch 'bugfix/btdm_add_check_peer_addr_type_in_set_adv_params' into 'master'
Component/bt: add check peer addr type in set adv params

See merge request idf/esp-idf!3732
2018-11-20 20:02:13 +08:00
Angus Gratton 92f32f0060 Merge branch 'fix/spi_callback_in_iram' into 'master'
spi: fix the crash when callbacks are not in the IRAM

See merge request idf/esp-idf!3498
2018-11-20 16:25:08 +08:00
Jiang Jiang Jian ffda37dd16 Merge branch 'feature/btdm_BLE_Blocking_APIs' into 'master'
Component/bt: add BLE Blocking APIs

See merge request idf/esp-idf!3513
2018-11-20 14:40:50 +08:00
Jiang Jiang Jian b422a42697 Merge branch 'bugfix/btdm_errors_in_comment' into 'master'
components/bt: Some errors in comment

See merge request idf/esp-idf!3703
2018-11-20 14:26:12 +08:00
Angus Gratton 61ee1bd31f Merge branch 'feature/esp_https_server' into 'master'
Add HTTPS Server component

See merge request idf/esp-idf!3608
2018-11-20 13:58:26 +08:00
Michael (XIAO Xufeng) 8cddfa35b8 spi: fix the crash when callbacks are not in the IRAM
Introduced in 9c23b8e5 and 4f87a62f. To get higher speed, menuconfig
options are added to put ISR and other functions into the IRAM.  The
interrupt flag ESP_INTR_FLAG_IRAM is also mistakenly set when the ISR is
put into the IRAM. However callbacks, which are wrote by the user, are
called in the master and slave ISR. The user may not be aware of that
these callbacks are not disabled during flash operations. Any cache miss
during flash operation will cause panic.

Essentially IRAM functions and intrrupt flag ESP_INTR_FLAG_IRAM are
different, the latter means not disabling the ISR during flash
operations.  New bus_config flag intr_flags is offered to help set the
interrupt attribute, including priority level, SHARED, IRAM (not
disabled during flash operations).  It introduced a small BREAK to
IDFv3.1 (but the same as IDFv3.0) that the user has to manually set IRAM
flag now (therefore he's aware of the IRAM thing) to void the ISR being
disabled during flash operations.
2018-11-20 13:07:13 +08:00
Alexey Gerenkov 3139b2d533 example: Adds SystemView tracing example app 2018-11-20 04:09:39 +00:00
Alexey Gerenkov 3eaba1c8ce esp32: Fixes SystemView lock's IRQ state restore 2018-11-20 04:09:39 +00:00
zhiweijian 775c6e5ab7 Component/bt: add set long adv data api 2018-11-20 11:19:51 +08:00
Ivan Grokhotkov 8027adaf81 esp32, mbedtls: check component name when enabling test flags
Otherwise flags get enabled even when building tests for other components.
2018-11-20 01:27:24 +08:00
Mahavir Jain 62efef0444 test: spiram: fix and enable test cases for default configuration 2018-11-19 22:40:14 +05:30
Ivan Grokhotkov 00a13bd8d3 Merge branch 'bugfix/init_memctl' into 'master'
bootloader, esp32: add workaround for Tensilica erratum 572

See merge request idf/esp-idf!3605
2018-11-19 18:36:47 +08:00
Ivan Grokhotkov a46b884a14 Merge branch 'feature/unit_test_example' into 'master'
Move Unity into components, add unit test example

See merge request idf/esp-idf!3562
2018-11-19 18:35:54 +08:00
zhiweijian 3c7819eaf2 Component/bt: add check peer addr type in set adv params 2018-11-19 17:04:48 +08:00
Angus Gratton 6cdfea4251 Merge branch 'fix/spi_freq_limit_check' into 'master'
spi: modify some docs about the freq limit and the ISR

See merge request idf/esp-idf!3686
2018-11-19 14:02:40 +08:00
Angus Gratton 8915f48208 Merge branch 'feature/linker_script_generator' into 'master'
Linker script generator

See merge request idf/esp-idf!2286
2018-11-19 12:43:27 +08:00
Ivan Grokhotkov 964f5a91f7 bootloader, esp32: add workaround for Tensilica erratum 572
If zero-overhead loop buffer is enabled, under certain rare conditions
when executing a zero-overhead loop, the CPU may attempt to execute an invalid instruction. Work around by disabling the buffer.
2018-11-19 04:39:35 +00:00
Ivan Grokhotkov a98674d78b unity: don't use stdio in runner, fix code style 2018-11-19 12:36:31 +08:00
Ivan Grokhotkov 6091021e83 unity: separate common and IDF specific functionality
New unity component can be used for testing other applications.
Upstream version of Unity is included as a submodule.
Utilities specific to ESP-IDF unit tests (partitions, leak checking
setup/teardown functions, etc) are kept only in unit-test-app.
Kconfig options are added to allow disabling certain Unity features.
2018-11-19 12:36:31 +08:00
Ivan Grokhotkov aa692b3483 vfs: implement fsync for UART VFS 2018-11-19 12:36:31 +08:00
Ivan Grokhotkov 5fb3d59a92 esp32: fix typos in rom/uart.h 2018-11-19 12:36:31 +08:00
Anurag Kar 1d3f4074de esp_https_server : change config option secure_enable to transport_mode and some minor changes
transport_mode accepts enum httpd_ssl_transport_t instead of true/false.
This will allow for extension to dual mode (server running on both secure and insecure ports) in the future.
2018-11-19 04:00:21 +00:00
Anurag Kar 9a9d18e466 esp_http_server : APIs renamed and context get/set implementations fixed
* http_sess_set_*_override APIs are now the only ones available to set custom recv/send/pending functions
* Fixed side effects to using http_sess_set/get_context inside URI handlers
2018-11-19 04:00:21 +00:00
Anurag Kar aa6066a197 esp_https_server : Docs and API references fixed 2018-11-19 04:00:21 +00:00
Ondřej Hruška 4dd0fa61e9 Add a 'esp_https_server' component allowing to use http_server with OpenSSL 2018-11-19 04:00:21 +00:00
Ondřej Hruška a10fc02dd9 esp_http_server improvements to allow adding transport layer encryption
Changes:
- renamed `httpd_free_sess_ctx_fn_t` to `httpd_free_ctx_fn_t`
- added a `httpd_handle_t` argument to `httpd_send_func_t` and `httpd_recv_func_t`
- internal function `httpd_sess_get()` is no longer static, as it's used in other
  files besides httpd_sess.c

Bug fixes:
- removed a trailing semicolon from `HTTPD_DEFAULT_CONFIG()`
- fixed issue with failed `select()`, now it automatically closes invalid sockets
  instead of shutting down the entire server

New features:
- `httpd_resp_send()` and `httpd_resp_send_chunk()` now accept -1 as length to use
  `strlen()` internally
- added `httpd_sess_set_ctx()` to accompany `httpd_sess_get_ctx()`
- added a "transport context" to the session structure (next to user context)
- added `httpd_sess_{get,set}_transport_ctx()` to work with this transport context
- added "global user context" and "global transport context" stored in the server
  config (and then the handle); supports a user-provided free_fn
- added a "pending func" to e.g. check for data in the transport layer receive
  buffer
- added functions `httpd_set_sess_{send,recv,pending}_override()` that target
  a session by ID (i.e. not using a request object)
- added `httpd_set_pending_override()`
- added a "open_fn" and "close_fn" - functions called when creating and closing
  a session. These may be used to set up transport layer encryption or some other
  session-wide feature
2018-11-19 04:00:21 +00:00
Deng Xin 5b4e3da759 wifi: add connected event after softap finish 4 way
Background

Softap will send connected event after receive assoc request as before, however, STA didn't connect to softAP if need security. As our mesh design, it will send data packet after receive connected event, so change the current behavior, softAP will send connected event if have encryption
2018-11-19 11:24:42 +08:00
Jiang Jiang Jian 26bcb7f2cf Merge branch 'bugfix/wifi_sta_sniffer_phy_config_bug' into 'master'
wifi: fix wifi sta and sniffer phy config bug

See merge request idf/esp-idf!3566
2018-11-19 10:11:23 +08:00
Mahavir Jain e3956787f6 clk: fix regression in clock setting for SPIRAM with 80MHz config
Support for HSPI to output clock for 4M SPIRAM introduced regression
in clock configuration affecting SPIRAM access with 80MHz clock. This
commit fixes the issue.
2018-11-17 00:08:20 +05:30
Ivan Grokhotkov 960c240578 Merge branch 'bugfix/cmake_ut_parsing' into 'master'
cmake: fix for parsing unit test config

See merge request idf/esp-idf!3696
2018-11-16 22:11:14 +08:00
Ivan Grokhotkov 8c9407f22f Merge branch 'bugfix/fat_lock_log' into 'master'
fatfs: Do not log from critical sections

See merge request idf/esp-idf!3683
2018-11-16 21:29:56 +08:00
Ivan Grokhotkov 96f152341a esp_timer: improve unit test robustness
1. call esp_timer_get_time and ref_clock_get in the same order on
   start and in the loop

2. disable interrupts when calculating delta between ref_clock
   and esp_timer

3. ensure both functions are in cache before calculating the delta
2018-11-16 12:00:39 +00:00
Ivan Grokhotkov 0db8c2e618 Merge branch 'feature/ut_filter_test_groups' into 'master'
unit test: allow filtering tests using TEST_GROUPS

See merge request idf/esp-idf!3695
2018-11-16 19:31:47 +08:00
Ivan Grokhotkov a55d350f43 Merge branch 'bugfix/adjtime_test2' into 'master'
Resolve ""test for thread safety adjtime and gettimeofday functions" fails randomly"

Closes #37

See merge request idf/esp-idf!3657
2018-11-16 19:21:45 +08:00
Roland Dobai ad2cdeb476 fatfs: Do not log from critical sections
Logging in the critical section can result in a deadlock when the logger
is redirected to FATFS.

Closes https://github.com/espressif/esp-idf/issues/1693
2018-11-16 11:19:01 +00:00
zhangyanjiao 8be8ea2488 wifi: fix the bug that if station (sleep is enabled) and sniffer are enabled at the same time,
when disable sniffer, station will never enable phy and rf again.

Closes: https://github.com/espressif/esp-idf/issues/2545
2018-11-16 11:16:37 +00:00
Jiang Jiang Jian 6fa2f388ef Merge branch 'bugfix/btdm_controller_disable' into 'master'
Fix two bugs when disable bluetooth controller

See merge request idf/esp-idf!3692
2018-11-16 17:10:37 +08:00
David Cermak d16762a036 mdns: sending search packets also in probing and announcing state
mdns queries did not work properly when send imeadiately after set_hostname, which cuased reinit of pcb and therefore restarted probing, so search packets were blocked until probing finished
closes #2507, closes #2593
2018-11-16 07:22:29 +00:00
Renz Bagaporo 63411fc556 tools: implement linker script generation 2018-11-16 12:42:02 +08:00
Konstantin Kondrashov b00be955ee newlib: Fix UT adjtime 2018-11-16 04:11:55 +00:00
baohongde ac5a3443a4 components/bt: Some errors in comment 2018-11-16 11:27:22 +08:00
Tian Hao 9c9aa4ea4c Fix two bugs when disable bluetooth controller
1. Fix the bug that disable controller suddenly cause crash when ble is working. (585cfba1)
2. Fix the bug that when disable controller, it will cause wifi cannot RX, TX timeout, buffer lack and etc. (f8546145)
2018-11-16 02:42:38 +00:00
Ivan Grokhotkov 7b86247428 unit-test: use TEST_GROUPS to filter tests for psram_vspi and psram_hspi 2018-11-15 12:27:05 +00:00
Alexey Gerenkov 78a7a152d1 esp32: Fixes freezing core dump process when flash write address checks are enabled 2018-11-15 06:13:48 +00:00
Alexey Gerenkov b152c1020c esp32: Adds logging level to core dump script 2018-11-15 06:13:48 +00:00
Alexey Gerenkov 76e02cadcc esp32: Adds support for core dump format version 2018-11-15 06:13:48 +00:00
Alexey Gerenkov 181a40ae30 esp32: Adds menuconfig option for max tasks number in core dump 2018-11-15 06:13:48 +00:00
Alexey Gerenkov 30e766ee6b esp32: Core dump API to retrieve current core data layout in flash 2018-11-15 06:13:48 +00:00
Alexey Gerenkov a55cc99f50 esp32: Replaces magic numbers with CRC for core dump in flash 2018-11-15 06:13:48 +00:00
Ivan Grokhotkov 8b5f61eb35 Merge branch 'bugfix/ethernet_fail_twice_init' into 'master'
fix bug of multi-call failure in esp_eth_init

See merge request idf/esp-idf!3673
2018-11-15 12:35:55 +08:00
Jiang Jiang Jian bbdcff1f45 Merge branch 'bugfix/tw27096_fix_lwip_mbox_free_crash' into 'master'
fix the crash bug caused by sys_mbox_free

See merge request idf/esp-idf!3654
2018-11-15 10:31:35 +08:00
Ivan Grokhotkov f1949a59b6 Merge branch 'bugfix/readdir_ut_timeout' into 'master'
spiffs: increase timeout in readdir test

Closes #41

See merge request idf/esp-idf!3687
2018-11-13 22:54:21 +08:00
morris eec6de57ff ethernet: multi-call failure in esp_eth_init
Because of incomplete state machine, ethernet driver will broken if esp_eth_init is called twice.
Detailed information here: https://ezredmine.espressif.cn:8765/issues/27332
2018-11-13 16:38:45 +08:00
michael 26626dfbf2 spi: add documents explicitly showing the executing core of the ISR
It is an ESP specific FreeRTOS feature that the ISR is always executed
on the core which calls the interrupt register function. In the SPI
driver, the function is always called in the bus initialization
function.

Hence, the ISR will be executed on the core which initialize the driver.

If the core is starved due to higher priority ISRs, or the interrupt is
disabled on the core (spinlock called, etc.), the ISR will not get
executed and SPI transactions will not be handled.

(MINOR CHANGE)

Resolves https://github.com/espressif/esp-idf/issues/2432.
2018-11-13 11:49:31 +08:00
michael a52ab8ca87 spi_master: modify the error msg a little when over freq limit
The MISO signal will be delayed if the GPIO matrix is enabled.
However, delay also comes from the slave.

Previous code only considers the former case, and assume the frequency
limitations is only violated when GPIO matrix is used.

Now we are able to calculate the freq limit when extenal MISO delay is
given (feature introduced in 9c6c6ec34ab0641ace89aeb9b1a133eb6fae1a18).
The frequency limit is lower when the external MISO delay is large, and
the limit is likely to be violated even with IOMUX.

Resolves https://github.com/espressif/esp-idf/issues/2690.
2018-11-13 11:49:31 +08:00
Ivan Grokhotkov 356fe47ce1 spiffs: increase timeout in readdir test
Timeout of 15 seconds is not sufficient if SPIFFS partition needs to
be formatted, on some of the boards.
2018-11-13 11:41:19 +08:00
morris 5fccb73f86 ethernetif: fix potential memory leak
1. If L2_TO_L3_RX_BUF_MODE is not selected, we must assign l2_owner explictly before we call pbuf_free.
2. free intr resource in esp_eth_deinit

Closes https://github.com/espressif/esp-idf/issues/2670
2018-11-13 10:11:48 +08:00
Jiang Jiang Jian ef4a87d62e Merge branch 'bugfix/http_literal_caseinsensitive' into 'master'
Compare case-insensitive URI schemes

See merge request idf/esp-idf!3558
2018-11-12 17:03:06 +08:00
Ivan Grokhotkov 7efb3926c5 Merge branch 'feature/build_system_multi_target' into 'master'
build system: support for multiple targets (CMake only)

See merge request idf/esp-idf!3499
2018-11-12 15:30:36 +08:00
Jiang Jiang Jian c7fb749b84 Merge branch 'bugfix/btdm_fix_memory_leak_in_v3.2' into 'master'
Component/bt: fix memory leak in service change char

See merge request idf/esp-idf!3631
2018-11-12 11:27:00 +08:00
Jiang Jiang Jian ccb3841a9e Merge branch 'feature/btdm_add_vendor_hci_cmd' into 'master'
component/bt: add vendor hci cmd

See merge request idf/esp-idf!3577
2018-11-12 11:26:35 +08:00
Angus Gratton 3685d325d8 Merge branch 'bugfix/multiple_github_pr' into 'master'
Multiple github PR's

See merge request idf/esp-idf!3665
2018-11-12 09:14:35 +08:00
Angus Gratton a96deceb27 Merge branch 'feature/cmake_secure_boot_support' into 'master'
CMake : Secure Boot support added

See merge request idf/esp-idf!3522
2018-11-12 09:09:30 +08:00
Ivan Grokhotkov ccfa134533 build system: support for multiple targets 2018-11-11 21:46:02 +08:00
Liu Zhi Fu 4fe3673f35 lwip: fix crash caused by sys_mbox_free
Fix lwip crashed bug caused by sys_mbox_free()
2018-11-11 12:15:51 +08:00
Jiang Jiang Jian 9859428606 Merge branch 'bugfix/btdm_add_scan_window_interval_check' into 'master'
Component/bt: add scan window and interval check when set scan params

See merge request idf/esp-idf!3581
2018-11-09 19:32:11 +08:00
zwj baf57b9702 component/bt: add vendor hci cmd 2018-11-09 14:39:04 +08:00
zhiweijian fb3aa88565 Component/bt: add BLE Blocking APIs 2018-11-09 03:31:08 +00:00
Stephen Bird 0c9f7271a9 Add checks to for CONFIG_MBEDTLS_SSL_ALPN
Merges https://github.com/espressif/esp-idf/pull/2569
2018-11-08 15:57:13 +05:30
Stephen Bird b5c58557fc bt: Fix bracket warning
Merges https://github.com/espressif/esp-idf/pull/2568
2018-11-08 15:57:12 +05:30
Damian Reboredo 049c9f7bea esp_http_client: Fix infinite loop on esp_http_client_fetch_headers
error must also be returned if esp_tls_conn_read return 0 because socket  was closed

Merges https://github.com/espressif/esp-idf/pull/2534
2018-11-08 15:57:11 +05:30
Paul Reimer b358581ab8 heap: Compile heap_task_info.c conditionally on CONFIG_HEAP_TASK_TRACKING in heap CMakeLists.txt
Merges https://github.com/espressif/esp-idf/pull/2498
2018-11-08 15:57:11 +05:30
shawwwn 288d9b75e9 rtc_clk: bugfix: incorrect divider setting in rtc_clk_cpu_freq_to_config()
Merges https://github.com/espressif/esp-idf/pull/2404
2018-11-08 15:57:10 +05:30
Jiang Jiang Jian 71f1a34540 Merge branch 'feature/btdm_support_oob_in_SMP' into 'master'
Component/bt: support OOB in SMP

See merge request idf/esp-idf!3496
2018-11-08 16:44:15 +08:00
Jiang Jiang Jian 05838641ff Merge branch 'bugfix/mesh_start_stop' into 'master'
mesh: update libs

See merge request idf/esp-idf!3569
2018-11-07 14:29:27 +08:00
qiyuexia 2d34a93dc4 mesh: update libs
1. fix ap_loss that occurs when the parent turns off the mesh function and becomes a normal WiFi with a different SSID.
2. add an event MESH_EVENT_NETWORK_STATE that contains information about whether there is a root in the current network.
3. modify the mechanism of mesh IE update.
4. fix a problem in the process of re-voting to select the root, the device that does not meet the conditions of being a root votes for itself.
5. fix an issue that occurs in esp_mesh_recv_toDS() when stopping the mesh.
6. when the user specifies a parent for the device, the device will set the authmode and password of its AP mode to the same value as the specified parent.
7. add two disconnected reason codes MESH_REASON_EMPTY_PASSWORD and MESH_REASON_PARENT_UNENCRYPTED.
2018-11-06 22:55:48 +08:00
Hrishikesh Dhayagude 2c353edbc4 components/bt: Fix btc_gatts_arg_deep_copy() and bta_gatts_indicate_handle() 2018-11-06 21:01:54 +08:00
Ivan Grokhotkov 621e316725 Merge branch 'feat/psram_support_hspi' into 'master'
esp32: support to use hspi to output clock for 4M psram

See merge request idf/esp-idf!3377
2018-11-06 20:34:41 +08:00
Anurag Kar 1f6622b2d1 CMake : Secure Boot support added 2018-11-06 17:09:55 +05:30
Jiang Jiang Jian 17c70a4a32 Merge branch 'bugfix/wifi_do_not_load_phy_data_if_fail_to_open_nvs' into 'master'
esp32: do not try to load PHY data if fail to open NVS

See merge request idf/esp-idf!3538
2018-11-06 18:01:58 +08:00
Jiang Jiang Jian 888406231c Merge branch 'bugfix/btdm_fuction_in_isr_is_not_in_iram' into 'master'
components/bt: Put function in isr into iram

See merge request idf/esp-idf!3619
2018-11-06 17:13:34 +08:00
zhiweijian 77668b3912 Component/bt: add scan window and interval check when set scan params 2018-11-06 08:45:25 +00:00
zhiweijian 2e139c7885 Component/bt: fix memory leak in service change char 2018-11-06 08:43:59 +00:00
Ivan Grokhotkov 28f1e1597b Merge branch 'bugfix/tickless_idle_single_core' into 'master'
freertos, pm: fix tickless idle not entered in single core mode

See merge request idf/esp-idf!3584
2018-11-06 12:15:03 +08:00
Ivan Grokhotkov 35d1c7b173 Merge branch 'bugfix/freertos_idle_tick_count' into 'master'
freertos: use xTaskQueueMutex to protect tick count

See merge request idf/esp-idf!3478
2018-11-06 12:14:51 +08:00
Ivan Grokhotkov ddfd62ee66 Merge branch 'bugfix/register_map_LAN8720' into 'master'
ethernet: fix some bugs in Ethernet driver

See merge request idf/esp-idf!3490
2018-11-06 12:13:47 +08:00