Commit graph

8082 commits

Author SHA1 Message Date
Hrishikesh Dhayagude 91c8f324a9 NimBLE: Use dynamic buffers instead of static memory.
The NimBLE host buffers that consume a significant amount of memory are
now allocated dynamically.
The advantage is that, the memory can be reclaimed in cases where BLE
is turned off and not required for the current boot cycle
2020-01-23 00:55:51 +08:00
morris 405b0e7f06 esp_rom: splict libgcc and libc outof rom.ld bundle file 2020-01-23 00:27:47 +08:00
KonstantinKondrashov 6061d5d65a esp_timer/esp32: Fix case when alarm_reg > counter_reg but FRC_TIMER_INT_STATUS is not set
Closes: WIFI-1576
Closes: https://github.com/espressif/esp-idf/issues/2954
2020-01-22 14:30:34 +08:00
morris e30cd361a8 global: rename esp32s2beta to esp32s2 2020-01-22 12:14:38 +08:00
morris 95743f4ee6 update rtc_sleep_init for esp32s2 2020-01-22 10:19:05 +08:00
Felipe Neves 73592d9bc4 spin_lock: added new spinlock interface and decoupled it from RTOS
spin_lock: cleaned-up port files and removed portmux files

components/soc: decoupled compare and set operations from FreeRTOS

soc/spinlock: filled initial implementation of spinlock refactor

It will decouple the spinlocks into separated components with not depencences of freertos
an similar interface was provided focusing the readabillity and maintenance, also
naming to spinlocks were adopted. On FreeRTOS side the legacy portMUX macros
gained a form of wrapper functions that calls the spinlocks component thus
minimizing the impact on RTOS side.

This feature aims to close IDF-967

soc/spinlock: spinlocks passed on unit test, missing test corner cases

components/compare_set: added better function namings plus minor performance optimization on spinlocks

soc/spinlock: code reordering to remove ISC C90 mix error

freertos/portmacro: gor rid of critical sections multiline macros, placed inline functions instead

soc/spinlock: improved spinlock performance from internal RAM

For cases where the spinlock is executed from IRAM, there is no
need to check where the spinlock object is placed on memory,
removing this checks caused a great improvement on performance.
2020-01-22 06:20:34 +08:00
Ivan Grokhotkov cc3df01f8f rom: add header guards in rom/opi_flash.h, fix error in rom/spi_flash.h 2020-01-21 11:58:10 +01:00
Ivan Grokhotkov 2c3e6481bb Merge branch 'feature/ci_check_cpp_guards' into 'master'
ci: add job to check for C++ guards in header files

Closes IDF-288

See merge request espressif/esp-idf!7050
2020-01-21 17:18:23 +08:00
Ivan Grokhotkov f619a3174b Merge branch 'bugfix/nvs_new_nothrow' into 'master'
NVS: Change all new to new (nothrow)

See merge request espressif/esp-idf!6930
2020-01-21 17:06:19 +08:00
Ivan Grokhotkov c11f77cb1a Merge branch 'feature/use_underlying_cmake_targets_for_idf_py' into 'master'
CMake: Use underlying flash targets for idf.py

See merge request espressif/esp-idf!7067
2020-01-21 17:05:47 +08:00
Jiang Jiang Jian 95f9db79d2 Merge branch 'feature/lwip_netinet_tcp_pr4637' into 'master'
lw_ip: Add netinet compatibility headers (PR 4637)

Closes IDFGH-2551

See merge request espressif/esp-idf!7408
2020-01-21 15:00:03 +08:00
Angus Gratton e0fe136bf9 Merge branch 'bugfix/select_driver_not_installed' into 'master'
VFS: Check in select() if the UART driver is installed or not

Closes IDFGH-2540

See merge request espressif/esp-idf!7331
2020-01-21 11:08:38 +08:00
Angus Gratton 78e219bbe2 Merge branch 'bugfix/eth_int_allocate' into 'master'
PSRAM related fix

Closes IDFGH-2263 and IDFGH-2549

