Commit 2c00c8e5 authored by Stephanos Ioannidis's avatar Stephanos Ioannidis Committed by Kumar Gala
Browse files

cmake: emu: Support QEMU semihosting console emulation



The QEMU '-semihosting' option enables the emulation of the semihosting
mechanism that can be used to interface the Zephyr RTOS to the host
operating system.

In order to support semihosting console output, the QEMU semihosting
feature is enabled and its console is connected to the console backend
chardev.

Signed-off-by: default avatarStephanos Ioannidis <root@stephanos.io>
parent 1811fff2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -50,6 +50,13 @@ endif()
# Connect main serial port to the console chardev.
list(APPEND QEMU_FLAGS -serial chardev:con)

# Connect semihosting console to the console chardev if configured.
if(CONFIG_SEMIHOST_CONSOLE)
  list(APPEND QEMU_FLAGS
    -semihosting-config enable=on,target=auto,chardev=con
    )
endif()

# Connect monitor to the console chardev.
list(APPEND QEMU_FLAGS -mon chardev=con,mode=readline)