OOCDLinks
Synopsis
The OOCDLink-s is a version without levelshifter. The FTDI is connected direct to the target.
The size of oocdlinks pcb is about 39x32mm. It provides a standard JTAG connector and a additional UART interface with handshake and modem signals. There are no level shifters on board, so that targets with IO voltage vom 3V-5V can be handled. A solution with levelshifters is under development.
Update Version
OOCDLinks-04, released 2007-03-17
Pictures
Some pictures from the my working prototype:
Building the OpenOCD
To build the the OpenOCD under Cygwin I use a small script which executes the following lines:
You have to modify this expression
to the path the FTDI drivers are located.
OpenOCD Layout
Here is the required configuration layout for the OpenOCD for a SAM7 uC
Integration in Code::Blocks
During the search for an IDE I found [[http://www.codeblocks.org/|Code::Blocks]] which looks very good. So I tried to integrated the oocdlink to the IDE. You must only add some line to get the debugger work with Code::Blocks:
Select in the main menu:
Now change the dropdown menu "selected Compiler" to:
choose in the left menu:
add the following lines in the "Debugger initialization commands" input box:
Some additional commands are listed below for a SAM7 from Atmel. The commands are taken from the configuration script by Martin Thomas.
Troubleshooting
I got some stability problems with my OOCD-Link. In the log file a FTDI error occured. After some inquiry I found someone who had the same problem. So I tried a hub too. In my case a passive hub increased the stabilty very much.
Log:
During the Embedded World 2007 in Nuernberg I talked with a guy from FTDI. He told me that in the FT2232D some bugs had been fixed. I will post me experience when the ic's arrive.
I never saw that error again with the FT2232D.
Downloads
In the download section you find all that you need to build a OOCD-Links:
The OOCDLink-s is a version without levelshifter. The FTDI is connected direct to the target.
The size of oocdlinks pcb is about 39x32mm. It provides a standard JTAG connector and a additional UART interface with handshake and modem signals. There are no level shifters on board, so that targets with IO voltage vom 3V-5V can be handled. A solution with levelshifters is under development.
Update Version
OOCDLinks-04, released 2007-03-17
Pictures
Some pictures from the my working prototype:
Building the OpenOCD
To build the the OpenOCD under Cygwin I use a small script which executes the following lines:
| make clean ./bootstrap ./configure --enable-ft2232_ftd2xx --with-ftd2xx=/cygdrive/z/oocdlink_driver/ --disable-ft2232_libftdi --disable-amtjtagaccel --disable-ep93xx --disable-parport --disable-parport_ppdev make |
You have to modify this expression
| --with-ftd2xx=/cygdrive/z/oocdlink_driver/ |
to the path the FTDI drivers are located.
OpenOCD Layout
Here is the required configuration layout for the OpenOCD for a SAM7 uC
| #daemon configuration telnet_port 4444 gdb_port 3333 #interface interface ft2232 ft2232_device_desc "OOCDLink A" ft2232_layout oocdlink ft2232_vid_pid 0x0403 0xBAF8 jtag_speed 0 #use combined on interfaces or targets that can't set TRST/SRST separately reset_config trst_and_srst srst_pulls_trst #jtag scan chain #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE) jtag_device 4 0x1 0xf 0xe #target configuration daemon_startup reset #target <type> <startup mode> #target arm7tdmi <reset mode> <chainpos> <endianness> <variant> target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4 #target_script 0 reset sam7_remap.script run_and_halt_time 0 30 #flash configuration #flash bank at91sam7 <base> <size> <chip_width> <bus_width> <target#> flash bank at91sam7 0x100000 0x10000 0 0 0 #flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum #flash bank cfi 0x80000000 0x400000 2 2 0 0x40000000 0x4000 |
Integration in Code::Blocks
During the search for an IDE I found [[http://www.codeblocks.org/|Code::Blocks]] which looks very good. So I tried to integrated the oocdlink to the IDE. You must only add some line to get the debugger work with Code::Blocks:
Select in the main menu:
| Settings > Compiler and debugger |
Now change the dropdown menu "selected Compiler" to:
| "GNU ARM GCC Compiler" |
| Settings > Compiler and debugger |
choose in the left menu:
| "Debugger settings" |
add the following lines in the "Debugger initialization commands" input box:
| file main.elf target remote localhost:3333 monitor halt monitor sleep 1000 monitor mww 0xffffff00 0x1 // remap SRAM monitor arm7_9 force_hw_bkpts enable // use hardware breakpoints load thbreak main continue |
Some additional commands are listed below for a SAM7 from Atmel. The commands are taken from the configuration script by Martin Thomas.
| monitor mww 0xfffffd44 0x00008000 # disable watchdog monitor mww 0xfffffd08 0xa5000001 # enable user reset monitor mww 0xfffffc20 0x00000601 # CKGR_MOR : enable the main oscillator monitor sleep 10 monitor mww 0xfffffc2c 0x12560a64 # CKGR_PLLR: 119.8MHz (DIV=100,MUL=598+1) monitor sleep 10 monitor mww 0xfffffc30 0x00000007 # PMC_MCKR : MCK = PLL / 2 = 59.9MHz |
Troubleshooting
I got some stability problems with my OOCD-Link. In the log file a FTDI error occured. After some inquiry I found someone who had the same problem. So I tried a hub too. In my case a passive hub increased the stabilty very much.
Log:
| Error: ft2232.c:164 ft2232_write(): FT_Write returned: 4 |
During the Embedded World 2007 in Nuernberg I talked with a guy from FTDI. He told me that in the FT2232D some bugs had been fixed. I will post me experience when the ic's arrive.
I never saw that error again with the FT2232D.
Downloads
In the download section you find all that you need to build a OOCD-Links:
- Schematic & Layout
- component placement specification
- PCB Gerber data
- EPT File for MPROG
- Bill of material
- Driver for Windows


