From aefab81f3708a7357584cbeea86d673362b2b689 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Fri, 21 Nov 2025 15:45:18 +0800 Subject: [PATCH] fix(libc): fixed P4 ECO5 always using sub opt. version of memcpy and similar --- .../esp_libc/test_apps/.build-test-rules.yml | 6 -- .../test_apps/newlib/pytest_newlib.py | 1 - .../esp32p4/ld/esp32p4.rom.eco5.newlib.ld | 64 +------------------ 3 files changed, 3 insertions(+), 68 deletions(-) diff --git a/components/esp_libc/test_apps/.build-test-rules.yml b/components/esp_libc/test_apps/.build-test-rules.yml index 37507a6cfe..6f79760bde 100644 --- a/components/esp_libc/test_apps/.build-test-rules.yml +++ b/components/esp_libc/test_apps/.build-test-rules.yml @@ -1,11 +1,5 @@ # Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps -components/esp_libc/test_apps/newlib: - disable_test: - - if: IDF_TARGET == "esp32p4" - temporary: true - reason: p4 rev3 migration # TODO: IDF-14415 - components/esp_libc/test_apps/no_rvfplib: disable: - if: ESP_ROM_HAS_RVFPLIB != 1 diff --git a/components/esp_libc/test_apps/newlib/pytest_newlib.py b/components/esp_libc/test_apps/newlib/pytest_newlib.py index de750e938b..96d5e4ac1c 100644 --- a/components/esp_libc/test_apps/newlib/pytest_newlib.py +++ b/components/esp_libc/test_apps/newlib/pytest_newlib.py @@ -20,6 +20,5 @@ from pytest_embedded_idf.utils import idf_parametrize ], indirect=['config', 'target'], ) -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration # TODO: IDF-14415') def test_newlib(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/components/esp_rom/esp32p4/ld/esp32p4.rom.eco5.newlib.ld b/components/esp_rom/esp32p4/ld/esp32p4.rom.eco5.newlib.ld index 0498c23bf1..827507e6e4 100644 --- a/components/esp_rom/esp32p4/ld/esp32p4.rom.eco5.newlib.ld +++ b/components/esp_rom/esp32p4/ld/esp32p4.rom.eco5.newlib.ld @@ -10,7 +10,9 @@ * * Compatible with ROM where ECO version equal or greater to 5. * - * THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT EDIT. + * THIS FILE WAS AUTOMATICALLY GENERATED. !!! BUT EDITED !!! + * The file was originally generated for use with newlib, but it was split into + * multiple files to make it compatible with picolibc. */ /*************************************** @@ -18,69 +20,12 @@ ***************************************/ /* Functions */ -esp_rom_newlib_init_common_mutexes = 0x4fc00264; -memset = 0x4fc00268; -memcpy = 0x4fc0026c; -memmove = 0x4fc00270; -memcmp = 0x4fc00274; -strcpy = 0x4fc00278; -strncpy = 0x4fc0027c; -strcmp = 0x4fc00280; -strncmp = 0x4fc00284; -strlen = 0x4fc00288; -strstr = 0x4fc0028c; -bzero = 0x4fc00290; _isatty_r = 0x4fc00294; -sbrk = 0x4fc00298; -isalnum = 0x4fc0029c; -isalpha = 0x4fc002a0; -isascii = 0x4fc002a4; -isblank = 0x4fc002a8; -iscntrl = 0x4fc002ac; -isdigit = 0x4fc002b0; -islower = 0x4fc002b4; -isgraph = 0x4fc002b8; -isprint = 0x4fc002bc; -ispunct = 0x4fc002c0; -isspace = 0x4fc002c4; -isupper = 0x4fc002c8; -toupper = 0x4fc002cc; -tolower = 0x4fc002d0; -toascii = 0x4fc002d4; -memccpy = 0x4fc002d8; -memchr = 0x4fc002dc; -memrchr = 0x4fc002e0; -strcasecmp = 0x4fc002e4; -strcasestr = 0x4fc002e8; -strcat = 0x4fc002ec; strdup = 0x4fc002f0; -strchr = 0x4fc002f4; -strcspn = 0x4fc002f8; -strcoll = 0x4fc002fc; -strlcat = 0x4fc00300; -strlcpy = 0x4fc00304; -strlwr = 0x4fc00308; -strncasecmp = 0x4fc0030c; -strncat = 0x4fc00310; strndup = 0x4fc00314; -strnlen = 0x4fc00318; -strrchr = 0x4fc0031c; -strsep = 0x4fc00320; -strspn = 0x4fc00324; -strtok_r = 0x4fc00328; -strupr = 0x4fc0032c; -longjmp = 0x4fc00330; -setjmp = 0x4fc00334; -abs = 0x4fc00338; -div = 0x4fc0033c; -labs = 0x4fc00340; -ldiv = 0x4fc00344; -qsort = 0x4fc00348; rand_r = 0x4fc0034c; rand = 0x4fc00350; srand = 0x4fc00354; -utoa = 0x4fc00358; -itoa = 0x4fc0035c; atoi = 0x4fc00360; atol = 0x4fc00364; strtol = 0x4fc00368; @@ -94,6 +39,3 @@ __swhatbuf_r = 0x4fc00384; __swbuf_r = 0x4fc00388; __swbuf = 0x4fc0038c; __swsetup_r = 0x4fc00390; -/* Data (.data, .bss, .rodata) */ -syscall_table_ptr = 0x4ffbffe4; -_global_impure_ptr = 0x4ffbffe0;