1.每次都删除build目录,编译时间太长了。我之前尝试删除xxx_secure.bin文件,可以每次都生成最新加密固件,但现在又不行了。我看到编译时,不会每次都运行main/CMakeLists.txt这个文件
2.我是按照示例添加的cmake和yml文件,你看下是否有问题
yml
Code: Select all
## IDF Component Manager Manifest File
dependencies:
espressif/nghttp: "^1.52.0"
espressif/esp_encrypted_img: "^2.0.1"
## Required IDF version
idf:
version: ">=4.1.0"
# # Put list of dependencies here
# # For components maintained by Espressif:
# component: "~1.0.0"
# # For 3rd party components:
# username/component: ">=1.0.0,<2.0.0"
# username2/component2:
# version: "~1.0.0"
# # For transient dependencies `public` flag can be set.
# # `public` flag doesn't have an effect dependencies of the `main` component.
# # All dependencies of `main` are public by default.
# public: true
CMakeLists
Code: Select all
idf_build_get_property(project_dir PROJECT_DIR)
idf_component_register(SRCS "brs_main.c"
INCLUDE_DIRS "."
EMBED_FILES "favicon.ico" "upload_script.html"
${project_dir}/rsa_key/ota_private.pem
)
file(REMOVE ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}_secure.bin)
create_esp_enc_img(${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.bin
${project_dir}/rsa_key/ota_private.pem ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}_secure.bin app)