[SOLVED] static rom unsigned char string not pass correctly to the unsigned char array

Status
Not open for further replies.

dhakeparag81

Full Member level 2
Joined
Jun 6, 2012
Messages
142
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
INDIA
Visit site
Activity points
2,469
Hello there,

When i am try to use array of char after compilation it gives me error,"stack frame too large.
i am declare it in function,
so i used static rom unsigned char compiled successfully:smile:
But when i debug it i come to know the value of static rom..... not passed correctly to unsigned char array.:bang:

Any help?
compilation is successful.
pseudo code

Code:
void gsm_msg(unsigned char var)
{
     rom static unsigned char gsm_msg4[20]={"Date Halt"};
     
	switch(var)
	{
		case 1:
			for(i=0;i<20;i++)
				serial_out[i]=gsm_msg1[i];
		break;
		
		case 2:
			for(i=0;i<20;i++)
				serial_out[i]=gsm_msg2[i];
		break;

}
 

Attachments

  • sting_error1.jpg
    241.7 KB · Views: 161


Found Solution.

Actually my code is very large in size may be memory exceeded.
i used static rom far unsigned cha
check above link for clarification.
https://www.microchip.com/forums/m121587.aspx
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…