Skip to content

Commit 050b8a9

Browse files
edersondisouzakartben
authored andcommitted
cmake/emu: Use SIMICS_PROJECT environment variable as working dir
Some simics dependencies live at its own directory, not application's. Note we need to change it to its absolute path, because relative paths for `add_custom_target` are relative to the build directory, while relative SIMICS_PROJECT are more likely to be relative to ZEPHYR_BASE, from where west or twister are normally run. Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
1 parent 9b1969a commit 050b8a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmake/emu/simics.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ else()
2424

2525
get_property(SIMICS_ARGS GLOBAL PROPERTY "BOARD_EMU_ARGS_simics")
2626

27+
file(REAL_PATH $ENV{SIMICS_PROJECT} simics_project_dir_real)
28+
2729
add_custom_target(run_simics
2830
COMMAND
2931
${SIMICS}
@@ -34,7 +36,7 @@ else()
3436
${SIMICS_ARGS}
3537
$ENV{SIMICS_EXTRA_ARGS}
3638
-e run
37-
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
39+
WORKING_DIRECTORY ${simics_project_dir_real}
3840
DEPENDS ${logical_target_for_zephyr_elf}
3941
USES_TERMINAL
4042
)

0 commit comments

Comments
 (0)