Hello,
I’m using OpenOCD for quite some time now but for the first time I really wanted to post a question on the forum here. I have 2 boards with exactly the same processor (s3c6410 from Samsung), Ram 256MB, and NAND Flash 1Gb. I use those boards with a J-Link programmer and OpenOCD.
For some time now my second board doesn’t want to probe the NAND Flash (It still works perfectly with the other board, so no problems with my config file or with the J-Link.
A major difference I find is in the target halted in ARM state due to debug-request, current mode:
On the failing board it says: undefined instruction
On the working board it says: Supervisor
Based on the terminal info I don’t find any other differences. I’m completely stuck here and I was hoping someone could give me a clue or something on how to move on. Is it the processor? Is it NAND Flash? …
I include all the info here:
Config file:
# Deamon Setup
#-------------------------------------------------------------------------
telnet_port 4444
tcl_port 6666
# GDB Setup
#gdb_port 3333
#gdb_breakpoint_override hard
#gdb_memory_map enable
#gdb_flash_program enable
#-------------------------------------------------------------------------
# interface Setup
#-------------------------------------------------------------------------
interface jlink
#-------------------------------------------------------------------------
# target Setup
#-------------------------------------------------------------------------
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME s3c6410
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
# this defaults to a bigendian
set _ENDIAN little
}
# trace buffer
if { [info exists ETBTAPID ] } {
set _ETBTAPID $ETBTAPID
} else {
# force an error till we get a good number
set _ETBTAPID 0x2b900f0f
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
# force an error till we get a good number
set _CPUTAPID 0x07b76f0f
}
#jtag scan chain
jtag newtap $_CHIPNAME etb -irlen 4 -expected-id $_ETBTAPID
jtag newtap $_CHIPNAME cpu -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm11 -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm1176
adapter_nsrst_delay 500
adapter_khz 0
#reset configuration
reset_config trst_and_srst
nand device 0 s3c6400 $_TARGETNAME
# trace setup ... NOTE, "normal full" mode fudges the real ETMv3.1 mode
etm config $_TARGETNAME 16 normal full etb
etb config $_TARGETNAME $_CHIPNAME.etb
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME cfi 0x00000000 0x00200000 2 2 $_TARGETNAME
OpenOCD (with the ‘bad’ board):
ubuntu-i7:~$ sudo openocd -f openocd0.5.0/ok6410.cfg
Open On-Chip Debugger 0.7.0-dev-00079-g08ddb19 (2013-07-18-16:26)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter_nsrst_delay: 500
adapter speed: RCLK - adaptive
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Info : J-Link initialization started / target CPU reset initiated
Info : J-Link ARM V8 compiled May 27 2009 17:31:22
Info : J-Link caps 0xb9ff7bbf
Info : J-Link hw version 80000
Info : J-Link hw type J-Link
Info : J-Link max mem block 9752
Info : J-Link configuration
Info : USB-Address: 0xff
Info : Kickstart power on JTAG-pin 19: 0xffffffff
Info : Vref = 3.300 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 0 TRST = 0
Info : J-Link JTAG Interface ready
Info : RCLK (adaptive clock speed)
Info : JTAG tap: s3c6410.etb tap/device found: 0x2b900f0f (mfg: 0x787, part: 0xb900, ver: 0x2)
Info : JTAG tap: s3c6410.cpu tap/device found: 0x07b76f0f (mfg: 0x787, part: 0x7b76, ver: 0x0)
Info : found ARM1176
Info : s3c6410.cpu: hardware has 6 breakpoints, 2 watchpoints
Warn : ETMv2+ support is incomplete
Info : ETM v3.2
Info : accepting 'telnet' connection from 4444
Info : JTAG tap: s3c6410.etb tap/device found: 0x2b900f0f (mfg: 0x787, part: 0xb900, ver: 0x2)
Info : JTAG tap: s3c6410.cpu tap/device found: 0x07b76f0f (mfg: 0x787, part: 0x7b76, ver: 0x0)
Info : found ARM1176
Warn : s3c6410.cpu: ran after reset and before halt ...
target state: halted
target halted in ARM state due to debug-request, current mode: Undefined instruction
cpsr: 0x000001db pc: 0x00000004
#0: not probed
Error: unknown NAND flash device found, manufacturer id: 0x0c device id: 0x0c
in procedure 'nand'
The text unknown NAND flash device found, manufacturer id: … The numbers change every time a reset the board. This is maybe the most strange behavior.
OpenOCD (with the working board):
ubuntu-i7:~$ sudo openocd -f openocd0.5.0/ok6410.cfg
Open On-Chip Debugger 0.7.0-dev-00079-g08ddb19 (2013-07-18-16:26)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter_nsrst_delay: 500
adapter speed: RCLK - adaptive
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Info : J-Link initialization started / target CPU reset initiated
Info : J-Link ARM V8 compiled May 27 2009 17:31:22
Info : J-Link caps 0xb9ff7bbf
Info : J-Link hw version 80000
Info : J-Link hw type J-Link
Info : J-Link max mem block 9752
Info : J-Link configuration
Info : USB-Address: 0xff
Info : Kickstart power on JTAG-pin 19: 0xffffffff
Info : Vref = 3.306 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 0 TRST = 0
Info : J-Link JTAG Interface ready
Info : RCLK (adaptive clock speed)
Info : JTAG tap: s3c6410.etb tap/device found: 0x2b900f0f (mfg: 0x787, part: 0xb900, ver: 0x2)
Info : JTAG tap: s3c6410.cpu tap/device found: 0x07b76f0f (mfg: 0x787, part: 0x7b76, ver: 0x0)
Info : found ARM1176
Info : s3c6410.cpu: hardware has 6 breakpoints, 2 watchpoints
Warn : ETMv2+ support is incomplete
Info : ETM v3.2
Info : accepting 'telnet' connection from 4444
Info : JTAG tap: s3c6410.etb tap/device found: 0x2b900f0f (mfg: 0x787, part: 0xb900, ver: 0x2)
Info : JTAG tap: s3c6410.cpu tap/device found: 0x07b76f0f (mfg: 0x787, part: 0x7b76, ver: 0x0)
Info : found ARM1176
Warn : s3c6410.cpu: ran after reset and before halt ...
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x200001d3 pc: 0xc7e00c48
NAND flash device 'NAND 1GiB 3.3V 8-bit (Samsung)' found
Through the telnet host I always gave the same commands:
Reset halt
Nand Probe 0
Any help would really be appreciated!
Best Regards
Hacor