Commit Graph

22360 Commits

Author SHA1 Message Date
xiongweichao
d1ce1f9586 bt:Fixed the use of invalid configuration when the peer device configures the stream, and returned an incorrect error code 2022-12-15 17:01:32 +08:00
Guillaume Souchere
dd249a9ecd esp_system: fix placement of __stack_chk_fail from flash to RAM
When stack check is enabled, certain functions (sometimes placed in RAM)
are being decorated with stack guards and a call to __stask_chk_fail() in
case ofr stack corruption. For this reason, __stack_chk_fail() must be
placed in RAM too.

Add stack check config in heap tests on all targets to find eventual flash to RAM
calls due to stack checks when running callgraph_check.py
2022-12-14 12:57:08 +01:00
Guillaume Souchere
43ba878870 heap: fix linker issues and remove spi flash dependencies 2022-12-14 12:57:08 +01:00
Guillaume Souchere
b78193700a feat: remove tlsf_fls and tlsf_ffs from linker as they are inlined. 2022-12-14 12:57:08 +01:00
Guillaume Souchere
e0c92b3e04 tools: update list of references to not include symbold used by __assert_func calls
On xtensa architecture, the call to __assert_func uses a reference to __func__ that can
sometimes be placed in flash. Since the __asert_func can be called from functions in IRAM
the check_callgraph script can report an error when checking for invalid calls from IRAM
to flash sections. However, the __asert_func prevents this scenario at runtime so the
check_callgraph script reports a 'flas positive' situation. For this reasson, all references
to __func__$x found prior to a call to __assert_func are droped in the parsing of the rtl files.
2022-12-14 12:57:08 +01:00
Guillaume Souchere
9ec87993c8 heap: add check for usage of flash content from iram
this commits:
- adds build-time test to check that no call to flash regions are done from IRAM functions

- resolves problems related to IRAM function using content in flash memory

- update heap_caps_alloc_failed to use a default function name in DRAM
  when necessary instead of creating a function name variable in DRAM for
  each call of heap_caps_alloc_failed. This allows to save some extra bytes
  in RAM.
2022-12-14 12:57:08 +01:00
Guillaume Souchere
125609963e heap: add documentation about the function placement in IRAM and its usage in ISR
This commits adds a internal.md file in the heap directory to clarify the idea behind
which functions is placed in IRAM or in flash.

A section in mem_alloc.rst documentation is added to specify which functions from the
heap component API can be used in interrupt handlers.
2022-12-14 12:57:08 +01:00
Guillaume Souchere
6141600b61 heap: add selective placement of function in IRAM
This commit aims to place in the IRAM section only the functions that
are relevent for performance instead of placing the entire content of
multi_heap.c, mullti_heap_poisoning.c and tlsf.c in the IRAM.
2022-12-14 12:57:08 +01:00
chenjianxing
d13e431341 esp_wifi: fix multicast pkts drop issue for some AP when DTIM period > 1 2022-12-14 17:19:27 +08:00
Darian Leung
3eef9e7598 usb: Fix incorrect bmRequestType direction flag in USB Host Library
usb_host_transfer_submit_control() uses the incorrect bmRequestType direction
flag. Therefore, when doing a transfer check, all transfers were mistakenly
treated as OUT transfers (only affects transfer check and not actual transfer).
2022-12-13 22:28:02 +08:00
Darian Leung
974b955cff hal: Fix USB DWC HAL host channel halt race condition
This commit fixes a race condtion bug with usb_dwc_hal_chan_request_halt()
where a channel the channel is halted if it has just completed a transfer
(i.e., finished processing a QTD with the "HOC" flag set) but the channel is
still pending interrupt handling. In this case...

- usb_dwc_hal_chan_request_halt() would simply read the channel's underlying
register, determine it is not active, not set the "halt_requested" flag, and
simply return true.
- The caller assumes of usb_dwc_hal_chan_request_halt() will assume that the
channel has halted, and may proceed to reconfigure the pipe/port
- When usb_dwc_hal_chan_decode_intr() comes to process the pending interrupt
it will simply return USB_DWC_HAL_CHAN_EVENT_CPLT not knowing a halt has been
requested.

This commit updates the implementation of usb_dwc_hal_chan_request_halt() so
that a halt is properly requested even if the underlying channel has already
physically halted.
2022-12-13 22:27:54 +08:00
Tomas Rezucha
5842aca69c usb: Refactor USB Host tests
* Error messages improved
* Configurable for different mock devices

Note: Backport 645592e157 to v4.4 without
migrating to pytest.
2022-12-13 22:26:47 +08:00
Darian Leung
7295933f5f usb_host: Rename struct/ll/hal symbols to use "usb_dwc" prefix
Following the file renaming to use the "usb_dwc" prefix, this commit
updates the symbol names of those files to use the "usb_dwc" as well.

