diff --git a/docs/en/api-reference/storage/spiffs.rst b/docs/en/api-reference/storage/spiffs.rst index a11c3814e8..4c7b3cf779 100644 --- a/docs/en/api-reference/storage/spiffs.rst +++ b/docs/en/api-reference/storage/spiffs.rst @@ -70,7 +70,7 @@ Optionally, user can opt to have the image automatically flashed together with t If FLASH_IN_PROJECT is not specified, the image is still generated, but user has to flash it manually using ``esptool.py``, ``parttool.py`` or a custom build system target. -For an example, see :example:`examples/build_system/spiffsgen>`. +For an example, see :example:`examples/storage/spiffsgen>`. mkspiffs diff --git a/examples/build_system/spiffsgen/CMakeLists.txt b/examples/storage/spiffsgen/CMakeLists.txt similarity index 100% rename from examples/build_system/spiffsgen/CMakeLists.txt rename to examples/storage/spiffsgen/CMakeLists.txt diff --git a/examples/build_system/spiffsgen/Makefile b/examples/storage/spiffsgen/Makefile similarity index 100% rename from examples/build_system/spiffsgen/Makefile rename to examples/storage/spiffsgen/Makefile diff --git a/examples/build_system/spiffsgen/README.md b/examples/storage/spiffsgen/README.md similarity index 100% rename from examples/build_system/spiffsgen/README.md rename to examples/storage/spiffsgen/README.md diff --git a/examples/build_system/spiffsgen/example_test.py b/examples/storage/spiffsgen/example_test.py similarity index 93% rename from examples/build_system/spiffsgen/example_test.py rename to examples/storage/spiffsgen/example_test.py index de08fb72e3..636d69c7db 100644 --- a/examples/build_system/spiffsgen/example_test.py +++ b/examples/storage/spiffsgen/example_test.py @@ -15,7 +15,7 @@ except ImportError: @IDF.idf_example_test(env_tag='Example_WIFI') def test_examples_spiffsgen(env, extra_data): # Test with default build configurations - dut = env.get_dut('spiffsgen', 'examples/build_system/spiffsgen') + dut = env.get_dut('spiffsgen', 'examples/storage/spiffsgen') dut.start_app() base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'spiffs_image') diff --git a/examples/build_system/spiffsgen/main/CMakeLists.txt b/examples/storage/spiffsgen/main/CMakeLists.txt similarity index 100% rename from examples/build_system/spiffsgen/main/CMakeLists.txt rename to examples/storage/spiffsgen/main/CMakeLists.txt diff --git a/examples/build_system/spiffsgen/main/component.mk b/examples/storage/spiffsgen/main/component.mk similarity index 100% rename from examples/build_system/spiffsgen/main/component.mk rename to examples/storage/spiffsgen/main/component.mk diff --git a/examples/build_system/spiffsgen/main/spiffsgen_example_main.c b/examples/storage/spiffsgen/main/spiffsgen_example_main.c similarity index 93% rename from examples/build_system/spiffsgen/main/spiffsgen_example_main.c rename to examples/storage/spiffsgen/main/spiffsgen_example_main.c index 1511ec51d1..fde74dcdc0 100644 --- a/examples/build_system/spiffsgen/main/spiffsgen_example_main.c +++ b/examples/storage/spiffsgen/main/spiffsgen_example_main.c @@ -14,7 +14,7 @@ #include "esp_err.h" #include "esp_log.h" #include "esp_spiffs.h" -#include "esp32/rom/md5_hash.h" +#include "mbedtls/md5.h" static const char *TAG = "example"; @@ -53,19 +53,20 @@ static void compute_alice_txt_md5() #define MD5_MAX_LEN 16 char buf[64]; - struct MD5Context ctx; + mbedtls_md5_context ctx; unsigned char digest[MD5_MAX_LEN]; - MD5Init(&ctx); + mbedtls_md5_init(&ctx); + mbedtls_md5_starts_ret(&ctx); size_t read; do { read = fread((void*) buf, 1, sizeof(buf), f); - MD5Update(&ctx, (unsigned const char*) buf, read); + mbedtls_md5_update_ret(&ctx, (unsigned const char*) buf, read); } while(read == sizeof(buf)); - MD5Final(digest, &ctx); + mbedtls_md5_finish_ret(&ctx, digest); // Create a string of the digest char digest_str[MD5_MAX_LEN * 2]; diff --git a/examples/build_system/spiffsgen/partitions_example.csv b/examples/storage/spiffsgen/partitions_example.csv similarity index 100% rename from examples/build_system/spiffsgen/partitions_example.csv rename to examples/storage/spiffsgen/partitions_example.csv diff --git a/examples/build_system/spiffsgen/sdkconfig.defaults b/examples/storage/spiffsgen/sdkconfig.defaults similarity index 100% rename from examples/build_system/spiffsgen/sdkconfig.defaults rename to examples/storage/spiffsgen/sdkconfig.defaults diff --git a/examples/build_system/spiffsgen/spiffs_image/hello.txt b/examples/storage/spiffsgen/spiffs_image/hello.txt similarity index 100% rename from examples/build_system/spiffsgen/spiffs_image/hello.txt rename to examples/storage/spiffsgen/spiffs_image/hello.txt diff --git a/examples/build_system/spiffsgen/spiffs_image/sub/alice.txt b/examples/storage/spiffsgen/spiffs_image/sub/alice.txt similarity index 100% rename from examples/build_system/spiffsgen/spiffs_image/sub/alice.txt rename to examples/storage/spiffsgen/spiffs_image/sub/alice.txt