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
Next revisionBoth sides next revision
dev:nab:v2:jtag [2015/11/12 13:38] – created redoxdev:nab:v2:jtag [2015/11/12 13:48] – [Links] redox
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/pages/dev/nab/v2/jtag.txt · Last modified: 2023/11/24 22:18 by redox