Using specific memory regions in MicroPython modules (DTCM, etc.) #14367
Unanswered
graeme-winter
asked this question in
m.iMX RT / Teensy 4.x
Replies: 1 comment 1 reply
-
ITCM is already used for code. See line 100 and 205 in boards/common.ld. But the areas could be made smaller, if not used. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Default configuration of MicroPython for Teensy 4.1 has 768kB of OCRAM2+OCRAM as the heap, which makes sense for the general use case. If however I want to explicitly use some DTCM or the OCRAM region that is in the TCM, I don't have an option to
m_malloc
in that region in my extension module or define anarray
in the same area?Key part of linker output:
From what I can see on a quick look the TCM isn't really used at all at least explicitly, and it is also true that the relatively large caches in the CPU would mitigate most of the performance issues, but I was still curious as to how this space could be used.
Specifics:
m_itcm
?m_ocrm
?It would also look like the vector table is stored in flash - again maybe this would be cached so wouldn't matter?
which aligns with
I noticed when trying to copy the vector table and update VTOR the board would lock up (I have done this on M0+ and M4 just fine) so again wonder if the cache is doing a lot of work here.
I appreciate using MicroPython on MCU (though this is not really that micro) for relatively heavy lifting is outside the usual and I could just use a proper RTOS like Zephyr, but I was curious.
Beta Was this translation helpful? Give feedback.
All reactions