STM3210E-EVAL

Discussions and support about ChibiStudio, the free development environment for ARM.
Tabulous
Posts: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

STM3210E-EVAL

Postby Tabulous » Fri May 03, 2013 12:07 pm

Board = STM3210E-EVAL
Debugger = ST-LINK/V2
Demo = ARMCM3-STM32F103ZG-FATFS

Project builds ok, run external tool (OpenOCD on ST-Link V2), and select "stm3210e_eval.cfg".

Get the following error;

Open On-Chip Debugger 0.7.0-dev-00079-g08ddb19 (2012-11-12-17:14)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
adapter speed: 1000 kHz
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
Runtime Error: C:/ChibiStudio/tools/openocd/bin/../scripts/target/stm32f1x.cfg:27: invalid command name "jtag_ntrst_delay"
in procedure 'script'
at file "embedded:startup.tcl", line 58
at file "C:\ChibiStudio\tools\openocd\scripts\board\stm3210e_eval.cfg", line 7
at file "C:/ChibiStudio/tools/openocd/bin/../scripts/target/stm32f1x.cfg", line 27

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: STM3210E-EVAL

Postby Giovanni » Fri May 03, 2013 12:37 pm

Hi,

It must be a bug in that OpenOCD script. That command is probably obsolete, try looking into the documentation how to replace it.

Giovanni

Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm
Location: India

Re: STM3210E-EVAL

Postby Abhishek » Sat May 04, 2013 5:12 am

When you select using the external tool, a board file need not be selected, as the adapter is already configured for ST-LINK/V2 when the external tool is used.

There are two separate cfg files in 'openocd\scripts\target' folder. The stm32f1x_stlink.cfg is the one that should be used, not the stm32f1x.cfg. The stm32f1x.cfg is for the other FTDI based debuggers, the ST-LINK uses a different interface.

I hope this should help.

Regards
Abhishek

Tabulous
Posts: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

Re: STM3210E-EVAL

Postby Tabulous » Sat May 04, 2013 12:17 pm

This is the command line inside ChibiStudio to invoke the external tool.

-c "telnet_port 4444" -f "interface/stlink-v2.cfg" -f "${file_prompt}"

At the prompt i would have thought that you would select the board you are using ?

Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm
Location: India

Re: STM3210E-EVAL

Postby Abhishek » Sat May 04, 2013 12:26 pm

You could. But then you have to select the target now. Just the target. So try selecting 'stm32f1x_stlink.cfg'.

Tabulous
Posts: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

Re: STM3210E-EVAL

Postby Tabulous » Fri May 10, 2013 11:56 am

Abhishek if i select 'stm32f1x_stlink.cfg' i get this error....



Open On-Chip Debugger 0.7.0-dev-00079-g08ddb19 (2012-11-12-17:14)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
adapter speed: 1000 kHz
Info : clock speed 1000 kHz
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection from 3333
Info : device id = 0x10006430
Info : flash size = 512kbytes
Warn : acknowledgment received, but no packet pending
undefined debug reason 6 - target needs reset
requesting target halt and executing a soft reset
requesting target halt and executing a soft reset
Error: timed out while waiting for target halted
in procedure 'wait_halt'
background polling: on
TAP: stm32f1x.cpu (enabled)
target state: unknown
Info : device id = 0x10006430
Info : flash size = 512kbytes
flash 'stm32f1x' found at 0x08000000
Error: Target not halted
stm32x mass erase failed
in procedure 'stm32f1x'
Error: Target not halted
Error: error writing to flash at address 0x08000000 at offset 0x00000000
in procedure 'flash'
requesting target halt and executing a soft reset

Tabulous
Posts: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

Re: STM3210E-EVAL

Postby Tabulous » Fri May 10, 2013 6:00 pm

firstly why are the external tool settings "-c "telnet_port 4444" -f "interface/stlink-v2.cfg" -f "${file_prompt}"" set to port 4444, when in the debug configurations it is set to 3333, surley this is wrong.

I can now launch the openocd debugger using "stm32f1x_stlink.cfg" this give the following

Open On-Chip Debugger 0.7.0-rc2 (2013-04-28-12:55)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : Target voltage: 3.226178
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints

This is what i would expect, but if i now run the debug config "ARMCM3-STM32F103ZG-FATFS (OpenOCD, Flash and Run)" nothing happens and i get this

symbol-file C:\\ChibiStudio\\chibios\\demos\\ARMCM3-STM32F103ZG-FATFS\\build\\ch.elf
set remotetimeout 1000
monitor soft_reset_halt
"monitor" command not supported by this target.
monitor soft_reset_halt
"monitor" command not supported by this target.
monitor wait_halt
"monitor" command not supported by this target.
monitor poll
"monitor" command not supported by this target.
monitor flash probe 0
"monitor" command not supported by this target.
monitor stm32f1x mass_erase 0
"monitor" command not supported by this target.
monitor flash write_bank 0 build/ch.bin 0
"monitor" command not supported by this target.
monitor soft_reset_halt
"monitor" command not supported by this target.
tbreak main
Cannot access memory at address 0x8000134

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: STM3210E-EVAL

Postby Giovanni » Fri May 10, 2013 6:47 pm

Ports 3333 and 4444 are both present and serve a different purpose, configurations are correct. The other port is for giving direct commands via telnet.

Giovanni

Tabulous
Posts: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

Re: STM3210E-EVAL

Postby Tabulous » Tue May 14, 2013 3:42 pm

Dont seem to be getting anywhere fast. The debugger starts up ok, and then you can see errors. I'm selecting "stm32f1x_stlink.cfg" when prompted for target file.

Open On-Chip Debugger 0.7.0 (2013-05-05-10:41)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v16 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : Target voltage: 3.222004
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection from 3333
Info : device id = 0x10006430
Info : flash size = 512kbytes
Warn : acknowledgment received, but no packet pending
undefined debug reason 6 - target needs reset
requesting target halt and executing a soft reset
requesting target halt and executing a soft reset
Error: timed out while waiting for target halted
in procedure 'wait_halt'
background polling: on
TAP: stm32f1x.cpu (enabled)
target state: unknown
Info : device id = 0x10006430
Info : flash size = 512kbytes
flash 'stm32f1x' found at 0x08000000
Error: Target not halted
stm32x mass erase failed
in procedure 'stm32f1x'
Error: Target not halted
Error: error writing to flash at address 0x08000000 at offset 0x00000000
in procedure 'flash'
requesting target halt and executing a soft reset
Info : dropped 'gdb' connection

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: STM3210E-EVAL

Postby Giovanni » Tue May 14, 2013 6:25 pm

Probably you should ask into the OpenOCD forum or mailing list about this, ST-Link v2 works for me on the STM32F1.

Anybody else can test an STM32F1 using an ST-Link v2?

Giovanni


Return to “ChibiStudio”

Who is online

Users browsing this forum: No registered users and 14 guests