I'm using ESP-IDF 4.4.2 in vscode without pio, using ESP-IDF extension, on windows 11
My whole project is public on github : https://github.com/nipil/open-fil-pilote-esp-idf
So far everything is fine and i can build my project in two steps using ESP-IDF terminal :
Code: Select all
# generates autosign.crt and autosign.key from info.txt
cd .\components\ofp-certificates\
python gen.py
# build firmware and embed autosign.crt and autosign.key
cd -
idf.py.exe build
Code: Select all
cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS components/)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(open-fil-pilote-esp-idf)
Code: Select all
idf_component_register(
EMBED_TXTFILES
autosign.crt
autosign.key
)
But i cannot seem to do it, and it is driving me nuts...
Here is the my best attempt so far for the component's CMakeLists.txt :
Code: Select all
idf_component_register(
EMBED_TXTFILES
autosign.crt
autosign.key
)
add_custom_command(
WORKING_DIRECTORY ${COMPONENT_DIR}
OUTPUT autosign.crt autosign.key
COMMAND python gen.py
DEPENDS info.txt
)
add_custom_target(
autosign
DEPENDS autosign.crt autosign.key
)
add_dependencies(
${COMPONENT_TARGET}
autosign
)
set_property(
DIRECTORY ${COMPONENT_DIR}
APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES autosign.crt autosign.key
)
- the autosign.crt autosign.key files are not generated, and thus cannot be embedded
- the autosign.crt autosign.key are not cleaned either when cleaning the project
What am i missing ?
Any hint will be greatly appreciated !
Thanks in advance
Nicolas