You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/08/24 18:09:21 UTC

[GitHub] [incubator-nuttx-apps] mransom-campbell opened a new pull request #840: interpreters/micropython: Add Micropython support to NuttX (WIP)

mransom-campbell opened a new pull request #840:
URL: https://github.com/apache/incubator-nuttx-apps/pull/840


   
   I could use some feedback on this. It is still a WIP but it is taking longer than expected so I wanted to get this out there.
   
   
   ## Summary
   [Micropython](https://github.com/micropython/micropython) is a Python implementation for Microcontrollers. I think it is a perfect fit for NuttX.
   
   This PR adds NuttX as a Unix "Variant" under Micropython. This allows lots of features like files, sockets, etc.. to work without maintaining a separate Micropython port for NuttX.
   
   Notes:
    - Hardest part was integrating the build systems. Currently Micropython is built using the Micropython ports/unix Makefile during the "context" step. Building during the build step would be better but I couldn't get that to work.
    - I previously manually specified all the .c files but that broke as soon as I updated Micropython. I am far from a Make expert so if
   anyone has a better solution let me know.
    - Currently clones my fork of Micropython (https://github.com/mransom-campbell/micropython/tree/nuttx). I will upstream those changes once I do some cleanup.
    - Would it be better to download the latest Micropython release and apply patches like the Duktape NuttX support?
   
   TODO:
   - [x] Add NuttX support to Micropython Unix port.
   - [x] Create Makefile and KConfig for NuttX Apps.
   - [ ] Fix warnings when sockets/ussl are enabled (NuttX builds will -Werror)
   - [ ] Fix Micropython stack check size.
   - [ ] Add Micropython default Heap size as configuration option.
   - [ ] Run Micropython test suite
   
   ## Impact
   
   Application.mk: changed OBJS to be += so Applications can add their own object files manually.
   
   ## Testing
   
   I have tried a few things on a stm32 board and Renesas RX board, everything seems to work. The full Micropython test suite should be run before this PR is merged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] cederom removed a comment on pull request #840: interpreters/micropython: Add Micropython support to NuttX (WIP)

Posted by GitBox <gi...@apache.org>.
cederom removed a comment on pull request #840:
URL: https://github.com/apache/incubator-nuttx-apps/pull/840#issuecomment-951102940


   I am for FreeBSD's way of porting: we use release package, locally add patches where necessary, preferably patch upstream to build and run out of the box after unpacking on the target :-)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] mransom-campbell commented on pull request #840: interpreters/micropython: Add Micropython support to NuttX (WIP)

Posted by GitBox <gi...@apache.org>.
mransom-campbell commented on pull request #840:
URL: https://github.com/apache/incubator-nuttx-apps/pull/840#issuecomment-951366355


   @cederom thanks for your interest! I actually got stuck trying to run the Micropython test suite. Here's the approaches I tried:
   - Run test suite on Nuttx simulation: Doesn't work because I couldn't get the arguments to be passed to the Micropython task, and the simulation doesn't exit at the end by default.
   - Run test suite on Nuttx arm dev board: Doesn't work because the Unix port of Micropython doesn't support the 'Raw' REPL mode required to run the test suite on hardware.
   If you could help get the test suite working on either of those approaches that would be helpful.
   
   I have a solution to the Float issue but I haven't pushed that to this branch yet.
   
   I was working on this for a Research project at work so I'm not sure how much more time I can dedicate to this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] cederom commented on pull request #840: interpreters/micropython: Add Micropython support to NuttX (WIP)

Posted by GitBox <gi...@apache.org>.
cederom commented on pull request #840:
URL: https://github.com/apache/incubator-nuttx-apps/pull/840#issuecomment-951385263


   * Thanks  @mransom-campbell :-) 
   * I am new to NuttX so it can take some time until I get familiar with all internals.. but I have starting point and clear goal, test suite, thanks! :-)
   * So far I did run NuttX Simulator and NuttX firmware on ESP32-C3 DevKit.
   * I am working on FreeBSD. I can see there is a MicroPython 1.17 port here so I can have reference point.
   * What problems do you see with hardware drivers? I am mostly interested in running MP on MCU (RISC-V).
   * What is your rough work / time estimation to complete MP on NuttX? How much time did you spend already to get familiar with the internals?
   * I will try to build from your repo / branch and report back. 
   * I already cloned you repo :-) Will you have time to review PRs from me or I should push here directly?
   * Step by step, incremental progress :-)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] mransom-campbell edited a comment on pull request #840: interpreters/micropython: Add Micropython support to NuttX (WIP)

Posted by GitBox <gi...@apache.org>.
mransom-campbell edited a comment on pull request #840:
URL: https://github.com/apache/incubator-nuttx-apps/pull/840#issuecomment-951366355


   @cederom thanks for your interest! I actually got stuck trying to run the Micropython test suite. Here's the approaches I tried:
   - Run test suite on Nuttx simulation: Doesn't work because I couldn't get the arguments to be passed to the Micropython task, and the simulation doesn't exit at the end by default.
   - Run test suite on Nuttx arm dev board: Doesn't work because the Unix port of Micropython doesn't support the 'Raw' REPL mode required to run the test suite on hardware.
   
   If you could help get the test suite working on either of those approaches that would be helpful.
   
   I have a solution to the Float issue but I haven't pushed that to this branch yet.
   
   I was working on this for a Research project at work so I'm not sure how much more time I can dedicate to this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] cederom commented on pull request #840: interpreters/micropython: Add Micropython support to NuttX (WIP)

Posted by GitBox <gi...@apache.org>.
cederom commented on pull request #840:
URL: https://github.com/apache/incubator-nuttx-apps/pull/840#issuecomment-951102940


   I am for FreeBSD's way of porting: we use release package, locally add patches where necessary, preferably patch upstream to build and run out of the box after unpacking on the target :-)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] cederom commented on pull request #840: interpreters/micropython: Add Micropython support to NuttX (WIP)

Posted by GitBox <gi...@apache.org>.
cederom commented on pull request #840:
URL: https://github.com/apache/incubator-nuttx-apps/pull/840#issuecomment-951097204


   Awsome work @mransom-campbell ! I also got interested in MicroPython and NuttX :-) How can I help? :-)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org