openocd on squeeze
ページを編集するにはログインが必要です。
sheevaplug.cfg をググっていたら、squeeze, sid にはopenocd が、パッケージとして存在するらしい。 http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/debian-testing-i386-netinst.iso をダウンロードし、CD-ROMを焼き焼きして、
squeezeをクリーンインストール後、
squeeze:/home/nitobe# cat /etc/debian_version squeeze/sid squeeze:/home/nitobe# uname -a Linux squeeze 2.6.26-2-686 #1 SMP Sun Jun 21 04:57:38 UTC 2009 i686 GNU/Linux squeeze:/home/nitobe# aptitude install libusb-dev libftdi-dev libboost-dev openocd squeeze:/home/nitobe# find /usr -name sheevaplug.cfg -print /usr/share/openocd/scripts/interface/sheevaplug.cfg /usr/share/openocd/scripts/board/sheevaplug.cfg
既に、cfgファイルは、/usr/share/openocd/scripts/board/ に存在する。
squeeze:/home/nitobe# openocd -f /usr/share/openocd/scripts/board/sheevaplug Open On-Chip Debugger 0.2.0-in-development (2009-06-25-18:22) svn:r2403 BUGS? Read /usr/share/doc/openocd/BUGS $URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $ 2000 kHz jtag_nsrst_delay: 200 jtag_ntrst_delay: 200 dcc downloads are enabled Info : JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2) Info : JTAG Tap/device matched
おっ!さくっと動くねぇ。
違うターミナルをあげて、
squeeze:/home/nitobe# telnet localhost 4444 Trying ::1... Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Open On-Chip Debugger > help bp set breakpoint <address> <length> [hw] cpu <name> - prints out target options and a comment on CPU which matches name debug_level adjust debug level <0-3> drscan execute DR scan <device> <num_bits> <value> <num_bits1> <value2> ... dump_image dump_image <file> <address> <size> exit exit telnet session fast fast <enable/disable> - place at beginning of config files. Sets defaults to fast and dangerous. fast_load loads active fast load image to current target - mainly for profiling purposes fast_load_image same args as load_image, image stored in memory - mainly for profiling purposes find <file> - print full path to file according to OpenOCD search rules flush_count returns number of times the JTAG queue has been flushed ft2232_device_desc the USB device description of the FTDI FT2232 device ft2232_latency set the FT2232 latency timer to a new value ft2232_layout the layout of the FT2232 GPIO signals used to control output-enables and reset signals ft2232_serial the serial number of the FTDI FT2232 device ft2232_vid_pid the vendor ID and product ID of the FTDI FT2232 device gdb_breakpoint_override hard/soft/disable - force breakpoint type for gdb 'break' commands. gdb_detach resume/reset/halt/nothing - specify behavior when GDB detaches from the target gdb_flash_program enable or disable flash program gdb_memory_map enable or disable memory map gdb_port daemon configuration command gdb_port gdb_report_data_abort enable or disable reporting data aborts halt halt target help Tcl implementation of help command init initializes target and servers - nop on subsequent invocations interface try to configure interface interface_list list all built-in interfaces irscan execute IR scan <device> <instr> [dev2] [instr2] ... jtag perform jtag tap actions jtag_device (DEPRECATED) jtag_device <ir_length> <ir_expected> <ir_mask> jtag_khz set maximum jtag speed (if supported); parameter is maximum khz, or 0 for adaptive clocking (RTCK). jtag_nsrst_delay jtag_nsrst_delay <ms> - delay after deasserting srst in ms jtag_ntrst_delay jtag_ntrst_delay <ms> - delay after deasserting trst in ms jtag_rclk fallback_speed_khz - set JTAG speed to RCLK or use fallback speed jtag_reset toggle reset lines <trst> <srst> jtag_speed (DEPRECATED) set jtag speed (if supported) load_image load_image <file> <address> ['bin'|'ihex'|'elf'|'s19'] [min_address] [max_length] log_output redirect logging to <file> (default: stderr) mdb display memory bytes <addr> [count] mdh display memory half-words <addr> [count] mdw display memory words <addr> [count] mwb write memory byte <addr> <value> [count] mwh write memory half-word <addr> <value> [count] mww write memory word <addr> <value> [count] ocd_array2mem convert a TCL array to memory locations and write the values <ARRAYNAME> <WIDTH = 32/16/8> <ADDRESS> <COUNT> ocd_flash_banks return information about the flash banks ocd_mem2array read memory and return as a TCL array for script processing <ARRAYNAME> <WIDTH = 32/16/8> <ADDRESS> <COUNT> pathmove move JTAG to state1 then to state2, state3, etc. <state1>,<state2>,<stat3>... poll poll target state power_restore Overridable procedure run when power restore is detected. Runs 'reset init' by default. production <serialnumber> - Runs production procedure. Throws exception if procedure failed. Prints progress messages. Implement this procedure in the target script. production Runs test procedure. Throws exception if procedure failed. Prints progress messages. Implement in target script. production_info Displays information on production procedure for target script. Implement this procedure in target script. profile profiling samples the CPU PC rbp remove breakpoint <adress> reg display or set a register reset reset target [run | halt | init] - default is run reset_config [none/trst_only/srst_only/trst_and_srst] [srst_pulls_trst/trst_pulls_srst] [combined/separate] [trst_push_pull/trst_open_drain] [srst_push_pull/srst_open_drain] resume resume target [addr] runtest move to Run-Test/Idle, and execute <num_cycles> rwp remove watchpoint <adress> scan_chain print current scan chain configuration script <filename> - filename of OpenOCD script (tcl) to run shutdown shut the server down sleep <n> [busy] - sleep for n milliseconds. "busy" means busy wait soft_reset_halt halt the target and do a soft reset srst_deasserted Overridable procedure run when srst deassert is detected. Runs 'reset init' by default. step step one instruction from current PC or [addr] svf run svf <file> target configure target targets change the current command line target (one parameter) or lists targets (with no parameter) tcl_port port on which to listen for incoming TCL syntax telnet_port port on which to listen for incoming telnet connections test_image test_image <file> [offset] [type] tms_sequence choose short(default) or long tms_sequence <short | long> verify_image verify_image <file> [offset] [type] verify_ircapture verify value captured during Capture-IR <enable | disable> verify_jtag verify value capture <enable | disable> version show OpenOCD version virt2phys translate a virtual address into a physical address wait_halt wait for target halt [time (s)] wp set watchpoint <address> <length> <r/w/a> [value] [mask] xsvf run xsvf <file> [virt2] [quiet] arm7_9 dbgrq use EmbeddedICE dbgrq instead of breakpoint for target halt requests <enable | disable> arm7_9 dcc_downloads use DCC downloads for larger memory writes <enable | disable> arm7_9 fast_memory_access use fast memory accesses instead of slower but potentially safer accesses <enable | disable> arm7_9 write_core_reg write core register <num> <mode> <value> arm7_9 write_xpsr_im8 write program status register <8bit immediate> <rotate> <not cpsr | spsr> arm7_9 write_xpsr write program status register <value> <not cpsr | spsr> arm926ejs cache_info display information about target caches arm926ejs cp15 display/modify cp15 register <opcode_1> <opcode_2> <CRn> <CRm> [value] arm926ejs mdb_phys display memory bytes <physical addr> [count] arm926ejs mdh_phys display memory half-words <physical addr> [count] arm926ejs mdw_phys display memory words <physical addr> [count] arm926ejs mwb_phys write memory byte <physical addr> <value> arm926ejs mwh_phys write memory half-word <physical addr> <value> arm926ejs mww_phys write memory word <physical addr> <value> arm926ejs virt2phys translate va to pa <va> arm9tdmi vector_catch catch arm920t vectors ['all'|'none'|'<vec1 vec2 ...>'] armv4_5 core_state display/change ARM core state <arm | thumb> armv4_5 disassemble disassemble instructions <address> <count> ['thumb'] armv4_5 reg display ARM core registers etm config etm config <target> <port_width> <port_mode> <clocking> <capture_driver> flash bank flash bank <driver> <base> <size> <chip_width> <bus_width> <target> [driver_options ...] mflash bank mflash bank <soc> <base> <RST pin> <target #> nand check_bad_blocks check NAND flash device <num> for bad blocks [<offset> <length>] nand device nand dump dump from NAND flash device <num> <filename> <offset> <length> [oob_raw | oob_only] nand erase erase blocks on NAND flash device <num> <offset> <length> nand info print info about NAND flash device <num> nand list list configured NAND flash devices nand probe identify NAND flash device <num> nand raw_access raw access to NAND flash device <num> ['enable'|'disable'] nand write write to NAND flash device <num> <filename> <offset> [oob_raw | oob_only | oob_softecc | oob_softecc_kw] pld device target_request debugmsgs enable/disable reception of debug messages from target trace history display trace history, ['clear'] history or set [size] trace point display trace points, ['clear'] list of trace points, or add new tracepoint at [address] > cpu CPU Options Comment > trace history trace history buffer is not allocated > reg (0) r0 (/32): 0x00000000 (dirty: 0, valid: 0) (1) r1 (/32): 0x00000000 (dirty: 0, valid: 0) (2) r2 (/32): 0x00000000 (dirty: 0, valid: 0) (3) r3 (/32): 0x00000000 (dirty: 0, valid: 0) (4) r4 (/32): 0x00000000 (dirty: 0, valid: 0) (5) r5 (/32): 0x00000000 (dirty: 0, valid: 0) (6) r6 (/32): 0x00000000 (dirty: 0, valid: 0) (7) r7 (/32): 0x00000000 (dirty: 0, valid: 0) (8) r8 (/32): 0x00000000 (dirty: 0, valid: 0) (9) r9 (/32): 0x00000000 (dirty: 0, valid: 0) (10) r10 (/32): 0x00000000 (dirty: 0, valid: 0) (11) r11 (/32): 0x00000000 (dirty: 0, valid: 0) (12) r12 (/32): 0x00000000 (dirty: 0, valid: 0) (13) r13_usr (/32): 0x00000000 (dirty: 0, valid: 0) (14) lr_usr (/32): 0x00000000 (dirty: 0, valid: 0) (15) pc (/32): 0x00000000 (dirty: 0, valid: 0) (16) r8_fiq (/32): 0x00000000 (dirty: 0, valid: 0) (17) r9_fiq (/32): 0x00000000 (dirty: 0, valid: 0) (18) r10_fiq (/32): 0x00000000 (dirty: 0, valid: 0) (19) r11_fiq (/32): 0x00000000 (dirty: 0, valid: 0) (20) r12_fiq (/32): 0x00000000 (dirty: 0, valid: 0) (21) r13_fiq (/32): 0x00000000 (dirty: 0, valid: 0) (22) lr_fiq (/32): 0x00000000 (dirty: 0, valid: 0) (23) r13_irq (/32): 0x00000000 (dirty: 0, valid: 0) (24) lr_irq (/32): 0x00000000 (dirty: 0, valid: 0) (25) r13_svc (/32): 0x00000000 (dirty: 0, valid: 0) (26) lr_svc (/32): 0x00000000 (dirty: 0, valid: 0) (27) r13_abt (/32): 0x00000000 (dirty: 0, valid: 0) (28) lr_abt (/32): 0x00000000 (dirty: 0, valid: 0) (29) r13_und (/32): 0x00000000 (dirty: 0, valid: 0) (30) lr_und (/32): 0x00000000 (dirty: 0, valid: 0) (31) cpsr (/32): 0x00000000 (dirty: 0, valid: 0) (32) spsr_fiq (/32): 0x00000000 (dirty: 0, valid: 0) (33) spsr_irq (/32): 0x00000000 (dirty: 0, valid: 0) (34) spsr_svc (/32): 0x00000000 (dirty: 0, valid: 0) (35) spsr_abt (/32): 0x00000000 (dirty: 0, valid: 0) (36) spsr_und (/32): 0x00000000 (dirty: 0, valid: 0) (37) debug_ctrl (/6): 0x00 (dirty: 0, valid: 0) (38) debug_status (/5): 0x04 (dirty: 0, valid: 0) (39) comms_ctrl (/32): 0x00000018 (dirty: 0, valid: 0) (40) comms_data (/32): 0x00000000 (dirty: 0, valid: 0) (41) watch 0 addr value (/32): 0x00000000 (dirty: 0, valid: 0) (42) watch 0 addr mask (/32): 0x00000000 (dirty: 0, valid: 0) (43) watch 0 data value (/32): 0x00000000 (dirty: 0, valid: 0) (44) watch 0 data mask (/32): 0x00000000 (dirty: 0, valid: 0) (45) watch 0 control value (/32): 0x00000000 (dirty: 0, valid: 0) (46) watch 0 control mask (/32): 0x00000000 (dirty: 0, valid: 0) (47) watch 1 addr value (/32): 0x00000000 (dirty: 0, valid: 0) (48) watch 1 addr mask (/32): 0x00000000 (dirty: 0, valid: 0) (49) watch 1 data value (/32): 0x00000000 (dirty: 0, valid: 0) (50) watch 1 data mask (/32): 0x00000000 (dirty: 0, valid: 0) (51) watch 1 control value (/32): 0x00000000 (dirty: 0, valid: 0) (52) watch 1 control mask (/32): 0x00000000 (dirty: 0, valid: 0) (53) vector catch (/32): 0x00000000 (dirty: 0, valid: 1) >
ほんとかいな?わかちこわかちこ。
Keyword(s):
References: