Commit Graph

16884 Commits

Author SHA1 Message Date
Marius Vikhammer
0fa3443cea cxx: fixed stack smash test case failing due to changed output
__stack_chk_fail no longer prints "abort() was called" message,
changed test case to reflect this.
2022-12-14 12:37:23 +01:00
Guillaume Souchere
87a738962e 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:37:23 +01:00
Guillaume Souchere
72e7cbee88 heap: Remove size check in multi_heap.c when registering a new heap
The tlsf now checks for size validity when creating a new heap.

The check previously done in multi_heap_register_impl() is no longer
valid since the tlsf_size() is not known at this time (as the metadata
size is linked ot the size of the memory region passed as parameter
when calling tlsf_create_with_pool())

The tlsf_create_with_pool() will return a null pointer if the size
of the memory is not big enough to hold the metadata overhead and
at least a small block.

Update the test according to the changes in TLSF API
2022-12-14 12:37:23 +01:00
Guillaume Souchere
47dc520538 heap: Update host tests after incorporation of the new TLSF implementation 2022-12-14 12:37:23 +01:00
Guillaume Souchere
6c926ab7b0 heap: Update the component to incorporate the new TLSF implementation
- remove tlsf_platform.h from esp-idf since the fl_index is now calculated
  based on the size of the requested heap
- update CMakeLists.txt accordingly
2022-12-14 12:37:23 +01:00
Guillaume Souchere
be74fd1e8c heap: fix linker issues and remove spi flash dependencies 2022-12-14 12:37:23 +01:00
Guillaume Souchere
35260d4325 feat: remove tlsf_fls and tlsf_ffs from linker as they are inlined. 2022-12-14 12:37:23 +01:00
Guillaume Souchere
c47ea5d2bb 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:37:23 +01:00
Guillaume Souchere
e92250e6a2 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:37:16 +01:00
Guillaume Souchere
755dded0f5 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-11-24 12:40:00 +01:00
Guillaume Souchere
47cfd0a0d8 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-11-24 12:39:46 +01:00
Mahavir Jain
9e88f790ff Merge branch 'bugfix/parttool_commands_extra_partition_subtypes_v5.0' into 'release/v5.0'
parttool: fix parttool commands attribute parsing (v5.0)

See merge request espressif/esp-idf!21221

Closes https://github.com/espressif/esp-idf/issues/10238
2022-11-24 18:47:09 +08:00
harshal.patil
9977dbe8e2 parttool: fix extra_partition_subtypes attribute parsing 2022-11-24 10:45:05 +05:30
Aditya Patwardhan
ae32582cc7 esp-tls: Fix esp-cryptoauthlib built dependency when secure element
support is enabled
2022-11-24 09:32:30 +05:30
Roland Dobai
c93c6317f5 Tools: Fix esptool wrappers by avoiding importing the module
Importing esptool in wrappers could cause importing the wrapper itself.
Updating the PATH is not reliable. For example, os.path.realpath()
changes the Windows driver letter to uppercase therefore, misses the
right path for users with small device letters in their PATH. Removing
paths without considering cases could also lead to errors.

This fix invokes esptool scripts as modules without the need to
importing them.

Closes https://github.com/espressif/esp-idf/issues/9861

Closes https://github.com/espressif/vscode-esp-idf-extension/issues/791
2022-11-21 15:20:14 +01:00
Michael (XIAO Xufeng)
f8d4bc8911 soc: upgrade version printing to vX.Y 2022-11-10 06:21:11 +00:00
Michael (XIAO Xufeng)
5b0448eaed esp32s3: fixed bug chip v0.0 detected as vX.0
A typical value is 2.0.
2022-11-09 18:21:43 +08:00
Ivan Grokhotkov
a8ebd8ad04 unity: add linux port
This allows using unity fixture in Linux host tests
2022-11-02 21:49:15 +01:00
Martin Vychodil
af81bd1b0a Storage: Partition APIs moved to the new component 'esp_partition'
All the partition handling API functions and data-types were moved from the 'spi_flash' component to the new one named 'esp_partition'. See Storage 5.x migration guide for more details
2022-11-02 21:49:08 +01:00
Michael (XIAO Xufeng)
725eacbf16 Merge branch 'feature/usb/voltage_monitoring_backport_v5.0' into 'release/v5.0'
tinyusb: TinyUSB in IDF v5.0.0 (backport v5.0)

See merge request espressif/esp-idf!20673
2022-11-02 17:26:22 +08:00
Jiang Jiang Jian
3305987d66 Merge branch 'bugfix/esp32c2_create_sync_lost_v5.0' into 'release/v5.0'
Fixed occasional failure to establish sync and occasional wdt timeout issues on ESP32C2

See merge request espressif/esp-idf!20862
2022-11-02 11:35:00 +08:00
Jiang Jiang Jian
e63724adce Merge branch 'bugfix/fix_ble_array_access_out_of_bounds_v5.0' into 'release/v5.0'
Fixed BLE array access out of bounds (backport v5.0)

See merge request espressif/esp-idf!20875
2022-11-01 21:00:20 +08:00
morris
53075e44ad Merge branch 'contrib/github_pr_10083_v5.0' into 'release/v5.0'
temperature_sensor: fix typo (github PR) (v5.0)

See merge request espressif/esp-idf!20888
2022-11-01 19:23:27 +08:00
Jiang Jiang Jian
79aea89853 Merge branch 'bugfix/add_protection_for_mac_rst_v5.0' into 'release/v5.0'
esp_wifi: add protection for mac reset (backport 5.0)

See merge request espressif/esp-idf!20871
2022-11-01 18:45:01 +08:00
Jonas Vanthornhout
bc225c8886 Fixed typo 2022-11-01 14:36:44 +08:00
morris
88482af17a Merge branch 'bugfix/i2s_tx_auto_clear_not_totally_clean_the_buf_v5.0' into 'release/v5.0'
i2s: fix tx incomplete auto clear (v5.0)

See merge request espressif/esp-idf!20570
2022-11-01 10:14:54 +08:00
morris
a6d2c65fdc Merge branch 'bugfix/2nd_bootloader_uart1_baudrate_issues_v5.0' into 'release/v5.0'
esp_rom: fix 2nd bootloader custom uart1 baudrate issue (backport to v5.0)

See merge request espressif/esp-idf!20653
2022-11-01 10:11:28 +08:00
zhiweijian
c35b14bb49 Fixed BLE array access out of bounds 2022-10-31 20:13:26 +08:00
Jiang Jiang Jian
eb71cf38bb Merge branch 'feature/move_eloop_to_pptask_v5.0' into 'release/v5.0'
wpa_supplicant: Run eloop timer in ppTask context (v5.0)

See merge request espressif/esp-idf!20864
2022-10-31 20:11:44 +08:00
liuning
eb61f5835a esp_wifi: add protection for mac reset (backport 5.0) 2022-10-31 17:55:03 +08:00
Nachiket Kukade
cbee4d4328 esp_wifi: Update wifi libs
Fix some SoftAP PMF and espnow key management related issues
2022-10-31 12:49:48 +05:30
Kapil Gupta
34bb7af431 wpa_supplicant: Run eloop timer in ppTask context
Currently eloop runs in timer context which may cause some
inconsistent behavior.

Add changes to run eloop in ppTask context
2022-10-31 10:38:01 +05:30
zwl
3bc38b7ff4 Fixed occasional failure to establish sync and occasional wdt timeout issues on ESP32C2 2022-10-31 12:01:35 +08:00
morris
20949d444f Merge branch 'bugfix/rtc_function_needs_disable_usj_pads_esp32s3_v5.0' into 'release/v5.0'
rtcio: Disable USB Serial JTAG pad when setting pins 19 and 20 as RTC function on ESP32S3 (backport v5.0)

See merge request espressif/esp-idf!20550
2022-10-31 11:57:07 +08:00
morris
b1c856022c Merge branch 'bugfix/spi2_add_device_cs_more_than_3_v5.0' into 'release/v5.0'
spi_master:fix error when use `spi_bus_add_device` more than 3 device(v5.0)

See merge request espressif/esp-idf!20073
2022-10-31 11:46:16 +08:00
Jiang Jiang Jian
2635a18df2 Merge branch 'bufix/Backport_some_wifi_lwip_bugs_for_5.0_0821' into 'release/v5.0'
Bufix/backport some wifi lwip bugs for 5.0 0821

See merge request espressif/esp-idf!20732
2022-10-28 16:33:50 +08:00
Kapil Gupta
2444d99612 wpa_supplicant: Validate eloop struct before deleting it 2022-10-28 09:44:32 +05:30
Jiang Jiang Jian
a43a6809c7 Merge branch 'feature/esp32c2_optimize_npl_os_freertos_ram_v5.0' into 'release/v5.0'
Feature/esp32c2 optimize npl os freertos ram v5.0

See merge request espressif/esp-idf!20776
2022-10-28 11:42:16 +08:00
morris
78773966c3 Merge branch 'feature/rgb_lcd_yuv_converter_v5.0' into 'release/v5.0'
RGB-YUV converter (v5.0)

See merge request espressif/esp-idf!20362
2022-10-28 10:07:48 +08:00
morris
8481fbf752 Merge branch 'bugfix/change_clock_name_v5.0' into 'release/v5.0'
mcpwm: fix wrong return value in the legacy MCPWM driver (5.0)

See merge request espressif/esp-idf!20693
2022-10-28 10:02:40 +08:00
morris
a13d5ef224 Merge branch 'bugfix/update_duty_on_tez_tep_v5.0' into 'release/v5.0'
mcpwm: update compare value on both tep and tez (v5.0)

See merge request espressif/esp-idf!20766
2022-10-28 10:00:36 +08:00
Mahavir Jain
108274f6c0 Merge branch 'bugfix/esp32_hardware_mpi_fix_v5.0' into 'release/v5.0'
esp32: mpi: add workaround for data corruption issue observed with IDF 5.x toolchain (v5.0)

See merge request espressif/esp-idf!20819
2022-10-27 20:43:11 +08:00
Mahavir Jain
0830a47b60 Merge branch 'bugfix/http_cached_data_in_redirection_v5.0' into 'release/v5.0'
esp_http_client: free cached data in case connection gets closed for redirection (v5.0)

See merge request espressif/esp-idf!20791
2022-10-27 20:42:37 +08:00
Mahavir Jain
1af8f48a22 Merge branch 'bugfix/fix_wifi_retry_v5.0' into 'release/v5.0'
wifi_provisioning: fix error codes for wifi connect retry (v5.0)

See merge request espressif/esp-idf!20716
2022-10-27 20:42:20 +08:00
Laukik Hase
8becd5a856
protocomm: Increase Bluedroid-BLE maximum buffer size
- For the security2 scheme, the payload size is quite larger
  than that for security1.
2022-10-27 09:56:10 +05:30
Mahavir Jain
84b0254fbf
esp32: mpi: add workaround for data corruption issue observed with IDF 5.x toolchain
This fix adds a workaround to disable compiler optimization flag "-ftree-loop-distribute-patterns"
for `mpi_to_mem_block` routine. It was observed that compiler with release configuration was falling
back to `memset` call from ROM library causing an issue in correctly zero initializing MPI peripheral
block.

Please see following linked issue for more discussion and context on this issue.

Closes https://github.com/espressif/esp-idf/issues/8710
Closes https://github.com/espressif/esp-idf/issues/9371
Closes https://github.com/espressif/esp-idf/issues/9256
Closes IDFGH-7102
Closes IDFGH-7842
Closes IDFGH-7714
Closes IDFCI-1452
Closes IDF-6029
2022-10-27 09:54:26 +05:30
Mahavir Jain
f93304d36e
esp_http_client: free cached data in case connection gets closed for redirection
In case of `esp_http_client_read` based workflow, we cache data that is received
during fetch header stage. In case, there is URL redirection and we have to close
the connection on URL, port change then we must discard earlier cached data.

Closes AUD-4158
2022-10-26 10:11:09 +05:30
zwl
333c3db233 Modify ESP32C2's default ble tx output power 2022-10-25 16:50:21 +08:00
zwl
be07eb4757 Reduced the RAM size of npl_os_freertos.c file 2022-10-25 16:50:07 +08:00
Jiang Jiang Jian
dbcf640261 Merge branch 'bugfix/handle_buffers_for_ext_adv_rpt_v5.0' into 'release/v5.0'
Nimble: Allocate memory for ext adv reports from lower priority pool. (v5.0)

See merge request espressif/esp-idf!20730
2022-10-25 16:48:20 +08:00