Hello,
when I take an example from the SDK to run in RAM, the linker script results is created with the following section:
.text : ALIGN(4)
{
*(.text*)
*(.rodata .rodata.* .constdata .constdata.*)
. = ALIGN(4);
} > SRAM_ITC
I wonder if better performance would be achieved by moving .rodata* or .constdata* to DTC, since the instruction (to ITC) and data (to DTC) buses are separate.
What drawbacks should there be to doing this? And why are code and (readonly) data mixed in the SDK examples.
best reagrds
Max
Yes, moving .rodata* or .constdata* to DTC may get better performance. but this kind of image placement is not supported by BootROM, when you want image booted by ROM automatically after power-up.
of course, you can debug such kind of image within IDE project by HW debugger.
you are probably right about the ROM Bootloader not being able to do such a thing, however the SDK examples include the startup code that deals exactly with populating the various types of RAM (ITC, DTC, or OCRAM), so it might not have been an issue.
best regards
Max
Yes, we can do some section relocate work in app startup code, but it is implemented by special initialization by copy sentence in IDE linker file. that means there is only one continuous block in final image file.