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.

C6748 variable value problem.

Hi, I had a problem.

I don't know why. But I found something. 

1. Changed variable is random and certain value. When I found this value, That is same to A or B registers in core register. (ex, A3 register is 0x64004000. Then 'a' is 0x64004000)

2. Occured problem can not predict, and happen suddenly.

Reference this post.

 

I wonder lnk.cmd problem. I'm using lnk.cmd is below;

MEMORY

{

   CACHE_L1P   : origin = 0x11e00000,  len = 0x8000

   CACHE_L1D   : origin = 0x11f00000,  len = 0x8000

   DDR         : origin = 0xc0000000,  len = 0x8000000

   IRAM        : origin = 0x11800000,  len = 0x40000

   L3_CBA_RAM  : origin = 0x80000000,  len = 0x20000

 

SECTIONS

{

    .vecs > IRAM

    .text       >       IRAM

    .stack      >       IRAM

    .bss        >       IRAM

    .cinit      >       IRAM

    .cio        >       IRAM 

    .const      >       IRAM

    .data       >       IRAM

    .switch     >       IRAM 

    .sysmem     >       IRAM

    .far        >       IRAM

    .ppdata     >       IRAM

}

 

I can not find the reason of problem. Give me some advice. Thank you.

  • Did you fix the things Brad Griffis told you to fix in your program?

    pilhwan doe said:
    Changed variable is random and certain value. When I found this value, That is same to A or B registers in core register. (ex, A3 register is 0x64004000. Then 'a' is 0x64004000)

    A and B registers are what the C674x core uses to store intermediate values. If a memory variable is accessed, it is done using 1 or more of these registers. But if you are debugging C code, you should never need to look at these registers under normal conditions. This is quite advanced to be trying to understand how the registers are used.

    I think you are saying that randomly some variable 'a' gets changed to 0x64004000 but it should instead be some other value. Is this correct?

    Can you search through memory for some other memory location that may have this value 0x64004000? If you find it, then perhaps the code that writes to that location is inadvertently writing to 'a'.