Hello Patrick Morrow,
I think no you do not want to edit the .tcl and .mem files for this purpose.
As .tcl file is used to initialize registers, memory locations, and other components on a target board. And .mem file is used to define the rules the debugger follows when accessing a target board's memory.
Instead, this is the work of linker. Please check in your .map file if .text section is located in DRAM (0x80000000). The .map file is locate in the same path as .elf file. And try to add/modify your .ld file(this is the liker files for project, which tell how to build), to put those sections you would like into OCRAM as below:
/* Specify the memory areas */
MEMORY
{
ocram0 (rx) : ORIGIN = 0x10000000, LENGTH = 64K
ocram1 (rx) : ORIGIN = 0x10010000, LENGTH = 64K
m_ram (rx) : ORIGIN = 0x80000000, LENGTH = 512M
}
/* Define output sections */
SECTIONS
{
/* The program code and other data goes into RAM */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} > ocram0
...
}
Have a great day,
Lunmin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------