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: 51
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: 136
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: 341
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: 51
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.

scruss
Posts: 67
Joined: Sat Aug 12, 2017 2:27 pm

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: 51
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 284 times

Post Reply