-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Refine iMX RT memory layout and add three boards #2532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduces a way to place CircuitPython code and data into tightly coupled memory (TCM) which is accessible by the CPU in a single cycle. It also frees up room in the corresponding cache for intermittent data. Loading from external flash is slow! The data cache is also now enabled. Adds support for the iMX RT 1021 chip. Adds three new boards: * iMX RT 1020 EVK * iMX RT 1060 EVK * Teensy 4.0 Related to micropython#2492, micropython#2472 and micropython#2477. Fixes micropython#2475.
Please don't merge. Teensy doesn't work. The 1060 EVK does though. :-/ |
Have you tested this with the uf2 bootloader? |
On power up the FlexRAM banks are in an unknown config so we can't rely on the stack until after we configure FlexRAM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like for you to confirm that you tested this with the uf2 bootloader so my Feather's don't suddenly stop working 😅
@tannewt Just for fun, I downloaded and tried this PR on a Teensy4.0 -- using teensy_loader_cli
One little quirk so far. After soft reboot (and possibly at other times) the first character typed into the REPL is missed (or misinterpreted) edited to add: this is a real issue. I'm not that bad a typist. The first character its often missed , and others appear to be missed on occasion. I have not established a reproducible case yet other than than after a soft reboot (most of the time) . It also seem to be waiting for an extra carriage return at the start of the REPL (sometimes). At least that seems to help when it is misbehaving. I was able to blink the D13 LED ! woohoo! I also noted that the reported size of CIRCUITPY is 1Mbyte -- is this correct? expected 2.
also
|
FYI-- I tried using an I2C device but am getting errors reading the library from the Flash
reading the file -- I don't see any issues with the syntax. Is reading from the Flash still a WIP? I am able to write a simple "blink.py" to the Flash and execute it. Just wondering if the issue is with larger files the error occurs at 0x800 bytes into the .py file (a suspiciously nice round number ;-)
dump from od
|
@jerryneedell I have a feeling its related to enabling the DCache. I think I'll disable it for now. @arturo182 I hear ya about testing with UF2. I just haven't gotten the time to do it. Will ping when this is ready for another look. I also need to update the USB PIDs before committing. |
@arturo182 I wasn't able to get the UF2 bootloader going on my 1010 EVK. I tried to load the feather_mimxrt1011 version from commit 8d7dffe16901833041e75c3e3b6874e490cc4e6b but wasn't able to double tap reset. Is there another spot I should look? It didn't look like TinyUF2 had everything. @jerryneedell This disables the DCache. Let me know if it fixes your issues on Teensy 4. |
@tannewt -- this appears to have worked!! I can read the library files now -- I2C test worked with msa301 accelerometer.
It recovers OK after a power cycle Also tested a NeoPixel Jewel -- Wow between pixelbuf and the speed of the Teensy, the |
regarding the REPL crash on cut/paste, I found that:
works OK
causes it to crash into bootloader mode |
The Flash file system on the Teensy4.0 is also still showing up as only 1Mbyte - is this expected? |
@jerryneedell Thanks! I'll try and check out that crash soon. I'm glad it is working better. The 1MB filesystem is correct. We use the first 1MB of external flash for the bootloader and CircuitPython. The Teensy has a 2MB flash which leaves 1MB for the filesystem. @arturo182's feathers have 8MB so the filesystem will be 7MB. |
@tannewt I don't think I'll have time to look at the uf2 issue until Saturday or Sunday, sorry. You could maybe try tinyuf2, the tinyusb branch was just a proof of concept, but it was working on my Feathers (and still is, haven't flashed it since the original flash). |
@arturo182 Mind if I merge this? I know it's not perfect but I'd like to get it in so it doesn't grow stale. I'll happily follow up with changes to work with the bootloader and other fixes. |
I guess it's fine, even though I haven't had time to test it yet. The Adafruit Feather boards were delayed a week, so I will test this when I'm bringing them up later. |
Ok, thanks! Let me know what needs to be fixed. I'll try to get a feather from @ladyada when she has some. |
Introduces a way to place CircuitPython code and data into
tightly coupled memory (TCM) which is accessible by the CPU in a
single cycle. It also frees up room in the corresponding cache for
intermittent data. Loading from external flash is slow!
The data cache is also now enabled.
Adds support for the iMX RT 1021 chip. Adds three new boards:
Related to #2492, #2472 and #2477. Fixes #2475.