See merge request espressif/esp-idf!7310
2020-01-21 07:31:26 +08:00
Francesco Giancane e48fe540be include/sys/socket.h: ensure SOMAXCONN symbol is defined
SOMAXCONN is expected to be defined in this header, but for the esp32
port is found in net/if.h from newlib.

Avoid the issue by including the net/if.h header in sys/socket.h so that
compatibility is preserved.

Signed-off-by: Francesco Giancane <francesco.giancane@accenture.com>

Merges https://github.com/espressif/esp-idf/pull/4637
2020-01-21 10:11:33 +11:00
Francesco Giancane 64377b54d1 include/netinet/tcp.h: wrap lwip/tcp.h header for compatibility
Some applications (i.e. Azure IoT SDK) are expecting this header to
exist and to contain the tcp constants and description.

The esp32 did not wrap the lwip/tcp.h header, thus this commit adds a
compatibility layer.

Signed-off-by: Francesco Giancane <francesco.giancane@accenture.com>

Merges https://github.com/espressif/esp-idf/pull/4637
2020-01-21 10:11:29 +11:00
Jiang Jiang Jian 10c426e5ef Merge branch 'bugfix/fix_sniffer_bug_caused_by_mode_switch' into 'master'
FIx sniffer bug caused by mode switch

Closes WIFI-466

See merge request espressif/esp-idf!5846
2020-01-20 21:08:31 +08:00
Tian Hao 30fbd99ad0 fix bug sleep may cause HCI timeout
When Host run different cpu and sleep enable, it may cause hci
timeout about 10s.
2020-01-20 17:44:03 +08:00
Tian Hao f351effdb2 fix Kconfig use mistake cause some config not effect
1. Fix bluedroid task pinned_to_core un-effected
2. other minor sdkconfig bugs
2020-01-20 17:43:36 +08:00
xiehang 6cb271c20b esp_wifi: Small refactor for ic_set_vif 2020-01-20 11:47:02 +08:00
Angus Gratton 3f532c8895 Merge branch 'bugfix/esp_tls_blocking_timeout' into 'master'
esp-tls: add timeout for blocking connection

See merge request espressif/esp-idf!7316
2020-01-20 09:35:23 +08:00
Jiang Jiang Jian 1c8937bf14 Merge branch 'feature/esp32_5p0_new_features' into 'master'
esp32 5p0 features support

See merge request espressif/esp-idf!7028
2020-01-19 23:06:45 +08:00
morris cc0459eea2 ethernet: always put eth_driver handle in SRAM
Closes https://github.com/espressif/esp-idf/issues/4635
2020-01-19 16:25:44 +08:00
morris 5ad0bdd8db ethernet: work with cache disabled
add ETH_MAC_FLAG_WORK_WITH_CACHE_DISABLE flag, make ethenret driver
possible to work when cache disabled

Closes https://github.com/espressif/esp-idf/issues/4406
2020-01-19 16:25:24 +08:00
morris 4fb879c11e spi: always put spihost handle in SRAM
Closes https://github.com/espressif/esp-idf/issues/4635
2020-01-19 16:08:53 +08:00
June 19730c81f0 esp32 5p0 new features support 2020-01-17 10:34:54 +00:00
xiehang 0d1a20ba18 esp_wifi:Fix double recycle bar crash issue 2020-01-17 14:28:27 +08:00
Ivan Grokhotkov 0c99aef08d Merge branch 'feature/bringup_723_cmake' into 'master'
bringup 723 cmake

See merge request espressif/esp-idf!6578
2020-01-17 09:20:34 +08:00
Mahavir Jain c7f44a301d Merge branch 'feature/modify_esp_tls_structure' into 'master'
esp-tls: add API to retrieve sockfd for tls connection.

See merge request espressif/esp-idf!7329
2020-01-16 18:12:16 +08:00
Hrudaynath Dhabe 93bc830ac6 esp_wifi: esp_wifi_sta_get_ap_info function returns actual values of group cipher and pairwise cipher 2020-01-16 17:52:59 +08:00
morris 2422c52851 global: hello world on real esp32-s2 2020-01-16 17:43:59 +08:00
duyi 18a05e2ee0 update ld file for esp32-s2 2020-01-16 17:43:59 +08:00
Wangjialin d4e5980823 flash: fix 80Mhz for new spi flash driver on esp32s2 2020-01-16 17:43:59 +08:00
Wangjialin fad639f0d4 feature(psram): update psram initialization.
1. use spi functions in rom
2. remove unnecessary GPIO configurations.
3. remove unnecessary dummy settings.
4. enable dummy out function
5. flash and psram have independent timing setting registers.
6. no need to set 1.9v for LDO in 80Mhz
7. set IO driver ability to 1 by default.
8. no need to use GPIO matrix on esp32s2, IO MUX is recommended
9. enable spi clock mode and IO mode settings
2020-01-16 17:41:31 +08:00
Du Ya Yuan 0ad7602efe make spiram work 2020-01-16 17:41:31 +08:00
duyi 30a525aeb1 update cache config 2020-01-16 17:41:31 +08:00
morris a8d31b0385 rtc: enable super wdt auto feed 2020-01-16 17:41:31 +08:00
morris 1c2cc5430e global: bring up esp32s2(not beta) 2020-01-16 17:41:31 +08:00
duyi 9c5a981ef1 remove unnecessary function in bootloader_support
1. Delete bootloader_clock_get_rated_freq_mhz, esp32s2 do not need it right now
2. Remove bootloader_flash_gpio_config () because it has the same function as bootloader_flash_dummy_config
2020-01-16 17:41:31 +08:00
Angus Gratton eaafe7f599 Merge branch 'feature/add_setting_project_version_from_kconfig' into 'master'
build: Add CONFIG_APP_PROJECT_VER to set the project version from Kconfig

See merge request espressif/esp-idf!7125
2020-01-16 15:54:14 +08:00
David Cermak 98cf3142fa esp_tls: fail connection if esp_tls_conn_new() timeouts 2020-01-16 07:32:19 +00:00
David Cermak aa3b1da384 esp_tls: added connection timeout to esp_tls_conn_new_sync() 2020-01-16 07:32:19 +00:00
Aditya Patwardhan c7418042b4 esp32/esp-tls: provide API to retrieve sockfd value from esp_tls_t 2020-01-16 12:27:44 +05:30
Jiang Jiang Jian 2a6a560eb3 Merge branch 'bugfix/hfp_disconn_bridgera' into 'master'
hfp disconn issue for bridgera

See merge request espressif/esp-idf!7336
2020-01-16 11:33:36 +08:00
Ivan Grokhotkov e9426d4ed1 Merge branch 'feature/improved_cxx_tests' into 'master'
Improved C++ tests

Closes IDF-1322

See merge request espressif/esp-idf!7283
2020-01-16 10:11:32 +08:00
KonstantinKondrashov b49a657448 build: Add CONFIG_APP_PROJECT_VER to set the project version from Kconfig 2020-01-15 11:02:27 +00:00
Jakob Hasse c75ec644f4 NVS: Changed all new to new (nothrow) 2020-01-15 14:01:35 +08:00
Angus Gratton c1a1e19c2b Merge branch 'feature/freertos_optimized_taskselection' into 'master'
feature/freertos optimized task selection o S2 Beta or unicore configurations

Closes IDF-1116

See merge request espressif/esp-idf!6616
2020-01-15 13:29:21 +08:00
Angus Gratton ee899cb2aa Merge branch 'feature/ver-4.2' into 'master'
global: bump version to 4.2

See merge request espressif/esp-idf!7335
2020-01-15 13:07:59 +08:00
weitianhua 8b2919ee2b hfp disconn issue for bridgera 2020-01-15 12:22:58 +08:00
Ivan Grokhotkov 80d7db9466 Merge branch 'bugfix/esp32s2_mac_addr_allocation' into 'master'
esp32s2 mac address allocation

Closes IDF-1191

See merge request espressif/esp-idf!7286
2020-01-15 11:58:14 +08:00
Renz Christian Bagaporo fd74ec75d7 esptool_py: retain flash targets when building RAM loadable apps 2020-01-15 03:36:47 +00:00
Renz Christian Bagaporo cc8bff703e esptool_py: create flash target functions 2020-01-15 03:36:47 +00:00
Jiang Jiang Jian 5f803b8283 Merge branch 'bugfix/enable_ipv6_address_autoconfig' into 'master'
lw-ip:  Enable IPv6 stateless address autoconfiguration

Closes WIFI-1237

See merge request espressif/esp-idf!6313
2020-01-15 11:27:56 +08:00
Ivan Grokhotkov 5466ff3f4d global: bump version to 4.2 2020-01-15 10:22:22 +08:00
Felipe Neves 5d7564a039 freertos/Kconfig: make optimized task selection dependent on FREERTOS_UNICORE option
freertos: fix decrement loop of high priority task selection
2020-01-14 09:58:14 -03:00
Felipe Neves 2c612ec1dc components/freertos: using the optimized task selection on esp32s2beta
components/freertos: cleaned up multicore option scheduler.

components/freertos:  more cleanup and test optimization to present realistic results

components/freertos: remove unused macros of optimized task selection when multicore is used
2020-01-14 09:58:14 -03:00
Felipe Neves 77bf1ff1c0 freertos/tests: added test to evaluate scheduling time
freertos/Kconfig: fix trailing space on optimized scheduler option

freertos/tests: moved test context variables inside of test task.

The public variables used on scheduling time test now were packed into a structure allocated on  test case task stack and passed to tasks as arguments saving RAM comsumption.
2020-01-14 09:58:14 -03:00
Felipe Neves d4c82606fb components/freertos: added and enabled the optimized task selection
FreeRTOS  have an platform dependent configuration to enable selection task in a optimized way.

Provided the platform dependent functions in order to allow the scheduler to use the optimized algorithms by telling to the port layer where to found bitscan instruction i.e. NSAU.

This closes IDF-1116

components/freertos: added option to disable the optimized scheduler
2020-01-14 09:58:14 -03:00
Roland Dobai a9c4dab4d3 VFS: Check in select() if the UART driver is installed or not
Closes https://github.com/espressif/esp-idf/issues/4627
2020-01-14 13:52:27 +01:00
morris e1f9b283bc esp32s2: mac addr allocation 2020-01-14 15:19:38 +08:00
xiehang c0148ef1e8 lwip: Enable IPv6 stateless address autoconfiguration 2020-01-14 07:15:26 +00:00
zhiweijian 86bebae4fb Component/bt: Fix GATTC trigger open event multiple times 2020-01-14 03:24:29 +00:00
Angus Gratton ee269ed687 Merge branch 'bugfix/fatfs_corrupted_assert' into 'master'
fatfs: handle FR_INT_ERR as "filesystem corrupted"

Closes IDF-894

See merge request espressif/esp-idf!5912
2020-01-14 08:37:07 +08:00
Jakob Hasse c8137c5298 C++: rtti unit tests, corresponding CI config 2020-01-13 16:39:21 +08:00
houwenxiang 4c065c217e driver(rmt): Fix the rmt err interrupt crash bug when sending 63 items 2020-01-13 08:30:20 +00:00
Jiang Jiang Jian 0a6e61ae6d Merge branch 'bugfix/btdm_fix_blufi_prepare_buf_len_invalid' into 'master'
component/bt: fix blufi prepare write buf len invalid

See merge request espressif/esp-idf!7048
2020-01-13 15:59:14 +08:00
Jiang Jiang Jian f8e3bf4a7a Merge branch 'bugfix/mesh_ie_issues' into 'master'
mesh: fix mesh ie issues

