code_relocation: Move NOCOPY flag to avoid OS drive colon

COPY/NOCOPY flag was added to the end of the string with ':'
as separators. The python script then split the line on ':'
which breaks on Windows build because the string was

[MEM]:[FILE]:[COPY]

In windows you will have 'c:\' in the file path so the
line.split() in script will split on the 'c:'.

Move the COPY/NOCOPY to:

[MEM]:[COPY/NOCOPY]:[FILE]

Note that the comments at top of gen_relocate_app.py also
indicates this format.

Fixes #43950

Signed-off-by: David Leach <david.leach@nxp.com>
This commit is contained in:
David Leach 2022-03-17 22:34:26 -05:00 committed by Carles Cufí
commit c243da02ed
2 changed files with 2 additions and 2 deletions

View file

@ -1271,7 +1271,7 @@ function(zephyr_code_relocate file location)
endif()
set_property(TARGET code_data_relocation_target
APPEND PROPERTY COMPILE_DEFINITIONS
"${location}:${file}:${copy_flag}")
"${location}:${copy_flag}:${file}")
endfunction()
# Usage:

View file

@ -418,7 +418,7 @@ def create_dict_wrt_mem():
if ':' not in line:
continue
mem_region, file_name, copy_flag = line.split(':', 2)
mem_region, copy_flag, file_name = line.split(':', 2)
file_name_list = glob.glob(file_name)
if not file_name_list: