dev:nab:v2:jtag_access
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
dev:nab:v2:jtag_access [2015/11/12 13:37] – [ Usage] redox | dev:nab:v2:jtag_access [2015/11/12 13:38] (current) – removed redox | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | # JTAG access | ||
- | ## Overview | ||
- | |||
- | As detailed on the Schematic (released in the FCC documents), the Nabaztag: | ||
- | |||
- | ## Hardware | ||
- | |||
- | |||
- | ### JTAG probe: BusBlaster | ||
- | |||
- | {{: | ||
- | |||
- | On of the best features of the BusBlaster is you can reconfigure the CPLD to emulate any FT2232 JTAG probe. I think it comes pre-programmed with a JTAGkey buffer logic, which should work fine for this application. | ||
- | |||
- | _Note_: My BusBlaster (a v4 !) uses a KT-link buffer logic, because I needed the SWD capabilities for another application. If the following steps don't work, try to reprogram the CPLD with a KT-link buffer and try again ! | ||
- | |||
- | You also need some jumper wires (also called _Dupont wire_ sometimes) F/F to connect the BusBlaster to the Nabaztag | ||
- | |||
- | ### Nabaztag: | ||
- | |||
- | Well, of course you need a Nabaztag: | ||
- | |||
- | Grab a small flat screwdriver and remove the four screws on the base. You can also use a triangle screwdriver if you happen to have one, I don't. | ||
- | |||
- | And this is about it. the JTAG header is on the top left corner of the board. | ||
- | |||
- | Pinout is the following (top to bottom): | ||
- | |||
- | |||
- | ^ Nabaztag Pin ^ Function ^ BusBlaster pin ^ | ||
- | | 1 | ||
- | | 2 | ||
- | | 3 | ||
- | | 4 | ||
- | | 5 | ||
- | | 6 | ||
- | | 7 | ||
- | | 8 | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ## Software: OpenOCD | ||
- | |||
- | ### Patch and compile OpenOCD | ||
- | |||
- | The Nabaztag: | ||
- | |||
- | - access the CPU registers, which means debug is possible ! | ||
- | - read and write the Internal flash | ||
- | - First version was slow as hell: 5 to 10 minutes to read/write the whole flash | ||
- | - Second version is much better: under 5 seconds. I had to write ARM assembler code to be run from RAM to write the Flash, which was a rather painful but interesting experience... | ||
- | |||
- | So ! Download OpenOCD **0.8.0** from their website, or here (mirror): {{: | ||
- | |||
- | Download the patch: {{: | ||
- | |||
- | #### Prepare | ||
- | |||
- | sudo aptitude install libtool autoconf automake libusb-1.0-0-dev | ||
- | | ||
- | gzip -d openocd_0.8.0_oki.patch.gz | ||
- | tar xzvf ./ | ||
- | |||
- | |||
- | #### Patch | ||
- | |||
- | cd openocd-0.8.0/ | ||
- | patch -p1 < ../ | ||
- | |||
- | #### Compile | ||
- | |||
- | autoreconf -fi | ||
- | ./configure | ||
- | make | ||
- | |||
- | When it's done, you should have a binary named **openocd** in the `src/` folder | ||
- | |||
- | ### Usage | ||
- | |||
- | Now that you have a patched version of OpenOCD capable of debugging the OKI chip, you need some configuration files. Here are mine: {{: | ||
- | |||
- | _Note_: You might need to tweak them a little bit, especially the `interface/ | ||
- | |||
- | Once you have the config files, just copy the openocd binary in the same folder and then it's as easy as: | ||
- | |||
- | ./openocd -f nabaztagv2.cfg | ||
- | |||
- | ## Pictures | ||
- | |||
- | {{.: | ||
- | |||
- | ## Links |
/home/share/www/redox.ws/wiki/data/attic/dev/nab/v2/jtag_access.1447335451.txt.gz · Last modified: 2023/11/24 21:55 (external edit)