Hello everyone,
This is an issue that my co-worker and I observed with various MIMXRT1050EVK board versions. After entering a debug session on a given demo project (ie: gpio_output_led or hello_world_xip or freertos_hello) we noticed that it takes several seconds (in some cases over 15 sec) to step over code fragments. I don't know if this is related, but outright running while in debug mode takes a bit of time for the prints to materialize. This seems to be the case whether a project is running out of RAM or out of hyperflash.
I noticed that if I terminated the debug session for an XiP customized project that redirected prints to serial terminal, the prints to serial terminal were instantaneous after resetting the EVK via SW4. I may be incorrectly drawing the conclusion that the execution delays are explicitly tied to running in debug mode, but either way the delays are repeatable on different boards and for different projects.
I am curious if anyone else is running into this issue.
Solved! Go to Solution.
The delay you see is related to the non-optimal cache handling by the debugger. Most (if not all) of the iMXRT1050 demos are using TCM RAMs for code and/or data. It should be safe to remove the cache management plugin from your launch configuration. Under "Addition options", you should see:
--no-packed --cachelib libm7_cache.so
Edit the "Additional options" to remove the cache plugin (in bold above) leaving only:
--no_packed
You shouldn't see coherency issues. Let us know otherwise.
Thanks and regards,
MCUXpresso Support
The delay you see is related to the non-optimal cache handling by the debugger. Most (if not all) of the iMXRT1050 demos are using TCM RAMs for code and/or data. It should be safe to remove the cache management plugin from your launch configuration. Under "Addition options", you should see:
--no-packed --cachelib libm7_cache.so
Edit the "Additional options" to remove the cache plugin (in bold above) leaving only:
--no_packed
You shouldn't see coherency issues. Let us know otherwise.
Thanks and regards,
MCUXpresso Support
Hi,
Can you be more specific about when this workaround would work and when not? I tried it on two projects. On one of them it worked and single step response time was indeed reduced significantly (from 4-6 seconds to under second in my case). On the second project the code wouldn't even reach 'main'. It got stuck in SCB_EnableDCache where it would never get out of the loop.
Thanks for your support.
Hello Eyal,
I have used the above workaround in several projects running on MCU Xpresso IDE v10.0.2 thru v10.1.1 (build 606) which at the time of this response is the latest IDE available. The workaround was effective for each of my projects. I always started with a project base from an SDK project import. I don't know if that makes a difference in your case.
-Ed.
Thank you, this apparently fixed the slowdown. Will keep an eye on whether this has any side effects. NXP login times out at the validation gateway, otherwise I would mark this as the correct answer.
-Ed.