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.

CCS/TMS320F28379D: TMS320F28379D

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

I'm writing an assembly language program and building it through CCSv8. 

I'm initialising variables as :

"

.data

a: .word 0xC000
b: .word 0x4000

"

This should initialise the variables a and b with values 0xc000 and 0x4000 respectively.

However, when I'm looking at their respective values in memory, it's showing FFFF and FFFF for both.

Why is it happening?

  • Disassemble your final executable final with a command similar to ...

    % dis2000 --all final_executable.out

    The output you see for the .data section should be similar to ...

    DATA Section .data (Little Endian), 0x2 words at 0x00000040
    00000040        a:
    00000040        ___data__:
    00000040   c000    .word 0xc000
    00000041        b:
    00000041   b000    .word 0xb000

    Is that the case?

    Thanks and regards,

    -George

  • Thanks for the reply.

    Yes, it is showing the same as:

    DATA Section .data (Little Endian), 0x3 words at 0x00000122
    00000122 ___data__:
    00000122 a:
    00000122 c000 .word 0xc000
    00000123 b:
    00000123 4000 .word 0x4000

    So, where is the problem?
  • This proves the assembler and linker work correctly.  The problem must be in how the code is loaded (perhaps flashed?) into the system.  Those details are beyond my expertise.  I'll notify the C2000 experts about this thread.

    Thanks and regards,

    -George

  • That should be all that is necessary to load it to RAM. You're sure you are looking at address 0x122 and 0x123?
    Make sure to be using the appropriate target configuration file.
    I created an ASM file and added it to one of our examples, it loaded and showed in memory.
    Examples in C2000Ware.

    Best regards
    Chris
  • Thank you Christopher.

    Yes, I am looking at correct address and using appropriate target configuration file.

    Can you explicitly send me the link of your example or tell me the name of your example file which you have placed in C2000Ware?
  • I just took any example (specifically I did this one C:\ti\c2000\C2000Ware_1_00_05_00\driverlib\f2837xd\examples\cpu1\led) and added an ASM file with the data as you described above. When loaded, everything looked to loaded into memory.

    Best regards
    Chris
  • Thank you Chris,

    I took one of the example and found that the problem is with the linker.

    I changed the default linker and now address is showing the correct values.

    Regards

    Aquib