How to port Micropython to new Microcontroller

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
baristajosh
Posts: 2
Joined: Sun Jan 06, 2019 9:34 pm

How to port Micropython to new Microcontroller

Post by baristajosh » Sun Jan 06, 2019 9:40 pm

Hi, I wanted to start the process of porting Micropython to an SAM-E54-XplainedPro Dev Board from Atmel
It's based on the ATSAME54P20A (ARM Cortex-M4).
I could not find any good documentation on how to go about porting Micropython to a new board that is not already supported in the Micropython github ports directory.
Can someone point me in the right direction?

HarryOz
Posts: 13
Joined: Thu May 19, 2016 6:02 am

Re: How to port Micropython to new Microcontroller

Post by HarryOz » Tue Jan 08, 2019 3:01 am

Have you had any luck finding out how to port Micropython to a new micro controller / custom board? I want to do the same thing.

yosel.balibrea
Posts: 1
Joined: Wed Jan 09, 2019 8:37 pm

Re: How to port Micropython to new Microcontroller

Post by yosel.balibrea » Wed Jan 09, 2019 9:03 pm

Hi, i have the same problem. I'm trying to port micropython to an FPGA soft core processor (ZPU) and i don't have any help or documentation.

tannewt
Posts: 33
Joined: Thu Aug 25, 2016 2:43 am

Re: How to port Micropython to new Microcontroller

Post by tannewt » Thu Jan 10, 2019 1:50 am

baristajosh, CircuitPython (a fork of MicroPython) supports the SAMD51 which is very similar to the E54 I believe. So, I'd suggest starting there. Once you have CircuitPython going on the E54 you should have enough knowledge to backport SAMD support to MicroPython (which other folks would like too I think.) I'm happy to answer any questions you have too. (You can find me and others on Adafruit discord: https://adafru.it/discord in the #circuitpython channel)

baristajosh
Posts: 2
Joined: Sun Jan 06, 2019 9:34 pm

Re: How to port Micropython to new Microcontroller

Post by baristajosh » Thu Jan 17, 2019 11:52 pm

[quote=tannewt post_id=33250 time=1547085005 user_id=1966]
baristajosh, CircuitPython (a fork of MicroPython) supports the SAMD51 which is very similar to the E54 I believe. So, I'd suggest starting there. Once you have CircuitPython going on the E54 you should have enough knowledge to backport SAMD support to MicroPython (which other folks would like too I think.) I'm happy to answer any questions you have too. (You can find me and others on Adafruit discord: https://adafru.it/discord in the #circuitpython channel)
[/quote]

Thanks tannewt, not a bad idea....
I'll try that route. I guess I was hoping there was a more formal process to port micropython to a new board.... or at least some rough documentation. I'm sure there is but I just can't seem to find it.

ExXec
Posts: 58
Joined: Sat Oct 20, 2018 4:02 pm

Re: How to port Micropython to new Microcontroller

Post by ExXec » Thu Feb 21, 2019 8:38 pm

I personally found it really helpful to start with the minimal port and then adding the modules from the stm32 folder while adjusting them.

The stm32 is really well documented.

After the minimal port you also want to create the pin and AF mapping like in the board folder. this is essential, because it tells uPython, what pins are available. Then the pin module and then you can already control the digital IO.

-ExXec

Post Reply