Hi,

On 3 November 2016 at 15:18, marko kiiskila <[email protected]> wrote:

> Hi Wayne,
>
> > On Nov 2, 2016, at 10:53 AM, Wayne Keenan <[email protected]>
> wrote:
> >
> > I've not had a chance to look, but is there a low level UART HAL (perhaps
> > with basic buffer support) that the console, stdio, assert can all depend
> > on in more recent development versions of Mynewt?
> >
>
> I recommend having console/full, but not include shell package. This is
> what
> some of the sample apps do, like apps/bleprph.
>

> Alternatively we could have a knob in console/full that turns off normal
> I/O,
> only keeping output when system crashes.
>

Ah ok, but I still need unfettered access to the serial data...


>
> Is there something missing from the console/shell interface that you need?
>

Yes.. a Python context aware console with auto-tab indentation :)
I seriously don't expect Mynewt todo this, it's obviously way too
application specific.

Instead, under the banner of 'reuse' & maximum compatibility I've wired the
MicroPython REPL code to the UART HAL, hence bypassing the console.
Going this route also required a tweak to Mynewt's core mynewt.c 'stdout'.
Having todo this step is why I thought that the core shouldn't depend on a
higher level package as the console.IMHO.

An alternative would be to implement a new Mynewt  package, say
'python_repl_cons_tty', that followed the same API as the current
'cons_tty' package and performed the uPy REPL functions.  Perhaps some time
later, but I doubt it because it's less of a uPy REPL compatibility
headache not to.

All the best
Wayne

Reply via email to