Skip to content

Commit

Permalink
boards: mps2: Disable qemu host pty on Windows
Browse files Browse the repository at this point in the history
pty is not available on Windows hosts. Running a sample in Qemu
on Windows shows an error. Fix it by enabling pty on Unix hosts only.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
  • Loading branch information
michal-smola committed Mar 5, 2024
1 parent 3203bd6 commit 9fc7f1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion boards/arm/mps2/board.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ board_set_debugger_ifnset(qemu)
if(CONFIG_BOARD_MPS2_AN521_CPU0 OR CONFIG_BOARD_MPS2_AN521_CPU0_NS OR CONFIG_BOARD_MPS2_AN521_CPU1)
# To enable a host tty switch between serial and pty
# -chardev serial,path=/dev/ttyS0,id=hostS0
list(APPEND QEMU_EXTRA_FLAGS -chardev pty,id=hostS0 -serial chardev:hostS0)
# pty is not available on Windows.
if(CMAKE_HOST_UNIX)
list(APPEND QEMU_EXTRA_FLAGS -chardev pty,id=hostS0 -serial chardev:hostS0)
endif()

if(CONFIG_BUILD_WITH_TFM)
# Override the binary used by qemu, to use the combined
Expand Down

0 comments on commit 9fc7f1d

Please sign in to comment.