You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Tomasz CEDRO <to...@cedro.info> on 2021/10/25 14:09:44 UTC

NuttX + MicroPython + ESP32 / ESP32-C3

Hello world :-)

I am considering MicroPython as the rapid development platform. It
seems well developed already, allows simple tasks extremely fast, also
allows client to develop firmware on their own relatively easy without
rebuilding whole firmware, getting into details, drivers, etc.

I would like to ask what is the current state of MicroPython in NuttX RTOS?

What would be the proper way to autostart application and/or
MicroPython + main.py script on boot?

Are all CPU/SoC supported over HAL or I will have to write
implementation on my own?

Is ESP32-C3 fully supported? Is ESP32-PICO fully supported as ESP32 derivative?

I have also some M5Stack devices with LCD (M5StickC) even with Camera
(M5StickV). They can use LVGL and I can see LVGL and LCD drivers are
already ported to NuttX :-) M5StickV even has 64-bit RISC-V RV64IMAFDC
(RV64GC) with NeuralNetwork accelerator! All of them cost way below
$50 :-)

MicroPython seems really amazing way to quickly create
Proof-of-Concept designs :-)

Any hints welcome :-)
Tomek

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Sebastien Lorquet <se...@lorquet.fr>.
Hi,

This would be no problem I think, as our potential usage is a stm32h7 
board running a 400 MHz with 2 megs of ram.

We already have a product structure made of separate small services and 
a message bus, so timing critical stuff, which is quite frozen (protocol 
handlers etc) could stay in C but the rest (which is more subject to 
change) could be in python for flexibility, maintenance, and memory 
safety, and modules could be replaced one by one. This is really a 
technical evaluation, I dont know what problems we could encounter.

Other usages would be experimental, so we dont care :)

It would still be cool to have micropython available in nuttx, beginners 
would like it.

Sebastien


Le 09/02/2024 à 16:09, Tomek CEDRO a écrit :
> Hey there Sebastien :-)
>
> NuttX is so well organized that writing bare C here is far more
> efficient "rapid prototyping" so I had no more need to use MicoPython
> as it turned out memory hungry for bigger applications.
>
> But still I am fan of Python so we could resurrect the idea :-)
>
> Tomek
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>
> On Fri, Feb 9, 2024 at 4:04 PM Sebastien Lorquet <se...@lorquet.fr> wrote:
>> Hi,
>>
>> I think I may like to have micropython work again on NuttX.
>>
>> Where can I find the latest efforts on this project, to try my hand on it?
>>
>> Sebastien
>>
>>
>> Le 26/10/2021 à 04:16, Tomasz CEDRO a écrit :
>>> On Mon, Oct 25, 2021 at 7:45 PM Xiang Xiao wrote:
>>>> On Mon, Oct 25, 2021 at 11:37 PM Tomasz CEDRO 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...)
>>> Thank you Xiao! Looks more and more like Unix on MCU :-)
>>>
>>>
>>>>> 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.
>>> Good news thank you! One port to rule them all :-) I start to love
>>> NuttX even more! Can't wait the day when it runs on my 8-bit Atari :-)
>>> :-)
>>>
>>>   From what I can see the current MicroPython port is initial, needs to
>>> be able to run test suite as the current task, will look into it in my
>>> free time, duty noted :-)
>>>
>>> I just need to make some working prototype in few days quickly, I
>>> thought that MicroPython could be the way, but it will require more
>>> work / time with ESP32-C3 + NuttX, however I believe it will be worth
>>> working on it :-)
>>>
>>> I got MicroPython working on ESP32 boards out of the box, so that
>>> would be good place to learn it and get some experience in the first
>>> place before porting :-)
>>>
>>> I have allergy to JavaScript and any framework related to it to the
>>> point that I am considering porting (Micro)Python + LVGL as the cross
>>> platform mobile development framework. Thus my research into
>>> MicroPython. We have lost so much time and effort and heart to build
>>> on React Native + Expo. I never would have even guess such slow heavy
>>> self-incompatible thing with a life cycle shorter than yogurt could
>>> get so much world wide traction. On the other hand we have web backend
>>> written in Python Django that is clean small elegant efficient
>>> scalable and can run even on a small networked embedded system. Maybe
>>> "Apples and Oranges"^TM but I am definitely a Python fan :-P
>>>
>>> Thank you for all the hints folks! :-)
>>> Tomek
>>>

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Sebastien Lorquet <se...@lorquet.fr>.
Hi,

The embed port method they suggested on my issue ticket looks promising.

I'm looking at this right now.

Sebastien


Le 10/02/2024 à 10:24, Victor Suarez Rovere a écrit :
> I ported Micropython to various platforms (CPU and FPGA), including
> peripherals like Video output, so I can help with porting to NuttX:
> See my developments:
> https://github.com/suarezvictor/micropython/tree/litex-rebase/ports/litex#readme
>
> Who else can contribute?
>
>
> On Fri, Feb 9, 2024 at 2:27 PM Sebastien Lorquet <se...@lorquet.fr>
> wrote:
>
>> Hi,
>>
>> Not sure I'm going to wait24Q3 :-) I'm certainly not focussed enough :-)
>>
>> https://github.com/micropython/micropython/issues/13632
>>
>> Let's see what they think.
>>
>> The only real issue is "how to build a micropython port that links to a
>> static lib" :)
>>
>> And maybe how to avoid duplicating mbedtls and some other libs in some
>> cases... but that can wait.
>>
>> Sebastien
>>
>> Le 09/02/2024 à 18:16, Tomek CEDRO a écrit :
>>> Yes exactly, I was also thinking to make MicroPython a NuttX
>>> application, just like we have Python on desktop, so it builds out of
>>> the box and provides generic access no matter what arch/board, no
>>> hardcoded hardware specific stuff, all hardware interaction done
>>> though /dev :-)
>>>
>>> I am switching from hardware project right now more into a software
>>> development right now but I am still rushing so I will have more time
>>> for that around 2024Q3 but we can create a dedicated fork repo and
>>> play there when stuff is ready we can push to both upstreams..? :-)
>>>
>>> --
>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>
>>> On Fri, Feb 9, 2024 at 6:07 PM Sebastien Lorquet <se...@lorquet.fr>
>> wrote:
>>>> Hi,
>>>>
>>>> I found the deletion commit:
>>>>
>> https://github.com/apache/nuttx-apps/commit/abcb66cb20d85b910d55854de51b197eaa468e8b
>>>> I think it should not work like that today.
>>>>
>>>> Also, it looks like it does not come with micropython libraries...
>>>>
>>>> We should contribute anything required in micropython itself so it can
>>>> be built as a kind of library, and have the absolute required minimum in
>>>> nuttx-apps to allow linking with this lib.
>>>>
>>>> What do you think?
>>>>
>>>> Sebastien
>>>>
>>>>
>>>> Le 09/02/2024 à 16:09, Tomek CEDRO a écrit :
>>>>> Hey there Sebastien :-)
>>>>>
>>>>> NuttX is so well organized that writing bare C here is far more
>>>>> efficient "rapid prototyping" so I had no more need to use MicoPython
>>>>> as it turned out memory hungry for bigger applications.
>>>>>
>>>>> But still I am fan of Python so we could resurrect the idea :-)
>>>>>
>>>>> Tomek
>>>>>
>>>>> --
>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>
>>>>> On Fri, Feb 9, 2024 at 4:04 PM Sebastien Lorquet <se...@lorquet.fr>
>> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I think I may like to have micropython work again on NuttX.
>>>>>>
>>>>>> Where can I find the latest efforts on this project, to try my hand
>> on it?
>>>>>> Sebastien
>>>>>>
>>>>>>
>>>>>> Le 26/10/2021 à 04:16, Tomasz CEDRO a écrit :
>>>>>>> On Mon, Oct 25, 2021 at 7:45 PM Xiang Xiao wrote:
>>>>>>>> On Mon, Oct 25, 2021 at 11:37 PM Tomasz CEDRO 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...)
>>>>>>> Thank you Xiao! Looks more and more like Unix on MCU :-)
>>>>>>>
>>>>>>>
>>>>>>>>> 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.
>>>>>>> Good news thank you! One port to rule them all :-) I start to love
>>>>>>> NuttX even more! Can't wait the day when it runs on my 8-bit Atari
>> :-)
>>>>>>> :-)
>>>>>>>
>>>>>>>     From what I can see the current MicroPython port is initial,
>> needs to
>>>>>>> be able to run test suite as the current task, will look into it in
>> my
>>>>>>> free time, duty noted :-)
>>>>>>>
>>>>>>> I just need to make some working prototype in few days quickly, I
>>>>>>> thought that MicroPython could be the way, but it will require more
>>>>>>> work / time with ESP32-C3 + NuttX, however I believe it will be worth
>>>>>>> working on it :-)
>>>>>>>
>>>>>>> I got MicroPython working on ESP32 boards out of the box, so that
>>>>>>> would be good place to learn it and get some experience in the first
>>>>>>> place before porting :-)
>>>>>>>
>>>>>>> I have allergy to JavaScript and any framework related to it to the
>>>>>>> point that I am considering porting (Micro)Python + LVGL as the cross
>>>>>>> platform mobile development framework. Thus my research into
>>>>>>> MicroPython. We have lost so much time and effort and heart to build
>>>>>>> on React Native + Expo. I never would have even guess such slow heavy
>>>>>>> self-incompatible thing with a life cycle shorter than yogurt could
>>>>>>> get so much world wide traction. On the other hand we have web
>> backend
>>>>>>> written in Python Django that is clean small elegant efficient
>>>>>>> scalable and can run even on a small networked embedded system. Maybe
>>>>>>> "Apples and Oranges"^TM but I am definitely a Python fan :-P
>>>>>>>
>>>>>>> Thank you for all the hints folks! :-)
>>>>>>> Tomek
>>>>>>>

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Victor Suarez Rovere <su...@gmail.com>.
I ported Micropython to various platforms (CPU and FPGA), including
peripherals like Video output, so I can help with porting to NuttX:
See my developments:
https://github.com/suarezvictor/micropython/tree/litex-rebase/ports/litex#readme

Who else can contribute?


On Fri, Feb 9, 2024 at 2:27 PM Sebastien Lorquet <se...@lorquet.fr>
wrote:

> Hi,
>
> Not sure I'm going to wait24Q3 :-) I'm certainly not focussed enough :-)
>
> https://github.com/micropython/micropython/issues/13632
>
> Let's see what they think.
>
> The only real issue is "how to build a micropython port that links to a
> static lib" :)
>
> And maybe how to avoid duplicating mbedtls and some other libs in some
> cases... but that can wait.
>
> Sebastien
>
> Le 09/02/2024 à 18:16, Tomek CEDRO a écrit :
> > Yes exactly, I was also thinking to make MicroPython a NuttX
> > application, just like we have Python on desktop, so it builds out of
> > the box and provides generic access no matter what arch/board, no
> > hardcoded hardware specific stuff, all hardware interaction done
> > though /dev :-)
> >
> > I am switching from hardware project right now more into a software
> > development right now but I am still rushing so I will have more time
> > for that around 2024Q3 but we can create a dedicated fork repo and
> > play there when stuff is ready we can push to both upstreams..? :-)
> >
> > --
> > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> >
> > On Fri, Feb 9, 2024 at 6:07 PM Sebastien Lorquet <se...@lorquet.fr>
> wrote:
> >> Hi,
> >>
> >> I found the deletion commit:
> >>
> https://github.com/apache/nuttx-apps/commit/abcb66cb20d85b910d55854de51b197eaa468e8b
> >>
> >> I think it should not work like that today.
> >>
> >> Also, it looks like it does not come with micropython libraries...
> >>
> >> We should contribute anything required in micropython itself so it can
> >> be built as a kind of library, and have the absolute required minimum in
> >> nuttx-apps to allow linking with this lib.
> >>
> >> What do you think?
> >>
> >> Sebastien
> >>
> >>
> >> Le 09/02/2024 à 16:09, Tomek CEDRO a écrit :
> >>> Hey there Sebastien :-)
> >>>
> >>> NuttX is so well organized that writing bare C here is far more
> >>> efficient "rapid prototyping" so I had no more need to use MicoPython
> >>> as it turned out memory hungry for bigger applications.
> >>>
> >>> But still I am fan of Python so we could resurrect the idea :-)
> >>>
> >>> Tomek
> >>>
> >>> --
> >>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> >>>
> >>> On Fri, Feb 9, 2024 at 4:04 PM Sebastien Lorquet <se...@lorquet.fr>
> wrote:
> >>>> Hi,
> >>>>
> >>>> I think I may like to have micropython work again on NuttX.
> >>>>
> >>>> Where can I find the latest efforts on this project, to try my hand
> on it?
> >>>>
> >>>> Sebastien
> >>>>
> >>>>
> >>>> Le 26/10/2021 à 04:16, Tomasz CEDRO a écrit :
> >>>>> On Mon, Oct 25, 2021 at 7:45 PM Xiang Xiao wrote:
> >>>>>> On Mon, Oct 25, 2021 at 11:37 PM Tomasz CEDRO 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...)
> >>>>> Thank you Xiao! Looks more and more like Unix on MCU :-)
> >>>>>
> >>>>>
> >>>>>>> 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.
> >>>>> Good news thank you! One port to rule them all :-) I start to love
> >>>>> NuttX even more! Can't wait the day when it runs on my 8-bit Atari
> :-)
> >>>>> :-)
> >>>>>
> >>>>>    From what I can see the current MicroPython port is initial,
> needs to
> >>>>> be able to run test suite as the current task, will look into it in
> my
> >>>>> free time, duty noted :-)
> >>>>>
> >>>>> I just need to make some working prototype in few days quickly, I
> >>>>> thought that MicroPython could be the way, but it will require more
> >>>>> work / time with ESP32-C3 + NuttX, however I believe it will be worth
> >>>>> working on it :-)
> >>>>>
> >>>>> I got MicroPython working on ESP32 boards out of the box, so that
> >>>>> would be good place to learn it and get some experience in the first
> >>>>> place before porting :-)
> >>>>>
> >>>>> I have allergy to JavaScript and any framework related to it to the
> >>>>> point that I am considering porting (Micro)Python + LVGL as the cross
> >>>>> platform mobile development framework. Thus my research into
> >>>>> MicroPython. We have lost so much time and effort and heart to build
> >>>>> on React Native + Expo. I never would have even guess such slow heavy
> >>>>> self-incompatible thing with a life cycle shorter than yogurt could
> >>>>> get so much world wide traction. On the other hand we have web
> backend
> >>>>> written in Python Django that is clean small elegant efficient
> >>>>> scalable and can run even on a small networked embedded system. Maybe
> >>>>> "Apples and Oranges"^TM but I am definitely a Python fan :-P
> >>>>>
> >>>>> Thank you for all the hints folks! :-)
> >>>>> Tomek
> >>>>>
>

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Sebastien Lorquet <se...@lorquet.fr>.
Hi,

Not sure I'm going to wait24Q3 :-) I'm certainly not focussed enough :-)

https://github.com/micropython/micropython/issues/13632

Let's see what they think.

The only real issue is "how to build a micropython port that links to a 
static lib" :)

And maybe how to avoid duplicating mbedtls and some other libs in some 
cases... but that can wait.

Sebastien

Le 09/02/2024 à 18:16, Tomek CEDRO a écrit :
> Yes exactly, I was also thinking to make MicroPython a NuttX
> application, just like we have Python on desktop, so it builds out of
> the box and provides generic access no matter what arch/board, no
> hardcoded hardware specific stuff, all hardware interaction done
> though /dev :-)
>
> I am switching from hardware project right now more into a software
> development right now but I am still rushing so I will have more time
> for that around 2024Q3 but we can create a dedicated fork repo and
> play there when stuff is ready we can push to both upstreams..? :-)
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>
> On Fri, Feb 9, 2024 at 6:07 PM Sebastien Lorquet <se...@lorquet.fr> wrote:
>> Hi,
>>
>> I found the deletion commit:
>> https://github.com/apache/nuttx-apps/commit/abcb66cb20d85b910d55854de51b197eaa468e8b
>>
>> I think it should not work like that today.
>>
>> Also, it looks like it does not come with micropython libraries...
>>
>> We should contribute anything required in micropython itself so it can
>> be built as a kind of library, and have the absolute required minimum in
>> nuttx-apps to allow linking with this lib.
>>
>> What do you think?
>>
>> Sebastien
>>
>>
>> Le 09/02/2024 à 16:09, Tomek CEDRO a écrit :
>>> Hey there Sebastien :-)
>>>
>>> NuttX is so well organized that writing bare C here is far more
>>> efficient "rapid prototyping" so I had no more need to use MicoPython
>>> as it turned out memory hungry for bigger applications.
>>>
>>> But still I am fan of Python so we could resurrect the idea :-)
>>>
>>> Tomek
>>>
>>> --
>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>
>>> On Fri, Feb 9, 2024 at 4:04 PM Sebastien Lorquet <se...@lorquet.fr> wrote:
>>>> Hi,
>>>>
>>>> I think I may like to have micropython work again on NuttX.
>>>>
>>>> Where can I find the latest efforts on this project, to try my hand on it?
>>>>
>>>> Sebastien
>>>>
>>>>
>>>> Le 26/10/2021 à 04:16, Tomasz CEDRO a écrit :
>>>>> On Mon, Oct 25, 2021 at 7:45 PM Xiang Xiao wrote:
>>>>>> On Mon, Oct 25, 2021 at 11:37 PM Tomasz CEDRO 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...)
>>>>> Thank you Xiao! Looks more and more like Unix on MCU :-)
>>>>>
>>>>>
>>>>>>> 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.
>>>>> Good news thank you! One port to rule them all :-) I start to love
>>>>> NuttX even more! Can't wait the day when it runs on my 8-bit Atari :-)
>>>>> :-)
>>>>>
>>>>>    From what I can see the current MicroPython port is initial, needs to
>>>>> be able to run test suite as the current task, will look into it in my
>>>>> free time, duty noted :-)
>>>>>
>>>>> I just need to make some working prototype in few days quickly, I
>>>>> thought that MicroPython could be the way, but it will require more
>>>>> work / time with ESP32-C3 + NuttX, however I believe it will be worth
>>>>> working on it :-)
>>>>>
>>>>> I got MicroPython working on ESP32 boards out of the box, so that
>>>>> would be good place to learn it and get some experience in the first
>>>>> place before porting :-)
>>>>>
>>>>> I have allergy to JavaScript and any framework related to it to the
>>>>> point that I am considering porting (Micro)Python + LVGL as the cross
>>>>> platform mobile development framework. Thus my research into
>>>>> MicroPython. We have lost so much time and effort and heart to build
>>>>> on React Native + Expo. I never would have even guess such slow heavy
>>>>> self-incompatible thing with a life cycle shorter than yogurt could
>>>>> get so much world wide traction. On the other hand we have web backend
>>>>> written in Python Django that is clean small elegant efficient
>>>>> scalable and can run even on a small networked embedded system. Maybe
>>>>> "Apples and Oranges"^TM but I am definitely a Python fan :-P
>>>>>
>>>>> Thank you for all the hints folks! :-)
>>>>> Tomek
>>>>>

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Tomek CEDRO <to...@cedro.info>.
Yes exactly, I was also thinking to make MicroPython a NuttX
application, just like we have Python on desktop, so it builds out of
the box and provides generic access no matter what arch/board, no
hardcoded hardware specific stuff, all hardware interaction done
though /dev :-)

