Forked from
flow3r / flow3r firmware
1198 commits behind the upstream repository.
-
q3k authored
We attempt to share st3m with the recovery firmware, and thus must eliminate two components that can't live in the recovery firmware: 1. The startup function, which contains references to all matters of subfunctionality we don't want (audio, micropython, etc) 2. The FS code, which contains references to the tarball extraction logic (which we don't want to embed into recovery mode either).
q3k authoredWe attempt to share st3m with the recovery firmware, and thus must eliminate two components that can't live in the recovery firmware: 1. The startup function, which contains references to all matters of subfunctionality we don't want (audio, micropython, etc) 2. The FS code, which contains references to the tarball extraction logic (which we don't want to embed into recovery mode either).
CMakeLists.txt 894 B
set(SYS_C_PATH "${CMAKE_CURRENT_BINARY_DIR}/include/sys_data.c")
idf_component_register(
SRCS
main.c
fs.c
"${SYS_C_PATH}"
)
idf_component_get_property(freertos_lib freertos COMPONENT_LIB)
target_compile_options(${freertos_lib} PRIVATE -Wno-format)
# Generate sys_data.c from python_payload.
idf_build_get_property(python PYTHON)
file(GLOB_RECURSE payload_files "${PROJECT_DIR}/python_payload/*.py")
add_custom_command(
OUTPUT
"${SYS_C_PATH}"
COMMAND
"${python}" "${CMAKE_CURRENT_SOURCE_DIR}/host-tools/pack-sys.py" "${PROJECT_DIR}/python_payload" "${SYS_C_PATH}"
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/host-tools/pack-sys.py"
"${payload_files}"
)
add_custom_target(generate_sys_c ALL DEPENDS "${SYS_C_PATH}")
idf_component_get_property(main_lib main COMPONENT_LIB)
add_dependencies("${main_lib}" generate_sys_c)