Size: 2659
Comment:
|
Size: 3607
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 32: | Line 32: |
TODO: Add correct dmesg output here... | [ 347.868034] usb 2-2: new full speed USB device using uhci_hcd and address 3 [ 348.172550] usb 2-2: configuration #1 chosen from 1 choice [ 348.360463] usbcore: registered new interface driver usbserial [ 348.360496] USB Serial support registered for generic [ 348.360556] usbcore: registered new interface driver usbserial_generic [ 348.360561] usbserial: USB Serial Driver core [ 348.525815] USB Serial support registered for FTDI USB Serial Device [ 348.526020] usb 2-2: Ignoring serial port reserved for JTAG [ 348.526109] ftdi_sio 2-2:1.1: FTDI USB Serial Device converter detected [ 348.526155] usb 2-2: Detected FT2232C [ 348.526250] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0 [ 348.526277] usbcore: registered new interface driver ftdi_sio [ 348.526282] ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver |
Line 42: | Line 54: |
The file can be named for example ''openocd.cfg'', and it's contents should be as follows: | The file can be named for example ''openocd.cfg'', and the contents of that file: |
Line 45: | Line 57: |
TODO: add correct configuration file here. | source [find interface/olimex-arm-usb-ocd.cfg] source [find target/sam7x256.cfg] |
Line 47: | Line 60: |
This should automatically find the correct configurations for the board and for the dongle. |
|
Needs Expansion |
|
OpenOCD
Please note that this page is not yet completed!
Introduction
Installation Instructions
Look for the package named openocd in the Synaptic Package Manager and install it.
Usage examples
Using OpenOCD with Olimex ARM-USB-OCD and LPC-H2103
OpenOCD Setup
After installing OpenOCD package, you need to set permissions right. Create a file ""/etc/udev/rules.d/45-ft2232.rules"" with following contents:
BUS!="usb", ACTION!="add", SUBSYSTEM!=="usb_device", GOTO="kcontrol_rules_end" SYSFS{idProduct}=="0003", SYSFS{idVendor}=="15ba", MODE="664", GROUP="plugdev" LABEL="kcontrol_rules_end"
Then connect ARM-USB-OCD to the USB port. Check ""dmesg"" which should give the following output:
[ 347.868034] usb 2-2: new full speed USB device using uhci_hcd and address 3 [ 348.172550] usb 2-2: configuration #1 chosen from 1 choice [ 348.360463] usbcore: registered new interface driver usbserial [ 348.360496] USB Serial support registered for generic [ 348.360556] usbcore: registered new interface driver usbserial_generic [ 348.360561] usbserial: USB Serial Driver core [ 348.525815] USB Serial support registered for FTDI USB Serial Device [ 348.526020] usb 2-2: Ignoring serial port reserved for JTAG [ 348.526109] ftdi_sio 2-2:1.1: FTDI USB Serial Device converter detected [ 348.526155] usb 2-2: Detected FT2232C [ 348.526250] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0 [ 348.526277] usbcore: registered new interface driver ftdi_sio [ 348.526282] ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver
Connect ARM-USB-OCD dongle to LPC-H2103 prototype board via JTAG cable.
Power on LPC-H2103 board by giving 5 volts between Vin and gnd pins. Refer to board schematics for correct pins ( http://www.olimex.com/dev/pdf/lpc-h2103-pins.pdf ). The board should now have power led (red) on and another led (green) flashing.
You need to create a configuration file. More information here: http://openfacts.berlios.de/index-en.phtml?title=OpenOCD_configuration
The file can be named for example openocd.cfg, and the contents of that file:
source [find interface/olimex-arm-usb-ocd.cfg] source [find target/sam7x256.cfg]
This should automatically find the correct configurations for the board and for the dongle.
Start OpenOCD daemon with the following command:
openocd -f openocd.cfg TODO: Add output here
Test the setup by connecting to openocd daemon with telnet:
telnet localhost 4444 TODO: add some more stuff here
ARM development toolchain
TODO: how to install ARM development toolchain
http://blog.nutaksas.com/2009/05/installing-gnuarm-arm-toolchain-on.html http://www.alphapogo.de/ http://danielromaniuk.com/?q=node/19
Blinking led example
Todo: Blinking led code
Todo: Compilation
TODO: upload with openocd
TODO: Running
Further Help and Documentation
OpenOCD website: http://openocd.berlios.de
Further Reading
SparkFun Electronics forum: http://forum.sparkfun.com/
http://danielromaniuk.com/?q=node/19
Usage info: http://openfacts.berlios.de/index-en.phtml?title=Open%20On-Chip%20Debugger
Good howto: http://www.sparkfun.com/tutorial/ARM/ARM_Cross_Development_with_Eclipse.pdf