I am switching from hardware project right now more into a software
development right now but I am still rushing so I will have more time
for that around 2024Q3 but we can create a dedicated fork repo and
play there when stuff is ready we can push to both upstreams..? :-)

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

On Fri, Feb 9, 2024 at 6:07 PM Sebastien Lorquet <se...@lorquet.fr> wrote:
>
> Hi,
>
> I found the deletion commit:
> https://github.com/apache/nuttx-apps/commit/abcb66cb20d85b910d55854de51b197eaa468e8b
>
> I think it should not work like that today.
>
> Also, it looks like it does not come with micropython libraries...
>
> We should contribute anything required in micropython itself so it can
> be built as a kind of library, and have the absolute required minimum in
> nuttx-apps to allow linking with this lib.
>
> What do you think?
>
> Sebastien
>
>
> Le 09/02/2024 à 16:09, Tomek CEDRO a écrit :
> > Hey there Sebastien :-)
> >
> > NuttX is so well organized that writing bare C here is far more
> > efficient "rapid prototyping" so I had no more need to use MicoPython
> > as it turned out memory hungry for bigger applications.
> >
> > But still I am fan of Python so we could resurrect the idea :-)
> >
> > Tomek
> >
> > --
> > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> >
> > On Fri, Feb 9, 2024 at 4:04 PM Sebastien Lorquet <se...@lorquet.fr> wrote:
> >> Hi,
> >>
> >> I think I may like to have micropython work again on NuttX.
> >>
> >> Where can I find the latest efforts on this project, to try my hand on it?
> >>
> >> Sebastien
> >>
> >>
> >> Le 26/10/2021 à 04:16, Tomasz CEDRO a écrit :
> >>> On Mon, Oct 25, 2021 at 7:45 PM Xiang Xiao wrote:
> >>>> On Mon, Oct 25, 2021 at 11:37 PM Tomasz CEDRO 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...)
> >>> Thank you Xiao! Looks more and more like Unix on MCU :-)
> >>>
> >>>
> >>>>> 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.
> >>> Good news thank you! One port to rule them all :-) I start to love
> >>> NuttX even more! Can't wait the day when it runs on my 8-bit Atari :-)
> >>> :-)
> >>>
> >>>   From what I can see the current MicroPython port is initial, needs to
> >>> be able to run test suite as the current task, will look into it in my
> >>> free time, duty noted :-)
> >>>
> >>> I just need to make some working prototype in few days quickly, I
> >>> thought that MicroPython could be the way, but it will require more
> >>> work / time with ESP32-C3 + NuttX, however I believe it will be worth
> >>> working on it :-)
> >>>
> >>> I got MicroPython working on ESP32 boards out of the box, so that
> >>> would be good place to learn it and get some experience in the first
> >>> place before porting :-)
> >>>
> >>> I have allergy to JavaScript and any framework related to it to the
> >>> point that I am considering porting (Micro)Python + LVGL as the cross
> >>> platform mobile development framework. Thus my research into
> >>> MicroPython. We have lost so much time and effort and heart to build
> >>> on React Native + Expo. I never would have even guess such slow heavy
> >>> self-incompatible thing with a life cycle shorter than yogurt could
> >>> get so much world wide traction. On the other hand we have web backend
> >>> written in Python Django that is clean small elegant efficient
> >>> scalable and can run even on a small networked embedded system. Maybe
> >>> "Apples and Oranges"^TM but I am definitely a Python fan :-P
> >>>
> >>> Thank you for all the hints folks! :-)
> >>> Tomek
> >>>

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Sebastien Lorquet <se...@lorquet.fr>.
Hi,

I found the deletion commit: 
https://github.com/apache/nuttx-apps/commit/abcb66cb20d85b910d55854de51b197eaa468e8b

I think it should not work like that today.

Also, it looks like it does not come with micropython libraries...

We should contribute anything required in micropython itself so it can 
be built as a kind of library, and have the absolute required minimum in 
nuttx-apps to allow linking with this lib.

What do you think?

Sebastien


Le 09/02/2024 à 16:09, Tomek CEDRO a écrit :
> Hey there Sebastien :-)
>
> NuttX is so well organized that writing bare C here is far more
> efficient "rapid prototyping" so I had no more need to use MicoPython
> as it turned out memory hungry for bigger applications.
>
> But still I am fan of Python so we could resurrect the idea :-)
>
> Tomek
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>
> On Fri, Feb 9, 2024 at 4:04 PM Sebastien Lorquet <se...@lorquet.fr> wrote:
>> Hi,
>>
>> I think I may like to have micropython work again on NuttX.
>>
>> Where can I find the latest efforts on this project, to try my hand on it?
>>
>> Sebastien
>>
>>
>> Le 26/10/2021 à 04:16, Tomasz CEDRO a écrit :
>>> On Mon, Oct 25, 2021 at 7:45 PM Xiang Xiao wrote:
>>>> On Mon, Oct 25, 2021 at 11:37 PM Tomasz CEDRO 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...)
>>> Thank you Xiao! Looks more and more like Unix on MCU :-)
>>>
>>>
>>>>> 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.
>>> Good news thank you! One port to rule them all :-) I start to love
>>> NuttX even more! Can't wait the day when it runs on my 8-bit Atari :-)
>>> :-)
>>>
>>>   From what I can see the current MicroPython port is initial, needs to
>>> be able to run test suite as the current task, will look into it in my
>>> free time, duty noted :-)
>>>
>>> I just need to make some working prototype in few days quickly, I
>>> thought that MicroPython could be the way, but it will require more
>>> work / time with ESP32-C3 + NuttX, however I believe it will be worth
>>> working on it :-)
>>>
>>> I got MicroPython working on ESP32 boards out of the box, so that
>>> would be good place to learn it and get some experience in the first
>>> place before porting :-)
>>>
>>> I have allergy to JavaScript and any framework related to it to the
>>> point that I am considering porting (Micro)Python + LVGL as the cross
>>> platform mobile development framework. Thus my research into
>>> MicroPython. We have lost so much time and effort and heart to build
>>> on React Native + Expo. I never would have even guess such slow heavy
>>> self-incompatible thing with a life cycle shorter than yogurt could
>>> get so much world wide traction. On the other hand we have web backend
>>> written in Python Django that is clean small elegant efficient
>>> scalable and can run even on a small networked embedded system. Maybe
>>> "Apples and Oranges"^TM but I am definitely a Python fan :-P
>>>
>>> Thank you for all the hints folks! :-)
>>> Tomek
>>>

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Tomek CEDRO <to...@cedro.info>.
Hey there Sebastien :-)

NuttX is so well organized that writing bare C here is far more
efficient "rapid prototyping" so I had no more need to use MicoPython
as it turned out memory hungry for bigger applications.

But still I am fan of Python so we could resurrect the idea :-)

Tomek

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

On Fri, Feb 9, 2024 at 4:04 PM Sebastien Lorquet <se...@lorquet.fr> wrote:
>
> Hi,
>
> I think I may like to have micropython work again on NuttX.
>
> Where can I find the latest efforts on this project, to try my hand on it?
>
> Sebastien
>
>
> Le 26/10/2021 à 04:16, Tomasz CEDRO a écrit :
> > On Mon, Oct 25, 2021 at 7:45 PM Xiang Xiao wrote:
> >> On Mon, Oct 25, 2021 at 11:37 PM Tomasz CEDRO 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...)
> > Thank you Xiao! Looks more and more like Unix on MCU :-)
> >
> >
> >>> 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.
> > Good news thank you! One port to rule them all :-) I start to love
> > NuttX even more! Can't wait the day when it runs on my 8-bit Atari :-)
> > :-)
> >
> >  From what I can see the current MicroPython port is initial, needs to
> > be able to run test suite as the current task, will look into it in my
> > free time, duty noted :-)
> >
> > I just need to make some working prototype in few days quickly, I
> > thought that MicroPython could be the way, but it will require more
> > work / time with ESP32-C3 + NuttX, however I believe it will be worth
> > working on it :-)
> >
> > I got MicroPython working on ESP32 boards out of the box, so that
> > would be good place to learn it and get some experience in the first
> > place before porting :-)
> >
> > I have allergy to JavaScript and any framework related to it to the
> > point that I am considering porting (Micro)Python + LVGL as the cross
> > platform mobile development framework. Thus my research into
> > MicroPython. We have lost so much time and effort and heart to build
> > on React Native + Expo. I never would have even guess such slow heavy
> > self-incompatible thing with a life cycle shorter than yogurt could
> > get so much world wide traction. On the other hand we have web backend
> > written in Python Django that is clean small elegant efficient
> > scalable and can run even on a small networked embedded system. Maybe
> > "Apples and Oranges"^TM but I am definitely a Python fan :-P
> >
> > Thank you for all the hints folks! :-)
> > Tomek
> >

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Sebastien Lorquet <se...@lorquet.fr>.
Hi,

I think I may like to have micropython work again on NuttX.

Where can I find the latest efforts on this project, to try my hand on it?

Sebastien


Le 26/10/2021 à 04:16, Tomasz CEDRO a écrit :
> On Mon, Oct 25, 2021 at 7:45 PM Xiang Xiao wrote:
>> On Mon, Oct 25, 2021 at 11:37 PM Tomasz CEDRO 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...)
> Thank you Xiao! Looks more and more like Unix on MCU :-)
>
>
>>> 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.
> Good news thank you! One port to rule them all :-) I start to love
> NuttX even more! Can't wait the day when it runs on my 8-bit Atari :-)
> :-)
>
>  From what I can see the current MicroPython port is initial, needs to
> be able to run test suite as the current task, will look into it in my
> free time, duty noted :-)
>
> I just need to make some working prototype in few days quickly, I
> thought that MicroPython could be the way, but it will require more
> work / time with ESP32-C3 + NuttX, however I believe it will be worth
> working on it :-)
>
> I got MicroPython working on ESP32 boards out of the box, so that
> would be good place to learn it and get some experience in the first
> place before porting :-)
>
> I have allergy to JavaScript and any framework related to it to the
> point that I am considering porting (Micro)Python + LVGL as the cross
> platform mobile development framework. Thus my research into
> MicroPython. We have lost so much time and effort and heart to build
> on React Native + Expo. I never would have even guess such slow heavy
> self-incompatible thing with a life cycle shorter than yogurt could
> get so much world wide traction. On the other hand we have web backend
> written in Python Django that is clean small elegant efficient
> scalable and can run even on a small networked embedded system. Maybe
> "Apples and Oranges"^TM but I am definitely a Python fan :-P
>
> Thank you for all the hints folks! :-)
> Tomek
>

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Tomasz CEDRO <to...@cedro.info>.
On Mon, Oct 25, 2021 at 7:45 PM Xiang Xiao wrote:
> On Mon, Oct 25, 2021 at 11:37 PM Tomasz CEDRO 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...)

Thank you Xiao! Looks more and more like Unix on MCU :-)


> > 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.

Good news thank you! One port to rule them all :-) I start to love
NuttX even more! Can't wait the day when it runs on my 8-bit Atari :-)
:-)

From what I can see the current MicroPython port is initial, needs to
be able to run test suite as the current task, will look into it in my
free time, duty noted :-)

I just need to make some working prototype in few days quickly, I
thought that MicroPython could be the way, but it will require more
work / time with ESP32-C3 + NuttX, however I believe it will be worth
working on it :-)

I got MicroPython working on ESP32 boards out of the box, so that
would be good place to learn it and get some experience in the first
place before porting :-)

I have allergy to JavaScript and any framework related to it to the
point that I am considering porting (Micro)Python + LVGL as the cross
platform mobile development framework. Thus my research into
MicroPython. We have lost so much time and effort and heart to build
on React Native + Expo. I never would have even guess such slow heavy
self-incompatible thing with a life cycle shorter than yogurt could
get so much world wide traction. On the other hand we have web backend
written in Python Django that is clean small elegant efficient
scalable and can run even on a small networked embedded system. Maybe
"Apples and Oranges"^TM but I am definitely a Python fan :-P

Thank you for all the hints folks! :-)
Tomek

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Xiang Xiao <xi...@gmail.com>.
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
>

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Tomasz CEDRO <to...@cedro.info>.
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)?

2. Would dedicated functionalities, like MicroPython, require separate
implementation of drivers for each SoC or will it use existing
drivers?

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

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Tomasz CEDRO <to...@cedro.info>.
On Mon, Oct 25, 2021 at 5:28 PM Simon Filgis wrote:
> (..)
> ...but I have the mission micropython in the back of my head.
> Looking forward to more discussion wherever (discord or mail, I don't
> care), but please keep me in the loop ;)
> Thank you,
> Simon

Yup, having out of the box MicroPython would be a strong attractor to
NuttX RTOS, especially in the DIY community! :-)

And for most cases that would be sufficient solution that would
noticeably decrease development time :-)

I noticed that M5 devices have the UI-Flow DK. But its mostly focused
on Scratch (coding by dragging building blocks). If we had consistent
low-level Python capable environment based on NuttX the PoC / R&D
would seem like a dream :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Simon Filgis <si...@ingenieurbuero-filgis.de>.
Hi,

this is a good example why discussion on discord channel is tricky. The
discussion was good. Learned a lot. I managed to build PR840, simple math
on the micropython console was possible.

However I stopped the work because:
1. I got distracted in running daily business
2. I need to admit my skills*freetime=projectpower is not sufficient for
attacking

...but I have the mission micropython in the back of my head.

Looking forward to more discussion wherever (discord or mail, I don't
care), but please keep me in the loop ;)

Thank you,

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Mon, Oct 25, 2021 at 4:58 PM Xiang Xiao <xi...@gmail.com>
wrote:

