Xtensa simulator console should not be enabled when the target is using
winstream console, otherwise we will have multiple definitions of the
same function.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
GSM_MUX and UART_MUX are being marked as deprecated.
The new modem subsystem MODEM_CMUX and MODEM_PPP
should be used instead.
Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
CONFIG_COVERAGE has been incorrectly used to
change other kconfig options (stack sizes, etc)
code defaults, as well as some samples behaviour,
which should not have dependend on it.
Instead those should have depended on COVERAGE_GCOV,
which, being the one which adds special code and
temporary RAM storage for embedded targets,
require changes to many features.
When building for the native targets, all this was
unnecessary.
=> Fix the dependency.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
All posix arch boards are required to provide the same
tracing/print API.
So, instead of having a different driver for native_posix and the
bsim boards, let's have a common one which uses this API.
This in turn results in the printk strings being printed in
the same underlaying backend as before with individual drivers.
A part from this, the native_posix console driver was a full
backend for the now long gone Zephyr console shell
(named legacy_shell from 527256501f
until it was retired in fd0b7f7767).
The whole input handling in this driver was dead code
(since 140a8d0c8a)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix a very old cmake warning for the nrf52_bsim due to the
console library being empty.
The printk backend was originally provided by the board
code for simplicity, but this left the console library
empty when building for this board.
Instead refactor that code to where all printk backends are.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This was all done as part of the soc and called from the soc. Define
this type of console under drivers/console and use it in the SoCs
supporting that via SYS_INIT instead of calling the console code
directly.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The uart_pipe driver is not dependent on any console driver,
however a serial driver is required.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a minimal EFI console driver to support printf, this console driver
only supports console output. Otherwise the printf will not work.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
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>
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:
sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Since there are no more users and dependencies of
Kconfig option USB_UART_CONSOLE in the tree,
remove the remains and the option USB_UART_CONSOLE.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Do not change init level and priority of console driver
if Kconfig option CONFIG_USB_UART_CONSOLE is enabled because
commit 37f4d9ba63
("usb: cdc_acm: rework cdc_acm_poll_out to non-blocking")
changed CDC ACM UART driver so that it more closely mimics
the real controller and CDC ACM UART driver now uses the same
init level and priority as regular serial driver.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
With the introduction of `EXPERIMENTAL` and `WARN_EXPERIMENTAL` in
Zephyr all drivers settings having `[EXPERIMENTAL]` in their
prompt has has been updated to include `select EXPERIMENTAL` so that
developers can enable warnings when experimental features are enabled.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Refactors all of the console drivers to use a shared driver class
initialization priority configuration, CONFIG_CONSOLE_INIT_PRIORITY, to
allow configuring console drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.
The default is set to CONFIG_KERNEL_INIT_PRIORITY_DEFAULT to preserve
the existing default initialization priority for most drivers.
The driver-specific option, CONFIG_NATIVE_POSIX_CONSOLE_INIT_PRIORITY,
is left intact because the native posix console driver needs to
initialize after the UART console driver when both drivers are enabled.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Remove CONFIG_UART_MCUMGR_ON_DEV_NAME and use
DEVICE_DT_GET(DT_CHOSEN(zephyr_uart_mcumgr)).
Add usb.overlay, which contains chosen node and cdc-acm-uart node,
to smp_svr sample.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This changes the init priority of native posix console to 99.
When building for native_posix, it is usually assumed that
the output would be stdout. With old priority at 60, UART
console, for example, can be initialized later which means
printk() would not go to stdout. So changing the native posix
console to be (hopefully) initialized last.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This CL introduces two configuration options which allows a notification
to the power management module that the UART console module is in use
now. If the interval of console module doesn't receive any input message
exceeds expired timeout, the power management module is allowed to enter
sleep/deep sleep state and turn off the clock of console module.
This mechanism gives a window in which the users can organize input
message if CONFIG_PM is enabled.
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
This also makes it into arch_printk_char_out() which gets linked
in place of the weak symbol version, meaning printk() is usable
as soon as the stack is set up.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Put everything inside an if, we should not see anything related to
uart_mux in generated .config if it is not enabled.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add console over Inter Processor Mailboxes (IPM).
This is useful for AMP processors like ADSP found on up_squared board.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The conversion last year mixed up uart-pipe with uart-mcumgr. Revert
to the pre-conversion relationship.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This patch removes unused Kconfig option from console
subsystem. If application wants to wait until the console
port is connected, enabled and ready to receive data
it should use uart_line_ctrl_get() API function and
check for DTR flag.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Many chips have only one serial port. When the serial port is occupied
by other devices, there is a lack of a console to output debugging
information. Semihosting can provide a console. The disadvantage of
semihosting is that a debugger must be connected, so it can only be
used for online debugging.
Signed-off-by: ZhongYao Luo <LuoZhongYao@gmail.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Instead of global workqueue, use own one so that the users of this
driver can more conveniently use global one. This means GSM modem
can work better with the UART muxing driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Create support for muxed UARTs which are attached to a real
UART and which use GSM 07.10 muxing protocol to create virtual
channels that can be run on top of the real UART.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add support to GSM 07.10 muxing protocol which is used to
share the same UART for PPP and AT commands among other things.
This allows e.g., the modem to send SMS and have PPP connection
active at the same time.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
CONSOLE_HANDLER was unconditionally selecting UART_INTERRUPT_DRIVEN (and
depends on it in the code), but UART_INTERRUPT_DRIVEN depends on
SERIAL && SERIAL_SUPPORT_INTERRUPT.
Add a SERIAL_SUPPORT_INTERRUPT dependency to CONSOLE_HANDLER.
CONSOLE_HANDLER already depends on UART_CONSOLE, which depends on
SERIAL, so a SERIAL dependency does not need to be added.
This avoids some selects with unsatisfied dependencies in CI.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use this short header style in all Kconfig files:
# <description>
# <copyright>
# <license>
...
Also change all <description>s from
# Kconfig[.extension] - Foo-related options
to just
# Foo-related options
It's clear enough that it's about Kconfig.
The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)
git ls-files '*Kconfig*' | \
xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Clean up space errors and use a consistent style throughout the Kconfig
files. This makes reading the Kconfig files more distraction-free, helps
with grepping, and encourages the same style getting copied around
everywhere (meaning another pass hopefully won't be needed).
Go for the most common style:
- Indent properties with a single tab, including for choices.
Properties on choices work exactly the same syntactically as
properties on symbols, so not sure how the no-indentation thing
happened.
- Indent help texts with a tab followed by two spaces
- Put a space between 'config' and the symbol name, not a tab. This
also helps when grepping for definitions.
- Do '# A comment' instead of '#A comment'
I tweaked Kconfiglib a bit to find most of the stuff.
Some help texts were reflowed to 79 columns with 'gq' in Vim as well,
though not all, because I was afraid I'd accidentally mess up
formatting.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Unused since commit 140a8d0c8a ("console: Remove deprecated function
console_register_line_input").
Found with a script.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Convert how we get the various chosen properties like "zephyr,console"
to use the new kconfig functions like dt_chosen_to_label.
Because of how kconfig parses things we define a set of variables of the
form DT_CHOSEN_Z_<PROP> since comma's are parsed as field seperators in
macros.
This conversion allows us to remove code in gen_defines.py for the
following chosen properties:
zephyr,console
zephyr,shell-uart
zephyr,bt-uart
zephyr,uart-pipe
zephyr,bt-mon-uart
zephyr,uart-mcumgr
zephyr,bt-c2h-uart
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
It does make sense to initialize USB console after USB Device stack.
Note that the value is selected only if we specify USB_UART_CONSOLE
in prj.conf, not in menuconfig afterwards.
Fixes#16518
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Allow user to set log level for UART console drivers. Add
log level option to UART pipe driver in order to see what it
is sending and receiving.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Appears within an 'if UART_MCUMGR'.
'if FOO' is just shorthand for adding 'depends on FOO' to each item
within the 'if'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Console subsystem doesn't depend on older consoles-in-drivers, the
only common thing between them is CONFIG_UART_CONSOLE_ON_DEV_NAME
setting, so make it so (by depending on either UART_CONSOLE or
CONSOLE_SUBSYS.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Replace generating CONFIG_ symbols with DT_ symbols for chosen
properties like 'zephyr,console' or 'zephyr,bt-mon-uart'. We now use a
kconfigfunctions (dt_str_val) to extract the info from dts into Kconfig.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove all references in the documentation and Kconfig options
to the legacy shell to avoid confusing users and developers
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>