how to use trace32

8
TRACE32 How to use FERNANDEZ Steve 8 Nov 2007 1

Upload: vasile-morariu

Post on 03-Mar-2015

1.075 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: How to Use TRACE32

TRACE32How to use

FERNANDEZ Steve8 Nov 2007

1

Page 2: How to Use TRACE32

SUMMARY

1. Location Path of TRACE32........................................................................................32. Hardware Desccription...............................................................................................33. Switch configuration...................................................................................................44. Starting application.....................................................................................................45. breakpoints and step by step command......................................................................7

2

Page 3: How to Use TRACE32

How to use TRACE32

TRACE32 is a software in Graphical Interface able to drive board 49xx, The emulator part of TRACE32 is responsible for carrying out debugging functions, for managingbreakpoints, for displaying memory and high-level-language structures…Here is how to load and use this software:

1. Location Path of TRACE32

The package zipped is located at:P:\_SOFTWARE\internal_software_releases\mcu_image_release\4901\nxp490x\Integration 4901\3. Tools\TRACE32-Référence

T32.zip => Pachage to unzip at the root of c:/ Desktop Icons => shortcut used to run trace32 in different connection. Notice that

those shortcuts have some parameter set in the target path, please copy them in your desktop.

2. Hardware Desccription

1 - LAUTHERBACH : ICD board2 - Laptop with T32usb application3 - Platform board 4905 usable also for 4901

3. Switch configuration

3

3 - Board 4905

2 - TRACE32 Program

1- LAUTHERBACH

USB Cable

JTAG Cable

Page 4: How to Use TRACE32

First of all, we have to configure the switches, see below the poper configuration used in 4901 board

4. Starting application

After verifying that the hardware are well connected, make sure that all devices are powered on; then run the USB_C program, the below window of TRACE32 is displayed: the application is STARTED

Notice that 3 panels is loaded automatically and new buttons are available depending of .cmm files setted in T32_Config directory.

Then press P2 button to switch on another workspace.

Some panels appear in P2 wokspace, then on the B::SYStem window clic on “Up” Mode to reset the board:

4

1

2

3

45

6

7

8

| 0 +Switch 2, position | = USB component (cp2101) disable

Switch 2, position + = USB component enable (virtual serial COM via USB )

Switch 6, position | = Normal Boot of firmware

Switch 6, position + = Boot in download mode of firmware

Switch 7, position | = Debug disableSwitch 7, position + = Debug enable

Page 5: How to Use TRACE32

After that press on “NXP F1” button to load symbol

The following windows appear => Remapped data at @ 9000 0000

Hence, back on to the P2 workspace, you can now load symbols according to the Baseline compiled; to brose the symbol you can go to View/Symbols/Browse

5

Page 6: How to Use TRACE32

The following windows appear, you can browse all function matching with the code compile in cygwin it is usefull to debug code using breakpoints and step by step execution.

Then when the symbols are loaded reclic on “Up” and play button, the board is under running step.

If the board doesn’t start properly, please re do the same step until the board is started.The MMI (board screen display) should display the time, network name…Check if the board can be control by TRACE32 => Press Pause button and check if nothing answers when pressing keyboard on board button pad.Now the board system is well attached with TRACE32 software.

5. breakpoints and step by step command

6

Page 7: How to Use TRACE32

Let us show how to set a breakpoint. Select in the symbols browser the name of the function you want to break; as an

example hkbd1_0StartKeyFrame function have been taken, it will break whenever you press on a keyboard Pad button.

Below windows show:i. B::Break.List windows => give a summury of breakpoints list setted, when the

breakpoint is highlighted it means that the program is stopped at this breakpoint. Be aware that only 2 breakpoint is authorised.

ii. B::Data.List windows => display the code when clicking on the breakpoint setted. Notice on the below picture that the program is stop at the breakpoint highlighted with a grey lign. To make a breakpoint simply double-click on the ASM code.

To verify if TRACE32 is stop at breakpoint, check at your bottom right (red circle) if the state is at “stopped at breakpoint”.

Then to run step by step press on F2 key.

7