Skip to content

Commit 51ec3a0

Browse files
committed
[nrf toup] Fix non-PM building of factory data
Fixes this feature to put files in the correct place and run with the correct configuration Signed-off-by: Jamie McCrae <[email protected]>
1 parent f1ce020 commit 51ec3a0

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

config/nrfconnect/chip-module/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ endif()
290290
# Define 'factory_data' target for generating a factory data partition
291291
# ==============================================================================
292292

293-
if(CONFIG_CHIP_FACTORY_DATA_BUILD AND (NOT SYSBUILD OR NOT CONFIG_PARTITION_MANAGER_ENABLED))
293+
if(CONFIG_CHIP_FACTORY_DATA_BUILD AND CONFIG_PARTITION_MANAGER_ENABLED)
294294
nrfconnect_generate_factory_data()
295295
endif()
296296

config/nrfconnect/chip-module/generate_factory_data.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,12 @@ endif()
181181
set(FACTORY_DATA_SCRIPT_PATH ${CHIP_ROOT}/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py)
182182
set(GENERATE_CBOR_SCRIPT_PATH ${CHIP_ROOT}/scripts/tools/nrfconnect/nrfconnect_generate_partition.py)
183183
set(FACTORY_DATA_SCHEMA_PATH ${CHIP_ROOT}/scripts/tools/nrfconnect/nrfconnect_factory_data.schema)
184-
set(OUTPUT_FILE_PATH ${APPLICATION_BINARY_DIR}/zephyr)
184+
185+
if(CONFIG_PARTITION_MANAGER_ENABLED)
186+
set(OUTPUT_FILE_PATH ${APPLICATION_BINARY_DIR}/zephyr)
187+
else()
188+
set(OUTPUT_FILE_PATH ${APPLICATION_BINARY_DIR})
189+
endif()
185190

186191
# create a .hex file with factory data in CBOR format based on the JSON file created previously
187192
nrfconnect_create_factory_data(factory_data
@@ -194,9 +199,6 @@ if(CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE)
194199
# set custom target for merging factory_data hex file
195200
set_property(GLOBAL PROPERTY factory_data_PM_HEX_FILE ${OUTPUT_FILE_PATH}/factory_data.hex)
196201
set_property(GLOBAL PROPERTY factory_data_PM_TARGET factory_data)
197-
else()
198-
set_property(GLOBAL APPEND PROPERTY HEX_FILES_TO_MERGE ${OUTPUT_FILE_PATH}/factory_data.hex ${OUTPUT_FILE_PATH}/zephyr.hex)
199-
set_property(TARGET runners_yaml_props_target PROPERTY hex_file ${OUTPUT_FILE_PATH}/merged.hex)
200202
endif()
201203
endif()
202204

0 commit comments

Comments
 (0)