EmbDev.net

Forum: ARM programming with GCC/GNU tools efsl+AT91SAM7S: sudden jump out of RAM-execution


von Chris B. (chris301)


Rate this post
useful
not useful
Hello,

I have integrated efsl into my application on AT91SAM7S256 
(olimex-board, yagarto-toolchain). I can create and write files on 
SD-cards, everythings works fine.

However when i remove the SD-card while efsl is busy writing, strange 
things happen: in case the program is located in RAM, pc jumps for some 
reason to a memory location outside the program's RAM-section. I haven't 
confirmed 100%, but it seems like pc jumps to adress 0.
When the program is located in FLASH, this jump most probably also 
occurs, but the program continues to work.

Watchdog is disabled and reset is also not triggered by interrupts, 
timeouts etc.

The application environment (makefile, linker file, startup-file etc.) 
should be OK, as i have been using it since a while and never observed 
such a behaviour.

Besides any hints on this problem i would also be grateful if you could 
tell me how to check the last line of valid RAM-code before PC jumps to 
0000 (or any other adress outside of the valid RAM-area).


chris

von Andreas S. (andreas) (Admin)


Rate this post
useful
not useful
Check the content of the link register (r14) and the call stack 
("backtrace" in gdb), this will give you the functions that were called 
before the error occured. It's not always that easy, because the stack 
might already have been corrupted by the program at this point, but it's 
a good place to start.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.