Creating a launch configuration

To debug using the Abatron BDI2000 Debugger, you need to create a debug configuration in the IDE to upload an image to the target board, and then debug the image through the JTAG pins.
To create a launch configuration to work with the BDI2000 device:
  1. In the Images directory in the System Builder Projects view, right-click the .elf file and select Debug As > Debug Configurations…
  2. Create a new instance of the GDB Hardware Debugging debug configuration.
  3. On the Main tab, specify the name of your project and select the appropriate .elf or .srec file as the C/C++ Application.
    You want to select the image file that will be uploaded to the target board's RAM through the JTAG pins.
  4. Click the Debugger tab.
  5. Change the GDB Command field to the path of a gdb debugger appropriate for your target architecture (e.g., ntoppc-gdb.exe).
  6. In the Remote Target area, select the Use remote target checkbox and ensure that the JTAG Device combo box is set to Abatron BDI2000.
  7. Verify that the Host name or IP address field is set to the IP address assigned to the BDI2000 device.
    Unless otherwise specified on the Debugger tab, the port number to use is 2001.
  8. Click the Startup tab.
  9. Select the Reset and Delay (seconds) checkbox, and enter the number of seconds to wait between resetting the target board and halting it to send the image.
    You should allow enough time to bring up all hardware.

    Since just about every board loaded with a U-Boot, IPL, or ROM Monitor needs to wait a few seconds for the prompt before halting the processor to send the image, a delay of 3 seconds is sufficient for waiting between resetting the board and starting to load the image.

  10. Check the Halt checkbox to stop the target in order to start sending the image.
  11. If there are any monitor commands you would like to execute before sending the image to the target, type those commands in the Halt field.
    Individual commands should be separated by newlines and prefixed with the keyword monitor and a space. You don't need to add commands to restart or halt the board, as this is done automatically.
  12. Check the Load image checkbox and specify the image file.
    You can type the filename into the top text field or click one of the buttons next to it to open a file selector and then navigate to and select the image file. You want to select the .elf or .srec file that will be uploaded to the target board's RAM through the JTAG pins.
  13. In the Image offset (hex) text field, type the number previously noted in the Properties view, in Step 11 in "Building a system image".
  14. Check the Load symbols checkbox and in the top text field, specify the symbol file.
    You can specify the symbol file in the same ways as you can specify the image file.

    The symbol file provides information for source-level debugging. For most BSPs, the symbol file has the same name as the image file, except for the extension (.sym). Note that the IDE issues a warning message if you build the image without debug symbols. Leaving this textbox blank results in no debug symbols being loaded, allowing for assembly-level debugging only.

  15. In the Symbols offset (hex) field, type the value in the first column of the console output line containing .sym, in Step 13 in "Building a system image".
  16. Check the Set program counter at (hex) checkbox and type the value in the third column of the console output noted earlier.
  17. Check the Set breakpoint at checkbox and type the name of the function you want to set as the initial break point, for example _main.
  18. Check the Resume checkbox.
  19. In the Run Commands field, type any GDB commands that you would like to have automatically executed after the image and symbols have been successfully uploaded to the target. For example, you can type the si command at the end of this box to start stepping.
  20. Click Apply.
  21. Click Debug and begin debugging.