Files
esp-idf/components/newlib/test_apps/newlib/pytest_newlib.py
T
Alexey Lapshin ec68cb3300 feat(newlib): riscv: add CONFIG_LIBC_OPTIMIZED_MISALIGNED_ACCESS config option
This option replaces implementations of functions from ROM:
  - memcpy
  - memcmp
  - memmove
  - str[n]cpy
  - str[n]cmp

The functions used in the firmware will be better optimized for misaligned
memory. Here are some measurements in CPU cycles for 4096-byte buffers:

  memcpy:  28676 -> 4128
  memcmp:  49147 -> 14259
  memmove: 33896 -> 8086
  strcpy:  32771 -> 17313
  strcmp:  32775 -> 13191
2025-03-26 17:27:24 +07:00

25 lines
707 B
Python

# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import pytest
from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic
@idf_parametrize(
'config,target',
[
('default', 'supported_targets'),
('picolibc', 'supported_targets'),
('options', 'supported_targets'),
('single_core_esp32', 'esp32'),
('psram_esp32', 'esp32'),
('release_esp32', 'esp32'),
('release_esp32c2', 'esp32c2'),
('misaligned_mem', 'esp32c3'),
],
indirect=['config', 'target'],
)
def test_newlib(dut: Dut) -> None:
dut.run_all_single_board_cases()