Good afternoon. It is not possible to add the IVT header for the axf file, the final file is then clipped.
Input parameters:
scf - file:
#! armcc -E
#define m_interrupts_start 0x00002000
#define m_interrupts_size 0x00000400#define m_text_start m_interrupts_start + m_interrupts_size
#define m_text_size 0x00020000 - m_interrupts_size#define m_data_start 0x20000000
#define m_data_size 0x00020000/* Sizes */
#if (defined(__stack_size__))
#define Stack_Size __stack_size__
#else
#define Stack_Size 0x0400
#endif#if (defined(__heap_size__))
#define Heap_Size __heap_size__
#else
#define Heap_Size 0x0400
#endifLR_m_text m_interrupts_start m_text_start+m_text_size-m_interrupts_size { ; load region size_region
VECTOR_ROM m_interrupts_start m_interrupts_size { ; load address = execution address
* (RESET,+FIRST)
}
ER_m_text m_text_start m_text_size { ; load address = execution address
* (InRoot$$Sections)
.ANY (+RO)
}
RW_m_data m_data_start m_data_size-Stack_Size-Heap_Size { ; RW data
.ANY (+RW +ZI)
* (NonCacheable.init)
* (NonCacheable)
}ARM_LIB_HEAP +0 EMPTY Heap_Size { ; Heap region growing up
}
ARM_LIB_STACK m_data_start+m_data_size EMPTY -Stack_Size { ; Stack region growing down
}
}
imx-itcm-unsigned.bd:
options {
flags = 0x00;
startAddress = 0x0000;
ivtOffset = 0x00001000;
initialLoadSize = 0x00002000;
entryPointAddress = 0x00002000;
DCDFilePath = "dcd.bin";
}sources {
elfFile = extern(0);
}section (0)
{
}
Run elftosb:
elftosb.exe -d -f imx -V -c imx-itcm-unsigned.bd -o ivt_ECP_RT1052_Release.bin ECP_RT1052_Release.axf
The elftosb utility is very unstable, constantly crashes.
For example, the following situation leads to departure:
RW_m_data m_data_start m_data_size-Stack_Size-Heap_Size { ; RW data
.ANY (+RW +ZI).ANY (+RO)
* (NonCacheable.init)
* (NonCacheable)
}
Tell me how to properly process the elf file?
Sorry for bad English
You can also try this tool, with this tool, You can flash bare image into various boot devices easily and don't need to care about headers (ivt, boot data...)
Hi Anton
please check elftosb user guide
https://www.nxp.com/docs/en/user-guide/KBLELFTOSBUG.pdf
and look at app notes describing usage of that tool on :
i.MX RT1050 MCU/Applications Crossover Processor | Arm® Cortex®-M7 @600 MHz, 512KB SRAM |NXP
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------