EmbDev.net

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


Author: Jan Bolting (Guest)
Posted on:

Rate this post
0 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

Author: amateur (Guest)
Posted on:

Rate this post
0 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.

Author: Uwe Bonnes (Guest)
Posted on:

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

Author: Jan Bolting (Guest)
Posted on:

Rate this post
0 useful
not useful
Thanks for the hints,

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

regards
Jan

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.