See merge request espressif/esp-idf!7214
2020-01-13 15:58:00 +08:00
Angus Gratton 28d64e7f82 Merge branch 'bugfix/cmake_failure_on_spiffsgen_clean_project' into 'master'
spiffs: fix build issue on clean project

See merge request espressif/esp-idf!6596
2020-01-13 12:14:04 +08:00
Angus Gratton a5a5c318f9 Merge branch 'bugfix/mmap_fail_on_esp32s2beta' into 'master'
spi_flash: reenable mmap tests on esp32s2beta

See merge request espressif/esp-idf!6595
2020-01-13 12:02:55 +08:00
Angus Gratton ec20cf01b5 Merge branch 'feature/wider_alignment_range_malloc' into 'master'
feature/wider alignment range malloc

Closes IDF-648

See merge request espressif/esp-idf!6691
2020-01-13 12:02:35 +08:00
Angus Gratton 42d7b1d641 Merge branch 'bugfix/mbedtls_esp_bignum' into 'master'
mbedtls: esp bignum fix for 4096 keys

See merge request espressif/esp-idf!7211
2020-01-13 12:01:23 +08:00
chenyudong 79f0d460f5 mesh: fix mesh ie issues
Fix an error of mesh deinit lock.
Fix mesh send returns TIMEOUT.
Increase root window close time to 120s.
Clear ie.child when the child connected or fully associated.
Update rc_rssi when roots direct/forward.
Fix assoc in mesh ie wrong.
Mesh packets use AC_VI instead of AC_BE.
2020-01-13 10:58:18 +08:00
Jiang Jiang Jian a27dfe6993 Merge branch 'bugfix/fix_ble_config_error_log_in_first_use_nvs' into 'master'
bugfix: remove the error code when there is no file in the nvs in config.c

See merge request espressif/esp-idf!7296
2020-01-13 10:24:43 +08:00
Ivan Grokhotkov 216dac8721 Merge branch 'test/add_esp32s2beta_ssc_build_job' into 'master'
test: add build ssc job for esp32s2beta

See merge request espressif/esp-idf!7068
2020-01-13 10:19:48 +08:00
Jiang Jiang Jian 7a7c4a5486 Merge branch 'bugfix/coex_schm' into 'master'
Bugfix/coex schm

See merge request espressif/esp-idf!7176
2020-01-12 20:37:42 +08:00
Jiang Jiang Jian a9cf334f0a Merge branch 'feature/Add_tcp_sack' into 'master'
feature for add tcp sack

Closes WIFI-1600

See merge request espressif/esp-idf!7241
2020-01-12 20:28:21 +08:00
Jiang Jiang Jian 3634192ded Merge branch 'bugfix/ble_throughput_heap_size_too_large_fix' into 'master'
bugfix:Fixed throughput wasting memory and packet loss issues.

Closes BT-437 and BCI-141

See merge request espressif/esp-idf!7063
2020-01-12 20:25:02 +08:00
Jiang Jiang Jian 8ec233dfd0 Merge branch 'bugfix/sync_zephyr_v2.0_ble_mesh_fixes' into 'master'
ble_mesh: sync Zephyr v2.0 ble mesh fixes

Closes BLEMESH-56

See merge request espressif/esp-idf!6892
2020-01-12 20:23:57 +08:00
Felipe Neves 6a307ee70f heap: removed ptr check in diram area since aligned allocator does not support data allocated from IRAM 2020-01-10 10:15:32 -03:00
Felipe Neves 0d8a5ebec7 heap: added aligned calloc function plus tests 2020-01-10 10:05:28 -03:00
Felipe Neves 8e5ea171d3 newlib: reverted support of memalign function 2020-01-10 10:05:28 -03:00
Felipe Neves 45766daa4f test_multi_heap_host/test_multi_heap: fix undefined reference error when testing aligned_alloc with no heap poisoning 2020-01-10 10:05:28 -03:00
Felipe Neves aa100d2dfe newlib: added heap_caps_aligned_alloc on bottom of memalign 2020-01-10 10:05:28 -03:00
Felipe Neves a2db437c46 heap/heap_caps: Added tests for align allocation on both internal and external ram 2020-01-10 10:05:28 -03:00
Felipe Neves 7fbf4c74d7 heap/heap_caps: added initial, top level heap_caps_aligned_alloc and heap_caps_aligned_free 2020-01-10 10:05:27 -03:00
Felipe Neves f31b8a8ab8 heap/multi_heap_poisoning: aligned alloc now working togheter with heap poisining code 2020-01-10 10:05:27 -03:00
Felipe Neves 8bd09429d3 heap/test_multi_heap_host: added initial tests for heap aligned alloc 2020-01-10 10:05:27 -03:00
Felipe Neves d26ddaa644 heap/multi_heap: added initial implementation of aligned alloc function 2020-01-10 10:05:27 -03:00
gengyuchao 3366467980 ble:set a esp api to get size of controller send packets buffer. 2020-01-10 20:32:07 +08:00
gengyuchao 189cd21660 bugfix:Fixed throughput wasting memory and packet loss issues. 2020-01-10 20:32:07 +08:00
gengyuchao 8e1a28940c ble:config.c remove the error code when there is no file in the nvs because it is not an error. 2020-01-10 20:04:10 +08:00
Angus Gratton a05c00c2b3 Merge branch 'bugfix/esp_netif_get_dns' into 'master'
esp_netif: fix esp_netif_get_dns_info() to copy the entire ip_addr_t

Closes IDFGH-2472

See merge request espressif/esp-idf!7266
2020-01-10 17:51:29 +08:00
David Cermak ff0128dd02 drivers: fixed c++ guards in driver public headers 2020-01-10 09:44:39 +01:00
baohongde a2398f0dcc components/esp_wifi: improve coexistence performance according to specific WiFi/BT/BLE scienario
1. Improve WiFi throughput in some Classic BT scienarios(idle, inquire scan,
       connected, sniff, a2dp pause, etc).

    2. Support WiFi + Classic BT + BLE mesh coexistence scienario.

    3. Improve WiFi scan and connect succeed ratio in coexistence scienario.

    4. Do not support to choose software coexistence preference anymore for it is
       determined according to coexistence scienario automatically.

components/lwip: increase TCP send buffer and receive window limitation when TCP window scale is enabled

components/ble_mesh: Fix some bugs about ble mesh

    1. fix send acl pkt after ble have sent terminate ind modify min adv interval to 10ms.
2020-01-10 16:00:12 +08:00
Angus Gratton c7738f24fc Merge branch 'bugfix/ledc_driver_enums' into 'master'
driver: Avoid possible accidental mismatch between ledc_clk_src_t & ledc_clk_cfg_t enum

See merge request espressif/esp-idf!7021
2020-01-10 15:34:43 +08:00
Jiang Jiang Jian 0f9ab61619 Merge branch 'bugfix/fix_wifi_buffer_reload_issue' into 'master'
esp_wifi: fix WiFi buffer reload issue

Closes WIFI-1634

See merge request espressif/esp-idf!7230
2020-01-10 15:08:19 +08:00
Jiang Jiang Jian 2f23fa8ab7 Merge branch 'bugfix/bt_osi_config_snprintf_add_length_check' into 'master'
bugfix:Fix length check for snprintf in osi config

See merge request espressif/esp-idf!7155
2020-01-10 15:06:37 +08:00
Jiang Jiang Jian 8cf4d02720 Merge branch 'bugfix/ble_mesh_update_lightness_last' into 'master'
ble_mesh: Update lightness last state when actual state is changed

See merge request espressif/esp-idf!7206
2020-01-10 14:47:29 +08:00
Angus Gratton 782fc0df5f Merge branch 'refactor/can_driver' into 'master'
Refactor CAN to use HAL and LowLevel layers

Closes IDF-617

See merge request espressif/esp-idf!7019
2020-01-10 14:22:02 +08:00
He Yin Ling 21a7580dc1 test: update SSC bin path of nvs compatible test 2020-01-10 14:14:51 +08:00