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.

fatal error #16001: object files have incompatible byte orderings



Hello,

I am back with my errors and confusions, Well, I have written one matrix to matrix multiplication code, I am trying to run on simulator and While doing this I am having some doubts. Please go through the attachment for my code. My doubts are as follows:

1.

int main()
{
int x, y, i, j, k, tr;
long A[N][N], B[N][N], C[N][N];

In this way, if I define N >15, then on running on individual or group of cores, it hangs, I mean I am not getting any output on console. For N<= 15, it works fine.

 But, If i do like this:
 
long A[N][N], B[N][N], C[N][N];
int main()
{
int x, y, i, j, k, tr;
In this way, it runs for N=1000, and for N>1000 it gives me some error about size of L2SRAM, which makes sense. 

I am wondering why this is actually happens? What I think is may be under function main, it goes on some stack whose size may be small, which is not the case while defining it 
above the main function.


2. Now, I was trying to optimize my code by changing compiler options , like optimization level I have selected 3, I have checked program mode compilation and I have also 
disable software pipelining, but on building, I am getting something like this error:

**** Build of configuration Debug for project matmul ****

D:\ti\ccsv5\utils\bin\gmake -k all

'Invoking: C6000 Compiler'

"D:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6600 -g -O3 -ms3 --program_level_compile --include_path="D:/ti/ccsv5/tools/compiler/c6000/include" --display_error_number --diag_warning=225 --big_endian --disable_software_pipeline --profile:power --abi=eabi --opt_for_speed=5 --cmd_file="./configPkg/compiler.opt" "../2d.c"

"../2d.c", line 15: warning #179-D: variable "tr" was declared but never referenced

<Optimizing>

<Generating>

<Assembling>

'Finished building: 2d.obj'

' '

'Building target: matmul.out'

'Invoking: C6000 Linker'

"D:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6600 -g -O3 -ms3 --program_level_compile --display_error_number --diag_warning=225 --big_endian --disable_software_pipeline --profile:power --abi=eabi --opt_for_speed=5 -z -m"matmul.map" --warn_sections -i"D:/ti/ccsv5/tools/compiler/c6000/lib" -i"D:/ti/ccsv5/tools/compiler/c6000/include" --reread_libs --rom_model -o "matmul.out" -l"./configPkg/linker.cmd" "2d.obj" -l"libc.a"

<Linking>

fatal error #16001: object files have incompatible byte orderings ("2d.obj" =

big endian, "D:\Arun Mishra\workspace\matmul\Debug\configPkg\package\cfg\matmul_pe66.oe66" =little endian)

>> Compilation failure

gmake: *** [matmul.out] Error 1

gmake: Target `all' not remade because of errors.

**** Build Finished ****


What I am missing, Kindly help.
7180.matmul.pdf

 

  • Arun said:
    What I think is may be under function main, it goes on some stack whose size may be small, which is not the case while defining it 
    above the main function.

    Local variables will go on the stack so yes, you could be running out of stack space. The other thing to check is if you have sufficient heap as C I/O routines such as printf take up a lot of heap. Here are a couple of wiki article references on this topic:

    http://processors.wiki.ti.com/index.php/Tips_for_using_printf
    http://processors.wiki.ti.com/index.php/Stack_and_Heap_size_requirements

    Arun said:

    <Linking>

    fatal error #16001: object files have incompatible byte orderings ("2d.obj" =

    big endian, "D:\Arun Mishra\workspace\matmul\Debug\configPkg\package\cfg\matmul_pe66.oe66" =little endian)

    This error is saying that you are linking together object files with different byte orderings, in this case, 2d.obj is big endian and the object file generated by BIOS is little endian.

    What RTSC target and platform did you select in your project? You can check it under Project Properties->General->RTSC tab.
    What specific versions of CCS, BIOS, RTSC, CGT are you using?

    In my simple test I noticed that BIOS seems to automatically adjust the project's build options to match the endianness selected within the RTSC target so as to not generate this error.

    Does this error only appear when adding certain specific build options, such as --program_level_compile?

  • Hello Aarti, 

    Thanks for your reply.

    1. I understand may be I was running out of stack space, but my concern is it is only 15x15 matrix, how then we will do higher sizes like 5000x5000 and more for performance calculations. Anyways, I am checking for heap sizes and as per wiki links I will do it.

    2. As far as RTSC is concerned, target I have selected is : ti.targets.elf.C66, Platform selected is: ti.platforms.evm6678, I am using CCS5.1.1, BIOS _MCSDK_02_00_05
    and, Yes this error arises only after selecting those specific build options, Actually I was trying to see if changing some optimizations properties, there would be some change in running.


    Can you also suggest something If I want to see every details of my data where they are residing in registers and all, and also How can I place my data manually on different memory locations , like, If I want to put my data on say MSMC, or L2SRAM, or DDR3.

    Thanks.

  • Arun said:
    Yes this error arises only after selecting those specific build options.

    Looking closer at your options, I see that the --big_endian option is being passed to the compiler while the RTSC platform chosen  (ti.targets.elf.C66) is little endian. If you previously had a project that was building without error, then the --big_endian must have somehow got added to the options. Not sure if that happened by user error or something else triggered it, but you should be able to disable that option and get it to build again. The option is available under Project Properties->Build->Compiler->Runtime Model Options.

    To control allocation of your code or data to different memory locations, you can either modify the RTSC platform or add your own custom linker command file depending on what you want to control. Please see these related threads for more information:

    http://e2e.ti.com/support/embedded/bios/f/355/t/108039.aspx
    http://e2e.ti.com/support/embedded/bios/f/355/t/56658.aspx