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.

TMS320F28388D: memory map prevented reading

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

When I was debugging 28388, I found that I could not read the value of any register from the [Expressions watch window]. An example is shown below

In [Register watch window], all the regsitsers value can be read correctly.

The CCS version is 10.2.0.00009

  • Hi,

    Are you debugging a C2000Ware example? If so, which example? What version of C2000 Device Support do you have installed? Do the registers get populated when attempting to enter them in the expressions window?

    Regards,

    Ozino

  • NO, I am debugging my project. But my project uses the drivelib and device_support from C2000Ware with version 3.04.

    Yes, the registers get populated when attempting to enter them in the expressions window

  • Here is what I see in CCSv10.3.0.  One thing that I see that is different is that in my case the "type" shown in the expressions view for me is "Register Group".  For you it is a struct I2CREGS.  That makes me think that in my case it is using the register definition information in CCS and in your case it is using the header files from C2000Ware.

    I am going to try out some other C2000Ware examples to see if I can reproduce what you are seeing.  I will also try CCSv10.2.0 to see if that makes a difference.

    Regards,

    John

  • No luck reproducing with other C2000Ware examples or with CCSv10.2

    Another difference I can see between yours and mine is that your accesses are address@Program and mine are address@Data.  

    Is it possible to get the project or the .out file?

    CCS will give precedence to symbols from the program over the register defintions.  So since your program has the defintions in C that is what it is trying to show.  Can you also send the linker command file?  

    As a workaround you can add this to the expressions view to force CCS to use the register defintions.

    'reg'::I2caRegs

    Regards,

    John

  • I can see  the value of regsiters by using 'reg':: prefix . would you mind tell me your email address? I can send you the cmd file.

  • I just sent you a friendship request.  Once you accept that we can exchange private messages.  

    Regards,

    John

  • Another difference I can see between yours and mine is that your accesses are address@Program and mine are address@Data.

    I imported the example C2000Ware (3.04.00.00) / English / Devices / F2838XD / F28388D / Examples / Bitfield / CPU1 / spi_ex1_loopback into CCS 10.3

    I don't have the hardware to try running the example, but building the example and looking at the map file shows the <peripheral_name>RegsFiles structures used for C200Ware BitFields being allocated to page 0 (Program Memory).

    The C2000Ware_3_04_00_00_Software/device_support/f2838x/headers/cmd/f2838x_headers_nonBIOS_cpu1.cmd file which get added to the example project doesn't define which page the peripheral registers are allocated to, so guess the linker places then in page 0 by default.

    Whereas if look at linker command files for other devices such as C2000Ware_3_04_00_00_Software/device_support/f28004x/headers/cmd/f28004x_headers_nonbios.cmd the peripheral registers are explicitly allocated to page 1 (data memory).

    I think editing the f2838x_headers_nonBIOS_cpu1.cmd file add adding the following PAGE lines before the memory regions for the peripheral registers would fix the problem:

    MEMORY
    {
     PAGE 0:    /* Program Memory */
     PAGE 1:    /* Data Memory */
       ACCESSPROTECTION           : origin = 0x0005F500, length = 0x00000040
    

    I haven't checked for any other linker command files in C2000Ware which are not explicitly allocating peripheral registers for BitField code to page 1 (Data Memory). 

  • Chester,

    Thanks for digging into this.  I will loop in the C2000 team in.

    Vesgine you can add the PAGE statements that Chester shows into the Linker command file to correct the issue.

    Regards,

    John

  • John, Chester,

    Thanks for figuring out the root cause for this. I will create an issue for this problem and it will be resolved in a future version of C2000Ware.

    Best Regards

    Siddharth

  • JohnS, Chester,

    Thank you both. The issue is corrected followed by Chester's suggestion.