Sunteți pe pagina 1din 15

OpenJTAG and OpenOCD under Eclipse

1. Install OpenOCD

Next

1 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

Next, unselect Add the make utils to the PATH variable under Make utils:

Click next to continue until finish the installation.


2 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

2. Download in command line mode: Copy openocd.cfg to directory eclipse_projects. Connect openjtag to the Spruce, and in command line run:

Next telnet localhost 4444 Type the following command:

3 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

Poll: poll spruce status Halt stop the spruce board Stm32x mass_erase 0: mass erase flash Flash write_image hex with file full path: write program to flash Reset: reset the spruce Note: stop the development board, mass erase, and then write the program to flash.

3. Download and debug under Eclipse: 3.1 Configure the connection of Openocd In menu, Run->External tools->External tools Configurations Click the following in sequence, Name Location Working Directory and then Arguments, click apply

Name Location Working Directory Arguments

openocd openocd-ftd2xx.exs full path workspacs full path -f openocd.cfgs full path

4 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

Open Build options, remove Build before launch and click apply

5 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

3.2 Debug configuration: Click the project name ->Run->debug configuration->double click Zylin Embedded debug(Native), the following window will show up

6 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

Select Debugger and add location of the debug tool: G++ Lite->bin->arm-none-eabi-gdb.exe. (Default: C:\Program Files\CodeSourcery\Sourcery G++ Lite\bin\arm-none-eabi-gdb.exe)

CodeSourcery->Sourcery

7 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

Open Commands option and add the following commands: target remote localhost:3333 monitor halt monitor poll monitor stm32x mass_erase 0 load monitor reset init break Reset_Handler break main continue

8 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

4. Download and debug Click Debug button in eclipse to enter into debug panel, click to open

openocd and the following information will show up when connected to openjtag:

9 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

Click Configuration

and

select

Debug

10 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

11 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

Select the file to be debug, and single click Debug to begin debug.

12 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

Waiting for the program to be downloaded to spruce:

13 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

After downloading, click to single step debug.

to run the program, and single click

or F5

We can double click to set breakpoints and debug.

14 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

15 / 15

www.soliddigi.com

SOLID Digital Technologies Inc.

S-ar putea să vă placă și