I am using the MIMXRT1050-EVK Board which uses the ARM-Cortex M7
processor on Keilv5 Professional version. I am trying to create a ram
test and then move code from the flash to external ram for execution.
I am using the MDK Hello World example as a base for my project. I
have tried to run a simple RAM test by copying over data to an
external RAM address and reading it, but the program just hangs. My
1. What do I need to do in the flash settings to use the external
2. Do I need to edit the startup file to use external RAM?
3. Are there any external RAM testing example projects using the
4. How can I move code from the flash to external RAM for
5. I have tried to assign a source file to the RAM space using the
Memory Assignment in the file properties, but the code still runs in
flash. How can I assign code to be saved and executed from external
ram using the memory assignment settings?
I have tried to follow other examples of external RAM tests but
have not gotten anything to work. Any help is appreciated.
For download/debug in RAM you'd need to create a Debug Script
(.INI) that brings up your external memory interface (ie clock, pins,
peripheral, memory), and then LOADs the .AXF image into the RAM space
you now have working.
For an app you have stored in FLASH, you need to write code,
normally in SystemInit() to bring up the external memory, and once
done the __main function will be able to unpack the LOAD REGIONs you
describe in the Scatter File (.sct) to whatever internal/external
RAMs you have functioning. Once __main initializes the statics it
calls your main() function.
Thanks for the explanation. Are there any examples of this method
in the pack installer or elsewhere? I understand the general idea of
setting up the RAM and using it, but I need help with the
Perhaps look for *.ini files under the Keil directory trees.
The process is involved because you must directly poke a lot of
registers using the _WDWORD() function.
Step 1 would be for you to refactor the C code doing the External
RAM configuration into a sequence of 32-bit memory writes into the
clock and memory interface register.
Step 2 test that code
Step 3 translate to the equivalent sequence in the debugger
It is a complex and tedious process, and will require an
understanding of the MINXRT1050, the chip, the board, the external
memory, etc. Not something I'd touch in an unpaid capacity, and
without a board.
View all questions in Keil forum