I am new to use ccs v4. I have written a code to produce sine wave. The build was perfectly done. However, while loading the code I am getting the following error:
C55xx: Loader: One or more sections of your program falls into a memory region that is not writable. These regions will not actually be written to the target. Check your linker configuration and/or memory map.
I have used lnkx.cmd as the default linker file and the code I wrote is as follows.
#define BUF_SIZE 40
const int sineTable[BUF_SIZE]={
0x0000,0x000f,0x001e,0x002d,0x003a,0x0046,0x0050,0x0059,
0x005f,0x0062,0x0063,0x0062,0x005f,0x0059,0x0050,0x0046,
0x003a,0x002d,0x001e,0x000f,0x0000,0xfff1,0xffe2,0xffd3,
0xffc6,0xffba,0xffb0,0xffa7,0xffa1,0xff9e,0xff9d,0xff9e,
0xffa1,0xffa7,0xffb0,0xffba,0xffc6,0xffd3,0xffe2,0xfff1
};
int in_buffer[BUF_SIZE];
int out_buffer[BUF_SIZE];
int Gain;
void main()
{
int i,j;
Gain=0x20;
while(1)
{
/*<-set profile point on this line*/
for(i=BUF_SIZE-1;i>=0;i--)
{
j=BUF_SIZE-1-i;
out_buffer[j]=0;
in_buffer[j]=0;
}
for(i=BUF_SIZE-1;i>=0;i--)
{
j=BUF_SIZE-1-i;
in_buffer[i]=sineTable[i]; /*<-set breakpoint*/
in_buffer[i]=0-in_buffer[i];
out_buffer[j]=Gain*in_buffer[i];
}
}
}
Please do reply.
I shall be grateful if my my query is answered.
Thanks in advance