User Tools

Site Tools


dev:nab:v2:jtag

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dev:nab:v2:jtag [2015/11/12 14:38]
redox created
dev:nab:v2:jtag [2019/12/25 15:40] (current)
Line 12: Line 12:
 {{:​dev:​nab:​v2:​jtag:​bbv3.jpg?​200 |}}I think you can use any JTAG probe that's 3.3v compatible, if you have one. If you don't, I recommend the [BusBlaster v3](http://​dangerousprototypes.com/​docs/​Bus_Blaster_v3_design_overview). It's a great board, versatile and cheap; oh ! and it's also open hardware and open source ! :-)  {{:​dev:​nab:​v2:​jtag:​bbv3.jpg?​200 |}}I think you can use any JTAG probe that's 3.3v compatible, if you have one. If you don't, I recommend the [BusBlaster v3](http://​dangerousprototypes.com/​docs/​Bus_Blaster_v3_design_overview). It's a great board, versatile and cheap; oh ! and it's also open hardware and open source ! :-) 
  
-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.+One 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 ! _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 !
Line 88: Line 88:
  
     ./openocd -f nabaztagv2.cfg     ./openocd -f nabaztagv2.cfg
 +
 +## GDB
 +
 +I think you can use telnet to interact with OpenOCD, but I use GDB... Here are a few notes:
 +
 +### Launch and connect
 +
 +    arm-none-eabi-gdb
 +
 +or, if you have an .elf file to debug/flash
 +
 +    arm-none-eabi-gdb ./​path/​to/​file.elf
 +
 +Once in GDB
 +
 +    tar ext :3333
 +
 +The Nabaztag should have "​frozen"​. you can (always) restart it with
 +
 +    mon reset run
 +
 +### Dump the flash
 +
 +    mon reset init
 +    dump ihex memory dump.hex 0x08000000 0x08020000 # Get an hex file, useful for analyzing it 
 +    dump binary memory dump.bin 0x08000000 0x08020000 # Get a bin file, useful for backup and restore
 +
 +_Note_: The files end up in the same folder as the openocd binary (or the folder from where you run it)
 +
 +### Write an image
 +
 +    mon reset init
 +    mon flash write_image erase ./dump.bin 0x08000000
 +
 +_Note_: The files should be in the same folder as the openocd binary (or the folder from where you run it)
 +
  
 ## Pictures ## Pictures
  
 {{.:​jtag:​nabjtag.jpg?​250| BusBlaster connected to the Nabaztag, side view}} {{.:​jtag:​nabjtag_bottom.jpg?​250| BusBlaster connected to the Nabaztag, bottom view}} {{.:​jtag:​nabjtag.jpg?​250| BusBlaster connected to the Nabaztag, side view}} {{.:​jtag:​nabjtag_bottom.jpg?​250| BusBlaster connected to the Nabaztag, bottom view}}
 +### Flash an elf file
 +
 +If you started GDB with an elf file (or if you loaded one), you can flash it on the Nabaztag by simply running:
 +
 +    load
  
 ## Links ## Links
 +
 +* [BusBlaster wiki](http://​dangerousprototypes.com/​docs/​Bus_Blaster)
 +* [OpenOCD user guide](http://​openocd.org/​doc/​html/​)
/home/share/www/redox.ws/wiki/data/attic/dev/nab/v2/jtag.1447335510.txt.gz · Last modified: 2019/12/25 15:40 (external edit)