cmake: code relocation setting.
With code relocation directives passed to the gen_relocate_app.py script using generated file, then each directive can be place on individual line in the file and thus free up the `|` character as separator. Furthermore, a multi-line file with each directive on separate line is also more user-readable, making debugging easier. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
ed9c6d84a9
commit
cb8f99ab7a
2 changed files with 5 additions and 5 deletions
|
@ -1522,7 +1522,7 @@ function(zephyr_code_relocate)
|
|||
if(CODE_REL_PHDR)
|
||||
set(CODE_REL_LOCATION "${CODE_REL_LOCATION}\ :${CODE_REL_PHDR}")
|
||||
endif()
|
||||
# We use the "|" character to separate code relocation directives, instead of
|
||||
# Each code relocation directive is placed on an independent line, instead of
|
||||
# using set_property(APPEND) to produce a ";"-separated CMake list. This way,
|
||||
# each directive can embed multiple CMake lists, representing flags and files,
|
||||
# the latter of which can come from generator expressions.
|
||||
|
@ -1530,7 +1530,7 @@ function(zephyr_code_relocate)
|
|||
PROPERTY INTERFACE_SOURCES)
|
||||
set_property(TARGET code_data_relocation_target
|
||||
PROPERTY INTERFACE_SOURCES
|
||||
"${code_rel_str}|${CODE_REL_LOCATION}:${flag_list}:${file_list}")
|
||||
"${code_rel_str}\n${CODE_REL_LOCATION}:${flag_list}:${file_list}")
|
||||
endfunction()
|
||||
|
||||
# Usage:
|
||||
|
|
|
@ -526,10 +526,10 @@ def create_dict_wrt_mem():
|
|||
rel_dict = dict()
|
||||
phdrs = dict()
|
||||
|
||||
input_rel_dict = args.input_rel_dict.read()
|
||||
if input_rel_dict == '':
|
||||
input_rel_dict = args.input_rel_dict.read().splitlines()
|
||||
if not input_rel_dict:
|
||||
sys.exit("Disable CONFIG_CODE_DATA_RELOCATION if no file needs relocation")
|
||||
for line in input_rel_dict.split('|'):
|
||||
for line in input_rel_dict:
|
||||
if ':' not in line:
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue