Commit Graph

364 Commits

Author SHA1 Message Date
Adam Múdry
670fb68bc7 test(vfs): Test changes regarding VFS register incorrect check fix 2026-06-22 14:48:13 +02:00
Adam Múdry
199a403d81 fix(vfs): Fix __errno_r(__getreent()) correctness for Linux 2026-06-22 14:01:55 +02:00
Adam Múdry
6ef5d42acc fix(vfs): Fix incorrect check in esp_vfs_register_fs_common and optimize memory 2026-06-11 16:34:39 +02:00
gadget-man
aad525da10 Fix bug in logging for VFS start_select function
Resolves issue identified in https://github.com/espressif/esp-idf/issues/18398 by seperating logging when `vfs == NULL`

Closes https://github.com/espressif/esp-idf/pull/18400
Closes https://github.com/espressif/esp-idf/issues/18398
2026-06-10 11:26:20 +02:00
Guillaume Souchere
a010738ec2 Merge branch 'feat/new-freertos-linux-simulator' into 'master'
feat(freertos): Refactor linux simulator

Closes IDF-8339

See merge request espressif/esp-idf!43564
2026-06-05 12:18:44 +02:00
Martin Vychodil
b6e4438cfb Merge branch 'bugfix/vfs-syscall-argument-checks' into 'master'
fix(vfs): add syscall argument validation in VFS layer

Closes IDF-12760

See merge request espressif/esp-idf!48954
2026-06-05 17:57:15 +08:00
Guillaume Souchere
9835daba70 feat(freertos/vfs): add Linux cooperative syscall dispatch with VFS FD registration
Rework the syscall interposition architecture so FreeRTOS works
standalone (without VFS) and VFS optionally overrides with strong
symbols.  All kernel FDs are registered with VFS via
esp_vfs_register_fd_with_local_fd, so the application only sees
VFS-allocated FD numbers, preventing numerical collisions between
kernel FDs and VFS-internal FD slots.

FreeRTOS side:
- Create linux_port_coop_internal.h with LINUX_COOP_IO_LOOP,
  LINUX_COOP_RESOLVE, linux_coop_yield and FD state table functions
- Export cooperative I/O primitives (freertos_linux_coop_read/write/
  open/close/fcntl/select/pread/pwrite/readv/writev/recv/send/
  recvfrom/sendto/recvmsg/sendmsg/connect/accept/pselect/poll/
  socket/socketpair/pipe/pipe2/dup/dup2/syscalls_init)
- Define weak POSIX symbols calling through to the cooperative
  primitives; keep nanosleep/sleep/usleep as strong (not FD-related)
- Refactor freertos_linux_coop_syscalls.h into a pure public API header

VFS side:
- Register the Linux host FS with esp_vfs_register_fs_with_id() as a
  proper VFS driver; register stdin/stdout/stderr at init (priority 99)
- Rewrite vfs_linux.c with strong POSIX symbols dispatching through
  esp_vfs_*
- Add strong overrides for FD-creating syscalls (open, pipe, pipe2,
  socket, socketpair, dup, dup2, accept) that register returned FDs
  with VFS
- Add strong overrides for FD-translating syscalls (readv, writev,
  recv, send, recvfrom, sendto, recvmsg, sendmsg, connect, pselect,
  poll) that translate VFS FD to kernel FD
- Delete vfs_coop_syscalls.c (absorbed into FreeRTOS weak + VFS strong)
- Update CMakeLists.txt: remove vfs_coop_syscalls.c, add linker hook
2026-06-04 11:36:34 +02:00
Tomáš Rohlínek
7361e32490 fix(storage/vfs): Mark the correct version of function deprecated 2026-05-28 15:00:50 +02:00
sonika.rathi
bc8e0ef153 fix(vfs): add syscall argument validation in VFS layer 2026-05-27 14:18:00 +02:00
sonika.rathi
d3a8009684 fix(storage): mark storage pytest apps flaky in CI 2026-05-21 20:35:24 +08:00
Frantisek Hrbata
0505ced81d fix(vfs): initialize local variables in Linux target block to prevent scope leakage
In CMake v2's recursive component evaluation model, when a component
triggers the inclusion of another component via idf_component_include(),
the child component's directory scope inherits variables from the
caller's scope chain through the idf_component_include() function scope
and add_subdirectory().

The vfs component's Linux target block used list(APPEND ...) without
first initializing the srcs, inc, and priv_inc variables. This was
harmless when vfs was evaluated before esp_stdio, but after commit
5fac0b7386 ("feat(console): Move IO initialization outside of the
console component"), esp_stdio became a real component for the Linux
target and started calling idf_component_include(vfs). When esp_stdio
is evaluated first, its srcs variable (containing stdio_port.c and
linux/esp_stdio_linux.c) leaks into vfs's scope, causing the build
to fail with "Cannot find source file: components/vfs/stdio_port.c".

Fix by explicitly initializing all local variables at the top of the
Linux target block before appending to them.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-26 16:09:27 +01:00
Tomas Rohlinek
3c499632c7 Merge branch 'feat/unify_vfs_api' into 'master'
feat(storage/vfs): Unify VFS API by removing context-less APIs

Closes IDF-15107

See merge request espressif/esp-idf!44161
2026-03-13 15:05:04 +01:00
Evgeny Torbin
d0f062c018 ci: remove unused test cases 2026-03-12 12:02:10 +01:00
Tomáš Rohlínek
a46fec8d96 feat(storage/vfs): Remove usage of context less VFS APIs 2026-03-11 11:03:43 +01:00
Tomáš Rohlínek
859ca9e5e2 feat(storage/vfs): Deprecate context-less function pointers 2026-03-11 11:03:37 +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
Tomáš Rohlínek
d509422fec fix(vfs): clear dummy select output fd sets
Zero dummy VFS output fd sets in start_select.
This keeps revents limited to readiness from end_select.
It prevents spurious POLLERR bits in poll() regression tests.
2026-02-19 11:27:21 +01:00
Tomas Rohlinek
f0bf3ca1c0 Merge branch 'fix/vfs_missing_va_end' into 'master'
fix(storage/vfs): Remove va_end leak in ioctl caused by early return in macro

Closes IDF-15111

See merge request espressif/esp-idf!44923
2026-01-29 12:03:11 +01:00
igor.udot
4c26ab876b ci: update build-test-rules to use common_components 2026-01-23 10:14:09 +08:00
Tomáš Rohlínek
d7344e9658 fix(storage/esp_libc): Fix poll return value discrepancy 2026-01-14 08:28:05 +01:00
Tomáš Rohlínek
8e41da1aa1 fix(storage/vfs): Remove va_end leak in ioctl caused by early return in macro 2026-01-08 12:01:56 +01:00
Xiao Xufeng
73735f3e87 test: merge chip-specific performance data headers 2026-01-01 02:35:58 +08:00
Xiao Xufeng
438e07b30e refactor: Remove idf_test component
Split the idf_performance.h and target ver, which hold the performance
thresholds, into the headers of each testing.

In the past pytest also parse the common header to get the thresholds.
Now the logic is also removed. Performance thresholds are supposed to be
in the pytest scripts.
2026-01-01 02:26:42 +08:00
Tomáš Rohlínek
3e41a5de6f feat(storage/vfs): Deprecate legacy API 2025-12-16 17:48:55 +08:00
Tomáš Rohlínek
515975d2bb feat(storage/vfs): Make lwip specific API private 2025-12-16 17:48:55 +08:00
Tomáš Rohlínek
8c9d62de98 feat(storage/vfs): Remove old API usage 2025-12-16 17:48:55 +08:00
Tomáš Rohlínek
4814f06283 feat(storage/vfs): refactor VFS calls to multiple files 2025-12-16 17:48:55 +08:00
C.S.M
f405e51784 ci(esp32s31): Add ci build test for esp32s31 2025-12-11 15:17:15 +08:00
Alexey Lapshin
31810ae993 feat(esp_libc): make picolibc default libc 2025-12-03 13:31:42 +07:00
Sonika Rathi
7fb2f80fe0 Merge branch 'feat/vfs_linux' into 'master'
feat(vfs): Add support for linux target in VFS

See merge request espressif/esp-idf!39524
2025-11-27 22:12:06 +08:00
Marius Vikhammer
d209293856 feat(stdio): updated CMakelists.txt to support cmake v2 build system 2025-11-14 10:13:38 +08:00
sonika.rathi
24e42cc4a6 feat(vfs): add linux support to vfs 2025-11-05 09:49:21 +01:00
Tomas Rohlinek
06004072cb Merge branch 'feat/vfs_disable_termios_by_default' into 'master'
feat(storage/vfs): Disable termios support by default

Closes IDF-7998

See merge request espressif/esp-idf!42175
2025-10-23 13:25:11 +02:00
Marius Vikhammer
a257812e14 feat(stdio): added esp_stdio component
esp_stdio contains everything the old esp_vfs_console contained (the vfs stdio glue layer)
as well as other functionality related to stdio (previously referred to as console)
2025-10-16 10:01:59 +08:00
Tomáš Rohlínek
d99e984a90 feat(storage/vfs): Disable termios support by default 2025-10-15 09:29:34 +02:00
morris
cd41b6a640 refactor: remove unnecessary driver dependencies from build rules 2025-10-11 14:02:29 +08:00
Marius Vikhammer
19337d2708 change(vfs): deleted deprecated uart and uart-jtag-serial API 2025-09-22 11:46:07 +08:00
Alexey Lapshin
9281e78381 change(esp_libc): rename newlib component to esp_libc 2025-09-09 22:00:44 +08:00
Alexey Lapshin
bc4a9ad406 change(newlib): remove sys/dirent.h from newlib component 2025-08-30 19:52:33 +07:00
Marius Vikhammer
56e0c11bb6 feat(usb_cdc_console): moved usb-cdc ROM console to new component: esp_usb_cdc_rom_console 2025-08-22 09:37:47 +08:00
Marius Vikhammer
bf84ab652a change(test_utils): moved test_utils component to tools/test_apps/components/ 2025-07-21 14:05:50 +08:00
Frantisek Hrbata
26e49e1e82 fix(vfs/cmake): avoid using uninitialized sources variable
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-04 19:50:27 +08:00
radek.tandler
c3239ce836 fix(vfs): Fixed include for target linux failing on MacOs 2025-05-15 12:28:11 +02:00
Shen Meng Jing
62d4115e08 docs: Fix some typos 2025-04-30 18:35:39 +08:00
Guillaume Souchere
8a89dc0b9c feat(vfs): Add linux target support for esp_vfs_eventfd 2025-04-03 10:06:01 +02:00
Chen Jichang
6c4271d4bb feat(esp32h4): disable unsupported build 2025-03-28 14:41:29 +08:00
Chen Jichang
c34b4eb882 feat(esp32h4): enable ESP32H4 ci build 2025-03-28 14:41:28 +08:00
igor.udot
daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00
Martin Vychodil
8606eb43f7 Merge branch 'feat/optimize_vfs_mountpoint_table' into 'master'
feat(storage/vfs): improve mountpoint table memory usage

Closes IDF-12560

See merge request espressif/esp-idf!36613
2025-02-26 22:08:15 +08:00
Tomáš Rohlínek
67638981ec feat(storage/vfs): cleanup path prefix handling 2025-02-07 10:34:24 +01:00