Documente Academic
Documente Profesional
Documente Cultură
1. Install OpenOCD
Next
1 / 15
www.soliddigi.com
Next, unselect Add the make utils to the PATH variable under Make utils:
www.soliddigi.com
2. Download in command line mode: Copy openocd.cfg to directory eclipse_projects. Connect openjtag to the Spruce, and in command line run:
3 / 15
www.soliddigi.com
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
openocd openocd-ftd2xx.exs full path workspacs full path -f openocd.cfgs full path
4 / 15
www.soliddigi.com
Open Build options, remove Build before launch and click apply
5 / 15
www.soliddigi.com
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
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
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
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
Click Configuration
and
select
Debug
10 / 15
www.soliddigi.com
11 / 15
www.soliddigi.com
Select the file to be debug, and single click Debug to begin debug.
12 / 15
www.soliddigi.com
13 / 15
www.soliddigi.com
or F5
14 / 15
www.soliddigi.com
15 / 15
www.soliddigi.com