Thank you all so much for sharing your knowledge. Stumbling my way through some of the intricacies of Teensy. Looking into how "padding" changes with these tweaks. I'm guessing once it hits 32k then I'll see a big jump in available RAM1 and...
The chunk size is 32KB.
Padding will grow as noted in p#11 as code moves from RAM1 until it crosses the next 32K boundary leaving that chunk free and then moving to the next one.
All code not marked as FLASHMEM is by default FASTRUN into RAM1
@macardoso: RAM is allocated in chunks (16K / 32K ?), so until you move enough functions from RAM to FLASH to free up an entire chunk, the primary thing that you will see will be a gradual change in the "padding" number as you move more and more...
Paul, I followed this and seemingly saved a bunch of RAM1. Then due to some errors with moving data structures into RAM2 and crashing things, I reverted back to an old save point and tried again (with much more granular checks between changes)...
That's a good question. I'm very much a novice here, so please bear with me. My understanding is that malloc() adds all new variables to RAM2, however several libraries (notably FreeRTOS) use newlib allocation that places dynamic allocation into...
Implemented a couple "FLASHMEM" calls in non-critical code.
Smallest Code with LTO: 153.9kB free
Faster (Default): 47.6kB
Think I'm safe again for a while...
Tried a couple, need to evaluate task timing and DAC output with Scope still. Don't feel the most comfortable with how inconsistent the results are with each compile option.
Faster: 14.8kB available - crashes
Faster with LTO: 20.0kB - works...
I haven't yet, although I'll give it a try. I'm using high speed, low latency ISRs up to 64kHz, fast RTOS task context switching and preemption, SPI (2 channels @ 60MHz), UART, I2C, DMA, etc. Reading about "Smaller" compile option sounds like a...
Use FLASHMEM on functions that aren't performance critical. That moves them completely out of RAM1 so they run directly from flash. The flash memory is slow, but it's cached, so you only suffer that slowness for cache misses.
Since the sticky thread recommended project photos, they are attached here.
Teensy 4.1
TI DAC8563 eval. board (+/-10V analog out to servo drive as torque reference)
4 inputs, 4 outputs, optoisolated 24VDC
MAX14789 transceiver for RS485 serial...
Hi All,
Related to my previous post but more general. I have a large project running on Teensy 4.1 to make a real-time inverted pendulum controller. The teensy is responsible for all tasks, except for torque amplification of the AC servo motor...
Didn't know that existed - thank you. Brand new to LVGL. Big learning curve but it is very cool to see my project working and interactive on a touchscreen.
Whew! God bless you. That was it. This lets me keep the Squareline export completely unmodified. Everything compiled and didn’t crash at runtime with dynamic allocation. Only have 44k left to play with in RAM1.
TL : DR: How to move image source code from .c files from RAM1 to PROGMEM/FLASH?
Problem Statement: I need to move a number of static images (189kB) out of RAM1 to avoid over-allocating memory on my project. The images are for on-screen buttons...
Much appreciated for the feedback. I don’t frequent the threads and updates so it’s a bit of a slog to try to read through everything a parse what is current info vs deprecated.
It’s probably worth picking up one of these screens. I’ve been...
Working on developing a personal project which is primarily be focused in high speed AC servo motion control and I’d like to utilize a touchscreen with LVGL to display telemetry and basic control interface. Using Teensy 4.1.
I’ve gotten a 2.4”...