Eclipse & OpenOCD: AHBAP; Sticky und Mem Read Error

OP #1697594
Rate this post
useful
not useful
Hi everyone,

I'm using the STM32-P103 board with Eclipse and oocd 0.2.0.

my problem is that I can't use debugging.

I use this for OpenOCD:

gdb_port 3333


# Work-area size (RAM size) = 20kB for STM32F103RB device
set _WORKAREASIZE 0x5000

interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003

# script for stm32

if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME stm32
}

if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}

# JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use 
F_JTAG = 1MHz
#jtag_khz 1000
jtag_speed 3

#jtag_device 4 0x1 0xf 0xe

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

#jtag scan chain
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
# See STM Document RM0008
# Section 26.6.3
set _CPUTAPID 0x3ba00477
}
jtag newtap $_CHIPNAME 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 $_CHIPNAME bs -irlen 5 -ircapture 0x1 -irmask 0x1 
-expected-id $_BSTAPID1 -expected-id $_BSTAPID2 -expected-id $_BSTAPID3 
-expected-id $_BSTAPID4 -expected-id $_BSTAPID5

set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position 
$_TARGETNAME

$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 
-work-area-size $_WORKAREASIZE -work-area-backup 0

flash bank stm32x 0 0 0 0 0

init
reset halt


For GDB:
target remote localhost:3333
break main


I got following Errors:

Open On-Chip Debugger 0.2.0 (2009-10-13-15:06) Release
$URL: http://svn.berlios.de/svnroot/repos/ope ... /openocd.c $
For bug reports, read 
http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
jtag_speed: 3
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
Info : device: 4
Info : deviceID: 364511236
Info : SerialNumber: FTS92Y5TA
Info : Description: Olimex OpenOCD JTAG TINY A
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, 
part: 0xba00, ver: 0x3)
Info : JTAG Tap/device matched
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, 
part: 0x6410, ver: 0x1)
Info : JTAG Tap/device matched
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, 
part: 0xba00, ver: 0x3)
Info : JTAG Tap/device matched
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, 
part: 0x6410, ver: 0x1)
Info : JTAG Tap/device matched
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x20000010
Info : accepting 'gdb' connection from 0
Warn : acknowledgment received, but no packet pending
Info : device id = 0x20036410
Info : flash size = 128kbytes
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000012, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x202d0dd4
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000012, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x202d0dd4
Warn : Block read error address 0x202d0dd0, count 0x1
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f64f
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f650
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000012, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x202d0dd4
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000012, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x202d0dd4
Warn : Block read error address 0x202d0dd0, count 0x1
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f64f
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f650
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f653
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f654
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f657
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f658
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f65b
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f65c
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f65f
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f660
Error: AHBAP Cached values: dp_select 0x0, ap_csw 0xa2000010, ap_tar 
0xffffffff
Error: SWJ-DP STICKY ERROR
Error: Read MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x5214f663


I tried a to reduce the JTAG speed but it didn't worked out for me.. I 
Have no Idea what else I should do..

So any help would be much appreciated!
OP #1697935
Rate this post
useful
not useful
Yes there were no errors at all and it was translated successfully..

these are the two steps on my way to run the code:

1) Build project
2) Run OpenOCD over external Tools in Eclipse
3) Run GDB over external Tools in Eclipse

and each time, I got the same error messages like above

I don't know why but sometimes it works but this is only in maybe 0,1 % 
at all tries i made the whole day :(

I have no idea what else to do, so I keep checking my makefile, cfg-file 
and so on, but as I said, I have no idea what else I should try..

So any help is really appreciated..

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now