Skip to content

Commit c3cb5bd

Browse files
golowanowkartben
authored andcommitted
boards: intel: ish: Improve Simics support
Improve Simics support for `boards/intel/ish/intel_ish_5_8_0` for better integration with the simulator. Signed-off-by: Dmitrii Golovanov <[email protected]>
1 parent a03a32b commit c3cb5bd

File tree

4 files changed

+37
-23
lines changed

4 files changed

+37
-23
lines changed

boards/common/simics.board.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# Copyright (c) 2023 Intel Corporation
1+
# Copyright (c) 2023-2024 Intel Corporation
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5+
set(SUPPORTED_EMU_PLATFORMS simics)
6+
57
board_finalize_emu_args(simics)

boards/intel/ish/board.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
# Copyright (c) 2023-2024 Intel Corporation
2+
#
13
# SPDX-License-Identifier: Apache-2.0
24

3-
set(SUPPORTED_EMU_PLATFORMS simics)
4-
55
if(CONFIG_BOARD_INTEL_ISH_5_8_0)
6-
board_emu_args(simics "project=$ENV{SIMICS_PROJECT}")
76
board_emu_args(simics "zephyr_elf=${APPLICATION_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME}")
87
board_emu_args(simics "zephyr_start_address=${CONFIG_SRAM_BASE_ADDRESS}")
98
include(${ZEPHYR_BASE}/boards/common/simics.board.cmake)

boards/intel/ish/intel_ish_5_8_0.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ simulation:
1111
supported:
1212
- serial
1313
testing:
14+
timeout_multiplier: 2
1415
ignore_tags:
1516
- net
1617
- bluetooth

cmake/emu/simics.cmake

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
1-
# Copyright (c) 2023 Intel Corporation
1+
# Copyright (c) 2023-2024 Intel Corporation
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

55
find_program(
66
SIMICS
77
NAMES simics
8+
NO_DEFAULT_PATH
9+
PATHS ENV SIMICS_PROJECT
10+
# Search exactly for the project's autogenerated 'trampoline' script.
811
)
912

10-
zephyr_get(SIMICS_SCRIPT_PATH SYSBUILD GLOBAL)
11-
if(SIMICS_SCRIPT_PATH)
12-
set(SIMICS_SCRIPT ${SIMICS_SCRIPT_PATH})
13+
if(SIMICS STREQUAL SIMICS-NOTFOUND)
14+
message(WARNING "Simics simulator environment is not found at SIMICS_PROJECT:'${SIMICS_PROJECT}'")
1315
else()
14-
set(SIMICS_SCRIPT ${BOARD_DIR}/support/${BOARD}.simics)
15-
endif()
16+
message(STATUS "Found Simics: ${SIMICS}")
1617

17-
get_property(SIMICS_ARGS GLOBAL PROPERTY "BOARD_EMU_ARGS_simics")
18+
zephyr_get(SIMICS_SCRIPT_PATH SYSBUILD GLOBAL)
19+
if(SIMICS_SCRIPT_PATH)
20+
set(SIMICS_SCRIPT ${SIMICS_SCRIPT_PATH})
21+
else()
22+
set(SIMICS_SCRIPT ${BOARD_DIR}/support/${BOARD}.simics)
23+
endif()
1824

19-
add_custom_target(run_simics
20-
COMMAND
21-
${SIMICS}
22-
-no-gui
23-
-no-win
24-
${SIMICS_SCRIPT}
25-
${SIMICS_ARGS}
26-
-e run
27-
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
28-
DEPENDS ${logical_target_for_zephyr_elf}
29-
USES_TERMINAL
30-
)
25+
get_property(SIMICS_ARGS GLOBAL PROPERTY "BOARD_EMU_ARGS_simics")
26+
27+
add_custom_target(run_simics
28+
COMMAND
29+
${SIMICS}
30+
-no-gui
31+
--no-win
32+
--batch-mode
33+
${SIMICS_SCRIPT}
34+
${SIMICS_ARGS}
35+
$ENV{SIMICS_EXTRA_ARGS}
36+
-e run
37+
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
38+
DEPENDS ${logical_target_for_zephyr_elf}
39+
USES_TERMINAL
40+
)
41+
42+
endif()

0 commit comments

Comments
 (0)