Re: Some thoughts on Zephyr Console API

Paul Sokolovsky

Hello Flavio,

On Sun, 24 Jul 2016 00:58:45 -0000
"Flavio Santes" <flavio.santes(a)> wrote:

Hello Paul,

Zephyr shell is useful for writing sample code, and it works fine if
you just want to create prototypes. However, you are right, the shell
is not quite useful for general interactive input processing. Running
JS, Lua or Python code embedded into a Zephyr application sounds
great. Even so, I do not see why more interactive functionality is
required. Perhaps I am missing something, can you provide a use-case?
Thanks for your reply, and sorry for dropping the ball from my side -
vacation time and other tasks. With all the arguments regarding Zephyr
shell, I agree that it's mistake to try to use for generic console
input, and going to close
as invalid.

I'm not sure what you mean by providing a use-case - in the original
mail, I gave 2 examples: porting JerryScript's and MicroPython's REPLs.
Perhaps, you mean why it's important to support REPL (interactive
prompt) for these systems? Well, JS/Lua/Python are interpreted
interactive languages (some less, some more, but every has basic REPL
for sure).

As long as you agree that prospect of running JS/Lua/Python in a deeply
embedded systems sounds interesting, trying to cut off REPL
functionality (and leave e.g. only precompiled bytecode execution)
means cutting off their functionality in half. Perhaps, REPL isn't
useful to ship finished products to classical end users (though
nowadays "makers" emerged as noticeable consumer group), but it's
definitely useful for development/debugging and initial acquaintance
with a system. And even the latter alone is very important - in the
current overcrowded landscape, making it easy for a customer to get
one's initial blinking-led demo up and running fast is what can
influence selection of one product over others.

Hope that wasn't too long and philosophical ;-). I figure, this is a
niche topic for now, and there're many more priority tasks to do in
Zephyr. So, I'm happy that I at least brought up this topic for future
consideration, though now it seems that some adhoc (but reusable)
out-of-tree solution is the way to go. I shaped that up in a
github repo: .

Thanks for the discussion!


Best Regards,
Paul | Open source software for ARM SoCs
Follow Linaro:!/linaroorg -

Join to automatically receive all group messages.