Hi All,
I'm trying to use some part of spifi NOR flash memory to execute the program(XIP). To do that I have changed the linker script as below.
MEMORY
{
...
m_text (RX) : ORIGIN = 0x00010400, LENGTH = 0x0006FC00
m_text_xip (RX) : ORIGIN = 0x17FF7FFF, LENGTH = 0x00008000
...
}
SECTIONS
{
.text :
{
. = ALIGN(4);
*(EXCLUDE_FILE(*spifi_xipFun.o) .text*)
*(.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);
} > m_text
.text_xip :
{
text_xip_start = .;
*spifi_xipFun.o(.text*)
KEEP (*(.text_2));
text_xip_end = .;
} > m_text_xip
}
With the above changes I'm getting bin size as normal and spifi_xipFun.o text is going to m_text only even after being excluded from m_text and included in m_text_xip.
Did I do anything wrong in the exclusion and inclusion of the file?
If I move the .text_2 section before the .text section I'm seeing spifi_xipFun.o text in expected memory that is in range of m_text_xip but the bin size is coming as 400+MB.
Please, let me know as soon as possible if I'm doing something wrong.