Sign in

username:

password:



Not a member?

Search rabbit-semi



Search tips

Subscribe to rabbit-semi



Ads

Discussion Groups

Discussion Groups | Rabbit-Semi | coData Structure Trashed: Run time error

This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions, flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.

coData Structure Trashed: Run time error - swapnil bakare - Apr 8 17:01:03 2008

Hello,
First time, I am facing such issue in last 2 yrs. The code is working from
last 2 yrs fine ... Nothing new added. I am not getting Y the problem is
raised now ??

Code is something like this :
main()
{
loopinit();
while(1)
{
loophead();
costate
{
}
costate
{
status = function();
}
costate
{

}
}//end while
}

int function()
{
//do something
status2 = function2();
return 1;
}
int function2()
{
//storing the root data in xmem using root to xmem :root2xmem()

return 1; // at this point coData structure trashed Run time error
occures...
}
This was not happening previously. No variable/constant changed in the code.
What might be the cause?
What might be the solution to resolve this?

--
Regards,
Swapnil

For those who understand, no explanation is needed. For those who do not
understand, no explanation is possible



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )


Re: coData Structure Trashed: Run time error - Scott Henion - Apr 8 21:01:52 2008

swapnil bakare wrote:
> Hello,
> First time, I am facing such issue in last 2 yrs. The code is working
> from last 2 yrs fine ... Nothing new added. I am not getting Y the
> problem is raised now ??
>
> Code is something like this :
> main()
> {
> loopinit();
> while(1)
> {
> loophead();
> costate
> {
> }
> costate
> {
> status = function();
> }
> costate
> {
>
> }
> }//end while
> }
>
> int function()
> {
> //do something
> status2 = function2();
> return 1;
> }
> int function2()
> {
> //storing the root data in xmem using root to xmem :root2xmem()
>
> return 1; // at this point coData structure trashed Run time error
> occures...
> }
> This was not happening previously. No variable/constant changed in the
> code.
> What might be the cause?
> What might be the solution to resolve this?
>
> -
Did you update the compiler? I find the later versions are buggy on
costates.

The compiler needs to track stack usage. It often gets confused. Keep
function variables small or static.

Because of these problems, i have gone away from costates and use my
CoExec. It is simpler, faster and ANSI.

--
------------------------------------------
| Scott G. Henion| s...@shdesigns.org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesigns.org |
------------------------------------------
Rabbit libs: http://www.shdesigns.org/rabbit/
today's fortune
James Cameron wanted Chuck Norris to play the Terminator. However, upon reflection, he realized that would have turned his movie into a documentary, so he went with Arnold Schwarzenegger.


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: coData Structure Trashed: Run time error - swapnil bakare - Apr 9 7:32:18 2008

Hi Scott,
No, I have not changed compiler nor it's new installation. Using DC
8.61. Nothing has changed from working code, compiler, Rabbit board, PC.
Any suggestion !!!

Regards
Swapnil
--- In r...@yahoogroups.com, Scott Henion wrote:
>
> swapnil bakare wrote:
> > Hello,
> > First time, I am facing such issue in last 2 yrs. The code is working
> > from last 2 yrs fine ... Nothing new added. I am not getting Y the
> > problem is raised now ??
> >
> > Code is something like this :
> > main()
> > {
> > loopinit();
> > while(1)
> > {
> > loophead();
> > costate
> > {
> > }
> > costate
> > {
> > status = function();
> > }
> > costate
> > {
> >
> > }
> > }//end while
> > }
> >
> > int function()
> > {
> > //do something
> > status2 = function2();
> > return 1;
> > }
> > int function2()
> > {
> > //storing the root data in xmem using root to xmem :root2xmem()
> >
> > return 1; // at this point coData structure trashed Run time error
> > occures...
> > }
> >
> >
> > This was not happening previously. No variable/constant changed in the
> > code.
> > What might be the cause?
> > What might be the solution to resolve this?
> >
> > -
> Did you update the compiler? I find the later versions are buggy on
> costates.
>
> The compiler needs to track stack usage. It often gets confused. Keep
> function variables small or static.
>
> Because of these problems, i have gone away from costates and use my
> CoExec. It is simpler, faster and ANSI.
>
> --
> ------------------------------------------
> | Scott G. Henion| shenion@... |
> | Consultant | Stone Mountain, GA |
> | SHDesigns http://www.shdesigns.org |
> ------------------------------------------
> Rabbit libs: http://www.shdesigns.org/rabbit/
> today's fortune
> James Cameron wanted Chuck Norris to play the Terminator. However,
upon reflection, he realized that would have turned his movie into a
documentary, so he went with Arnold Schwarzenegger.
>

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )