This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI-RTOS
Hi,
I have a question regarding the functionality of the SBL tool out2rprc.
In the wiki "processors.wiki.ti.com/.../Processor_SDK_RTOS_BOOT_AM57x", we can read that:
"Firstly, application executable is converted from ELF/COFF format (.out) to custom TI Rprc binary image using out2rprc tool. This tool strips out the initialized sections from the executable file (i.e. *.out) and places them in a compact format that the SBL can understand. The output (bin) file is typically much smaller than the original executable (out) file."
And we can see that if we for example create a big static global array in our main file, the *.out file gets bigger, but the size of the result from out2rprc+multicoreImageGen is not increased in the same way. So the out2rprc do what it is supposed to do.
However, if we increase the Global.pktNumFrameBufs from 384 to a higher number, the result from out2rprc+multicoreImageGen increases alot (obviously not in a compact format).
var Global = xdc.useModule('ti.ndk.config.Global');
Global.pktNumFrameBufs=384;
We can see in *project*/Debug/configPkg/package/cfg/*filename*_pa15fg.c (created from .cfg file in project) that the array ti_ndk_config_Global_pBufMem is put in a section "far:NDK_PACKETMEM".
Are we right to assume that this section is not converted into a compact format in the same way as the section used for our main.cpp file?
#ifndef _NDK_MIN_PBM_BUFS #define PKT_NUM_FRAMEBUF 384 #endif /* * Max size buffer * * On L2 cached CPUs, this size must be cache-line multiple * The LogicIO Etherent (Macronix MAC) requires a larger buffer because * it transfers data in 16 byte chunks, and with its pre-pad and data * alignment, it will overflow a 1536 byte buffer. * * This size may be overridden by defining _NDK_MIN_PBM_BUFS. If defined, the * value for PKT_SIZE_FRAMEBUF must also be defined elsewhere. */ #ifndef _NDK_MIN_PBM_BUFS #define PKT_SIZE_FRAMEBUF 1536 #endif const int ti_ndk_config_Global_numFrameBuf = PKT_NUM_FRAMEBUF; const int ti_ndk_config_Global_sizeFrameBuf = PKT_SIZE_FRAMEBUF; /* Data space for packet buffers */ #ifdef __ti__ #pragma DATA_ALIGN(ti_ndk_config_Global_pBufMem, 128); #pragma DATA_SECTION(ti_ndk_config_Global_pBufMem, ".far:NDK_PACKETMEM"); UINT8 ti_ndk_config_Global_pBufMem[PKT_NUM_FRAMEBUF * PKT_SIZE_FRAMEBUF]; #elif defined (__IAR_SYSTEMS_ICC__) #pragma data_alignment = 128 UINT8 ti_ndk_config_Global_pBufMem[PKT_NUM_FRAMEBUF*PKT_SIZE_FRAMEBUF]; #else UINT8 ti_ndk_config_Global_pBufMem[PKT_NUM_FRAMEBUF * PKT_SIZE_FRAMEBUF] __attribute__ ((aligned(128), section(".far:NDK_PACKETMEM")));
Appreciate your help,
Anders Viken.