Commit Graph

202 Commits

Author SHA1 Message Date
sonika.rathi
7fe0c2392f fix(spiffs): shorten obj_name_len guard comment 2026-07-16 09:52:08 +02:00
yi chen
e628a207ac fix(spiffs): fix off-by-one in spiffsgen.py obj name length check
SpiffsFS.create_file() rejected names only when strictly longer than
obj_name_len, but CONFIG_SPIFFS_OBJ_NAME_LEN's documented semantics
(see components/spiffs/Kconfig) are that the length includes the
zero-termination character, so the maximum number of actual name
characters is obj_name_len - 1.

With the old check, a name exactly obj_name_len characters long was
accepted. SpiffsObjIndexPage.to_binary() then computes the NUL padding
after the name as (obj_name_len - len(name)), which is 0 in that case,
so the generated image's fixed-size name field ends up with no NUL
terminator anywhere in its reserved region.

Fix the boundary so the generator enforces the same maximum length
that the Kconfig help text documents.
2026-07-13 08:29:48 +08:00
sonika.rathi
28c8a2ec0e fix(fatfs): re-enable fatfs and vfs psram/ccomp CI tests 2026-06-24 14:45:16 +02:00
sonika.rathi
eda2d97bdb fix(spiffs): normalize spiffsgen CLI output with esp-pylib 2026-06-05 15:09:16 +08:00
Sudeep Mohanty
301eeba878 Merge branch 'task/buildv2_hygiene_and_dep_declarations' into 'master'
fix(components): generic dep-declaration and scope-leakage hygiene exposed by cmakev2

See merge request espressif/esp-idf!48739
2026-05-26 10:18:22 +02:00
sonika.rathi
d3a8009684 fix(storage): mark storage pytest apps flaky in CI 2026-05-21 20:35:24 +08:00
Sudeep Mohanty
07af6ddcf7 fix(host_test): use ${project_elf} variable and keyword link form
Three host_test CMakeLists.txt files relied on idioms tied to a
specific build system layout. Make them portable:

- spiffs/host_test and esp_partition/host_test/partition_api_test
  passed a hard-coded "<project>.elf" target name to add_dependencies().
  Use ${project_elf}, the canonical variable that resolves to the live
  executable target name in either build system.

- nvs_flash/host_test/nvs_page_test linked --coverage using the plain
  signature of target_link_libraries. CMake forbids mixing plain and
  keyword signatures on the same target; the component library link
  already uses the keyword form. Switch the --coverage link to the
  keyword signature.
2026-05-21 10:05:48 +02:00
Sudeep Mohanty
6e3fae60fc fix(components): initialize srcs variable to prevent scope leakage 2026-05-21 10:05:47 +02:00
Adam Múdry
749c446a7e feat(esp_partition): Add esp_partition_flash_binary() CMake function
Add a new CMake function esp_partition_flash_binary() that provides a
unified API for registering partition data binaries to be flashed. It
replaces the direct esptool_py_flash_target calls scattered across
components (spiffs, fatfs, nvs_flash) with a single function that:

- Resolves partition offset from the partition table automatically
- Determines encryption requirements (auto-detect or ALWAYS_PLAINTEXT)
- Creates per-partition flash targets (e.g. idf.py <partition>-flash)
- Optionally includes the binary in `idf.py flash` via FLASH_IN_PROJECT

On the linux target, the function registers binaries for pre-loading
into the emulated flash. A build-time manifest (linux_flash_data.txt)
is generated via file(GENERATE), and partition_linux.c reads it at
runtime to copy each binary into the memory-mapped flash buffer at
the correct offset.

The partition_ops example is updated to use the new function and
includes a custom_partition with pre-built data to demonstrate the
full workflow, including on the linux target.
2026-04-10 15:22:50 +02:00
Evgeny Torbin
d0f062c018 ci: remove unused test cases 2026-03-12 12:02:10 +01:00
Tomas Rohlinek
ff2b43f31b Merge branch 'fix/minimize_dependencies' into 'master'
feat(storage): Minimize dependencies for test cases

Closes IDF-15321

See merge request espressif/esp-idf!45832
2026-02-24 16:06:21 +01:00
sonika.rathi
e81d02428f change(spiffs): upgrade spiffs module to 0.2-265-gad902ca version
Closes https://github.com/espressif/esp-idf/issues/18214
2026-02-19 11:43:19 +01:00
Tomáš Rohlínek
4575ac1f5e feat(storage): Minimize dependencies for test cases 2026-02-18 13:43:27 +01:00
igor.udot
4c26ab876b ci: update build-test-rules to use common_components 2026-01-23 10:14:09 +08:00
Augusto Zanellato
8f5a92eb36 fix(storage/spiffs): fix readdir setting errno on directory end
spiffs_res_to_errno maps `SPIFFS_ERR_END_OF_OBJECT` to EIO which breaks the common contract where
errno should be 0 if readdir iterated through all the entries in a directory.

The fix is explicitly checking for `SPIFFS_ERR_END_OF_OBJECT` and in that case set errno to 0.
2026-01-21 17:32:13 +01:00
C.S.M
f405e51784 ci(esp32s31): Add ci build test for esp32s31 2025-12-11 15:17:15 +08:00
Marek Fiala
9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
Sudeep Mohanty
30083e07be refactor(esptool_py): Re-evalute dependencies of esptool_py
This commit establishes the foundation for making the esptool_py
component idempotent.

The following changes are made in this commit:

- Removes unnecessary dependency of esp_wifi component on esptool_py.
- Add missing esptool_py dependencies to components which directly use
  esptool_py specific functions or variables but do not declare a public
  or private dependency.
2025-07-10 11:26:28 +02:00
Alexey Lapshin
e82d51a9ee fix(picolibc): fix missed headers in sources 2025-06-25 18:01:50 +07: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
gaoxu
5ef4f20778 feat(esp32h21): disable unsupported build test 2025-02-06 15:47:51 +08:00
Tomáš Rohlínek
d7c487178c feat(storage/spiffs): move spiffs to new VFS API 2024-11-21 07:41:41 +01:00
Tomas Rohlinek
ee6742d764 Merge branch 'fix/incorrect_test_case_spiffs_linux' into 'master'
fix(storage/spiffs): fix incorrect test case configuration

Closes IDFCI-2179

See merge request espressif/esp-idf!33323
2024-10-10 19:50:11 +08:00
Sonika Rathi
d5da858cd9 refactor: remove dependency on spi_flash include for sector size 2024-09-26 13:01:24 +08:00
Alexey Lapshin
4c87af6359 fix(build): fix calloc warnings 2024-09-08 13:53:52 +07:00
Tomáš Rohlínek
4a185b824d fix(storage/vfs): fix incorrect test case configuration 2024-09-04 12:11:43 +02:00
Igor Udot
b5ab82ce3c Merge branch 'fix/replace_pytest_function' into 'master'
ci: replace pytest function

Closes IDFCI-1693

See merge request espressif/esp-idf!30531
2024-07-31 17:23:56 +08:00
sonika.rathi
c1adbb234b test(spiffs): add test case for fsync() call 2024-07-29 19:04:10 +02:00
Alexander Somov
da42024bf2 feat(spiffs): add fsync() support to SPIFFS VFS driver
Closes https://github.com/espressif/esp-idf/pull/12693

Signed-off-by: sonika.rathi <sonika.rathi@espressif.com>
2024-07-29 17:29:03 +02:00
igor.udot
8691672f03 ci: replace pytest function 2024-07-23 14:07:31 +08:00
wanlei
3cf069c7d8 feat(esp32c61): disable unsupported build test 2024-07-16 16:06:19 +08:00
Tomáš Rohlínek
c44da2f222 feat(storage/spiffs): add host test for disabled erase check 2024-05-29 11:00:25 +02:00
laokaiyao
65b1fd33d3 ci(esp32c5mp): disable the unsupported tests 2024-04-07 12:13:29 +08:00
Ivan Grokhotkov
10cc15b150 fix(storage): applied spelling fixes by codespell pre-commit hook 2024-03-28 13:00:54 +01:00
Sudeep Mohanty
9605f9be3f Merge branch 'contrib/github_pr_12800' into 'master'
feat(freertos): Added new Kconfig option CONFIG_FREERTOS_NUMBER_OF_CORES

Closes IDFGH-11693 and IDF-8785

See merge request espressif/esp-idf!28505
2024-02-20 15:21:47 +08:00
Martin Vychodil
db56ade0f5 Merge branch 'fix/cleanup_storage_sdkconfigs' into 'master'
fix(storage): cleanup storage examples/test_apps sdkconfigs

See merge request espressif/esp-idf!28998
2024-02-16 19:28:37 +08:00
sonika.rathi
f7e4b9a132 fix(storage): cleanup storage examples/test_apps sdkconfigs 2024-02-12 10:57:46 +01:00
fl0wl0w
90d1dcfd76 feat(freertos): Introduced new Kconfig option CONFIG_FREERTOS_NUMBER_OF_CORES
This commit replaces the use of portNUM_PROCESSORS and configNUM_CORES
macros in all of ESP-IDF. These macros are needed to realize an SMP
scenario by fetching the number of active cores FreeRTOS is running on.
Instead, a new Kconfig option, CONFIG_FREERTOS_NUMBER_OF_CORES, has been
added as a proxy for the FreeRTOS config option, configNUMBER_OF_CORES.
This new commit is now used to realize an SMP scenario in various places
in ESP-IDF.

[Sudeep Mohanty: Added new Kconfig option CONFIG_FREERTOS_NUMBER_OF_CORES]

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2024-02-09 09:11:28 +01:00
Adam Múdry
a5630c8277 fix: PRI inttypes error due to C++ invalid suffix on literal in SPIFFS 2024-02-07 23:52:49 +08:00
Tomáš Rohlínek
092f5aff29 feat(storage): Update build test rules for storage related components 2024-01-02 13:10:59 +01:00
Adam Múdry
ab1eb37fe8 feat(partition_table): Add read-only partition flag and functionality 2023-10-11 00:01:05 +02:00
Chen Yudong
2e11919f70 fix(ci): change build-test-rules files folder 2023-09-20 19:17:06 +08:00
Martin Vychodil
e44d4260ad Merge branch 'feature/storage_host_test_nvs_flash2' into 'master'
nvs_flash: finished migration of host tests to the linux emulator of esp_partition

See merge request espressif/esp-idf!23926
2023-08-28 20:20:16 +08:00
Armando
7dbd3f6909 feat(ci): Enable p4 example, test_apps and unit tests CI build 2023-08-24 12:51:19 +08:00
Adam Múdry
abaf997018 fix(spiffs): SPIFFS print formatter errors out
Closes https://github.com/espressif/esp-idf/issues/11922
2023-08-15 15:40:19 +02:00
radek.tandler
1da6a4f5fa fix(spiffs): Corrected buffer size and allocation in host test 2023-08-09 14:14:20 +02:00
Marius Vikhammer
d17248ecdf build-system: replace ADDITIONAL_MAKE_CLEAN_FILES with ADDITIONAL_CLEAN_FILES
ADDITIONAL_MAKE_CLEAN_FILES is deprecated and only worked with make.
Replaced with the new ADDITIONAL_CLEAN_FILES (CMake 3.15) which also works with ninja.
2023-05-08 15:51:48 +08:00
Jakob Hasse
5327fd89b5 spiffs: test is using configurable build dir 2023-03-31 15:07:07 +08:00
radek.tandler
e9e388a085 Storage: ESP Partition extended options for the SPI Flash emulation
Various extensions and fixes to improve Linux target SPI Flash emulation. Used by the host tests
2023-03-03 23:57:34 +00:00