On Mon, Oct 25, 2021 at 11:37 PM Tomasz CEDRO <to...@cedro.info> wrote:

> On Mon, Oct 25, 2021 at 4:44 PM Alan Carvalho de Assis wrote:
> > Hi Tomasz,
> > MicroPython was integrated in NuttX at some time ago, but it started
> > to crash and was removed.
>
> Yup, I saw some websites stating it work here but I could not find
> among interpreters. Thanks for the hint Alan :-)
>
>
> > I think someone started a discussion about it on discord, but I don't
> > know what happened later.
>
> I would prefer to keep critical discussions here on the list as they
> are easier to find later on and may give hints to the others :-) Stuff
> like IRC or Discord I may prefer for short term tasks :-)
>
>
> > As I told you ESP32-C3 has a good support on NuttX and Xiaomi is
> > already using it internally (it passed on their certification
> > process).
>
> Yup :-) NuttX claims full support for ESP32-C3 while Zephyr lags
> behind in this area (only GPIO, UART and BLE is currently
> implemented). I know that already, thanks :-)
>
> But my question was closely related to MicroPython and NuttX and SoC
> driver support / architecture that is still unknown to me, sorry,
> maybe this will clarify:
>
> 1. Is there some sort of HAL in NuttX that when driver for a SoC is
> ported makes it available freely for every other functionality already
> implemented (like in Zephyr)?
>
>
No, NuttX doesn't like HAL, but NuttX defines many device driver
interfaces(from uart, i2c, spi to gpio...).
All expose their functionality as device files(e.g. /dev/ttyS0, /dev/gpio).
Other complex devices expose through:

   1. File system API(e.g. block device, flash, mtd...)
   2. Socket API(e.g. ethernet, WiFi, CAN...)



> 2. Would dedicated functionalities, like MicroPython, require separate
> implementation of drivers for each SoC or will it use existing
> drivers?
>
>
Since all above functionality is exposed to userspace through the standard
interface. MicroPython port can be done in a general way which means that
once you finish the porting, all boards supported by NuttX will get the
same functionality freely.
BTW, since NuttX is very similar to Unix/Linux, it's very easy to start the
porting from the Unix/Linux version. Actually, My colleague(Chao An)
finished MicroPython initial NuttX porting in one week three years ago. But
since we switch to JavaScript as our high level language later, our porting
stops the maintenance after that.


> Long story short: if ESP32-C3 is already fully supported by NuttX will
> it be out-of-the box supported by MicroPython (assuming we stop its
> crashes)? And will other already supported chips work too? :-)
>
> Thank you for any hints :-)
> Tomek
>
> ps/2: Please forgive me comparisons to Zephyr but this is my last
> experience and serves as reference point :-)
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>

Reply via email to