File tree 2 files changed +21
-1
lines changed
config/nrfconnect/chip-module
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,17 @@ else()
141
141
endif ()
142
142
dt_reg_addr(factory_data_addr PATH ${factory_data_alias} )
143
143
dt_reg_size(factory_data_size PATH ${factory_data_alias} )
144
+
145
+ # If the location of the factory data is defined as an alias,
146
+ # add the base address to the factory data offset
147
+ # to get the proper offset calculated from the base memory location.
148
+ dt_alias(factory_data_location PROPERTY "factory-data-location" )
149
+ if (factory_data_location)
150
+ dt_node_exists(factory_data_location_exists PATH "${factory_data_location} " )
151
+ dt_reg_addr(flash_base_addr PATH ${factory_data_location} )
152
+ math (EXPR factory_data_addr "${flash_base_addr} + ${factory_data_addr} " OUTPUT_FORMAT HEXADECIMAL)
153
+ endif ()
154
+
144
155
string (APPEND script_args "--offset ${factory_data_addr} \n " )
145
156
string (APPEND script_args "--size ${factory_data_size} \n " )
146
157
endif ()
@@ -194,7 +205,11 @@ if(CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE)
194
205
set_property (GLOBAL PROPERTY factory_data_PM_TARGET factory_data)
195
206
else ()
196
207
set_property (GLOBAL APPEND PROPERTY HEX_FILES_TO_MERGE ${OUTPUT_FILE_PATH} /factory_data.hex ${OUTPUT_FILE_PATH} /zephyr.hex)
197
- set_property (TARGET runners_yaml_props_target PROPERTY hex_file ${OUTPUT_FILE_PATH} /merged.hex)
208
+ if (NOT CONFIG_SOC_SERIES_NRF54HX)
209
+ # Do not overwrite runners while using nRF54H series.
210
+ # In this case we need to rely on SUIT mechanisms.
211
+ set_property (TARGET runners_yaml_props_target PROPERTY hex_file ${OUTPUT_FILE_PATH} /merged.hex)
212
+ endif ()
198
213
endif ()
199
214
endif ()
200
215
Original file line number Diff line number Diff line change 36
36
#else
37
37
#include < zephyr/storage/flash_map.h>
38
38
#define FACTORY_DATA_SIZE DT_REG_SIZE (DT_ALIAS(factory_data))
39
+ #define FACTORY_DATA_LOCATION_ADDRESS DT_REG_ADDR (DT_ALIAS(factory_data_location))
40
+ #if FACTORY_DATA_LOCATION_ADDRESS
41
+ #define FACTORY_DATA_ADDRESS (DT_REG_ADDR(DT_ALIAS(factory_data)) + FACTORY_DATA_LOCATION_ADDRESS)
42
+ #else
39
43
#define FACTORY_DATA_ADDRESS DT_REG_ADDR (DT_ALIAS(factory_data))
44
+ #endif // if FACTORY_DATA_LOCATION_ADDRESS
40
45
#endif // if defined(USE_PARTITION_MANAGER) && USE_PARTITION_MANAGER == 1
41
46
42
47
#include < system/SystemError.h>
You can’t perform that action at this time.
0 commit comments