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.