EasyManua.ls Logo

Abatron BDI2000 - Debugging with GDB

Abatron BDI2000
51 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
bdiGDB for BDI2000 (PowerPC 7440/7450/86xx) User Manual 36
© Copyright 1997-2015 by ABATRON AG Switzerland V 1.13
3.3 Debugging with GDB
Because the target agent runs within BDI, no debug support has to be linked to your application.
There is also no need for any BDI specific changes in the application sources. Your application must
be fully linked because no dynamic loading is supported.
3.3.1 Target setup
Target initialization may be done at two places. First with the BDI configuration file, second within the
application. The setup in the configuration file must at least enable access to the target memory
where the application will be loaded. Disable the watchdog and setting the CPU clock rate should
also be done with the BDI configuration file. Application specific initializations like setting the timer
rate are best located in the application startup sequence.
3.3.2 Connecting to the target
As soon as the target comes out of reset, BDI initializes it and loads your application code. If RUN is
selected, the application is immediately started, otherwise only the target PC is set. BDI now waits
for GDB request from the debugger running on the host.
After starting the debugger, it must be connected to the remote target. This can be done with the fol-
lowing command at the GDB prompt:
(gdb)target remote bdi2000:2001
bdi2000 This stands for an IP address. The HOST file must have an appropriate
entry. You may also use an IP address in the form xxx.xxx.xxx.xxx
2001 This is the TCP port used to communicate with the BDI
If not already suspended, this stops the execution of application code and the target CPU changes
to background debug mode.
Remember, every time the application is suspended, the target CPU is freezed. During this time, no
hardware interrupts will be processed.
Note: For convenience, the GDB detach command triggers a target reset sequence in the BDI.
(gdb)...
(gdb)detach
... Wait until BDI has resetet the target and reloaded the image
(gdb)target remote bdi2000:2001
Note:
After loading a program to the target you cannot use the GDB "run" command to start execution.
You have to use the GDB "continue" command.

Other manuals for Abatron BDI2000