zephyr/cmake/emu/renode.cmake
Stephanos Ioannidis 3cc5bda2fa cmake: Support renode 1.8.2.
Renode 1.8 introduced a behaviour change in which it automatically
launches the telnet monitor on the TCP port 1234 by default.

In order to prevent sanitycheck failures from multiple renode instances
attempting to listen on the TCP port 1234 simultaneously, this commit
disables renode telnet monitor by specifying '--port -2' (a negative
number lower than -1 is required to disable telnet monitor because of
the way renode command line parser is implemented).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-11-15 17:37:17 -05:00

22 lines
376 B
CMake

# SPDX-License-Identifier: Apache-2.0
find_program(
RENODE
renode
)
set(RENODE_FLAGS
--disable-xwt
--port -2
--pid-file renode.pid
)
add_custom_target(run
COMMAND
${RENODE}
${RENODE_FLAGS}
-e '$$bin=@${APPLICATION_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME}\; include @${RENODE_SCRIPT}\; s'
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
USES_TERMINAL
)