Building applications and an OS image for TRACE32-ICD debugging

The TRACE32-ICD needs debug symbols to debug an OS image and the applications within it. To provide these symbols, you must modify the buildfile of your QNX System Builder project to include the debug versions of application binaries and to create symbol files for the startup script and QNX Neutrino microkernel, procnto.

To prepare a QNX OS image for TRACE32-ICD debugging:
  1. Build debug versions of any applications that you plan to debug.

    From the launch bar, you can select an application project in the launch configuration dropdown, choose either Run or Debug as the launch mode, then click Build (Icon: Build button).

    From the Project Explorer, you can right-click a project and choose Build Configurations > Set Active > arch-debug (where arch is the target architecture, such as x86), then right-click again and choose Build Project.

    You should now see the application binaries in the build/arch-debug subdirectories of the projects.

  2. Add the binaries to the buildfile in the QNX System Builder project that defines your OS image.

    For each binary, you must list the target path for storing it, followed by an equal sign (=) and its workspace (host) path. You can use environment variables, such as PWD, in the workspace paths.

    Screenshot of buildfile editor with lines of code specifying target paths for debug binaries at specific workspace (or host) paths

    More information about buildfile syntax and adding content to images is given in the OS Image Buildfiles chapter of Building Embedded Systems.

  3. Request the creation of symbol files for startup and procnto, by adding the [+keeplinked] attribute near the top of the buildfile.

    Screenshot of buildfile editor with "keeplinked" attribute specified above startup and procnto commands

    With this attribute enabled, the mkifs or mkefs utility invoked by the IDE creates .sym files for the two components when building the image.

  4. Disable any watchdogs for the startup script or microkernel. This entails removing the watchdog-enabling options and commenting out the wdtkick command.

    Screenshot of buildfile editor with "keeplinked" attribute specified above startup and procnto commands
  5. Build the image by right-clicking the project entry and choosing Build Project.

    The images subdirectory then contains the IFS and symbol files.