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.

Compiler/TMS320C6748: Where is my binary really putting my .text information?

Part Number: TMS320C6748

Tool/software: TI C/C++ Compiler

Trying to understand why loaded data is different than i think it should be.

My project is compiled under Linux using an older toolset ; typical files are compiled like this ;
ti_c6x_v7.2.3_linux/bin/cl6x -eo .obj  -gq -ml3 -al -s -dCHIP_6748 -mv6740
likewise for the linker element;
ti_c6x_v7.2.3_linux/bin/lnk6x -c ...  -o tslave1Ctl.out -m tslave1Ctl.map

if i add some compiler flags to generate a listing file for my source.c files i can see the relative offset for opcodes
for the .text sections.

     750 00000000           _sysjob:
     751                    ;** --------------------------------------------------------------------------*
     752                            .dwcfi  cfa_offset, 0
     753                            .dwcfi  save_reg_to_reg, 228, 19
     754 00000000 01BC54F6             STW     .D2T2   B3,*SP--(8)       ; |41|

 If i use the map file produced from the linker - i can determine where the .text section from the various
modules are linked.

                  c6077100    00001dc0     sysreq.obj (.text)

 If i read the memory locations that i believe hold the .text data for which i have a listing file for ,
the data values ( opcodes ) do not agree.

dm c6077100
    Addr     Data
c6077100: ac4531f7  1838428  188c068    c0264

so using a similar disassembler for discovery ( again under linux );
TMS320C6x Disassembler                  v7.2.3
Tools Copyright (c) 1996-2011 Texas Instruments Incorporated

 ../dis6x -mv6740 -o=0xac4531f7
 [ A2]  STNDW.D2T2    B25:B24,*--B17(9)

trying the other endian... as a curiosity.
 ../dis6x -mv6740 -o=0xf73145ac
 .word         0xf73145ac


Can anyone explain the disagreement?
What am i missing?

Thanks

  • You demonstrate that the final address of the .text input section from the file sysreq.obj is 0xc0677100.  But that still does not guarantee that the symbol _sysjob is also at this location.  What is the value of the symbol _sysjob?  Presuming it is different, does the instruction at that address match the assembly listing?

    Thanks and regards,

    -George

  • Run the standalone disassembler (dis6x) on the executable output file (tslave1Ctl.out) and look at address c6077100. You should find the beginning of the .text input section from sysreq.obj, which presumably starts with _sysjob. If it does not, it does not match the map file, and something weird is going on.

    How do you get the program from the executable object file into target memory? Do you use CCS or some other loader? Are you using the TI hex conversion utility?