Benjamin Eckl wrote on 2009-11-05 23:05:41: > I've a bug report, > > # Target PCB/board description > STR750, wiggler style dongle > > # openocd version > latest clone out of git > > # Configuration scripts > openocd.cfg > ------------------------------------------------------- > source [find target/str750.cfg] > > #jtag_khz 0 > # Fall back to 3mhz if RCLK is not supported > #jtag_rclk 3000 > > #jtag_speed 2 > > interface parport > parport_port 0 > # modified wiggler cable, added in parport.cfg > parport_cable byteblaster2 > > #jtag_khz 2 > > #jtag_khz 0 > #jtag_rclk 3000 > > # GDB can also flash my flash! > gdb_memory_map enable > gdb_flash_program enable > ------------------------------------------------------- > > > # OpenOCD command line > $ openocd > > > # Actual result > Tried almost every speed or khz or rclk combination and none works > without one single translation error.
The parport interfaces do not support jtag_khz or jtag_rclk commands. You have to use the undocumented jtag_speed command. jtag_speed takes a interface specific value as a parameter. For the parport interface it sets the number of dummy parallel port writes that shall be performed for each transition of the JTAG signals. The parallel port write delay differ between computers, but it should be close to 1 us. I measured it to be 1.37us for my PC. Two examples for a 1 us write time: # Max speed: 2 * (1us + 0us) = 2us -> 500kHz jtag_speed 0 # 10kHz -> 100us = 2 * (1us + 49us) jtag_speed 49 > > # Logs using debug_level 3 > logfile > ------------------------------------------------------- > > Debug: 10 0 configuration.c:83 find_file(): found openocd.cfg > Debug: 11 0 configuration.c:83 find_file(): found > /usr/local/share/openocd/scripts/target/str750.cfg > Debug: 13 0 command.c:68 script_debug(): command - jtag_khz > Debug: 14 0 command.c:77 script_debug(): jtag_khz - argv[0]=ocd_jtag_khz > Debug: 15 0 command.c:77 script_debug(): jtag_khz - argv[1]=10 > Debug: 16 0 core.c:1581 jtag_config_khz(): handle jtag khz > Debug: 17 0 core.c:1537 jtag_khz_to_speed(): convert khz to interface > specific speed value > User : 18 0 command.c:400 command_print(): 10 kHz > Debug: 20 0 command.c:68 script_debug(): command - reset_config > Debug: 21 0 command.c:77 script_debug(): reset_config - > argv[0]=ocd_reset_config > Debug: 22 0 command.c:77 script_debug(): reset_config - > argv[1]=trst_and_srst > Debug: 23 0 command.c:77 script_debug(): reset_config - > argv[2]=srst_pulls_trst > User : 24 0 command.c:400 command_print(): trst_and_srst srst_pulls_trst > srst_gates_jtag trst_push_pull srst_open_drain > Debug: 25 0 tcl.c:245 jim_newtap_cmd(): Creating New Tap, Chip: str750, > Tap: cpu, Dotted: str750.cpu, 8 params > Debug: 26 0 tcl.c:262 jim_newtap_cmd(): Processing option: -irlen > Debug: 27 0 tcl.c:262 jim_newtap_cmd(): Processing option: -ircapture > Debug: 28 0 tcl.c:262 jim_newtap_cmd(): Processing option: -irmask > Debug: 29 0 tcl.c:262 jim_newtap_cmd(): Processing option: -expected-id > Debug: 30 0 core.c:1314 jtag_tap_init(): Created Tap: str750.cpu @ abs > position 0, irlen 4, capture: 0x1 mask: 0xf > Debug: 32 0 command.c:68 script_debug(): command - jtag_nsrst_delay > Debug: 33 0 command.c:77 script_debug(): jtag_nsrst_delay - > argv[0]=ocd_jtag_nsrst_delay > Debug: 34 0 command.c:77 script_debug(): jtag_nsrst_delay - argv[1]=500 > User : 35 0 command.c:400 command_print(): jtag_nsrst_delay: 500 > Debug: 37 1 command.c:68 script_debug(): command - jtag_ntrst_delay > Debug: 38 1 command.c:77 script_debug(): jtag_ntrst_delay - > argv[0]=ocd_jtag_ntrst_delay > Debug: 39 1 command.c:77 script_debug(): jtag_ntrst_delay - argv[1]=500 > User : 40 1 command.c:400 command_print(): jtag_ntrst_delay: 500 > Debug: 41 1 target.c:4555 jim_target(): Target command params: > Debug: 42 1 target.c:4556 jim_target(): target create str750.cpu > arm7tdmi -endian little -chain-position 0 -variant arm7tdmi > Warn : 43 1 core.c:236 jtag_tap_by_string(): Specify TAP 'str750.cpu' by > name, not number 0 > Debug: 45 1 command.c:68 script_debug(): command - bank > Debug: 46 1 command.c:77 script_debug(): bank - argv[0]=ocd_flash_bank > Debug: 47 1 command.c:77 script_debug(): bank - argv[1]=str7x > Debug: 48 1 command.c:77 script_debug(): bank - argv[2]=0x20000000 > Debug: 49 1 command.c:77 script_debug(): bank - argv[3]=0x00040000 > Debug: 50 1 command.c:77 script_debug(): bank - argv[4]=0 > Debug: 51 1 command.c:77 script_debug(): bank - argv[5]=0 > Debug: 52 1 command.c:77 script_debug(): bank - argv[6]=0 > Debug: 53 1 command.c:77 script_debug(): bank - argv[7]=STR75x > Warn : 54 1 target.c:344 get_target(): use 'str750.cpu' as target > identifier, not '0' > Debug: 56 1 command.c:68 script_debug(): command - bank > Debug: 57 1 command.c:77 script_debug(): bank - argv[0]=ocd_flash_bank > Debug: 58 1 command.c:77 script_debug(): bank - argv[1]=str7x > Debug: 59 1 command.c:77 script_debug(): bank - argv[2]=0x200C0000 > Debug: 60 1 command.c:77 script_debug(): bank - argv[3]=0x00004000 > Debug: 61 1 command.c:77 script_debug(): bank - argv[4]=0 > Debug: 62 1 command.c:77 script_debug(): bank - argv[5]=0 > Debug: 63 1 command.c:77 script_debug(): bank - argv[6]=0 > Debug: 64 1 command.c:77 script_debug(): bank - argv[7]=STR75x > Warn : 65 1 target.c:344 get_target(): use 'str750.cpu' as target > identifier, not '0' > Debug: 67 1 command.c:68 script_debug(): command - interface > Debug: 68 1 command.c:77 script_debug(): interface - argv[0]=ocd_interface > Debug: 69 1 command.c:77 script_debug(): interface - argv[1]=parport > Debug: 71 1 command.c:68 script_debug(): command - parport_port > Debug: 72 1 command.c:77 script_debug(): parport_port - > argv[0]=ocd_parport_port > Debug: 73 1 command.c:77 script_debug(): parport_port - argv[1]=0 > User : 74 1 command.c:400 command_print(): parport port = 0 > Debug: 76 1 command.c:68 script_debug(): command - parport_cable > Debug: 77 1 command.c:77 script_debug(): parport_cable - > argv[0]=ocd_parport_cable > Debug: 78 1 command.c:77 script_debug(): parport_cable - > argv[1]=byteblaster2 > Debug: 80 1 command.c:68 script_debug(): command - gdb_memory_map > Debug: 81 1 command.c:77 script_debug(): gdb_memory_map - > argv[0]=ocd_gdb_memory_map > Debug: 82 1 command.c:77 script_debug(): gdb_memory_map - argv[1]=enable > Debug: 84 1 command.c:68 script_debug(): command - gdb_flash_program > Debug: 85 1 command.c:77 script_debug(): gdb_flash_program - > argv[0]=ocd_gdb_flash_program > Debug: 86 1 command.c:77 script_debug(): gdb_flash_program - argv[1]=enable > Debug: 88 1 command.c:68 script_debug(): command - init > Debug: 89 1 command.c:77 script_debug(): init - argv[0]=ocd_init > Debug: 90 2 openocd.c:129 handle_init_command(): target init complete > Debug: 91 2 parport.c:337 parport_init(): opening /dev/parport0... > Debug: 92 2 parport.c:350 parport_init(): ...open > Debug: 93 37 parport.c:411 parport_init(): Byteblaster2 tristates > enabled. :) > Debug: 94 37 parport.c:221 parport_reset(): trst: 0, srst: 0 > Debug: 95 37 core.c:1537 jtag_khz_to_speed(): convert khz to interface > specific speed value > Debug: 96 37 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 97 37 tcl.c:668 default_khz(): Translation from khz to jtag_speed > not implemented > Debug: 98 37 core.c:1537 jtag_khz_to_speed(): convert khz to interface > specific speed value > Debug: 99 37 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 100 37 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Error: 101 37 tcl.c:674 default_speed_div(): Translation from jtag_speed > to khz not implemented > Debug: 102 37 core.c:1537 jtag_khz_to_speed(): convert khz to interface > specific speed value > Debug: 103 37 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 104 37 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Info : 105 37 core.c:1354 jtag_interface_init(): interface specific > clock speed value 0 > Debug: 106 37 openocd.c:136 handle_init_command(): jtag interface init > complete > Debug: 107 37 parport.c:221 parport_reset(): trst: 0, srst: 0 > Debug: 108 37 core.c:702 jtag_add_reset(): SRST line released > Debug: 109 37 core.c:727 jtag_add_reset(): TRST line released > Debug: 110 37 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset > Debug: 113 1047 core.c:1378 jtag_init_inner(): Init JTAG chain > Debug: 114 1047 core.c:327 jtag_call_event_callbacks(): jtag event: TAP > reset > Debug: 115 1047 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > Debug: 116 1047 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 117 1047 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Debug: 118 1082 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > Debug: 119 1082 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 120 1082 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Debug: 121 1118 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > Debug: 122 1118 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 123 1118 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Debug: 124 1154 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > Debug: 125 1154 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 126 1154 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Debug: 127 1191 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > Debug: 128 1191 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 129 1191 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Debug: 130 1227 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > Debug: 131 1227 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 132 1227 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Debug: 133 1263 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > Debug: 134 1263 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 135 1263 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Debug: 136 1298 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > Debug: 137 1298 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 138 1298 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Debug: 139 1336 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > Debug: 140 1336 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 141 1336 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Debug: 142 1372 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > Debug: 143 1372 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 144 1372 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Debug: 145 1407 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > Debug: 146 1407 core.c:1541 jtag_khz_to_speed(): have interface set up > Error: 147 1407 tcl.c:668 default_khz(): Translation from khz to > jtag_speed not implemented > Debug: 148 1443 core.c:1537 jtag_khz_to_speed(): convert khz to > interface specific speed value > ( endless repeating ) > > > Hope this information are enough, this is my first try on openocd and > spent already some days on it. > > Thanks! > Best regards Jonas Hörberg _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development