OpenOCD, JTAGKey-tiny and s3c2440

Hello everyone,

I trying to get OpenOCD working with the Embest SBC2440-II dev board. It’s got a Samsung S3C2440A processor which is an ARM 920t, 64Mbyte Nand Flash and 64Mbyte SDRAM. (more information and schematics are avaliable here http://www.armkits.com/product/sbc2440-II.asp).

And I am using the amontec JTAGKey-tiny

To sum up the only thing that seems to work is the reset.

I tried the latest OpenOCD build (rev 888) with this config file :

interface ft2232
jtag_speed 0

ft2232_vid_pid 0x0403 0xcff8
ft2232_layout "jtagkey"
ft2232_device_desc "Amontec JTAGkey"

jtag_device 4 0x1 0xf 0xe
target arm920t little 0 arm920t

And got the following result :

Open On-Chip Debugger 1.0 (2008-08-05-12:34) svn:888
$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
jtag_speed: 0
Error:  JTAG communication failure, check connection, JTAG interface, target power etc.
Error:  trying to validate configured JTAG chain anyway...
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Could not validate JTAG chain, exit
Error:  JTAG communication failure, check connection, JTAG interface, target power etc.
Error:  trying to validate configured JTAG chain anyway...
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:  Could not validate JTAG chain, exit
Warning:no telnet port specified, using default port 4444
Warning:no gdb port specified, using default port 3333
Warning:no tcl port specified, using default port 6666

I also tried an older OpenOCD build from the amontec sdk without more results, the config file used :

jtag_speed 0

interface ft2232
jtag_speed 0
ft2232_vid_pid 0x0403 0xcff8
ft2232_layout "jtagkey"
ft2232_device_desc "Amontec JTAGkey"

reset_config trst_and_srst

jtag_device 4 0x1 0xf 0xe
daemon_startup attach
target arm920t little reset_run 0 arm920t
run_and_halt_time 0 500

I tried to tweak some parameter as the jtag_speed, it didn’t help. So if anyone got a clue about what seems wrong, I’ll be everlastingly grateful. Also if anyone manager to get this kind of configuration working (this chip or even better this board) please let me know.

Thanks in advance.

[edit]Also if it seems to you that I forgot any kind of information that may be relevant, don’t hesitate to ask[\edit]

I finnaly solved it. It was in fact a connection problem. For those who got this board the problem is that the small connector provided to go from the jtag port to parrallel one can’t be used as an adaptor from the small jtag (2 mm step) to a “normal” jtag port (2,5 mm). So I managed to get connected directly to the board and it work better now :).

I also updated my conf file a little :

interface ft2232
jtag_speed 0

ft2232_vid_pid 0x0403 0xcff8
ft2232_layout "jtagkey"
ft2232_device_desc "Amontec JTAGkey"

jtag_device 4 0x1 0xf 0xe

target arm9tdmi little 0 arm920t

reset_config trst_and_srst combined

#nand device <nand_controller> [controller options]
nand device s3c2440 0

Hi, Grosbill.

I just bougth a S3C2440 development board from www.yctek.com, a supplier from China too.

I am looking for a USB JTAG tools , cause my laptop no longer has parallel port from LPT wiggler…

Look like you manage to program your S3C2440 development using JTAGKey, so that mean that all FT2232 JTAG tools should work, rigth?

So, you are fine using this JTAGKey for reprogramming/debugging? Any problem you still facing now???

Thanks and regards,

William

The S3C2440 nand flash controller support seems to be very experimental in openocd. Personally I didn’t managed to write anything with it. So I had to use the LPT wiggler to flash program my board.

Since I wanted to work from a Linux it wasn’t simple to found a program able to use it correctly. By chance I found some SDK from samsung with a test program able to do so.

Excepting that everything work fine with openocd and the jtagkey-tiny : accessing registers, reset, halt, writing and reading in ram).

But now that I managed to get an u-boot working I use it to load my program since it is way faster.

So, OpenOCD with HW, such as JTAGKey-Tiny or some FT2232x, is still not having very good support on the Samsung S3C2440 to control NAND flash… Coz i am kind of want to get a tools, that can do downloading code to NAND flash, and more important is can do debugger by using GDB or ADS 1.2.

I also had a ready u-boot that came bundle with the hardware, but by doing this, the only way to dfebug is written stub-codes in the software inside (through COM communication), instead of In-Step-Debugger by using JTAG.

Can you tell me, what is the your purpose of using your JTAGKey on your target board?

By exchanging information, i think we can learn more and figure out a better way to do coding/debugging on this S3C2440 uP…

Thanks and regards,

William (Atoman)

grosbill:
Hello everyone,

I trying to get OpenOCD working with the Embest SBC2440-II dev board. It’s got a Samsung S3C2440A processor which is an ARM 920t, 64Mbyte Nand Flash and 64Mbyte SDRAM. (more information and schematics are avaliable here http://www.armkits.com/product/sbc2440-II.asp).

This company sucks, they do not provide anything besides their commodities, they will not answer any of your question regarding hardware or software or BSP.

and their price sucks too, they sell the [SBC2410-II for $249, while [the same board I bought from developmentboard.net (also from China) only took me $220](http://www.developmentboard.net/index.php/productdetail/Development+boards/ARM9/SAMSUNG/S3C2410/SBC2410)](http://www.armkits.com/product/sbc2410II.asp)

Hello grosbill,

How did you reconfigure the JTAG pins so that you could have the right connection? which pins did you connect together? I see that my ARM-USB-OCD from Olimex has a RST line but the 3C2440 has an nRESET line instead.

I would appreciate if you show us your whole .cfg file. I am having problems getting openocd to work with this board.