arne wrote:
Hello,
I try to use openocd with a Luminary EK-LM3S9B90 Board.
This is the first time I try to use openocd and I hope I could post this 
question to the List.

The EK-LM3S9B90  Board has an extra JTAG-Interface-Board with a FT2232D chip.
I set following in the cfg file,
ft2232_device_desc "Luminary Micro ICDI Board"
ft2232_vid_pid 0x0403 0xbcda
ft2232_layout evb_lm3s811

but I get a JTAG-communication failure with this settings.

What I have to do to add this Interface-board to Openocd?

First, is there already an Adapter with the Pinning below which I can use?

Is there a Documentation with the Pinnings and the differences of the supported 
JTAG-Interfaces?
I looked a little bit around in the sources, tried to read some documentation, 
but not very successful.

Do I have to add the Interface in the C-Sources, if yes what files I have to 
modify?
I found the ft2232_layout_t array in the ft2322.c, where different initialisation and reset functions are defined.


The Pining of the Ft2232 is the following if I understood everything right:

(TCK  -> ADBUS0)
(TDI  -> ADBUS1 (Output from JTAG-Board, TDI on Controller Side))
(TDO  -> ADBUS2 (Input for JTAG-Board, TDO on Controller Side))
(TMS  -> ADBUS3)
(SRST -> ADBUS5)

There is an enable signal for all JTAG Drivers connected to ADBUS6.
There is a Signal called DBGMOD (ADBUS7) which enables or disables the TMS Driver and makes some further switching with the TDO/TMS Signals. Seems, that it is for a kind of Single-wire Communication over TMS, is this knownin other JTAG Interfaces?

The second Interface (BDBUS) of the ft2322 is used as UART and is connected to 
controller too,
I think for build-in Bootloader support of the LM3sB90.


By the way, I tried to compile openocd trunk with static linking for the ftd2xx driver, I get no errors during configuration and compiling, but the linker cant't find the FT_xxxxx Functions from the ../static-lib/libftd2xx.a.0.4.16. pathes seems to be correct.
with shared, I can start openocd. any Idea ?? (System is Ubuntu, with gcc4.2.4)

I can start openocd only with sudo, as normal user I get a segfault.

Best regards
  Arne


Hi

I use the EK-LM3S9B92 board with the same debug board (Luminary Micro ICDI Board). I created this ft2232.c.patch to get it work.

I also attached my configuration files.

Best regards
 Marcel
Index: src/jtag/ft2232.c
===================================================================
--- src/jtag/ft2232.c	(revision 2413)
+++ src/jtag/ft2232.c	(working copy)
@@ -156,6 +156,7 @@
 	{ "oocdlink",             jtagkey_init,              jtagkey_reset,      NULL                    },
 	{ "signalyzer",           usbjtag_init,              usbjtag_reset,      NULL                    },
 	{ "evb_lm3s811",          usbjtag_init,              usbjtag_reset,      NULL                    },
+	{ "micro_icdi",           usbjtag_init,              usbjtag_reset,      NULL                    },
 	{ "olimex-jtag",          olimex_jtag_init,          olimex_jtag_reset,  olimex_jtag_blink       },
 	{ "flyswatter",           flyswatter_init,           flyswatter_reset,   flyswatter_jtag_blink   },
 	{ "turtelizer2",          turtle_init,               turtle_reset,       turtle_jtag_blink       },
@@ -2163,6 +2164,15 @@
 		low_output    = 0x88;
 		low_direction = 0x8b;
 	}
+	else if (strcmp(ft2232_layout, "micro_icdi") == 0)
+	{
+		nTRST = 0x0;
+		nTRSTnOE = 0x00;
+		nSRST = 0x20;
+		nSRSTnOE = 0x20;
+		low_output    = 0x88;
+		low_direction = 0xcb;
+	}
 	else
 	{
 		LOG_ERROR("BUG: usbjtag_init called for unknown layout '%s'", ft2232_layout);
# script for luminary lm3s9b92

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

if { [info exists ENDIAN] } {   
   set  _ENDIAN $ENDIAN    
} else {         
  # this defaults to a little endian
   set  _ENDIAN little
}

if { [info exists CPUTAPID ] } {
   set _CPUTAPID $CPUTAPID
} else {
  # force an error till we get a good number
   set _CPUTAPID 0x4ba00477
}

# jtag speed
jtag_khz 500

jtag_nsrst_delay 100
jtag_ntrst_delay 100

#LM3S6918 Evaluation Board has only srst
reset_config srst_only

#jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 1 -irmask 0xf -expected-id 
$_CPUTAPID

# the luminary variant causes a software reset rather than asserting SRST
# this stops the debug registers from being cleared
# this will be fixed in later revisions of silicon
set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position 
$_TARGETNAME -variant lm3s

# 4k working area at base of ram
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 
-work-area-size 0x4000 -work-area-backup 0

#flash configuration
flash bank stellaris 0 0 0 0 0

gdb_memory_map     enable
# ftdi interface using libftdi driver
interface ft2232
ft2232_device_desc "Luminary Micro ICDI Board"
ft2232_layout micro_icdi
ft2232_vid_pid 0x0403 0xbcda

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

Reply via email to