I have a small problem with Olimex Jtag Tiny but only with a newer STM32 
processor

Here is three situations, the first if the evaluation board with Olimex 
Tiny, the second is my keypad with J-Link and the third one
is my keypad with Olimex Tiny. The configuration file is identical for 
all except in the case of J-Link where the first part call j-link
instead of Olimex. It uses the proprietary driver for ftdi.
This is on Linux Mandriva 2009.1, I have tried version 0.2.0, 0.1.0 and 
an svn version a few months before the 0.1.0 release.
I almost identical results on windows XP with version 0.2.0 from Freddie 
or my own . I cannot use J-Link as our board manufacturer wants the 
cheapest.
I told them to buy the Olimex Tiny as I was planning to  get them 
software to use with that. I didn't realized that there would be a 
problem as
I have used it successfully with the evaluation board. I have never had 
any failure.

There is a slight difference between what I did with them though. I have 
some silly LCD application with the evaluation board while the keypad
has 8 switches, around 40 Leds and NMEA software to connect to a marine 
control board. The software runs at 72Mhz with an external 8Mhz crystal.
It uses DMA while the application on the evaluation board does not.
Is it possible that the Olimex Tiny stuff doesn't give a full core 
reset? If so how to go around this?
With IAR I cannot reflash the device if the core is not reset, this is 
due to the DMA.

The processor I use on the keypad has 48 pins, 20k of RAM and 64k of 
flash. The one on the evaluation board has 128k of flash.

With the STM32-SK evaluation board which uses a STM32F103RB, using the 
Olimex Tiny jtag device

[mic...@localhost STM32-SK_LCD_Demo]$ openocd -f stm32_OlimexTiny.cfg
Open On-Chip Debugger 0.3.0-in-development (2009-09-12-17:22) svn:2700M
$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
1000 kHz
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
Warn : use 'stm32.cpu' as target identifier, not '0'
Info : device: 4 "2232C"
Info : deviceID: 364511236
Info : SerialNumber: FTPX9QML A
Info : Description: Olimex OpenOCD JTAG TINY A
Info : clock speed 1000 kHz
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, 
part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, 
part: 0x6410, ver: 0x1)

With my keypad which uses a STM32F103C8, using J-Link

[mic...@localhost STM32-SK_LCD_Demo]$ openocd -f stm32_jlink.cfg
Open On-Chip Debugger 0.3.0-in-development (2009-09-12-17:22) svn:2700M
$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
1000 kHz
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
Warn : use 'stm32.cpu' as target identifier, not '0'
Info : J-Link initialization started / target CPU reset initiated
Info : J-Link ARM V6 compiled Jan 13 2009 15:40:53
Info : JLink caps 0x19ff7bbf
Info : JLink hw version 60000
Info : JLink max mem block 8968
Info : Vref = 3.306 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 0 TRST = 0

Info : J-Link JTAG Interface ready
Info : clock speed 1000 kHz
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, 
part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, 
part: 0x6410, ver: 0x1)

With the keypad, same as for J-Link except for the top of the 
configuration where Olimex is used instead of J-Link

[mic...@localhost STM32-SK_LCD_Demo]$ openocd -f stm32_OlimexTiny.cfg
Open On-Chip Debugger 0.3.0-in-development (2009-09-12-17:22) svn:2700M
$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
1000 kHz
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
Warn : use 'stm32.cpu' as target identifier, not '0'
Info : device: 4 "2232C"
Info : deviceID: 364511236
Info : SerialNumber: FTPX9QML A
Info : Description: Olimex OpenOCD JTAG TINY A
Info : clock speed 1000 kHz
Info : JTAG tap: stm32.cpu tap/device found: 0x03780237 (mfg: 0x11b, 
part: 0x3780, ver: 0x0)
Error: JTAG tap: stm32.cpu              got: 0x03780237 (mfg: 0x11b, 
part: 0x3780, ver: 0x0)
Error: JTAG tap: stm32.cpu  expected 1 of 1: 0x3ba00477 (mfg: 0x23b, 
part: 0xba00, ver: 0x3)
Error: trying to validate configured JTAG chain anyway...
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Block read error address 0xe000ed00, count 0x1
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction

Here is the configuration file


interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY"
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x0004

# Change the default telnet port...
telnet_port 4444
# GDB connects here
gdb_port 3333
# GDB can also flash my flash!
gdb_memory_map enable
gdb_flash_program enable

jtag_khz 1000

jtag_nsrst_delay 100
jtag_ntrst_delay 100

#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst

set _CPUTAPID 0x3BA00477

jtag newtap stm32 cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 
$_CPUTAPID

if { [info exists BSTAPID ] } {
   set _BSTAPID $BSTAPID
} else {
  # See STM Document RM0008
  # Section 26.6.2
  # Low density devices, Rev A
  set _BSTAPID1 0x06412041
  # Medium density devices, Rev A
  set _BSTAPID2 0x06410041
  # Medium density devices, Rev B and Rev Z
  set _BSTAPID3 0x16410041
  # High density devices, Rev A
  set _BSTAPID4 0x06414041
  # Connectivity line devices, Rev A and Rev Z
  set _BSTAPID5 0x06418041
}
jtag newtap stm32 bs  -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id 
$_BSTAPID1 -expected-id $_BSTAPID2 -expecte

target create stm32.cpu cortex_m3 -endian little -chain-position stm32.cpu
stm32.cpu configure -work-area-virt 0 -work-area-phys 0x20000000 
-work-area-size 0x4000 -work-area-backup 0

flash bank stm32x 0 0 0 0 0


Michel

-- 
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://home.comcast.net/~mcatudal

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to