> McKay made a new porting here:
> Pull requests · apache/incubator-nuttx-apps (github.com)
> <https://github.com/apache/incubator-nuttx-apps/pull/840>
> Maybe, you could work with him to boost the porting.
>
> On Mon, Oct 25, 2021 at 10:44 PM Alan Carvalho de Assis <acassis@gmail.com
> >
> wrote:
>
> > Hi Tomasz,
> >
> > MicroPython was integrated in NuttX at some time ago, but it started
> > to crash and was removed.
> >
> > I think someone started a discussion about it on discord, but I don't
> > know what happened later.
> >
> > 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).
> >
> > BR,
> >
> > Alan
> >
> > On 10/25/21, Tomasz CEDRO <to...@cedro.info> wrote:
> > > Hello world :-)
> > >
> > > I am considering MicroPython as the rapid development platform. It
> > > seems well developed already, allows simple tasks extremely fast, also
> > > allows client to develop firmware on their own relatively easy without
> > > rebuilding whole firmware, getting into details, drivers, etc.
> > >
> > > I would like to ask what is the current state of MicroPython in NuttX
> > RTOS?
> > >
> > > What would be the proper way to autostart application and/or
> > > MicroPython + main.py script on boot?
> > >
> > > Are all CPU/SoC supported over HAL or I will have to write
> > > implementation on my own?
> > >
> > > Is ESP32-C3 fully supported? Is ESP32-PICO fully supported as ESP32
> > > derivative?
> > >
> > > I have also some M5Stack devices with LCD (M5StickC) even with Camera
> > > (M5StickV). They can use LVGL and I can see LVGL and LCD drivers are
> > > already ported to NuttX :-) M5StickV even has 64-bit RISC-V RV64IMAFDC
> > > (RV64GC) with NeuralNetwork accelerator! All of them cost way below
> > > $50 :-)
> > >
> > > MicroPython seems really amazing way to quickly create
> > > Proof-of-Concept designs :-)
> > >
> > > Any hints welcome :-)
> > > Tomek
> > >
> > > --
> > > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> > >
> >
>

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Tomasz CEDRO <to...@cedro.info>.
On Mon, Oct 25, 2021 at 4:58 PM Xiang Xiao wrote:
> McKay made a new porting here:
> Pull requests · apache/incubator-nuttx-apps (github.com)
> <https://github.com/apache/incubator-nuttx-apps/pull/840>
> Maybe, you could work with him to boost the porting.

Awsome! Thank you for the hint Xiang (Xiao??) :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Xiang Xiao <xi...@gmail.com>.
McKay made a new porting here:
Pull requests · apache/incubator-nuttx-apps (github.com)
<https://github.com/apache/incubator-nuttx-apps/pull/840>
Maybe, you could work with him to boost the porting.

On Mon, Oct 25, 2021 at 10:44 PM Alan Carvalho de Assis <ac...@gmail.com>
wrote:

> Hi Tomasz,
>
> MicroPython was integrated in NuttX at some time ago, but it started
> to crash and was removed.
>
> I think someone started a discussion about it on discord, but I don't
> know what happened later.
>
> 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).
>
> BR,
>
> Alan
>
> On 10/25/21, Tomasz CEDRO <to...@cedro.info> wrote:
> > Hello world :-)
> >
> > I am considering MicroPython as the rapid development platform. It
> > seems well developed already, allows simple tasks extremely fast, also
> > allows client to develop firmware on their own relatively easy without
> > rebuilding whole firmware, getting into details, drivers, etc.
> >
> > I would like to ask what is the current state of MicroPython in NuttX
> RTOS?
> >
> > What would be the proper way to autostart application and/or
> > MicroPython + main.py script on boot?
> >
> > Are all CPU/SoC supported over HAL or I will have to write
> > implementation on my own?
> >
> > Is ESP32-C3 fully supported? Is ESP32-PICO fully supported as ESP32
> > derivative?
> >
> > I have also some M5Stack devices with LCD (M5StickC) even with Camera
> > (M5StickV). They can use LVGL and I can see LVGL and LCD drivers are
> > already ported to NuttX :-) M5StickV even has 64-bit RISC-V RV64IMAFDC
> > (RV64GC) with NeuralNetwork accelerator! All of them cost way below
> > $50 :-)
> >
> > MicroPython seems really amazing way to quickly create
> > Proof-of-Concept designs :-)
> >
> > Any hints welcome :-)
> > Tomek
> >
> > --
> > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> >
>

Re: NuttX + MicroPython + ESP32 / ESP32-C3

Posted by Alan Carvalho de Assis <ac...@gmail.com>.
Hi Tomasz,

MicroPython was integrated in NuttX at some time ago, but it started
to crash and was removed.

I think someone started a discussion about it on discord, but I don't
know what happened later.

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).

BR,

Alan

On 10/25/21, Tomasz CEDRO <to...@cedro.info> wrote:
> Hello world :-)
>
> I am considering MicroPython as the rapid development platform. It
> seems well developed already, allows simple tasks extremely fast, also
> allows client to develop firmware on their own relatively easy without
> rebuilding whole firmware, getting into details, drivers, etc.
>
> I would like to ask what is the current state of MicroPython in NuttX RTOS?
>
> What would be the proper way to autostart application and/or
> MicroPython + main.py script on boot?
>
> Are all CPU/SoC supported over HAL or I will have to write
> implementation on my own?
>
> Is ESP32-C3 fully supported? Is ESP32-PICO fully supported as ESP32
> derivative?
>
> I have also some M5Stack devices with LCD (M5StickC) even with Camera
> (M5StickV). They can use LVGL and I can see LVGL and LCD drivers are
> already ported to NuttX :-) M5StickV even has 64-bit RISC-V RV64IMAFDC
> (RV64GC) with NeuralNetwork accelerator! All of them cost way below
> $50 :-)
>
> MicroPython seems really amazing way to quickly create
> Proof-of-Concept designs :-)
>
> Any hints welcome :-)
> Tomek
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>