/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / OpenJTAG under Eclipse on Spruce -SolidDigi STM32 Arduino Board

Username:     
Password:     
             

Forum
  • Index
  •  » STM32 Family
  •  » OpenJTAG under Eclipse on Spruce -SolidDigi STM32 Arduino Board

# 1   2011-08-17 07:07:29 OpenJTAG under Eclipse on Spruce -SolidDigi STM32 Arduino Board

melody91
New member
Registered: 2011-08-17
Posts: 3

OpenJTAG under Eclipse on Spruce -SolidDigi STM32 Arduino Board

OpenJTAG and OpenOCD under Eclipse

I bought from soliddepot.com an item named Spruce -SolidDigi STM32 Arduino Compatible Board With LCD

And then I tried to debug the board under Eclipse!

1. Install OpenOCD
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/1.jpg

Next
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/2.jpg

Next, unselect “Add the make utils to the PATH variable” under “Make utils”:
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/3.jpg

Click “next” to continue until finish the installation.

2. Download in command line mode:Copy openocd.cfg to directory “eclipse_projects”.Connect openjtag to the Spruce, and in command line run:
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/4.jpg
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/5.jpg

Next “telnet localhost 4444”Type the following command:
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/6.jpg

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 thenArguments, click apply

Name                            openocd

Location                        openocd-ftd2xx.ex’s full path

Working Directory         workspac’s full path

Arguments                    -f openocd.cfg’s full path
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/7.jpg

Open Build options, remove “Build before launch” and click “apply”
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/8.jpg

3.2 Debug configuration:Click the project name ->Run->debug configuration->double click Zylin Embeddeddebug(Native), the following window will show up
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/9.jpg

Select “Debugger” and add location of the debug tool: CodeSourcery->SourceryG++ Lite->bin->arm-none-eabi-gdb.exe.(Default: C:\Program Files\CodeSourcery\Sourcery G++Lite\bin\arm-none-eabi-gdb.exe)
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/10.jpg

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

http://i1102.photobucket.com/albums/g458/soliddigi/spruce/11.jpg

4. Download and debugClick Debug button in eclipse to enter into debug panel, click to openopenocd,and the following information will show up when connected to openjtag:
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/12.jpg

Clickhttp://i1102.photobucket.com/albums/g458/soliddigi/spruce/13.jpgand select “DebugConfiguration”
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/14.jpg

Select the file to be debug, and single click “Debug” to begin debug.
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/15.jpg

Waiting for the program to be downloaded to spruce:
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/16.jpg

After downloading, clickhttp://i1102.photobucket.com/albums/g458/soliddigi/spruce/1-1.jpgto run the program, and single clickhttp://i1102.photobucket.com/albums/g458/soliddigi/spruce/2-1.jpgor F5to single step debug.
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/17.jpg

We can double click to set breakpoints and debug.
http://i1102.photobucket.com/albums/g458/soliddigi/spruce/18.jpg


Isn't it nice!

Offline

 

# 2   2011-09-27 08:31:57 OpenJTAG under Eclipse on Spruce -SolidDigi STM32 Arduino Board

CindyKuai
New member
Registered: 2011-09-27
Posts: 2

Re: OpenJTAG under Eclipse on Spruce -SolidDigi STM32 Arduino Board

smile smile smile smile smile smile smile smile

$1

Last edited by CindyKuai (2011-09-27 08:34:59)

Offline

 

  • Index
  •  » STM32 Family
  •  » OpenJTAG under Eclipse on Spruce -SolidDigi STM32 Arduino Board

Board footer