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: Add a configuration for not printing shell errors #69002
Conversation
Hello @Brianmm94, and thank you very much for your first pull request to the Zephyr project! |
41f3a88
to
5d07b68
Compare
@Brianmm94 Depending on the context, might turning off shell echo address this issue? |
@jakub-uC Hello, setting |
@Brianmm94 |
The shell currently prints out `: command not found` and `Please specify a subcommand.` when invalid commands are sent. This can cause issues in certain situations, such as if a U-Boot console in interactive mode is on the other end of the shell's UART, where the U-Boot console will stop booting the device if it receives any characters, and it will print out strings that the shell then sees as commands. This causes the shell to send out the messages above, preventing the device running U-Boot on the other end from booting up. I added the configurations `CONFIG_SHELL_MSG_SPECIFY_SUBCOMMAND` and `CONFIG_SHELL_MSG_CMD_NOT_FOUND` to allow disabling these messages. Signed-off-by: Brian Moran <brian.moran@sabantoag.com>
Updated! I used the names Edit: I tested all 4 scenarios, as well as testing all 4 with |
Hi @Brianmm94, I had another thought that I wanted to share with you. Would you mind checking if the |
Hello @jakub-uC, that's actually what we started doing at first before this, but that solution only works if the U-Boot device on the other end just boots up once when the product is first powered on. If the U-Boot device reboots for any reason after that, then the issue still occurs. For example, in production we power off the U-Boot device to reduce power draw when it's not needed and we have APIs for rebooting it. We currently have no way of detecting that the U-Boot device is rebooting, and even if we could detect that accurately, calling |
Just out of curiosity, why is the Zephyr console and the U-boot console connected together in the first place? |
Hello @henrikbrixandersen, by default, our other device had U-Boot console on the serial port connected to this device when it was released before I started at the company. This wasn't an issue previously, but it is now that we're updating this device's firmware to use Zephyr. I believe that we may have another serial port that we can move the U-Boot console to in a future firmware update where it won't interact with Zephyr anymore, but that likely won't be for a while. Regardless, I still think these new configurations are beneficial to those who don't have another port to move U-Boot console to, or those who don't want anything printed unless a valid command is sent. |
Hi @Brianmm94! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
The shell currently prints out
: command not found
andPlease specify a subcommand.
when invalid commands aresent.
This can cause issues in certain situations, such as if a U-Boot
console in interactive mode is on the other end of the shell's
UART, where the U-Boot console will stop booting the device
if it receives any characters, and it will print out strings that
the shell then sees as commands. This causes the shell to send
out the messages above, preventing the device running
U-Boot on the other end from booting up.
I added the configurations
CONFIG_SHELL_MSG_SPECIFY_SUBCOMMAND
andCONFIG_SHELL_MSG_CMD_NOT_FOUND
to allow disablingthese messages.
Signed-off-by: Brian Moran brian.moran@sabantoag.com