EmbDev.net

Forum: µC & Digital Electronics Microcontroller (AT91SAM7A3) only crashes when not running with gdb


von Jan Bolting (Guest)


Rate this post
useful
not useful
Hey guys,

I am debugging some code on a AT91SAM7A3 that shows an odd behaviour: as 
long as it is connected by JTAG and run via gdb, everything works fine. 
If I do a power-on reset without running gdb, it boots up fine, but I 
can make it crash by sending some characters on a USART port (what works 
fine while debugging). The crash is 100% repeatable.

That puts me in a bad position because it's kind of hard to hunt down a 
bug that only shows up when the debugger is not connected.

It's a bare-metal system, the code is C and C++, the compiler is 
gcc/g++.

Has anyone experienced anything like this before?

best regards,
Jan

von amateur (Guest)


Rate this post
useful
not useful
Have a look at your asynchronous buffer management?

Maybe your debug environment slows the system down a little so that no 
overflow will occur.

von Uwe Bonnes (Guest)


Rate this post
useful
not useful
Another thing is to check is if the program uses semihosting.

von Jan Bolting (Guest)


Rate this post
useful
not useful
Thanks for the hints,

I will check both possibilities and post it here once I figured out the 
problem.

regards
Jan

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.