arch: common: dedicated SEMIHOST
symbol
Control the usage of semihosting with a dedicated symbol, instead of implying semihosting from the usage of `SEMIHOST_CONSOLE`. This allows semihosting to be used without the semihost console. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
8904bd1650
commit
070422db46
5 changed files with 23 additions and 10 deletions
|
@ -148,6 +148,8 @@ config ARCH_IS_SET
|
||||||
|
|
||||||
menu "General Architecture Options"
|
menu "General Architecture Options"
|
||||||
|
|
||||||
|
source "$(ARCH_DIR)/common/Kconfig"
|
||||||
|
|
||||||
module = ARCH
|
module = ARCH
|
||||||
module-str = arch
|
module-str = arch
|
||||||
source "subsys/logging/Kconfig.template.log_config"
|
source "subsys/logging/Kconfig.template.log_config"
|
||||||
|
|
17
arch/common/Kconfig
Normal file
17
arch/common/Kconfig
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Common architecture configuration options
|
||||||
|
|
||||||
|
# Copyright (c) 2022, CSIRO.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
config SEMIHOST
|
||||||
|
bool "Semihosting support for ARM and RISC-V targets"
|
||||||
|
depends on ARM || ARM64 || RISCV
|
||||||
|
help
|
||||||
|
Semihosting is a mechanism that enables code running on an ARM or
|
||||||
|
RISC-V target to communicate and use the Input/Output facilities on
|
||||||
|
a host computer that is running a debugger.
|
||||||
|
Additional information can be found in:
|
||||||
|
https://developer.arm.com/documentation/dui0471/m/what-is-semihosting-
|
||||||
|
https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc
|
||||||
|
This option is compatible with hardware and with QEMU, through the
|
||||||
|
(automatic) use of the -semihosting-config switch when invoking it.
|
|
@ -70,7 +70,7 @@ endif()
|
||||||
list(APPEND QEMU_FLAGS -serial chardev:con)
|
list(APPEND QEMU_FLAGS -serial chardev:con)
|
||||||
|
|
||||||
# Connect semihosting console to the console chardev if configured.
|
# Connect semihosting console to the console chardev if configured.
|
||||||
if(CONFIG_SEMIHOST_CONSOLE)
|
if(CONFIG_SEMIHOST)
|
||||||
list(APPEND QEMU_FLAGS
|
list(APPEND QEMU_FLAGS
|
||||||
-semihosting-config enable=on,target=auto,chardev=con
|
-semihosting-config enable=on,target=auto,chardev=con
|
||||||
)
|
)
|
||||||
|
|
|
@ -298,17 +298,10 @@ config NATIVE_POSIX_CONSOLE_INIT_PRIORITY
|
||||||
config SEMIHOST_CONSOLE
|
config SEMIHOST_CONSOLE
|
||||||
bool "Use semihosting for console"
|
bool "Use semihosting for console"
|
||||||
select CONSOLE_HAS_DRIVER
|
select CONSOLE_HAS_DRIVER
|
||||||
depends on CPU_CORTEX_M || ARM64 || RISCV
|
depends on SEMIHOST
|
||||||
help
|
help
|
||||||
Enable this option to use semihosting for console.
|
Enable this option to use semihosting for console.
|
||||||
Semihosting is a mechanism that enables code running on an ARM or
|
See SEMIHOST for a more complete description of semihosting.
|
||||||
RISC-V target to communicate and use the Input/Output facilities
|
|
||||||
on a host computer that is running a debugger.
|
|
||||||
Additional information can be found in:
|
|
||||||
https://developer.arm.com/docs/dui0471/k/what-is-semihosting/what-is-semihosting
|
|
||||||
https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc
|
|
||||||
This option is compatible with hardware and with QEMU, through the
|
|
||||||
(automatic) use of the -semihosting-config switch when invoking it.
|
|
||||||
|
|
||||||
module = UART_CONSOLE
|
module = UART_CONSOLE
|
||||||
module-str = UART console
|
module-str = UART console
|
||||||
|
|
|
@ -2,4 +2,5 @@ CONFIG_TEST=y
|
||||||
CONFIG_CONSOLE=y
|
CONFIG_CONSOLE=y
|
||||||
CONFIG_SERIAL=n
|
CONFIG_SERIAL=n
|
||||||
CONFIG_UART_CONSOLE=n
|
CONFIG_UART_CONSOLE=n
|
||||||
|
CONFIG_SEMIHOST=y
|
||||||
CONFIG_SEMIHOST_CONSOLE=y
|
CONFIG_SEMIHOST_CONSOLE=y
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue