Commit Graph

86 Commits

Author SHA1 Message Date
morris
193fca5b95 refactor(hal): extract cache && mmu HAL into esp_hal_cache 2026-09-16 21:40:16 +08:00
Marius Vikhammer
deb69a8dfe Merge branch 'fix/adjtime-offset-truncation' into 'master'
fix(esp_libc): reject out-of-range adjtime() deltas instead of overflowing

Closes IDFGH-18241

See merge request espressif/esp-idf!52498
2026-09-11 14:13:42 +08:00
armando
6e3abd12a1 refactor(spi_flash): move os layer to esp_mspi and chip configs to spi_flash
Also fixes the implicit dependency on esp_partition.
2026-09-09 14:17:00 +08:00
Guillaume Souchere
bdf98cf0dd fix(esp_libc): reject out-of-range adjtime() deltas instead of overflowing
The adjtime() wrapper stored the microsecond offset into the 32-bit
`long` timex.offset field without checking for overflow. A large delta
(e.g. 400 days) was computed in 64-bit and silently truncated when
assigned, wrapping into a small value that passed the ~35 minute range
check. adjtime() then returned 0 instead of the expected -1.

Compute the offset in int64_t and reject values that do not fit in the
timex.offset field with EINVAL. Add a regression test for a multi-day delta.

Closes https://github.com/espressif/esp-idf/issues/19051
2026-09-09 07:28:45 +02:00
Alexey Gerenkov
c5517c21f1 Merge branch 'fix/remove_duplicated_lines_in_esp_libc' into 'master'
fix(esp_libc): remove duplicated lines in linker fragment file

Closes IDF-15371

See merge request espressif/esp-idf!51575
2026-09-02 17:07:44 +08:00
Chen Jichang
3e32f8bb54 feat(esp32h4): update rom.ld files for esp32h4 eco2 2026-08-28 15:31:08 +08:00
Marius Vikhammer
844a03718a Merge branch 'feat/c5_eco4_newlib_support' into 'master'
change(esp_libc): use C5 ECO4 ROM newlib functions

See merge request espressif/esp-idf!50280
2026-08-20 15:10:47 +08:00
Alexey Lapshin
477677cc30 fix(esp_libc): remove duplicated lines in linker fragment file 2026-08-12 16:39:53 +07:00
Alexey Lapshin
36586b15d6 Merge branch 'fix/newlib_builds' into 'master'
Fix: newlib compatibility with libraries built with picolibc headers

Closes IDF-15962

See merge request espressif/esp-idf!51013
2026-08-04 14:41:32 +04:00
Marius Vikhammer
a96851ebfb change(esp_libc): use C5 ECO4 ROM newlib functions
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 17:26:37 +08:00
Alexey Lapshin
df1b1dea29 feat(libc): pass __PICOLIBC_ERRNO_FUNCTION to picolibc builds 2026-07-29 16:12:02 +07:00
Guillaume Souchere
9cea97187f fix(esp_libc): provide timespec_get missing from toolchain
Both newlib and picolibc headers in toolchain 16.1 declare timespec_get()
but the archives do not define it. Provide the missing C11 implementation
through esp_libc, mapping TIME_UTC to clock_gettime(CLOCK_REALTIME).

Closes https://github.com/espressif/esp-idf/issues/18889
2026-07-28 08:23:33 +02:00
Renz Christian Bagaporo
faca8f56a3 Merge branch 'feat/cmakev2_ulp_full_subproject' into 'master'
feat(ulp): initial support for building ULP projects as full subprojects under CMake v2

See merge request espressif/esp-idf!50134
2026-07-16 21:00:32 +08:00
Alexey Lapshin
1791325998 change(ci): enable -Werror=unused-but-set-variable 2026-07-16 10:54:36 +07:00
Frantisek Hrbata
534a7c0c96 feat(cmakev2): add IDF_CUSTOM_TOOLCHAIN for sub-projects with non-IDF toolchains
Sub-projects like ULP are built as external CMake projects via
externalproject_add() and may use toolchains that are completely
different from the IDF target toolchain. For example, the ULP RISC-V
co-processor on an xtensa target (ESP32-S2/S3) uses
riscv32-esp-elf-gcc while the main project uses xtensa-esp-elf-gcc.

This causes problems in cmakev2:

1. __init_toolchain() in idf.cmake validates that CMAKE_TOOLCHAIN_FILE
   matches IDF_TARGET and then overrides it. For sub-projects with
   custom toolchains (passed via -DCMAKE_TOOLCHAIN_FILE from the
   parent), this validation fails because the toolchain doesn't follow
   the IDF naming convention (toolchain-<target>.cmake).

2. Several component project_include.cmake files use functions from
   the IDF toolchain response file machinery (idf_toolchain_add_flags,
   idf_toolchain_remove_flags, idf_toolchain_rerun_abi_detection) that
   are not available in sub-projects with custom toolchains, or perform
   validation that assumes the IDF target toolchain is in use.

Introduce IDF_CUSTOM_TOOLCHAIN, a CMake variable passed via -D from
the parent build to indicate that the toolchain was provided externally
and should not be resolved or validated by the IDF build system.

When IDF_CUSTOM_TOOLCHAIN is set:
- __init_toolchain() records the pre-set CMAKE_TOOLCHAIN_FILE and
  skips IDF_TARGET-based resolution and validation.
- Component project_include.cmake files that manipulate IDF toolchain
  flags (xtensa, esp_libc, esp_psram, soc) return early, as those
  operations are not applicable to custom toolchains.

This is a generic mechanism usable by any sub-project that provides
its own toolchain (ULP, or any future sub-project with a non-IDF
toolchain).

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-07-14 16:54:57 +09:00
Alexey Lapshin
e389f3e4df Merge branch 'feature/upgrade_toolchain_to_16.1.0_20260609' into 'master'
Upgrade GNU toolchain to 16.1.0_20260609

See merge request espressif/esp-idf!49523
2026-06-18 00:55:07 +04:00
Alexey Lapshin
7d8c01b879 Revert "feat(esp_libc): picolibc: add fopencookie implementation"
This reverts commit 51f1861448.
2026-06-17 17:24:25 +07:00
Alexey Lapshin
159bc4b1bc Revert "fix(esp_libc): remove --gc-sections from picolibc.specs for CMake checks"
This reverts commit 4535898de9.
2026-06-17 17:24:25 +07:00
Alexey Lapshin
72682b9f36 Revert "fix(libc): nano: add -lnosys to linking to avoid CMake configuration issues"
This reverts commit f54b5d4747.
2026-06-17 17:24:25 +07:00
Alexey Lapshin
866239bd19 Revert "fix(esp_libc): add workaround for pthread_sigmask declaration in picolibc signal.h"
This reverts commit 5d38af9c17.
2026-06-17 17:24:25 +07:00
Alexey Lapshin
b6930d1e38 Revert "fix(picolibc): add psram fix for libc functions"
This reverts commit 1684eeb60f.
2026-06-17 17:24:25 +07:00
Alexey Lapshin
056eb76645 Revert "fix(libc): picolibc: workaround wrong pthread_exit declaration for c++"
This reverts commit b42688f6c9.
2026-06-17 17:24:25 +07:00
Alexey Lapshin
66e62fc9ef Revert "fix(esp_libc): picolibc: add workaround for setvbuf on _IONBF"
This reverts commit 8b3414ba51.
2026-06-17 17:24:25 +07:00
Alexey Lapshin
e44ddc22e2 feat(libc): picolibc:remove open_memstream implementation 2026-06-17 17:24:25 +07:00
Alexey Lapshin
33f9932329 fix(libc): change object names according to the new picolibc 2026-06-17 17:24:25 +07:00
Alexey Lapshin
2009840d2e feat(esp_libc): add riscv zcmp testing on esp32c5 2026-06-15 11:42:50 +07:00
Alexey Lapshin
8a66ccf322 Merge branch 'fix/newlib-nano-nosys-linking' into 'master'
fix(libc): nano: add -lnosys to linking to avoid CMake configuration issues

Closes IEC-540

See merge request espressif/esp-idf!48738
2026-05-28 15:47:59 +04:00
Tomas Rohlinek
ff1099f39b Merge branch 'feat/refactor_stdio_vfs' into 'master'
feat(storage/stdio): refactor stdio vfs

Closes IDF-15109

See merge request espressif/esp-idf!44351
2026-05-27 11:36:05 +02:00
Sudeep Mohanty
8f202ad7e8 fix(esp_libc/kconfig): exclude IDF_TARGET_LINUX from LibC menu
On the Linux target the host's C library is used directly; none of the
LibC menu options apply. Mark the entire "LibC" menu as `depends on
!IDF_TARGET_LINUX` so its symbols (LIBC_NEWLIB, LIBC_PICOLIBC, …) stay
undefined on Linux builds.

Also gate the picolibc-specific include in components/console/linenoise/
linenoise.c under `!CONFIG_IDF_TARGET_LINUX` so the file does not try to
pull <stdio-bufio.h> on the host even if CONFIG_LIBC_PICOLIBC is set by
some other build path.
2026-05-21 10:05:47 +02:00
Alexey Lapshin
f54b5d4747 fix(libc): nano: add -lnosys to linking to avoid CMake configuration issues 2026-05-20 15:08:41 +07:00
Alexey Lapshin
653e6007e6 Merge branch 'fix/picolibc-disable-c11-annex-k' into 'master'
fix(libc): picolibc: disable C11 annex K in compatibility mode

See merge request espressif/esp-idf!48197
2026-05-18 10:34:43 +04:00
Alexey Gerenkov
97e6873e34 feat(tools): update esp-clang version to esp-21.1.3_20260304 2026-05-07 17:42:32 +03:00
Alexey Lapshin
19c2f0becc fix(libc): picolibc: disable C11 annex K in compatibility mode 2026-05-06 14:23:29 +07:00
Alexey Lapshin
9b31897c2f fix(picolibc): add times() stub 2026-04-29 15:29:54 +07:00
nvmd
d95a838b36 fix(esp_libc): add missing stdint include 2026-04-27 11:35:16 +02:00
Alexey Lapshin
b42688f6c9 fix(libc): picolibc: workaround wrong pthread_exit declaration for c++ 2026-04-22 22:34:49 +08:00
Marius Vikhammer
ee50fa20e3 refactor(esp_libc): move newlib time init into esp_libc component 2026-04-13 15:11:57 +08:00
Tomáš Rohlínek
1509ca2895 fix(storage/esp_libc): Fix incorrect fd checks 2026-04-01 15:30:45 +02:00
Ondrej Kosta
ed2e6735ff feat(esp_libc): refactored POSIX timers get/set functions
- Added sys/timex.h and clock_adjtime API
2026-03-31 22:32:33 +08:00
Alexey Lapshin
8b3414ba51 fix(esp_libc): picolibc: add workaround for setvbuf on _IONBF 2026-03-25 16:26:54 +07:00
Marius Vikhammer
25a2747dfd ci: restore runnable pytest configs
Use real CI config names and minimal config aliases so these tests are
collected and built again instead of silently being skipped.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Made-with: Cursor
2026-03-16 13:45:26 +08:00
Evgeny Torbin
7ace6b91c9 ci: fix pre-commit hook errors 2026-03-12 12:02:11 +01:00
Evgeny Torbin
d0f062c018 ci: remove unused test cases 2026-03-12 12:02:10 +01:00
Tomas Rohlinek
0b096cccbb Merge branch 'fix/poll_return_value' into 'master'
fix(storage/esp_libc): Fix poll return value discrepancy

Closes IDF-9973

See merge request espressif/esp-idf!44943
2026-02-25 08:28:48 +01:00
Alexey Lapshin
387246d394 Merge branch 'fix/esp_libc_run_newlib_tests' into 'master'
fix(esp_libc): add Newlib tests (picolibc is default)

See merge request espressif/esp-idf!45710
2026-02-13 19:13:22 +04:00
Alexey Lapshin
c5c654576e fix(esp_libc): add Newlib tests (picolibc is default) 2026-02-06 13:16:56 +07:00
Alexey Lapshin
4535898de9 fix(esp_libc): remove --gc-sections from picolibc.specs for CMake checks
The --gc-sections flag in picolibc.specs causes CMake compiler detection
to fail by dropping required data. Work around this by creating a modified
specs file without the flag.
2026-02-04 18:08:51 +07:00
Marius Vikhammer
6b24a2f2eb Merge branch 'ci/core_comp_depends' into 'master'
ci(core): removed common_components from core test-apps dependencies

See merge request espressif/esp-idf!45407
2026-01-27 15:47:27 +08:00
Alexey Gerenkov
7b33befeaf Merge branch 'feature/add_fopencookie_implementation' into 'master'
feat(esp_libc): picolibc: add fopencookie implementation

See merge request espressif/esp-idf!45303
2026-01-26 22:42:34 +08:00
Marius Vikhammer
5f914189c2 ci(core): removed common_components from core test-apps dependencies 2026-01-26 11:47:23 +08:00