Teensy 4.0 & 4.1

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.
User avatar
RobH
Posts: 91
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: Teensy 4.0 & 4.1

Post by RobH » Sat Jun 05, 2021 9:34 am

I am missing something.... tried to install mpremote with:

Code: Select all

python3 -m pip install mpremote
which reports: Requirements already satisfied (2 lines:: for mpremote and pyserial)
but after that 'mpremote' on the commandline gives 'command not found'
It looks like I need to do something additionally, but what?

So for the time being I call the python script explicitly from micropyton/tools/mpremote, which seems to have the same effect. And the mount option is very convenient, thanks for the hint!

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Teensy 4.0 & 4.1

Post by pythoncoder » Sun Jun 06, 2021 4:31 am

I don't know. I installed with

Code: Select all

pip3 install mpremote
with no problems. Here is where it installed to:

Code: Select all

[adminpete@capybara]: ~
$ which mpremote
/home/adminpete/.local/bin/mpremote
Peter Hinch
Index to my micropython libraries.

User avatar
RobH
Posts: 91
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: Teensy 4.0 & 4.1

Post by RobH » Sun Jun 06, 2021 7:58 am

Thanks Peter, that did it!
BTW With my first attempt I followed the instructions for installing packages which I found at PyPi.org.

alphaFred
Posts: 31
Joined: Wed Apr 15, 2020 6:47 pm

Re: Teensy 4.0 & 4.1

Post by alphaFred » Tue Jun 15, 2021 4:28 pm

Great to hear that someone is actually using the mimxrt port.

Thanks to the great work of Roberthh we made good progress in the last couple of weeks. But there are still a lot of things to do :D .

User avatar
RobH
Posts: 91
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: Teensy 4.0 & 4.1

Post by RobH » Tue Jun 15, 2021 7:28 pm

Yes, I'm very happy with the developments of MP for the Teensy 4.0/4.1!
Just tested a TFT display with ST7789. Addition of the C-module (author russhughes) gave no problems and the display works (slowly, probably due to max baudrate 500000 of SoftSPI).

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

Re: Teensy 4.0 & 4.1

Post by Roberthh » Tue Jun 15, 2021 8:13 pm

I just made a PR for hard SPI.
Edit: SPI device numbers start at 0. So the SPI ports at the Teensy 4.0 is SPI(0), and the second port is SPI(1). I have to add the list of Pin and SPI port numbers for the various boards.

User avatar
RobH
Posts: 91
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: Teensy 4.0 & 4.1

Post by RobH » Sun Jun 20, 2021 8:32 am

About 2 weeks ago I mentioned these performance figures with pystone_lowmem:
RobH wrote:
Fri Jun 04, 2021 7:02 pm

Code: Select all

 ESP32     1231 pystones / second
 Teensy40  3782  pystornes / second
That was with firmware 1.15-186. With newer firmware 1.15 versions I found for the Teensy figures around 4350. But with 1.16-2 I see now figures around 2650. What could be the explication for these big differences?

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

Re: Teensy 4.0 & 4.1

Post by Roberthh » Sun Jun 20, 2021 8:59 am

No clue. the difference between latest V1.15.xxx and V1.16.2 is just the version number. I did not see any performance drops on Tennsy 4.0. Make sure that you compile with DEBUG=0.

User avatar
RobH
Posts: 91
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: Teensy 4.0 & 4.1

Post by RobH » Sun Jun 20, 2021 11:46 am

I added DEBUG=0 to the make call, but it seems not to make a difference.

I repeated pystone_lowmem.py for TEENSY 4.0 with some older firmware versions I had kept.
1.15-184 4269 pystones/second
1.15-216 4244
1.16 2627
1.16-2 2616

By simply including C-modules for support of ST7789 TFT displays I see another performance degradation of around 15%

For completeness also a simple re-check for the ESP32:
1.15-186 1234
1.16-2 878

So performance degradation is comparable for both types.

I'm not unhappy with the absolute performance, but the differences between firmware versions presumably without significant performance related changes makes me very curious (/ concerned).

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

Re: Teensy 4.0 & 4.1

Post by Roberthh » Sun Jun 20, 2021 12:52 pm

That's interesting and should indeed not happen. Maybe you should raise an issue.

Post Reply