native_sim build: Fix for APPLICATION_BINARY_DIR!=CMAKE_BINARY_DIR
In some cases, the APPLICATION_BINARY_DIR does not match the CMAKE_BINARY_DIR, in those cases the native simulator build would not find the zephyr elf file. Fix it by using the correct variable. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
19d250e1dc
commit
bc08e801c6
2 changed files with 2 additions and 2 deletions
|
@ -1762,7 +1762,7 @@ if(CONFIG_BUILD_OUTPUT_EXE)
|
||||||
COMMENT "Building native simulator runner, and linking final executable"
|
COMMENT "Building native simulator runner, and linking final executable"
|
||||||
COMMAND
|
COMMAND
|
||||||
${MAKE} -f ${ZEPHYR_BASE}/scripts/native_simulator/Makefile all --warn-undefined-variables
|
${MAKE} -f ${ZEPHYR_BASE}/scripts/native_simulator/Makefile all --warn-undefined-variables
|
||||||
-r NSI_CONFIG_FILE=${CMAKE_BINARY_DIR}/zephyr/NSI/nsi_config
|
-r NSI_CONFIG_FILE=${APPLICATION_BINARY_DIR}/zephyr/NSI/nsi_config
|
||||||
# nsi_config is created by the board cmake file
|
# nsi_config is created by the board cmake file
|
||||||
DEPENDS ${logical_target_for_zephyr_elf}
|
DEPENDS ${logical_target_for_zephyr_elf}
|
||||||
BYPRODUCTS ${KERNEL_EXE_NAME}
|
BYPRODUCTS ${KERNEL_EXE_NAME}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (c) 2023 Nordic Semiconductor ASA
|
# Copyright (c) 2023 Nordic Semiconductor ASA
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
set(zephyr_build_path ${CMAKE_BINARY_DIR}/zephyr)
|
set(zephyr_build_path ${APPLICATION_BINARY_DIR}/zephyr)
|
||||||
get_property(CCACHE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
|
get_property(CCACHE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
|
||||||
|
|
||||||
target_link_options(native_simulator INTERFACE
|
target_link_options(native_simulator INTERFACE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue