scripts: gen_relocate_app: check if argument matches

Check each line whether contains the correct pattern
${location}:${file} before splitting because it
turns out that script passes also compile
definitions added in project CMakeLists.txt such as:

add_compile_definitions(ABCD="XYZ")

which results in the build failure.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
This commit is contained in:
Bartosz Bilas 2021-10-29 14:04:42 +02:00 committed by Christopher Friedt
commit d85465fb11

View file

@ -399,6 +399,9 @@ def create_dict_wrt_mem():
if args.input_rel_dict == '':
sys.exit("Disable CONFIG_CODE_DATA_RELOCATION if no file needs relocation")
for line in args.input_rel_dict.split(';'):
if ':' not in line:
continue
mem_region, file_name = line.split(':', 1)
file_name_list = glob.glob(file_name)