J-Link RDI User Guide

J-Link RDI User Guide

21

Chapter 3

Using J-Link RDI with different debuggers

This chapter describes how to use J-Link ARM with different debuggers via RDI.

The J-Link RDI software is an ARM Remote Debug Interface (RDI) for J-Link ARM. It makes it possible to use J-Link ARM with any RDI compliant debugger. The package consists of 2 DLLs, which need to be copied to the same folder. In order to use these

DLLs, they need to be selected in the debugger. J-Link RDI is a separate item and not included in the J-Link ARM software.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

22 CHAPTER 3 Using J-Link RDI with different debuggers

3.1

IAR Embedded Workbench IDE

3.1.1

Software version

The JLinkRDI.dll has been tested with IAR Embedded Workbench IDE version 4.40.

There should be no problems with other versions of IAR Embedded Workbench IDE.

All screenshots are taken from IAR Embedded Workbench version 4.40.

3.1.2

Configuring to use J-Link RDI

1. Start the IAR Embedded Workbench and open the tutor example project or your desired project. This tutor project has been preconfigured to use the simulator driver.

In order to run the J-Link RDI you must change the driver.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

23

2. Choose Project | Options and select the Debugger category. Change the

Driver

option to RDI.

3. Go to the RDI page of the Debugger options, select the manufacturer driver

(JLinkRDI.dll) and click OK.

4. Now an extra menu, RDI, has been added to the menu bar.

Choose RDI | Configure to configure the J-Link. For details refer to the configuration chapter.

J-Link may also be selected directly in the debugger of the IAR Embedded Workbench

IDE; RDI can be used, but is not necessary to use the IAR Embedded Workbench IDE with J-Link ARM unless you want to use one of the features offered by J-Link RDI

(e.g. flash breakpoints or flash download).

Debugging on Cortex-M3 devices

The RDI protocol has only been specified by ARM for ARM 7/9 cores. For Cortex-M3 there is no official extension of the RDI protocol regarding the register assignement, that has been approved by ARM. Since IAR EWARM version 5.11 it is possible to use

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

24 CHAPTER 3 Using J-Link RDI with different debuggers

J-Link RDI for Cortex-M3 devices because SEGGER and IAR have been come to an agreement regarding the RDI register assignment for Cortex-M3. The following table lists the register assignment for RDI and Cortex-M3:

Register

Index

21

22

23

24

17

18

19

20

25

26

27

28

Table 3.1:

12

13

14

16

8

9

10

11

6

7

4

5

2

3

0

1

Assigned register

R4

R5

R6

R7

R0

R1

R2

R3

R8

R9

R10

R11

R12

MSP / PSP (depending on mode)

R14 (LR)

R15 (PC)

XPSR

APSR

IPSR

EPSR

IAPSR

EAPSR

IEPSR

PRIMASK

FAULTMASK

BASEPRI

BASEPRI_MAX

CFBP (CONTROL/FAULT/BASEPRI/PRIMASK)

Flash download and flash breakpoints are also available for RDI with Cortex-M3, but each needs an additional license.

3.1.3

Limitations

Their are no known limitations. All features including download into flash (add.

license) and breakpoints in flash memory (add. license) can be used.

3.2

ARM’s AXD (ARM Developer Suite, ADS)

3.2.1

Software version

The JLinkRDI.dll has been tested with ARM’s AXD version 1.2.0 and 1.2.1.

There should be no problems with other versions of ARM’s AXD.

All screenshots are taken from ARM’s AXD version 1.2.0.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

25

3.2.2

Configuring to use J-Link RDI

1. Start the ARM debugger and select Options | Configure Target.... This opens the

Choose Target

dialog box:

2. Press the Add Button to add the JLinkRDI.dll.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

26 CHAPTER 3 Using J-Link RDI with different debuggers

3. Now the J-Link RDI is in the Target Environments list.

4. Select J-Link and press OK to connect to the target via J-Link ARM. To configure

J-Link RDI refer to the chapter Configuration on page 41. After downloading an

image to the target board, the debugger window looks as follows:

3.2.3

Limitations

Their are no known limitations. All features including download into flash (add.

license) and breakpoints in flash memory (add. license) can be used.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

27

3.3

ARM’s RVDS (RealView developer suite)

3.3.1

Software version

The JLinkRDI.dll has been tested with ARM’s RVDS version 2.1 and 3.0. There should be no problems with earlier versions of RVDS (up to version v3.0.1). RVDS version 3.1 does not longer support RDI protocol to communicate with the debugger.

All screenshots are taken from ARM’s RVDS version 2.1.

3.3.2

Configuring to use J-Link RDI

1. Start the Real View debugger:

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

28 CHAPTER 3

2. Select File | Connection | Connect to Target.

Using J-Link RDI with different debuggers

3. In the Connection Control dialog use the right mouse click on the first item and select Add/Remove/Edit Devices

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

29

4. Now select Add DLL to add the JLinkRDI.dll. Select the installation path of the software, for example:

C:\Program Files\SEGGER\JLinkARM_V350g\JLinkRDI.dll

5. After adding the DLL, an additional Dialog opens and asks for description: (These values are voluntary, if you do not want change them, just click OK) Use the following values and click on OK, Short Name: JLinkRDI Description: J-Link

ARM RDI Interface

.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

30 CHAPTER 3 Using J-Link RDI with different debuggers

6. Back in the RDI Target List Dialog

Select JLink-RDI and click Configure. For configuration details refer to chapter

Configuration

on page 41.

7. Click the OK button in the configuration dialog. Now close the RDI Target List dialog. Be sure your target hardware is already connected to J-Link.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

31

8. In the Connection control dialog, expand the JLink ARM RDI Interface and select the ARM_0 Processor. Close the Connection Control Window.

9. Now the RealView Debugger is connected to J-Link.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

32 CHAPTER 3 Using J-Link RDI with different debuggers

10. A project or an image is needed for debugging. After downloading, J-Link is used to debug the target.

3.3.3

Limitations

Their are no known limitations. All features including download into flash (add.

license) and breakpoints in flash memory (add. license) can be used.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

33

3.4

GHS MULTI

3.4.1

Software version

The JLinkRDI.dll has been tested with GHS MULTI version 4.07. There should be no problems with other versions of GHS MULTI.

All screenshots are taken from GHS MULTI version 4.07.

3.4.2

Configuring to use J-Link RDI

1. Start Green Hills Software MULTI integrated development environment. Click Con-

nect

| Connection Organizer to open the Connection Organizer.

2. Click Method | New in the Connection Organizer dialog.

3. The Create a new Connection Method will be opened. Enter a name for your configuration in the Name field and select Custom in the Type list. Confirm your choice with the Create... button.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

34 CHAPTER 3 Using J-Link RDI with different debuggers

4. The Connection Editor dialog will be opened. Enter rdiserv in the Server field and enter the following values in the Arguments field:

-config -dll <FullPathToJLinkDLLs>

Note that JLinkRDI.dll and JLinkARM.dll must be stored in the same directory.

If you have used the standard J-Link installation path or another path that includes spaces, enclose the path in quotation marks.

Example:

-config -dll "C:\Program Files\SEGGER\JLinkARM_V350g\JLinkRDI.dll"

Refer to GHS manual "MULTI: Configuring Connections for ARM Targets", chapter

"ARM Remote Debug Interface (rdiserv) Connections" for the complete list of possible arguments.

5. Confirm your choices by clicking the Apply button and click afterwards the Con-

nect

button.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

35

6. The J-Link RDI Configuration dialog will be opened. J-Link RDI requires a valid license. If you do not have entered your J-Link RDI license, click License and add your license with the J-Link RDI License management. Refer to chapter

Configuration

on page 41 for further information about the options of the J-Link

RDI Configuration

dialog and the usage of the License Manager.

7. Click the OK button to connect to your target.

8. Build your project and start the debugger. Note that you have to perform at least one action (for example step or run) to initiate the download of your application to the target.

3.4.3

Limitations

Their are no known limitations. All features including download into flash (add.

license) and breakpoints in flash memory (add. license) can be used.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

36 CHAPTER 3 Using J-Link RDI with different debuggers

3.5

KEIL µVision IDE

3.5.1

Software version

The JLinkRDI.dll has been tested with KEIL µVision3 IDE version 3.34. There should be no problems with other versions of KEIL µVision.

All screenshots are taken from KEIL µVision3 version 3.34.

3.5.2

Configuring to use J-Link RDI

Start KEIL uVision and open your project.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

37

Select Project | Options for Target ’<NameOfYourTarget> to open the project options dialog and select the Debug tab.

Choose RDI Interface Driver from the list as shown above and click the Settings button. Select the location of JLinkRDI.dll in Browse for RDI Driver DLL field.

and click the Configure RDI Driver button.

The J-Link RDI Configuration dialog will be opened. For detailed information about

the confiiguration of J-Link RDI, refer to chapter Configuration on page 41.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

38 CHAPTER 3 Using J-Link RDI with different debuggers

After finishing configuration, you can build your project (Project | Build Target) and start the debugger (Debug | Start/Stop debug session).

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

39

Configuring flash download via J-Link RDI

You can use the J-Link RDI flash download feature instead of the standard µVisionflash loader.

Note:

This feature requires an additional licence. A free trial license is avaliable upon request from www.segger.com.

If you have the required licence and want to use J-Link RDI also for flash download, select Flash | Configure Flash Tools and choose RDI Interface Driver from the list in the Configure Flash Menu Command as shown below.

Click the Settings button and select J-Link Flash Programmer in the Select Flash

Programmer

dialog. Confirm your choice with a click on the OK button.

Refer to Setting up flash download & unlimited flash breakpoints on page 51 for

detailed information about the configuration of the flash programming feature.

3.5.3

Limitations

Their are no known limitations. All features including download into flash (add.

license) and breakpoints in flash memory (add. license) can be used.

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

40 CHAPTER 3 Using J-Link RDI with different debuggers

J-Link RDI(UM08004) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement

Table of contents