Hi Spen Target: AT91SAM7S256 OpenOCD: SVN657
Relevant part of configuration (AT91SAM7S256.cfg): reset_config srst_only srst_pulls_trst trst_push_pull srst_open_drain target arm7tdmi little run_and_init 0 Output of TELNET session: Open On-Chip Debugger > poll target state: running > reset JTAG device found: 0x3f0f0f0f (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x3) target state: halted target halted in Thumb state due to debug request, current mode: System cpsr: 0x0000001f pc: 0x0010036c executing reset script 'event/at91sam7s_reset.script' requesting target halt and executing a soft reset target state: halted target halted in ARM state due to debug request, current mode: Supervisor cpsr: 0x000000d3 pc: 0x00000000 > >From the debug output (attached "dbg.txt"), I can see that a "soft_reset_halt" >is performed, which resets the registers to their default values. I guess that it should be documented exactly when a "soft_reset_halt" is performed. I would have expected it to be always performed when a "run_and_halt" and "run_and_init" is performed, not just when reset_config is "srst_only" or some other magic combination. Best regards, Pieter -----Original Message----- From: Spen [mailto:[EMAIL PROTECTED] Sent: 24 June 2008 07:47 PM To: 'Øyvind Harboe'; Pieter Conradie Cc: openocd-development@lists.berlios.de Subject: RE: [Openocd-development] run_and_halt vs. run_and_init > > On Tue, Jun 24, 2008 at 5:17 PM, Pieter Conradie > <[EMAIL PROTECTED]> wrote: > > Hi List, > > > > > > > > "run_and_init" clears the CPU registers to their default > state, e.g. The only difference between run_and_halt and run_and_init is a script can be called with run_and_init. Openocd does not clear any cpu registers - asserting srst will do that. for example target cortex_m3 little run_and_init 0 target_script 0 reset reset.script Cheers Spen Notice This email is intended for the addressee only and may contain legally privileged and/or confidential information. If you have received this email in error and are not the intended recipient, you are hereby informed that you are not entitled to read, broadcast, distribute or in any manner whatsoever use the contents of this email or any attachments thereto. You are requested to please notify Psitek that you have received the email and then delete it. Unless clearly stated otherwise, the content and sentiments expressed in this email or any attachments thereto are those of the sender and not of Psitek (Proprietary) Limited. Psitek does not accept liability for any damages, loss or expense of any nature whatsoever arising (a) out of or in connection with the email or any attachments thereto and/or (b) from any act or omission by the recipient relying upon the content of the email or attachments. Psitek further disclaims liability for any damages caused by computer and/or software viruses. Should this email contain the terms of a contract, no binding agreement will result until such time as a written (hardcopy) document is signed on behalf of Psitek.
AT91SAM7S256.cfg
Description: AT91SAM7S256.cfg
arm-usb-tiny.cfg
Description: arm-usb-tiny.cfg
Debug: 4 0 command.c:425 command_run_line(): script interface/arm-usb-tiny.cfg Debug: 5 0 configuration.c:87 open_file_from_path(): opened interface/arm-usb-tiny.cfg Debug: 6 0 command.c:425 command_run_line(): telnet_port 4444 Debug: 7 0 command.c:425 command_run_line(): gdb_port 3333 Debug: 8 0 command.c:425 command_run_line(): gdb_detach resume Debug: 9 0 command.c:425 command_run_line(): gdb_memory_map enable Debug: 10 0 command.c:425 command_run_line(): gdb_flash_program enable Debug: 11 0 command.c:425 command_run_line(): daemon_startup attach Info: 12 0 options.c:50 configuration_output_handler(): Open On-Chip Debugger (2008-05-16 20:15) svn: 657 Debug: 13 0 command.c:425 command_run_line(): interface ft2232 Debug: 14 0 command.c:425 command_run_line(): ft2232_device_desc "Olimex OpenOCD JTAG TINY A" Debug: 15 0 command.c:425 command_run_line(): ft2232_layout "olimex-jtag" Debug: 16 0 command.c:425 command_run_line(): ft2232_vid_pid 0x15BA 0x0004 Debug: 17 0 command.c:425 command_run_line(): ft2232_latency 2 Debug: 18 0 command.c:425 command_run_line(): script target/AT91SAM7S256.cfg Debug: 19 0 configuration.c:87 open_file_from_path(): opened target/AT91SAM7S256.cfg Debug: 20 0 command.c:425 command_run_line(): jtag_speed 1 Debug: 21 0 jtag.c:1850 handle_jtag_speed_command(): handle jtag speed Info: 22 0 options.c:50 configuration_output_handler(): jtag_speed: 1, 1 Debug: 23 0 command.c:425 command_run_line(): reset_config srst_only srst_pulls_trst trst_push_pull srst_open_drain Debug: 24 0 command.c:425 command_run_line(): jtag_device 4 0x1 0xf 0xe Debug: 25 0 command.c:425 command_run_line(): jtag_nsrst_delay 200 Debug: 26 0 command.c:425 command_run_line(): jtag_ntrst_delay 0 Debug: 27 0 command.c:425 command_run_line(): target arm7tdmi little run_and_init 0 Debug: 28 0 command.c:425 command_run_line(): target_script 0 reset event/at91sam7s_reset.script Debug: 29 0 command.c:425 command_run_line(): run_and_halt_time 0 30 Debug: 30 0 command.c:425 command_run_line(): working_area 0 0x00200000 0x2000 backup Debug: 31 0 command.c:425 command_run_line(): flash bank at91sam7 0 0 0 0 0 Debug: 32 0 command.c:425 command_run_line(): init Debug: 33 0 openocd.c:102 handle_init_command(): target init complete Debug: 34 0 ft2232.c:1368 ft2232_init_ftd2xx(): 'ft2232' interface using FTD2XX with 'olimex-jtag' layout (15ba:0004) Debug: 35 15 ft2232.c:1457 ft2232_init_ftd2xx(): current latency timer: 2 Debug: 36 15 ft2232.c:1804 olimex_jtag_init(): 80 08 1b Debug: 37 15 ft2232.c:1847 olimex_jtag_init(): 82 09 0f Debug: 38 15 ft2232.c:253 ft2232_speed(): 86 01 00 Debug: 39 47 openocd.c:109 handle_init_command(): jtag interface init complete Debug: 40 47 jtag.c:1524 jtag_init_inner(): Init JTAG chain Debug: 41 47 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 42 47 jtag.c:1282 jtag_reset_callback(): - Debug: 43 47 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 44 47 jtag.c:1282 jtag_reset_callback(): - Info: 45 47 jtag.c:1376 jtag_examine_chain(): JTAG device found: 0x3f0f0f0f (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x3) Debug: 46 47 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 47 47 jtag.c:1282 jtag_reset_callback(): - Debug: 48 47 openocd.c:116 handle_init_command(): jtag init complete Debug: 49 47 openocd.c:119 handle_init_command(): jtag examine complete Debug: 50 47 openocd.c:126 handle_init_command(): flash init complete Debug: 51 47 openocd.c:130 handle_init_command(): NAND init complete Debug: 52 47 openocd.c:134 handle_init_command(): pld init complete Debug: 53 78 gdb_server.c:2036 gdb_init(): gdb service for target arm7tdmi at port 3333 Info: 54 2058 server.c:78 add_connection(): accepting 'telnet' connection from 0 Debug: 55 7671 command.c:425 command_run_line(): poll User: 56 7671 target.c:953 target_arch_state(): target state: running Debug: 57 9589 command.c:425 command_run_line(): reset Debug: 58 9589 target.c:1830 handle_reset_command(): - Debug: 59 9589 ft2232.c:253 ft2232_speed(): 86 01 00 Debug: 60 9589 jtag.c:1568 jtag_init_reset(): Trying to bring the JTAG controller to life by asserting TRST / tms Debug: 61 9589 jtag.c:989 jtag_add_reset(): SRST line released Debug: 62 9589 jtag.c:996 jtag_add_reset(): JTAG reset with tms instead of TRST Debug: 63 9589 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 64 9589 jtag.c:1282 jtag_reset_callback(): - Debug: 65 9589 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 66 9589 jtag.c:1282 jtag_reset_callback(): - Debug: 67 9589 jtag.c:985 jtag_add_reset(): SRST line asserted Debug: 68 9589 jtag.c:996 jtag_add_reset(): JTAG reset with tms instead of TRST Debug: 69 9589 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 70 9589 jtag.c:1282 jtag_reset_callback(): - Debug: 71 9589 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 72 9589 jtag.c:1282 jtag_reset_callback(): - Debug: 73 9589 jtag.c:989 jtag_add_reset(): SRST line released Debug: 74 9589 ft2232.c:1031 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x09, high_direction: 0x0f Debug: 75 9792 ft2232.c:1031 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x0b, high_direction: 0x0f Debug: 76 9792 ft2232.c:1031 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x09, high_direction: 0x0f Debug: 77 9994 jtag.c:1524 jtag_init_inner(): Init JTAG chain Debug: 78 9994 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 79 9994 jtag.c:1282 jtag_reset_callback(): - Debug: 80 9994 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 81 9994 jtag.c:1282 jtag_reset_callback(): - Info: 82 9994 jtag.c:1376 jtag_examine_chain(): JTAG device found: 0x3f0f0f0f (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x3) Debug: 83 9994 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 84 9994 jtag.c:1282 jtag_reset_callback(): - Debug: 85 9994 arm7_9_common.c:736 arm7_9_assert_reset(): target->state: running Debug: 86 9994 jtag.c:985 jtag_add_reset(): SRST line asserted Debug: 87 9994 jtag.c:996 jtag_add_reset(): JTAG reset with tms instead of TRST Debug: 88 9994 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 89 9994 jtag.c:1282 jtag_reset_callback(): - Debug: 90 9994 jtag.c:319 jtag_call_event_callbacks(): jtag event: JTAG controller reset(tms or TRST) Debug: 91 9994 jtag.c:1282 jtag_reset_callback(): - Debug: 92 9994 ft2232.c:1031 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x03, high_direction: 0x0f Debug: 93 10057 arm7_9_common.c:789 arm7_9_deassert_reset(): target->state: reset Debug: 94 10057 jtag.c:989 jtag_add_reset(): SRST line released Debug: 95 10057 ft2232.c:1031 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x01, high_direction: 0x0f Debug: 96 10259 target.c:410 target_process_reset(): Waiting for halted stated as approperiate Debug: 97 10259 arm7_9_common.c:926 arm7_9_halt(): target->state: running Debug: 98 10259 embeddedice.c:397 embeddedice_write_reg(): 9: 0xffffffff Debug: 99 10259 embeddedice.c:397 embeddedice_write_reg(): 11: 0xffffffff Debug: 100 10259 embeddedice.c:397 embeddedice_write_reg(): 12: 0x00000100 Debug: 101 10259 embeddedice.c:397 embeddedice_write_reg(): 13: 0x000000f7 Debug: 102 10259 target.c:424 target_process_reset(): Polling target Debug: 103 10259 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005 Debug: 104 10259 embeddedice.c:397 embeddedice_write_reg(): 12: 0x00000000 Debug: 105 10259 arm7_9_common.c:1028 arm7_9_debug_entry(): target entered debug from Thumb state Debug: 106 10259 arm7_9_common.c:1032 arm7_9_debug_entry(): r0_thumb: 0x0010033d, pc_thumb: 0x00100372 Debug: 107 10259 arm7_9_common.c:1068 arm7_9_debug_entry(): target entered debug state in System mode Debug: 108 10259 arm7_9_common.c:1072 arm7_9_debug_entry(): thumb state, applying fixups Debug: 109 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r0: 0x0010033d Debug: 110 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r1: 0xfffffd30 Debug: 111 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r2: 0x00200098 Debug: 112 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r3: 0xaabbccdd Debug: 113 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r4: 0xffffffff Debug: 114 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r5: 0xffffffff Debug: 115 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r6: 0xffffffff Debug: 116 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r7: 0x002002fc Debug: 117 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r8: 0xffffffff Debug: 118 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r9: 0xffffffff Debug: 119 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r10: 0x002000a4 Debug: 120 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r11: 0x00000000 Debug: 121 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r12: 0xffffffff Debug: 122 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r13: 0x002002fc Debug: 123 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r14: 0x0010033d Debug: 124 10259 arm7_9_common.c:1097 arm7_9_debug_entry(): r15: 0x0010036c Debug: 125 10259 arm7_9_common.c:1103 arm7_9_debug_entry(): entered debug state at PC 0x10036c Debug: 126 10259 target.c:723 target_call_event_callbacks(): target event 0 User: 127 10259 target.c:953 target_arch_state(): target state: halted User: 128 10259 armv4_5.c:304 armv4_5_arch_state(): target halted in Thumb state due to debug request, current mode: System cpsr: 0x0000001f pc: 0x0010036c Debug: 129 10259 configuration.c:87 open_file_from_path(): opened event/at91sam7s_reset.script Info: 130 10259 target.c:237 target_init_handler(): executing reset script 'event/at91sam7s_reset.script' Debug: 131 10259 command.c:425 command_run_line(): soft_reset_halt User: 132 10259 target.c:1817 handle_soft_reset_halt_command(): requesting target halt and executing a soft reset Debug: 133 10259 arm7_9_common.c:926 arm7_9_halt(): target->state: halted Debug: 134 10259 arm7_9_common.c:930 arm7_9_halt(): target was already halted Debug: 135 10259 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005 Debug: 136 10259 embeddedice.c:397 embeddedice_write_reg(): 12: 0x00000000 Debug: 137 10259 arm7_9_common.c:885 arm7_9_soft_reset_halt(): target entered debug from Thumb state, changing to ARM Debug: 138 10275 target.c:723 target_call_event_callbacks(): target event 0 User: 139 10275 target.c:953 target_arch_state(): target state: halted User: 140 10275 armv4_5.c:304 armv4_5_arch_state(): target halted in ARM state due to debug request, current mode: Supervisor cpsr: 0x000000d3 pc: 0x00000000 Debug: 141 10275 command.c:425 command_run_line(): mww 0xfffffd00 0xa5000004 Debug: 142 10275 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000004 Debug: 143 10275 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005 Debug: 144 10275 command.c:425 command_run_line(): sleep 10 Debug: 145 10291 command.c:425 command_run_line(): mww 0xfffffd44 0x00008000 Debug: 146 10291 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000004 Debug: 147 10400 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005 Debug: 148 10400 command.c:425 command_run_line(): mww 0xfffffd08 0xa5000401 Debug: 149 10400 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000004 Debug: 150 10509 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005 Debug: 151 10509 command.c:425 command_run_line(): mww 0xfffffc20 0x00000601 Debug: 152 10509 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000004 Debug: 153 10618 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005 Debug: 154 10618 command.c:425 command_run_line(): sleep 100 Debug: 155 10727 command.c:425 command_run_line(): mww 0xfffffc2c 0x00481c0e Debug: 156 10727 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000004 Debug: 157 10836 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005 Debug: 158 10836 command.c:425 command_run_line(): sleep 100 Debug: 159 10945 command.c:425 command_run_line(): mww 0xfffffc30 0x00000007 Debug: 160 10945 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000004 Debug: 161 11055 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005 Debug: 162 11055 command.c:425 command_run_line(): sleep 10 Debug: 163 11070 command.c:425 command_run_line(): mww 0xffffff60 0x00490100 Debug: 164 11070 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000004 Debug: 165 11070 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005 Debug: 166 11070 ft2232.c:253 ft2232_speed(): 86 01 00 Debug: 167 19240 telnet_server.c:416 telnet_input(): unhandled nonprintable: 03
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development