Sign in

username or email:

password:



Not a member?
Forgot your Password?

Search rabbit-semi



Search tips

Subscribe to rabbit-semi



Discussion Groups

See Also

DSPFPGA

Discussion Groups | Rabbit-Semi | corruption in ram of variables while running

This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. 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.


So far in May, you have voted 0 times ou of a total of 20 votes by the community.
Please help us clean the archives from unuseful discussion threads by using the voting system! Details here.


Is this thread worth a thumbs up?

-2

corruption in ram of variables while running - Stan - May 29 5:15:51 2012

Hi everyone.

Hope someone maybe can help shed some light on something. We are using the BL2100 with 512k/512k. We use Dynamic C 9.25.

with the following enabled

USE_2NDFLASH_CODE
Enable Separate instruction and data spaces

Now sure if any of the settings will help anyone maybe suggest if we can do something to help with the situation we have.

Right now, we use the battery backed ram to hold all variables, configuration structure etc. Even when the system powers off, when the systems powers on, it will use the data in the battery backed ram to setup the system.

We find that maybe after a few weeks or more of running, it seems the system variables gets corrupted sometimes. We are not sure why. Is there anything we can do to maybe minimize this? We do not allocate any arrays etc dynamically. Everything is global variables or that declared inside functions. So not sure how the corruption occurs and after a long time running.

Any insights or suggestions would be great! Thanks!

Stan the man





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

Re: corruption in ram of variables while running - markreds81 - May 29 5:29:43 2012



Hi Stan,
are you sure there aren't any kind of bug software in which you overwrite your global variables (buffer overflows, wrong memory addresses, ecc.)? Some times ago I had the same problem and after a day of debugging I discovered an error when I was calculating the xmem address of my circular buffer (due an implicit typecast of my record index) and I was making an access violation with unexpected behavior of my rcm3700.

--- In r..., "Stan" wrote:
>
> Hi everyone.
>
> Hope someone maybe can help shed some light on something. We are using the BL2100 with 512k/512k. We use Dynamic C 9.25.
>
> with the following enabled
>
> USE_2NDFLASH_CODE
> Enable Separate instruction and data spaces
>
> Now sure if any of the settings will help anyone maybe suggest if we can do something to help with the situation we have.
>
> Right now, we use the battery backed ram to hold all variables, configuration structure etc. Even when the system powers off, when the systems powers on, it will use the data in the battery backed ram to setup the system.
>
> We find that maybe after a few weeks or more of running, it seems the system variables gets corrupted sometimes. We are not sure why. Is there anything we can do to maybe minimize this? We do not allocate any arrays etc dynamically. Everything is global variables or that declared inside functions. So not sure how the corruption occurs and after a long time running.
>
> Any insights or suggestions would be great! Thanks!
>
> Stan the man
>





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

Re: corruption in ram of variables while running - Stan Hsu - May 29 5:51:52 2012

Hi.
We have been trying to see.  Just not sure if there are possibly anything else we are missing or in case someone has seen something beyond code mistakes...

Thanks

Stan

________________________________
From: markreds81
To: r...
Sent: Tuesday, May 29, 2012 5:28 PM
Subject: [rabbit-semi] Re: corruption in ram of variables while running

 
Hi Stan,
are you sure there aren't any kind of bug software in which you overwrite your global variables (buffer overflows, wrong memory addresses, ecc.)? Some times ago I had the same problem and after a day of debugging I discovered an error when I was calculating the xmem address of my circular buffer (due an implicit typecast of my record index) and I was making an access violation with unexpected behavior of my rcm3700.

--- In r..., "Stan" wrote:
>
> Hi everyone.
>
> Hope someone maybe can help shed some light on something. We are using the BL2100 with 512k/512k. We use Dynamic C 9.25.
>
> with the following enabled
>
> USE_2NDFLASH_CODE
> Enable Separate instruction and data spaces
>
> Now sure if any of the settings will help anyone maybe suggest if we can do something to help with the situation we have.
>
> Right now, we use the battery backed ram to hold all variables, configuration structure etc. Even when the system powers off, when the systems powers on, it will use the data in the battery backed ram to setup the system.
>
> We find that maybe after a few weeks or more of running, it seems the system variables gets corrupted sometimes. We are not sure why. Is there anything we can do to maybe minimize this? We do not allocate any arrays etc dynamically. Everything is global variables or that declared inside functions. So not sure how the corruption occurs and after a long time running.
>
> Any insights or suggestions would be great! Thanks!
>
> Stan the man
>



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