Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to upload binary to Spiffs once (keep separate from factory_app partition) #25

Closed
nathanRamaNoodles opened this issue Jul 15, 2021 · 1 comment

Comments

@nathanRamaNoodles
Copy link

For quick development, I'd like to have the HTML compressed to a spiffs partition once instead of uploading both inside of the factory app partition (it costs time to upload every new change to the main factory app). Is there a way to make use of the spiffsgen.py tool to do this?

@jkent
Copy link
Owner

jkent commented Jul 15, 2021

This repository is for the ROM filesystem espfs, not the read/write filesystem SPIFFS.

This is what you would do: I've documented this here: https://libespfs.readthedocs.io/en/stable/readme/readme.html#building-an-espfs-image

In your toplevel CMakeLists.txt you could do something like this to get a espfs-flash target:

    define_target_espfs(espfs_bin html ${CMAKE_CURRENT_BINARY_DIR}/espfs.bin)

    idf_component_get_property(main_args esptool_py FLASH_ARGS)
    idf_component_get_property(sub_args esptool_py FLASH_SUB_ARGS)
    esptool_py_flash_target(espfs-flash "${main_args}" "${sub_args}" ALWAYS_PLAINTEXT)
    esptool_py_flash_to_partition(espfs-flash espfs ${CMAKE_CURRENT_BINARY_DIR}/espfs.bin)
    add_dependencies(espfs-flash espfs_bin)

@jkent jkent closed this as completed Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants