Skip to content

Commit a5664d8

Browse files
magp-nordicmasz-nordic
authored andcommitted
cmake: change SDP ASM developer mode to not replace ASM files
Change SDP ASM developer mode to not replace ASM files in source directory. Instead build includes the temporary files from build directory. This change is needed so that CI would pass after adding test that enables assertions. Signed-off-by: Magdalena Pastula <[email protected]>
1 parent 7ec924d commit a5664d8

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

cmake/sdp.cmake

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,18 @@ function(sdp_assembly_install target hrt_srcs)
2020
sdp_assembly_prepare_install(${CONFIG_SOC} "${hrt_srcs}")
2121
sdp_assembly_target_sources(${CONFIG_SOC} ${target} "${hrt_srcs}")
2222

23-
if(CONFIG_SDP_DEVELOPER_MODE)
24-
add_dependencies(asm_install asm_check)
25-
add_dependencies(${target} asm_install)
26-
else()
27-
add_dependencies(${target} asm_check)
28-
endif()
23+
add_dependencies(${target} asm_check)
2924
endfunction()
3025

3126
function(sdp_assembly_target_sources soc target hrt_srcs)
3227
foreach(hrt_src ${hrt_srcs})
3328
get_filename_component(hrt_dir ${hrt_src} DIRECTORY) # directory
3429
get_filename_component(hrt_src_file ${hrt_src} NAME_WE) # filename without extension
35-
set(hrt_s_file "${hrt_dir}/${hrt_src_file}-${soc}.s")
30+
if(CONFIG_SDP_DEVELOPER_MODE)
31+
set(hrt_s_file "${hrt_src_file}-${soc}-temp.s")
32+
else()
33+
set(hrt_s_file "${hrt_dir}/${hrt_src_file}-${soc}.s")
34+
endif()
3635
target_sources(${target} PRIVATE ${hrt_s_file})
3736
endforeach()
3837
endfunction()

cmake/sdp_asm_check.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ function(asm_check)
3232
elseif( compare_result EQUAL 1)
3333
if(dev_mode)
3434
message(WARNING "${asm_filename}-${soc}.s ASM file content has changed.\
35-
It will be updated and included in build.")
35+
The new version will be included in build, but it will not be moved to the source \
36+
directory. If you want to update ASM file in source directory with the new one \
37+
run `ninja asm_install` in FLPR build directory.")
3638
else()
3739
message(FATAL_ERROR "${asm_filename}-${soc}.s ASM file content has changed.\
3840
If you want to include the new ASM in build, \
3941
please run `ninja asm_install` in FLPR build directory and build again. \
4042
If you want to disable this error and include new ASM in build every time,\
41-
enable SB_CONFIG_DEVELOPER_MODE option.")
43+
enable SB_CONFIG_SDP_DEVELOPER_MODE option.")
4244
endif()
4345
else()
4446
message("Something went wrong when comparing ${asm_filename}-${soc}.s and ${asm_filename}-${soc}-temp.s")

0 commit comments

Comments
 (0)