Using the debugger

A typical use case is to implement a new feature inside the IDE and build the executable file. After the Trace32 launch configuration starts, through the use of a PRACTICE script, it automatically downloads the modified binary to the target.

The program is then started and debugged inside the Trace32 Debugger. When an error is detected and its location identified, you can right-click inside any window with source code and select Edit source to return to the IDE. The IDE will open the requested file and position the cursor on the correct line.

After you correct the error, you can set a breakpoint at the same location from within IDE (see Using breakpoints and watchpoints). The breakpoint is communicated to the TRACE32 Debugger. After rebuilding and reloading the program, you can restart it again; the processor will stop at the breakpoint you set earlier.

As is common for IDE-based projects, all source code needs to be organized within projects. If a source file isn't part of a project, the plugin can't communicate breakpoints, or provide the required functionality.

If you need to change the IP address, add a static arp entry on the Windows host:

arp -s ip-addr 00-C0-8A-80-42-23

And edit the NODE=ip-addr line in c:\t32\config.t32 before running t32w95.exe.

To obtain basic access:

sys.reset sys.up go

Programming flash example

FLASH.RESET 
FLASH.Create 1. 0xFF800000--0xFF80FFFF 0x02000 AM29LV100B Byte 
FLASH.Create 1. 0xFF810000--0xFFFEFFFF 0x10000 AM29LV100B Byte 
FLASH.Create 1. 0xFFFF0000--0xFFFFFFFF 0x02000 AM29LV100B Byte 

flash.erase 0xfff00000--0xfff1ffff 
flash.program 1. 
data.load h:\ipl.bin # SREC Format 
flash.program

PRACTICE startup scripts

The Trace32 debugger software uses a simple startup script in the Lauterbach scripting language called PRACTICE. The software includes a few PRACTICE scripts to boot some boards in common use at QNX. The file called T32.CMM is available from:

http://community.qnx.com/sf/frs/do/viewRelease/projects.ide/frs.ide.jtag_utilities

http://community.qnx.com/sf/frs/do/viewRelease/trace32_practice_scripts

/projects.internal_tools/frs.jtag_utilities.

;Default startup program for TRACE32  
;
;This startup program can be modified according to your needs. 
   
;choose hex mode for input 
  radix hex 
  
;Add some extra buttons to the toolbar

menu.rp 
( 
   add
   toolbar 
   ( 
   separator 
   toolitem "Source/List" "list" "Data.List" 
   toolitem "Memory Dump" "dump" "Data.dump" 
   toolitem "Register" "reg" "Register /SpotLight" 
   separator 
   toolitem "Watch" ":var" "Var.Watch" 
   toolitem "Stack" ":varframe" "Var.Frame /l /c" 
   toolitem "Automatic Watch" ":varref" "Var.Ref" 
   separator 
   toolitem "List Breakpoints" "break" "Break.List" 
   toolitem "List Symbols" "symbols" "sYmbol.Browse" 
   separator 
   ) 
 ) 
 
;Recall and Define History File 
 autostore , history 
 
 enddo

The Macraigor JTAG debugger allows a host computer to control and debug an embedded target processor. Through the process of installing, configuring, and using the Macraigor Usb2Demon Debugger with a QNX Neutrino kernel image, you'll be able to write the image directly into RAM

The following topics discuss the process of installing, configuring, and using the Macraigor Usb2Demon Debugger with a QNX Neutrino kernel image, as well as describing the steps necessary for debugging using the Macraigor debugger: