Skip to content

Commit 0e01836

Browse files
raiden00plxiaoxiang781216
authored andcommitted
serial: add an option that selects uart rpmsg as console
1 parent 7f57421 commit 0e01836

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

arch/arm/src/common/arm_internal.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757
# elif defined(CONFIG_SERIAL_RTT_CONSOLE)
5858
# undef USE_SERIALDRIVER
5959
# undef USE_EARLYSERIALINIT
60+
# elif defined(CONFIG_RPMSG_UART_CONSOLE)
61+
# undef USE_SERIALDRIVER
62+
# undef USE_EARLYSERIALINIT
6063
# else
6164
# define USE_SERIALDRIVER 1
6265
# define USE_EARLYSERIALINIT 1

arch/arm64/src/common/arm64_internal.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
# elif defined(CONFIG_SERIAL_RTT_CONSOLE)
5959
# undef USE_SERIALDRIVER
6060
# undef USE_EARLYSERIALINIT
61+
# elif defined(CONFIG_RPMSG_UART_CONSOLE)
62+
# undef USE_SERIALDRIVER
63+
# undef USE_EARLYSERIALINIT
6164
# else
6265
# define USE_SERIALDRIVER 1
6366
# define USE_EARLYSERIALINIT 1

drivers/serial/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ config RPMSG_UART
8181
select SERIAL_REMOVABLE
8282
select SERIAL_IFLOWCONTROL
8383

84+
config RPMSG_UART_CONSOLE
85+
bool "UART rpmsg console support"
86+
default n
87+
depends on RPMSG_UART
88+
---help---
89+
Register the UART rpmsg device as /dev/console so that is will be used
90+
as the console device.
91+
NOTE: support for this option must be implemented in the board logic by
92+
setting the \"isconsole\" argument in the uart_rpmsg_init() function to true.
93+
8494
#
8595
# Standard serial driver configuration
8696
#

0 commit comments

Comments
 (0)