mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
build system: generate the partition table by default for linux target
This fixes the issue that "idf.py partition-table" had to be run manually in order for the partition table to be generated, when building for linux target.
This commit is contained in:
parent
98d1f7de4b
commit
ec8f38c9da
@ -7,5 +7,3 @@ set(COMPONENTS main)
|
||||
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/freertos/")
|
||||
|
||||
project(partition_api_test)
|
||||
|
||||
add_dependencies(partition_api_test.elf partition-table)
|
||||
|
@ -8,9 +8,8 @@ Source the IDF environment as usual.
|
||||
|
||||
Once this is done, build the application:
|
||||
```bash
|
||||
idf.py build partition-table
|
||||
idf.py build
|
||||
```
|
||||
Note that for the time being, `partition-table` target needs to be built manually.
|
||||
|
||||
# Run
|
||||
```bash
|
||||
|
@ -8,5 +8,3 @@ set(COMPONENTS main)
|
||||
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/freertos/")
|
||||
|
||||
project(nvs_host_test)
|
||||
|
||||
add_dependencies(nvs_host_test.elf partition-table)
|
||||
|
@ -96,6 +96,24 @@ else()
|
||||
"Either change partition table in menuconfig or create this input file.")
|
||||
endif()
|
||||
|
||||
if(${target} STREQUAL "linux" AND EXISTS ${partition_csv})
|
||||
# partition-table target is normally invoked as a dependency of 'flash' target.
|
||||
# However, when building for "linux" target, 'flash' target doesn't exist,
|
||||
# so we need to attach the partition table build to the executable target.
|
||||
#
|
||||
# The problem is that the executable target is not yet defined
|
||||
# when the component CMakeLists.txt file is evaluated, so we
|
||||
# can only get it as a generator expression. But generator expressions
|
||||
# can't be used in 'add_dependencies':
|
||||
# https://gitlab.kitware.com/cmake/cmake/-/issues/19467
|
||||
#
|
||||
# Therefore attach partition-table to the internal __idf_build_target
|
||||
# target. This is a hack, since that target name is an implementation detail
|
||||
# of the build system.
|
||||
|
||||
add_dependencies(__idf_build_target partition-table)
|
||||
endif()
|
||||
|
||||
# Add signing steps
|
||||
if(CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME)
|
||||
if(CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES)
|
||||
|
@ -22,4 +22,5 @@ set_property(
|
||||
DIRECTORY
|
||||
APPEND PROPERTY ADDITIONAL_CLEAN_FILES "../image.bin")
|
||||
|
||||
add_dependencies(host_test_spiffs.elf partition-table image.bin)
|
||||
|
||||
add_dependencies(host_test_spiffs.elf image.bin)
|
||||
|
Loading…
Reference in New Issue
Block a user