Tool/software:
Hi there,
I am unable to generate the valid .mcelf files using genimage.py tool given in MCU+SDK AM263P4.
Example of generated file is as follows:.
/*******************************************************************************************************************/
ELF header
==========
Name Offset NumValue Value
EI_MAG: 0x00000000 0x7F454C46 ELF
EI_CLASS 0x00000004 0x01 32 BIT
EI_DATA 0x00000005 0x01 DATA2LSB (Little-Endian)
EI_VERSION 0x00000006 0x01 EV_CURRENT
EI_OSABI 0x00000007 0x00 UNIX System V ABI
EI_OSABIVER 0x00000008 0x00
E_TYPE 0x00000010 0x0002 ET_EXEC (Executable file)
E_MACHINE 0x00000012 0x0028 EM_ARM (Advanced RISC Machines ARM)
E_VERSION 0x00000014 0x00000001 EV_CURRENT
E_ENTRY 0x00000018 0x00000000
E_PHOFF 0x0000001C 0x00000034
E_SHOFF 0x00000020 0x00000000
E_FLAGS 0x00000024 0x05000000
E_EHSIZE 0x00000028 0x0034
E_PHENTSIZE 0x0000002A 0x0020
E_PHNUM 0x0000002C 0x0013
E_SHENTSIZE 0x0000002E 0x0028
E_SHNUM 0x00000030 0x0000
E_SHSTRNDX 0x00000032 0x0000
Program header tables
=====================
Type Offset VAddr PAddr FileSz MemSz Align Flags
PT_NOTE 0x00000294 0x00000000 0x00000000 0x00000078 0x00000078 0x00000000
PT_LOAD 0x0000030C 0x00000000 0x00000000 0x00000040 0x00000040 0x00000008 Execute|Read
PT_LOAD 0x0000034C 0x00000000 0x00000000 0x00000040 0x00000040 0x00000008 Execute|Read
PT_LOAD 0x0000038C 0x70040000 0x70040000 0x00002000 0x00002000 0x00000020 Execute|Read
PT_LOAD 0x0000238C 0x70042000 0x70042000 0x00002000 0x00002000 0x00000001 Execute|Read
PT_LOAD 0x0000438C 0x70044000 0x70044000 0x00002000 0x00002000 0x00000001 Execute|Read
PT_LOAD 0x0000638C 0x70046000 0x70046000 0x00002000 0x00002000 0x00000001 Execute|Read
PT_LOAD 0x0000838C 0x70048000 0x70048000 0x00002000 0x00002000 0x00000001 Execute|Read
PT_LOAD 0x0000A38C 0x7004A000 0x7004A000 0x00002000 0x00002000 0x00000001 Execute|Read
PT_LOAD 0x0000C38C 0x7004C000 0x7004C000 0x00002000 0x00002000 0x00000001 Execute|Read
PT_LOAD 0x0000E38C 0x7004D5A0 0x7004D5A0 0x00002000 0x00002000 0x00000020 Execute|Read
PT_LOAD 0x0001038C 0x7004E000 0x7004E000 0x00000F70 0x00000F70 0x00000001 Execute|Read
PT_LOAD 0x000112FC 0x7004F5A0 0x7004F5A0 0x00002000 0x00002000 0x00000001 Execute|Read
PT_LOAD 0x000132FC 0x700515A0 0x700515A0 0x00002000 0x00002000 0x00000001 Execute|Read
PT_LOAD 0x000152FC 0x700535A0 0x700535A0 0x00001720 0x00001720 0x00000001 Execute|Read
PT_LOAD 0x00016A1C 0x70054CC0 0x70054CC0 0x00000358 0x00000358 0x00000008 Write|Read
PT_LOAD 0x00016D74 0x7005C560 0x7005C560 0x00001708 0x00001708 0x00000010 Execute|Read
PT_LOAD 0x0001847C 0x7005DC68 0x7005DC68 0x00000670 0x00000670 0x00000008 Write|Read
PT_NOTE 0x00018AEC 0x00000000 0x00000000 0x00000030 0x00000030 0x00000000
Section header tables
=====================
Nr Name Type Address Offset Size Link Info AddrAlign EntSize Flags
Symbol tables
==============
Note tables
==============
- Note table does not exist -
/*******************************************************************************************************************/
The respective .out file from which this .mcelf is generated works fine in debug and release modes. I am adding only 1 .out file for 1 core. It seems that segments are not generated in .mcelf file.
Here is the command I used for generation of .mcelf file:
python genimage.py --core-img=0:hello_world_am263px-lp_r5fss0-0_nortos_ti-arm-clang.out --core-img=1:mcan_loopback_polling_am263px-lp_r5fss0-0_nortos_ti-arm-clang.out --output=HelloWorld.mcelf --merge-segments=0 --t=0 --ignore-context=false --xip=none --xlat="" --max_segment_size=8192
This process does not throw any error. But through debugging, I found that when try to flash this file, no segments are present in file. Thus parsing the note segment (very first segment) throws error and flashing is stopped.
Please send me a valid .mcelf file for reference and help me resolve this .mcelf generation problem.