Some LL functions were also renamed so that the register name is
mentioned.
2022-12-13 21:36:00 +08:00
Darian Leung
c06346da35 usb_host: Rename struct/ll/hal files to use "usb_dwc" prefix
This commit updates the DWC_OTG based struct/ll/hal file names to
use the prefix "usb_dwc". This naming scheme reduces ambiguity if
another USB controller implementation is added.

As a result, "hcd.c" has been renamed to "hcd_dwc.c"
2022-12-13 21:36:00 +08:00
Darian Leung
d33e551f47 freertos: Remove GPL license text from port files
This commit removes the GPL license text from various FreeRTOS port files as it
no longer matches the licensing of FreeRTOS v10.4.3 which is distributed under
the MIT license.
2022-12-13 19:29:24 +08:00
timoxd7
b116cff94f Queue Send fix
Fixes rare deadlock on heavy loaded multicore-systems.
2022-12-13 17:23:29 +08:00
Darian Leung
9f3c0b1e38 usb_host: Fix incorrect memset() usage in HCD
This commit fixes incorrect usage of memset() in the HCD's various
_buffer_parse_...() functions. The memset was not clearing the qtd lists, and
were simply setting the first qtd to a non zero value (i.e., the length of
the QTD list).

However, no bug occurred as the subsequent _buffer_fill_...() functions would
overwrite the QTD list anyways.
2022-12-13 16:57:56 +08:00
Rahul Tank
f1ee4f551d Nimble: Update documentation to include distinction between upstream
mesh example and ESP-BLE-MESH
2022-12-13 12:56:17 +05:30
Rahul Tank
7c75d88da5 Nimble: Support maximum number of connections to 9 on ESP32-C3 and ESP32-S3 2022-12-11 18:17:25 +05:30
Aditya Patwardhan
43aa501f18 esp_flash_encrypt: If it is supported then Enable secure download mode in release mode instead of disabling it completely. 2022-12-11 18:16:56 +05:30
Jin Cheng
efcef1a400 correct the SR_mode selection when konw nothing about Peripheral 2022-12-09 10:28:06 +08:00
Mahavir Jain
e86181704a Merge branch 'fix/fix_behaviour_of_api_to_set_fe_release_mode_v4.4' into 'release/v4.4'
esp_flash_encrypt: If it is supported then Enable secure download mode in... (v4.4)

See merge request espressif/esp-idf!21494
2022-12-08 16:01:18 +08:00
wuzhenghui
e2b299660e bugfix: unstall other cpu on core reset
- Closes https://github.com/espressif/esp-idf/issues/10320
2022-12-08 15:38:01 +08:00
Aditya Patwardhan
0a83ebcded esp_flash_encrypt: If it is supported then Enable secure download mode in release mode instead of disabling it completely. 2022-12-08 10:28:48 +05:30
Mahavir Jain
9e46c9b894 Merge branch 'bugfix/fix_esp_https_server_initialize_v4.4' into 'release/v4.4'
esp_https_server: Fix initializers missing in esp_https_server (backport v4.4)

See merge request espressif/esp-idf!21482
2022-12-08 12:19:16 +08:00
morris
e72afc771f Merge branch 'bugfix/fix_slave_gpio_cs_mixed_with_iomux_bus_v4.4' into 'release/v4.4'
spi_slave: fix slave can't use iomux bus mixed with gpio cs_pin (v4.4)

See merge request espressif/esp-idf!21375
2022-12-08 10:58:08 +08:00
Jiang Jiang Jian
4500ddf2f0 Merge branch 'bugfix/modify_wifi_max_conn_num_v4.4' into 'release/v4.4'
esp_wifi: update wifi lib

See merge request espressif/esp-idf!21479
2022-12-08 09:49:20 +08:00
Jiang Jiang Jian
6da4c6b513 Merge branch 'bugfix/fix_long_time_to_get_ip_v4.4' into 'release/v4.4'
lwip: fix the bug that long time to get IP (backport v4.4)

See merge request espressif/esp-idf!21462
2022-12-07 21:49:28 +08:00
jack
a34a4a91fb esp_wifi: update wifi lib
1. Modify wifi max connection num
2. Fix the ESPNOW senf fail after changing opmode
3.Add wifi station config for enabling transition_disbale feature
2022-12-07 18:14:36 +08:00
jack
43f93678ce reduce the max connection number to 15 2022-12-07 18:04:46 +08:00
zhangyanjiao
e943143e0f esp_wifi: fix esp32c3 connect fail
Closes IDFCI-1524
2022-12-07 18:04:46 +08:00
Ivan Grokhotkov
a82a530387 Merge branch 'staging/esp_static_assert_v4.4' into 'release/v4.4'
C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT  (v4.4)

See merge request espressif/esp-idf!21439
2022-12-07 16:58:01 +08:00
yuanjianmin
12252773b9 esp_https_server: Fix initializers missing in esp_https_server 2022-12-07 15:10:03 +08:00
Jiang Jiang Jian
17db9540d6 Merge branch 'fix/usb/error_handling_bacport_v4.4' into 'release/v4.4'
USB Host: Invalid pointer hotfix (backport v4.4)

See merge request espressif/esp-idf!21367
2022-12-07 14:00:01 +08:00
Shreyas Sheth
2bbd3ac583 esp_wifi:Add wifi station config for enabling transition_disbale feature 2022-12-07 11:44:28 +08:00
zhangyanjiao
3823a991db update doc for espnow max encryped connection 2022-12-07 11:37:06 +08:00
zhangyanjiao
5c1ff3d70b Modify maximum softap conn num and espnow encryption peer num 2022-12-07 11:33:00 +08:00
Wang Meng Yang
77b37716a3 Merge branch 'bugfix/reduce_BTU_TASK_stack_consumption_v4.4' into 'release/v4.4'
Reduce the stack consumption of BTU_TASK (backport v4.4)

See merge request espressif/esp-idf!21435
2022-12-07 11:29:48 +08:00
zhangyanjiao
85bf17d7e2 lwip: fix the bug that long time to get IP 2022-12-07 11:24:13 +08:00
Mahavir Jain
e83289fb7c Merge branch 'docs/remote_signing_of_images_cmd_fix_v4.4' into 'release/v4.4'
docs: fix secure boot "Remote Signing of Images" section command (v4.4)

See merge request espressif/esp-idf!21471
2022-12-07 11:11:41 +08:00
morris
56342a6057 Merge branch 'feature/support_rotating_lcd_ssd1306_v4.4' into 'release/v4.4'
Support rotation on SSD1306 (backport v4.4)

See merge request espressif/esp-idf!21469
2022-12-07 10:55:55 +08:00
Jiang Jiang Jian
1d52944fda Merge branch 'bufix/Backport_some_wifi_lwip_bugs_for_4.4_1205' into 'release/v4.4'
lwip:optimization dns ipv4 ipv6 timer

See merge request espressif/esp-idf!21447
2022-12-07 10:37:19 +08:00
Jiang Jiang Jian
1c0d0e505d Merge branch 'bugfix/multiple_wifi_fixes_v4.4' into 'release/v4.4'
esp_wifi: backport some wifi bugfixes to v4.4

See merge request espressif/esp-idf!21449
2022-12-07 10:28:57 +08:00
harshal.patil
0062349955 docs: fix secure boot "Remote Signing of Images" section command 2022-12-06 23:46:46 +05:30
Vilem Zavodny
68178540f0 lcd: Support rotation SSD1306 and fix mirror y. 2022-12-06 15:43:17 +01:00
Jiang Jiang Jian
4e083d8214 Merge branch 'bugfix/spp_vfs_memory_leak_v4.4' into 'release/v4.4'
Component_bt/fix esp_spp_vfs_register memory leak(v4.4)

See merge request espressif/esp-idf!21440
2022-12-06 20:40:33 +08:00
Omar Chebib
622fb9e906 CI: check_public_headers script will detect the use of static asserts in headers
When a public header contains _Static_assert or static_assert, check_public_headers.py script will detect it and report it as an issue.
Indeed, public headers shall now use ESP_STATIC_ASSERT.
2022-12-06 19:28:51 +08:00
xueyunfei
2e17ad62b8 lwip:optimization dns ipv4 ipv6 timer
* Update submodule: git log --oneline * Update submodule: git log --oneline 6132c9755a43d4e04de4457f1558ced415756e4d..79182163e9e77547e58a6aa34db94902b9812cb3
Detailed description of the changes:
  - dhcp: optimization fine timer when dhcp start(esp-lwip@79182163)
  - ip6 timer: optimization lwip ip6 reassembly timer (esp-lwip@c943fc5a)
  - ip4 timer: optimization lwip ip4 reassembly timer (esp-lwip@17f41c9f)
  - dns timer: optimization lwip dns timer (esp-lwip@7f5ab42c)
2022-12-06 17:30:47 +08:00
Marius Vikhammer
1d13716d28 Merge branch 'bugfix/freertos_port_miss_header_v4.4' into 'release/v4.4'
freertos: add missing header include for esp_chip_info.h to port.c (v4.4)

See merge request espressif/esp-idf!21459
2022-12-06 14:32:36 +08:00
Jiang Jiang Jian
52ba3f1ee0 Merge branch 'bugfix/Fix_exceptional_list_params_check_v4.4' into 'release/v4.4'
ble_mesh: stack: Fix exceptional list parameters check issue(v4.4)

See merge request espressif/esp-idf!21442
2022-12-06 14:13:20 +08:00