sanitycheck: Add TSIM3 support
TSIM3 is a LEON processor and system simulator. This commit allows using TSIM sanitycheck and the make run target. TSIM parameters can be further specified in the board configuration using TSIM and TSIM_SYS. Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
This commit is contained in:
parent
bb5a565aaa
commit
c107714214
3 changed files with 22 additions and 2 deletions
13
cmake/emu/tsim.cmake
Normal file
13
cmake/emu/tsim.cmake
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
set(TSIM_FLAGS -e run -e exit)
|
||||||
|
|
||||||
|
add_custom_target(run
|
||||||
|
COMMAND
|
||||||
|
${TSIM}
|
||||||
|
${TSIM_SYS}
|
||||||
|
${TSIM_FLAGS}
|
||||||
|
${APPLICATION_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME}
|
||||||
|
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
|
||||||
|
USES_TERMINAL
|
||||||
|
)
|
|
@ -20,7 +20,7 @@ mapping:
|
||||||
enum: ["mcu", "qemu", "sim", "unit", "native"]
|
enum: ["mcu", "qemu", "sim", "unit", "native"]
|
||||||
"simulation":
|
"simulation":
|
||||||
type: str
|
type: str
|
||||||
enum: ["qemu", "simics", "xt-sim", "renode", "nsim", "mdb-nsim"]
|
enum: ["qemu", "simics", "xt-sim", "renode", "nsim", "mdb-nsim", "tsim"]
|
||||||
"arch":
|
"arch":
|
||||||
type: str
|
type: str
|
||||||
"toolchain":
|
"toolchain":
|
||||||
|
|
|
@ -1662,7 +1662,7 @@ class TestInstance(DisablePyTestCollectionMixin):
|
||||||
|
|
||||||
target_ready = bool(self.testcase.type == "unit" or \
|
target_ready = bool(self.testcase.type == "unit" or \
|
||||||
self.platform.type == "native" or \
|
self.platform.type == "native" or \
|
||||||
self.platform.simulation in ["mdb-nsim", "nsim", "renode", "qemu"] or \
|
self.platform.simulation in ["mdb-nsim", "nsim", "renode", "qemu", "tsim"] or \
|
||||||
filter == 'runnable')
|
filter == 'runnable')
|
||||||
|
|
||||||
if self.platform.simulation == "nsim":
|
if self.platform.simulation == "nsim":
|
||||||
|
@ -1677,6 +1677,10 @@ class TestInstance(DisablePyTestCollectionMixin):
|
||||||
if not find_executable("renode"):
|
if not find_executable("renode"):
|
||||||
target_ready = False
|
target_ready = False
|
||||||
|
|
||||||
|
if self.platform.simulation == "tsim":
|
||||||
|
if not find_executable("tsim-leon3"):
|
||||||
|
target_ready = False
|
||||||
|
|
||||||
testcase_runnable = self.testcase_runnable(self.testcase, fixtures)
|
testcase_runnable = self.testcase_runnable(self.testcase, fixtures)
|
||||||
|
|
||||||
return testcase_runnable and target_ready
|
return testcase_runnable and target_ready
|
||||||
|
@ -2063,6 +2067,9 @@ class ProjectBuilder(FilterBuilder):
|
||||||
instance.handler = BinaryHandler(instance, "renode")
|
instance.handler = BinaryHandler(instance, "renode")
|
||||||
instance.handler.pid_fn = os.path.join(instance.build_dir, "renode.pid")
|
instance.handler.pid_fn = os.path.join(instance.build_dir, "renode.pid")
|
||||||
instance.handler.call_make_run = True
|
instance.handler.call_make_run = True
|
||||||
|
elif instance.platform.simulation == "tsim":
|
||||||
|
instance.handler = BinaryHandler(instance, "tsim")
|
||||||
|
instance.handler.call_make_run = True
|
||||||
elif self.device_testing:
|
elif self.device_testing:
|
||||||
instance.handler = DeviceHandler(instance, "device")
|
instance.handler = DeviceHandler(instance, "device")
|
||||||
elif instance.platform.simulation == "nsim":
|
elif instance.platform.simulation == "nsim":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue