efsl+AT91SAM7S: sudden jump out of RAM-execution

OP #1200868
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
Admin
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.

Reply

A question of your own? This thread is over 17 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.