OpenJTAG on Soliddigi Spruce STM32 Arduino Board

Post on 04-Mar-2015

157 views 0 download

description

Spruce -SolidDigi STM32 ARM cortex board can be used with OpenJTAG and is compatible with mini ARM cortex-M3 board .It can be used in GCC+Eclipse+openocd+openJtag and Arduino enviroment!Spruce has Arduino compatible shield pins, all the Arduino shields can be used on SolidDigi STM32 cortex board. Arduino similar IDE can be used to download Arduino code to Spruce board.Spruce Hardware Resources:Including 2.4" TFT LCD Touchscreen, diamension of LCD screen CPU: STM32F103VET6, TQFP 100 pins FLASH£º512K BYTES, SRAM:64KBYTES 1 JTAG debug interface 1 power LED indicattor (Green), 1 status LED (Blue) 1 RS232 port, Need crossover cable to talk to PC Support 3 pin ISP 1 USB2.0 SLAVE port 1 Micro SD(TF) slot, uses SDIO 1 2.4 inch TFT (240X320 (touch screen) ), use FSMC 16 bits interface to control 1 SPI interfaced AT45DB161D(2M BYTES) serial FLASH 1 functional botton 1 RTC battery socket 1 RJ45 Ethernet port All unused GPIO pins are connected to external headers.

Transcript of OpenJTAG on Soliddigi Spruce STM32 Arduino Board

1 / 15

OpenJTAG and OpenOCD under Eclipse

1. Install OpenOCD

Next

www.soliddigi.com SOLID Digital Technologies Inc.

2 / 15

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

Click “next” to continue until finish the installation.

www.soliddigi.com SOLID Digital Technologies Inc.

3 / 15

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:

www.soliddigi.com SOLID Digital Technologies Inc.

4 / 15

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 openocd

Location openocd-ftd2xx.ex’s full path

Working Directory workspac’s full path

Arguments -f openocd.cfg’s full path

www.soliddigi.com SOLID Digital Technologies Inc.

5 / 15

Open Build options, remove “Build before launch” and click “apply”

www.soliddigi.com SOLID Digital Technologies Inc.

6 / 15

3.2 Debug configuration:

Click the project name ->Run->debug configuration->double click Zylin Embedded

debug(Native), the following window will show up

www.soliddigi.com SOLID Digital Technologies Inc.

7 / 15

Select “Debugger” and add location of the debug tool: CodeSourcery->Sourcery

G++ Lite->bin->arm-none-eabi-gdb.exe.

(Default: C:\Program Files\CodeSourcery\Sourcery G++

Lite\bin\arm-none-eabi-gdb.exe)

www.soliddigi.com SOLID Digital Technologies Inc.

8 / 15

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

www.soliddigi.com SOLID Digital Technologies Inc.

9 / 15

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:

www.soliddigi.com SOLID Digital Technologies Inc.

10 / 15

Click and select “Debug

Configuration”

www.soliddigi.com SOLID Digital Technologies Inc.

11 / 15

www.soliddigi.com SOLID Digital Technologies Inc.

12 / 15

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

www.soliddigi.com SOLID Digital Technologies Inc.

13 / 15

Waiting for the program to be downloaded to spruce:

www.soliddigi.com SOLID Digital Technologies Inc.

14 / 15

After downloading, click to run the program, and single click or F5

to single step debug.

We can double click to set breakpoints and debug.

www.soliddigi.com SOLID Digital Technologies Inc.

15 / 15

www.soliddigi.com SOLID Digital Technologies Inc.