Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Micropython on Teensy 4.1

  1. #1

    Micropython on Teensy 4.1


    I'm trying to get Micropython code to run on a stand alone Teensy 4.1.

    Why I say 'stand alone'? Well, I've got Micropython on it, wrote my code and it works as expected when started from within Thonny.
    There is one thing though: booting on it's own.

    I don't know if this is a question for the Teensy forum or the MicroPython forum.
    It is about booting but I don't know if it's the Teensy or the MicroPython firmware controlling the boot.

    I think the 'note to myself' below pretty much explains the situation.

    So my question is: How can the Teensy be booted from the flash?
    If you need more info, please let me know.


    My note to self:
    Thonny shows :
    MicroPython device/sdcard
    MicroPython device/flash
    == Whithout a '' file nothing is run is not booted at startup
     WILL run startup if placed on the sd card loads and runs by the 'import main' statement inside will NOT run at startup when it's inside the 'flash' directory
    For developing:
    - Place ALL code (,, libraries, folders) in the 'flash directory'
    - This because Thonny f's up and corrupts files when uploading/saving to the sd card
      and it's dead slow
    - When you have a on the sd card when developing, Thonny cannot connect to the REPL
      rename it to so it doesn't get booted
    For deployment:
    - Copy the contents of the 'flash' directory to your computer
    - Take the sd card out of the teensy, put it in your card reader 
      and copy the contents of the flash directory onto the sd card.
    - Put the sd card back in your teensy and it should boot: which loads

  2. #2
    Can this topic be closed?

    I would like to ask my question at the MicroPython forum.
    Please don't reply here.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Please post a link to the question on the MicroPython forum. Then this thread can be closed.

  4. #4
    Ok I will. But that would be in the next week or so.

  5. #5
    Ok, I didn't post on the MicroPython forum but I got it working.

    - On the Teensy's flash: and all other code
    - On the SD card:, webserver files and log files has only one line of code: 'import main'. This loads and runs from the flash.

    When programming I have to remove or rename on the SD.
    If not, Thonny can not connect to the Teensy over USB for programming.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts