Hi,
I've been a user of uPython for a while using the STM32F405. It's a fantastic language and have used it in several industrial applications.
I've also been evaluating several of the Adafruit boards such as the Metro M4 Express using CircuitPython. Not as impressed.
The issue I have with CircuitPython is that it seems it's a language for makers and beginners and not for serious industrial use. It lacks important feature such as interrupts, asynchio, in-line assembly, and other details. Also, the code between the two systems is different enough to make life difficult. For example to output a dac value is "dac.write(val)" in uPython, and "dac.write = val" in Circuit Python. So the code is not portable. It appears that uPython is more adherent to real Python.
I noticed there is a minimal port of the SAMD51 of in the git repo. Looking at it it seems it's for the 48 pin version and not the 64 pin. But it seems that the conversion is not too difficult.
Also, Circuit Python uses a special bootloader that uses UF2 format rather than BIN, DFU, or hex.
So I have some questions.
1. Are there any instructions on building and deploying uPyhon for any of the SAMD parts (D21 or D51)? Is the build process the same as with the STM32?
2. Can you use the UF2 bootloader or is a JTAG probe required?
3. What are the major differences in the SAMD version compared to the STM32 version?
4. Any links to actual usage or reviews of SAMD running uPython?
Cheeers,
Brad Stewart
SAMD51J19 Port
Re: SAMD51J19 Port
Want to add that the reason I want to move to the SAMD51 is it's about 1/2 the cost of the STM32 and it's wildly popular. I'm using them now with embedded C.
Re: SAMD51J19 Port
I would love to see more work done on this port but sadly it's extremely very bare bones. The idea was to do the "hard" bit (i.e. get it to boot) and then hopefully people would be able to contribute the various drivers and Python APIs but this hasn't happened yet...
Really all that is supported is:
- USB CDC (i.e. REPL over USB)
- time.sleep
I'm pretty sure that not even a flash driver has been written for filesystem support.
It's very similar to STM32 -- make mpy-cross, then make BOARD=
Yes, the build will generate a uf2 file. Most of the board definitions currently provided are for adafruit boards, so this is convenient.
Unfortunately the SAMD port is almost completely useless right now. It lacks even support for machine.Pin.
Really all that is supported is:
- USB CDC (i.e. REPL over USB)
- time.sleep
I'm pretty sure that not even a flash driver has been written for filesystem support.
I doubt it Like I said, would love to see this (I have some SAMD-based devices myself that would love to run MicroPython on) but just haven't had time to work on it (and neither has Damien it seems).
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: SAMD51J19 Port
That, plus your detailed observations, is spot-on. It is designed for ease of use by beginners whereas MicroPython prioritises performance and CPython compatibility. This at the expense of requiring some expertise on the part of its users.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.