Wio Terminal with ATSAMD51 + Realtek RTL8720DN + 2.4 screen + etc

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.
MCHobby
Posts: 52
Joined: Mon Jan 26, 2015 2:05 pm
Contact:

Re: Wio Terminal with ATSAMD51 + Realtek RTL8720DN + 2.4 screen + etc

Post by MCHobby » Sat Jan 09, 2021 9:33 am

No response ?!?!

Once again, is there any resource or reference document to install the compile toolchain to compile ATSAMD's base MicroPython ?

Dominique

Christian Walther
Posts: 169
Joined: Fri Aug 19, 2016 11:55 am

Re: Wio Terminal with ATSAMD51 + Realtek RTL8720DN + 2.4 screen + etc

Post by Christian Walther » Sat Jan 09, 2021 11:42 am

I don’t know but I assume the same toolchain as used to build CircuitPython should get you going. There’s a very detailed and up-to-date guide on that. As to building MicroPython, I assume the procedure is similar to other ARM-based targets such as STM32.

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: Wio Terminal with ATSAMD51 + Realtek RTL8720DN + 2.4 screen + etc

Post by mattyt » Sun Jan 10, 2021 5:37 am

MCHobby wrote:
Sat Jan 09, 2021 9:33 am
Once again, is there any resource or reference document to install the compile toolchain to compile ATSAMD's base MicroPython ?
Not that I'm aware of - but I know of two people that have built the SAMD port for the XIAO (SAMD21) recently, which is similar.

You can follow the STM32 guide for the dependencies (cross compilers is the same: arm-none-eabi-gcc) and then something like:

Code: Select all

> make -C mpy-cross
> cd ports/samd
> make submodules
> make BOARD=ADAFRUIT_ITSYBITSY_M4_EXPRESS
(The M4 is a SAMD51, similar to that used in the Wio Terminal. We will need to create a new board definition specifically for the Wio Terminal at some point...)

I haven't built for this board before but hopefully that will give you a start - let me know if you're still stuck.

I'll add 'Update README.md for SAMD port' to my todo list... :P

MCHobby
Posts: 52
Joined: Mon Jan 26, 2015 2:05 pm
Contact:

Re: Wio Terminal with ATSAMD51 + Realtek RTL8720DN + 2.4 screen + etc

Post by MCHobby » Sun Apr 04, 2021 10:36 pm

Before working on a more complex portage (ATSAMD51) I did focus my intention on SAMD21.

So I compiled MicroPython for the Adafruit Trinket M0 featuring an SAMD21E18A mcu.

1) I did install an Ubuntu machine on a virtual machine (Linux machine to ease the installation process). I did notice that Ubuntu server edition is more efficient for the compilation (no need to manage a graphical interface together with the compilation process).

2) I did follow the official Getting Starter Instructions at https://docs.micropython.org/en/latest/ ... arted.html

Please note that some package named had changed. Replace

Code: Select all

$ sudo apt-get install arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib
with

Code: Select all

$ sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
I did compile the unix version and the stm32 version. Thoses are good examples to get familliar with the build process.

3) Finally, I did compiled the firmware for the Trinket M0 (which is also an ARM mcu)

Code: Select all

$ cd ~/micropython/ports/samd
$ make submodules
$ make BOARD=ADAFRUIT_TRINKET_M0
this will generates the u2f file to upload to the board. The file will be located there.

Code: Select all

ls ~/micropython/ports/samd/build-ADAFRUIT_TRINKET_M0/firmware.uf2
Now... I need to wait for a Trinket M0 to upload the firmware
Last edited by MCHobby on Mon Apr 05, 2021 11:15 pm, edited 1 time in total.

User avatar
scruss
Posts: 360
Joined: Sat Aug 12, 2017 2:27 pm
Location: Toronto, Canada
Contact:

Re: Wio Terminal with ATSAMD51 + Realtek RTL8720DN + 2.4 screen + etc

Post by scruss » Mon Apr 05, 2021 3:45 am

Thanks! Note that binutils-arm-none-eabif should be binutils-arm-none-eabi.

I've got a Trinket lurking about somewhere, as well as a Xiao.

Update: … success! ish

Code: Select all

MicroPython v1.14-132-gd87f42b0e on 2021-04-04; Trinket M0 with SAMD21E18A
>>> import machine
>>> machine.
__name__        bootloader      freq            mem16
mem32           mem8            reset
So as expected from mattyt's comment last year, no peripherals supported, not even Pins. No obvious filesystem, either. But it built, and made a UF2, that loaded and did a thing.

I haven't found the working Xiao (SAMD21) MicroPython port anywhere. I know it can run ArduPy, SeeedStudio's MicroPython that lives on top of Arduino. But that's cheating.

Incidentally, if anyone gets those "Partnership with SeeedStudio" emails offering free kit, they're legit! That's how I got my Wio Terminal. All they ask is that you write something about the hardware, with a link back to them. It would be a good opportunity for MicroPython devs who want to work on SAMD support to get free hardware.

MCHobby
Posts: 52
Joined: Mon Jan 26, 2015 2:05 pm
Contact:

Re: Wio Terminal with ATSAMD51 + Realtek RTL8720DN + 2.4 screen + etc

Post by MCHobby » Fri Apr 30, 2021 12:39 pm

Hi there,
I'm progressing on the implementation... I just compiled a living SAMD21 MicroPython with Pin class declaration.
Did not work with C since my 25 (I'm also 50 now)... OMG... so hard!

Now, I still need to connect pipes.... but that's promising
Sélection_048.png
Sélection_048.png (2.35 KiB) Viewed 13948 times

User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: Wio Terminal with ATSAMD51 + Realtek RTL8720DN + 2.4 screen + etc

Post by rcolistete » Mon Nov 01, 2021 1:55 pm

There is CircuitPython for Seeeduino Wio Terminal since v6.0.0 :
https://circuitpython.org/board/seeeduino_wio_terminal/
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

MCHobby
Posts: 52
Joined: Mon Jan 26, 2015 2:05 pm
Contact:

Re: Wio Terminal with ATSAMD51 + Realtek RTL8720DN + 2.4 screen + etc

Post by MCHobby » Mon Nov 01, 2021 2:03 pm

Hi,
I'm just MicroPython addict (I do prefer that API)
Regards,
Dominique

ericwertz
Posts: 3
Joined: Sat Jan 13, 2018 11:58 pm

Re: Wio Terminal with ATSAMD51 + Realtek RTL8720DN + 2.4 screen + etc

Post by ericwertz » Sun May 15, 2022 12:18 am

I see that there's now a nightly build for the ItsyBitsy M4, but I don't have a clue as to whether it's another peripheral-less build like those mentioned previously. Were it complete that would seem to be a nearly complete starting point to get the WIOT-specific stuff going.

regards,
-e

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Wio Terminal with ATSAMD51 + Realtek RTL8720DN + 2.4 screen + etc

Post by Roberthh » Sun May 15, 2022 6:05 am

I'm working at extending the SAMD port and made already some progress. The state is contain in PR8533 at the repository: https://github.com/micropython/micropython/pull/8533, which shows the features already added. At the moment I'm implementing PWM. That will take a few days. Next on the list are hardware SPI/I2C (SoftSPI and SoftI2C are already present), WDT, RTC, DAC.
My plan is to first extend features that will be supported by both SAMD21 and SAMD51. Once the Firmware size exceed the available space for SAMD21, only extension for SAMD51 will be added. That may also include enhancements for classes present in both device types, like UART.

Note that there is still a bug in TinyUSB. If you paste text into the REPL with echo, the USB output locks up (see https://github.com/micropython/micropython/issues/8521).

Post Reply