Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shell: uart: multi-instance implementation is broken #66071

Closed
ycsin opened this issue Dec 4, 2023 · 1 comment · Fixed by #66218
Closed

shell: uart: multi-instance implementation is broken #66071

ycsin opened this issue Dec 4, 2023 · 1 comment · Fixed by #66218
Assignees
Labels
area: Shell Shell subsystem Enhancement Changes/Updates/Additions to existing features Regression Something, which was working, does not anymore

Comments

@ycsin
Copy link
Collaborator

ycsin commented Dec 4, 2023

Is your enhancement proposal related to a problem? Please describe.
Previously, it was possible to create another shell UART instance by:

SHELL_UART_DEFINE(shell_transport_uart1,
		  CONFIG_SHELL_BACKEND_SERIAL_TX_RING_BUFFER_SIZE,
		  CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE);
SHELL_DEFINE(shell_uart1, "uart1:~$ ",
	     &shell_transport_uart1,
	     CONFIG_SHELL_BACKEND_SERIAL_LOG_MESSAGE_QUEUE_SIZE,
	     CONFIG_SHELL_BACKEND_SERIAL_LOG_MESSAGE_QUEUE_TIMEOUT,
	     SHELL_FLAG_OLF_CRLF);

This isn't possible anymore after #63967, as it removed the SHELL_UART_DEFINE and other macros required to create another instance of it.

Describe the solution you'd like

Exposing some of the structures (i.e. struct shell_uart) and rework the implementation in #63967 to recreate macros that create the buffers necessary for a shell UART instance in the public shell_uart.h header, so that we can create another shell UART instance with ease again.

Describe alternatives you've considered
Implement something similar to the UART logging backend in #64917

@ycsin ycsin added Enhancement Changes/Updates/Additions to existing features area: Logging area: Shell Shell subsystem and removed area: Logging labels Dec 4, 2023
@ycsin ycsin added the Regression Something, which was working, does not anymore label Dec 5, 2023
@ycsin
Copy link
Collaborator Author

ycsin commented Dec 5, 2023

Adding Regression tag as the macros were removed from a public header, any downstream application that depended on that would break

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Shell Shell subsystem Enhancement Changes/Updates/Additions to existing features Regression Something, which was working, does not anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants