dev:nab:v2:jtag_access
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
dev:nab:v2:jtag_access [2015/11/12 12:38] – [Nabaztag:tag] redox | dev:nab:v2:jtag_access [2015/11/12 13:37] – [ Usage] redox | ||
---|---|---|---|
Line 10: | Line 10: | ||
### JTAG probe: BusBlaster | ### 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: | ### Nabaztag: | ||
Line 39: | Line 45: | ||
## Software: OpenOCD | ## Software: OpenOCD | ||
- | ### Pacth and compile | + | ### Patch and compile |
+ | |||
+ | 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 | ||
+ | ./ | ||
+ | make | ||
+ | |||
+ | When it's done, you should have a binary named **openocd** in the `src/` folder | ||
### Usage | ### 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 | ## Pictures |