Remote Debugging on Zynq Boards

Chris Johns chrisj at
Tue Jan 21 01:22:06 UTC 2020

On 7/1/20 9:58 pm, Vishav.Vishav at wrote:
> I want to remotely debug an RTEMS application on Zynq based board. I have been
> following link:
> I am particularly interested in Libdebugger Executable Debugging. I built the
> rtems-libbsd and found the debugger01 application. I am able to boot this
> application on the target board using tftpboot. This results in gdb server on
> the board. From the host computer, I run *arm-rtems-5-gdb  **myapp*. I am able
> to connect to server using *target remote *I set the
> breakpoint using *break Init *and then *c* to continue. The host machine
> displays *continuing *but never breaks at breakpoint.

If Init is the RTEMS entry point it will have run before you connect because it
is used to start libdebugger. Setting a break point there will not work because
that code is not executabled again.

> Can someone help me know if this is correct way to debug an RTEMS application?

If I need to debug an initialisation issue start libbsd and libdebugger than I
loop checking a volatile int variable looping while it is 0. When the debugger
connects I set a break point where I wish to debug, the volatile int variable to
1 and then hit continue.

A warning, the elf image on the host (myapp) that gdb loads needs to match the
image loaded onto the target. If it does not breakpoints will not work because
GDB is using the wrong address.


More information about the users mailing list