mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 22:54:33 +02: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:
@@ -7,5 +7,3 @@ set(COMPONENTS main)
|
|||||||
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/freertos/")
|
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/freertos/")
|
||||||
|
|
||||||
project(partition_api_test)
|
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:
|
Once this is done, build the application:
|
||||||
```bash
|
```bash
|
||||||
idf.py build partition-table
|
idf.py build
|
||||||
```
|
```
|
||||||
Note that for the time being, `partition-table` target needs to be built manually.
|
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
```bash
|
```bash
|
||||||
|
@@ -8,5 +8,3 @@ set(COMPONENTS main)
|
|||||||
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/freertos/")
|
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/freertos/")
|
||||||
|
|
||||||
project(nvs_host_test)
|
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.")
|
"Either change partition table in menuconfig or create this input file.")
|
||||||
endif()
|
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
|
# Add signing steps
|
||||||
if(CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME)
|
if(CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME)
|
||||||
if(CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES)
|
if(CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES)
|
||||||
|
@@ -22,4 +22,5 @@ set_property(
|
|||||||
DIRECTORY
|
DIRECTORY
|
||||||
APPEND PROPERTY ADDITIONAL_CLEAN_FILES "../image.bin")
|
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)
|
||||||
|
Reference in New Issue
Block a user