-
Notifications
You must be signed in to change notification settings - Fork 2k
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
sys: simplify shell #3402
sys: simplify shell #3402
Conversation
82cb83e
to
265c128
Compare
265c128
to
70b490f
Compare
shell_init(&shell, shell_commands, UART0_BUFSIZE, uart0_readc, uart0_putc); | ||
/* start shell */ | ||
char line_buf[SHELL_DEFAULT_BUFSIZE]; | ||
shell_run(shell_commands, line_buf, SHELL_DEFAULT_BUFSIZE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is line_buf
defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhm, one line above? :)
very nice, +1! |
(I mark the PR "ready for CI" to see build errors) |
only some :-) |
2618065
to
48010f9
Compare
|
could you pls squash? |
4a009cc
to
8a3b80f
Compare
|
@@ -29,6 +29,11 @@ extern "C" { | |||
#endif | |||
|
|||
/** | |||
* @brief Default shell buffer size (maximum line length shell can handle) | |||
*/ | |||
#define SHELL_DEFAULT_BUFSIZE (128) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be 64 bytes enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go with 128, its the safer bet...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, if I think of commands like fibroute
you're probably right.
Shell doesn't work on MSB-A2. |
#3530 should fix everything for the msba2 |
Ok, works on Z1 and pba-d-01-kw2x. Let's wait for #3530 then. |
reviewing and testing it as we speak |
breaks msb430. |
Will look into the msb430 anyway, so I try to deal with it. |
8a3b80f
to
bce5c6a
Compare
|
MSP430 periph driver are under way, hope we can merge this this week... |
needs a rebase, because of the |
bce5c6a
to
0fc0933
Compare
|
0fc0933
to
e41bb68
Compare
-rebased |
e41bb68
to
d16ae35
Compare
all dependencies are in!
|
code looks good, works on every board I tested (i.e |
just for fun, also successfully tested for the |
ACK |
and go! |
Nice work, @kaspar030! |
Thanks, and thanks for reviewing! |
seeing multiple different types of getchar/putchar given to shell, with no actual effect as all output goes to the default stdio anyways, I've decided to get rid of the parameters.
If we one day want shells with IO other than stdio, we should implement it right and redirect stdio.
This is breaks all platforms not offering getchar/putchar. (WIP because of this)