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.

unable to watch values,view graph, write to file etc.. in CCS 3.1

Other Parts Discussed in Thread: TMS320F2812

HI,

I started learning CCS just a week back, i am using CCS free trail v3.3, i read some tutorials provided by CCS and now started a fresh program.

we wanted to use TMS320F2812 for our up coming motor control application so configuration in CCS is chosen as TMS320C28XX simulator. 

i wanted to generate a sinewave from CCS in simulation mode so wrote very simple program and the code is as follows:

# include<stdio.h>

void main()
{

int a[5000], t=0, k=1,i=0;

while (t<=500)

{

a[i] = k*sin(2*3.14*60*t);

t=t+0.1;
i=i++;

}

}

i used some standard .gel and .cmd  and .lib files given in tutorial i.e sim2812.gel,  Aux_linker.cmd and rts2800_ml.lib

i build my program and loaded my program and run. here are my questions

1). i opened watch window to view values of i, k,t, a  but all are shown as zero, but some values in array  at index 2548 started showing as 2989 and same value till index 3059  and form index 3060 value column displays " memory map prevented read of target memory at 0X000010, and there is a error message in message window.. the errors is 

Can't Run Target CPU: Can't write to data memory 0x1794, check memory config [-2184]   is this error because of my linker file data?

currently i don't have my development board i am working only in simulation environment.

2). to use "sin" do i need to load any other library files? where will the math functions and trigonometric functions reside?

3). i created break point to atleast write data to file so used break point manger, breakpoint  created at line a[i] = k*sin(2*3.14*60*t)  and in actions column selected write to files and browsed .dat file ( fresh note pad file already created in folder) , and start address 'a' and length is provided but once i run error message appears same error with some other data address. i am not sure why no data is written to file.

4). similarly tried even graph for variable "a" but nothing got displayed.

i am attaching .cmd file for your reference.

as i am working on simulation mode i did not change .cmd file fields by looking a memory map of TMS320F2812.

 

  • hello,

    sangeetha badugu said:
    Can't Run Target CPU: Can't write to data memory 0x1794, check memory config [-2184]   is this error because of my linker file data?

    It is because the startup gel file (sim2812,gel) sets up the debugger memory map and that address is not defined as accessible:

    From sim2812.gel:

    /********************************************************************/
    /* F2812 Memory Map */
    /* */
    /* Note: M0M1MAP and VMAP signals tied high on F2812 core */
    /* */
    /* 0x000000 - 0x0007ff M0/M1 SARAM (Prog and Data) */
    /* 0x000800 - 0x000fff Peripheral Frame0 (PF0) (Data only) */
    /* 0x002000 - 0x003fff XINTF ZONE 0 (Prog and Data) */
    /* 0x004000 - 0x005fff XINTF ZONE 1 (Prog and Data) */
    /* 0x006000 - 0x006fff Peripheral Frame1 (PF1) (Data only) */
    /* 0x007000 - 0x007fff Peripheral Frame2 (PF2) (Data only) */
    /* 0x008000 - 0x009fff L0/L1 SARAM (Prog and Data) */
    /* 0x080000 - 0x0fffff XINTF ZONE 2 (Prog and Data) */
    /* 0x100000 - 0x17ffff XINTF ZONE 6 (Prog and Data) */
    /* 0x3d7800 - 0x3d7fff OTP (Prog and Data) */
    /* 0x3d8000 - 0x3f7fff FLASH (Prog and Data) */
    /* 0x3f8000 - 0x3f9fff H0 SARAM (Prog and Data) */
    /* 0x3fc000 - 0x3fffff XINTF ZONE 7 (MPNMC=1) (Prog and Data) */
    /* 0x3ff000 - 0x3fffff BOOT ROM (MPNMC=0) (Prog and Data) */
    /********************************************************************/

    you need to make sure your linker command file is in sync with the get startup file. The root of all your problems may be because of a mismatch.

    Thanks

    ki