Just took a quick look and the one thing that jumped out at me was your JTAG speed. jtag_speed is a depreciated command ... it should be jtag_khz. I too have a eval board based on a ARM926EJS core ... it is a Atmel at91sam9260ek based board. The thing I ran into was my board initially runs using the 32k clock which required me to use a setting of jtag_khz 4 until all the required registers are initialized (Clocks, SDRAM timing etc.) and then I could bump up to jtag_khz 3000 and it would work with my board.
Not sure that helps you but maybe my experience applies to your situation. Regards, Brian On Tue, May 26, 2009 at 9:18 PM, jie.zeng <jie.z...@soliton.com.cn> wrote: > Hello list, > > I'm new to OpenOCD. Now I'm trying to make the config files for our new > eval board which use the ARM926EJS core. Many problems come up that I > can't solve alone. > > Environment: > Eval Board and CPU core is ARM926EJS. > JTAG Adapter is a OpenJTAG compatible one (USB<=>JTAG). > Debian(etch). > OpenOCD is the lastest version from svnroot. > > First please have a look my config files: > > ### interface.cfg ### > interface ft2232 > jtag_speed 0 > ft2232_vid_pid 0x1457 0x5118 > ft2232_layout "jtagkey_prototype_v1" > ft2232_device_desc "USB<=>JTAG&RS232" > > ### flash.cfg ### > # flash bank <driver> <base> <size> <chip_width> <bus_width> <target#> > flash bank cfi 0x10000000 0x01000000 2 2 0 > > ### target.cfg ### > reset_config trst_and_srst > > if { [info exists CHIPNAME] } { > set _CHIPNAME $CHIPNAME > } else { > set _CHIPNAME arm926ejs > } > > if { [info exists ENDIAN] } { > set _ENDIAN $ENDIAN > } else { > set _ENDIAN little > } > > if { [info exists CPUTAPID ] } { > set _CPUTAPID $CPUTAPID > } else { > # From ARM926EJS Tech Ref Manual > set _CPUTAPID 0x07926F0F > } > > if { [info exists FLASHTAPID ] } { > set _CPUTAPID $FLASHTAPID > } > > if { [info exists BSTAPID ] } { > set _CPUTAPID $BSTAPID > } > > # cpu tap > jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf > -expected-id $_CPUTAPID > # flash tap > #jtag newtap $_CHIPNAME flash -irlen 4 -ircapture 0x1 -irmask 0xf > # bs tap > #jtag newtap $_CHIPNAME bs -irlen 4 -ircapture 0x1 -irmask 0xf > -expected-id $_BSTAPID > > set _TARGETNAME [format "%s.cpu" $_CHIPNAME] > > # target create <NAME> <TYPE> <PARAMS ...> > target create $_TARGETNAME arm926ejs \ > -endian $_ENDIAN \ > -chain-position $_TARGETNAME \ > -variant arm926ejs > > jtag_nsrst_delay 200 > jtag_ntrst_delay 200 > > ### board.cfg ### > > debug_level 3 > telnet_port 3333 > gdb_port 4444 > > source [find config/interface.cfg] > source [find config/target.cfg] > source [find config/flash.cfg] > > $_TARGETNAME configure -event reset-init { > > # needed and whats it, its from board datasheet register part?? > mww 0x72000000 0x00000021 # Memory Interface Config > mww 0x72000004 0x00000020 # DRAM Param Config > mww 0x72000010 0x322b8e83 # DRAM Timing Param 0 > mww 0x72000014 0x140F10C8 # DRAM Timing Param 1 > mww 0x72000018 0x0007030D # DRAM Timing Param 2 > mww 0x72000030 0x00000030 # DDQ Output Delay Control(DDR only) > > # > # Bank 0 at 0x10000000 > # Bank 1 at 0x11000000 > # Bank 2 at 0x12000000 > # Bank 3 at 0x13000000 > # > mww 0x73000000 0x00000000 # Mem Bank 0 Config > > mww 0x76000000 0x00000000 # Remap ? > # whats it > flash probe 0 > } > > $_TARGETNAME configure \ > -work-area-phys 0x300000 \ > -work-area-size 65536 \ > -work-area-backup 0 > > > That's all my current file. When I run openocd, I got following output > and I'm sure something must be wrong. > > ### output.log ### > c...@cj:~/openocd/bin$ sudo ./openocd -f board.cfg > Open On-Chip Debugger 0.2.0-in-development (2009-05-26-10:57) svn:1913M > > > BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS > > > $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $ > Debug: 6 0 command.c:88 script_command(): script_command - telnet_port > Debug: 7 0 command.c:105 script_command(): script_command - telnet_port, > argv[0]=ocd_telnet_port > Debug: 8 0 command.c:105 script_command(): script_command - telnet_port, > argv[1]=3333 > Debug: 10 0 command.c:88 script_command(): script_command - gdb_port > Debug: 11 0 command.c:105 script_command(): script_command - gdb_port, > argv[0]=ocd_gdb_port > Debug: 12 0 command.c:105 script_command(): script_command - gdb_port, > argv[1]=4444 > Debug: 13 1 configuration.c:83 find_file(): found config/interface.cfg > Debug: 15 1 command.c:88 script_command(): script_command - interface > Debug: 16 1 command.c:105 script_command(): script_command - interface, > argv[0]=ocd_interface > Debug: 17 1 command.c:105 script_command(): script_command - interface, > argv[1]=ft2232 > Debug: 19 1 command.c:88 script_command(): script_command - jtag_speed > Debug: 20 1 command.c:105 script_command(): script_command - jtag_speed, > argv[0]=ocd_jtag_speed > Debug: 21 1 command.c:105 script_command(): script_command - jtag_speed, > argv[1]=0 > Debug: 22 1 jtag.c:2767 handle_jtag_speed_command(): handle jtag speed > User : 23 1 command.c:380 command_print(): jtag_speed: 0 > Debug: 25 1 command.c:88 script_command(): script_command - > ft2232_vid_pid > Debug: 26 1 command.c:105 script_command(): script_command - > ft2232_vid_pid, argv[0]=ocd_ft2232_vid_pid > Debug: 27 1 command.c:105 script_command(): script_command - > ft2232_vid_pid, argv[1]=0x1457 > Debug: 28 1 command.c:105 script_command(): script_command - > ft2232_vid_pid, argv[2]=0x5118 > Debug: 30 8 command.c:88 script_command(): script_command - > ft2232_layout > Debug: 31 8 command.c:105 script_command(): script_command - > ft2232_layout, argv[0]=ocd_ft2232_layout > Debug: 32 8 command.c:105 script_command(): script_command - > ft2232_layout, argv[1]=jtagkey_prototype_v1 > Debug: 34 8 command.c:88 script_command(): script_command - > ft2232_device_desc > Debug: 35 9 command.c:105 script_command(): script_command - > ft2232_device_desc, argv[0]=ocd_ft2232_device_desc > Debug: 36 9 command.c:105 script_command(): script_command - > ft2232_device_desc, argv[1]=USB<=>JTAG&RS232 > Debug: 37 9 configuration.c:83 find_file(): found config/target.cfg > Debug: 39 9 command.c:88 script_command(): script_command - reset_config > Debug: 40 9 command.c:105 script_command(): script_command - > reset_config, argv[0]=ocd_reset_config > Debug: 41 9 command.c:105 script_command(): script_command - > reset_config, argv[1]=trst_and_srst > Debug: 42 9 command.c:105 script_command(): script_command - > reset_config, argv[2]=srst_pulls_trst > Debug: 43 9 jtag.c:2033 jim_newtap_cmd(): Creating New Tap, Chip: > arm926ejs, Tap: cpu, Dotted: arm926ejs.cpu, 8 params > Debug: 44 9 jtag.c:2052 jim_newtap_cmd(): Processing option: -irlen > Debug: 45 9 jtag.c:2052 jim_newtap_cmd(): Processing option: -ircapture > Debug: 46 9 jtag.c:2052 jim_newtap_cmd(): Processing option: -irmask > Debug: 47 9 jtag.c:2052 jim_newtap_cmd(): Processing option: > -expected-id > Debug: 48 9 jtag.c:2165 jim_newtap_cmd(): Created Tap: arm926ejs.cpu @ > abs position 0, irlen 4, capture: 0x1 mask: 0xf > Debug: 49 9 target.c:3969 jim_target(): Target command params: > Debug: 50 9 target.c:3970 jim_target(): target create arm926ejs.cpu > arm926ejs -endian little -chain-position arm926ejs.cpu -variant > arm926ejs > Debug: 52 10 command.c:88 script_command(): script_command - > jtag_nsrst_delay > Debug: 53 10 command.c:105 script_command(): script_command - > jtag_nsrst_delay, argv[0]=ocd_jtag_nsrst_delay > Debug: 54 10 command.c:105 script_command(): script_command - > jtag_nsrst_delay, argv[1]=200 > Debug: 56 10 command.c:88 script_command(): script_command - > jtag_ntrst_delay > Debug: 57 10 command.c:105 script_command(): script_command - > jtag_ntrst_delay, argv[0]=ocd_jtag_ntrst_delay > Debug: 58 10 command.c:105 script_command(): script_command - > jtag_ntrst_delay, argv[1]=200 > Debug: 59 10 configuration.c:83 find_file(): found config/flash.cfg > Debug: 61 11 command.c:88 script_command(): script_command - bank > Debug: 62 11 command.c:105 script_command(): script_command - bank, > argv[0]=ocd_flash_bank > Debug: 63 11 command.c:105 script_command(): script_command - bank, > argv[1]=cfi > Debug: 64 11 command.c:105 script_command(): script_command - bank, > argv[2]=0x10000000 > Debug: 65 11 command.c:105 script_command(): script_command - bank, > argv[3]=0x01000000 > Debug: 66 31 command.c:105 script_command(): script_command - bank, > argv[4]=2 > Debug: 67 31 command.c:105 script_command(): script_command - bank, > argv[5]=2 > Debug: 68 31 command.c:105 script_command(): script_command - bank, > argv[6]=0 > User : 70 31 command.c:493 command_run_line(): > Debug: 72 31 command.c:88 script_command(): script_command - init > Debug: 73 31 command.c:105 script_command(): script_command - init, > argv[0]=ocd_init > Debug: 74 32 openocd.c:131 handle_init_command(): target init complete > Debug: 75 32 ft2232.c:1981 ft2232_init(): ft2232 interface using > shortest path jtag state transitions > Debug: 76 32 ft2232.c:1900 ft2232_init_libftdi(): 'ft2232' interface > using libftdi with 'jtagkey_prototype_v1' layout (1457:5118) > Debug: 77 81 ft2232.c:1944 ft2232_init_libftdi(): current latency timer: > 2 > Debug: 78 84 ft2232.c:2215 jtagkey_init(): 80 08 1b > Debug: 79 87 ft2232.c:2273 jtagkey_init(): 82 06 0f > Debug: 80 90 ft2232.c:422 ft2232_speed(): 86 00 00 > Debug: 81 112 openocd.c:138 handle_init_command(): jtag interface init > complete > Debug: 82 112 jtag.c:2387 jtag_init_inner(): Init JTAG chain > Debug: 83 112 jtag.c:413 jtag_call_event_callbacks(): jtag event: JTAG > controller reset (RESET or TRST) > Debug: 84 112 jtag.c:1630 jtag_reset_callback(): - > Debug: 85 112 jtag.c:413 jtag_call_event_callbacks(): jtag event: JTAG > controller reset (RESET or TRST) > Debug: 86 112 jtag.c:1630 jtag_reset_callback(): - > Error: 87 118 jtag.c:1685 jtag_examine_chain(): JTAG communication > failure, check connection, JTAG interface, target power etc. > Error: 88 118 jtag.c:2402 jtag_init_inner(): trying to validate > configured JTAG chain anyway... > Debug: 89 118 jtag.c:413 jtag_call_event_callbacks(): jtag event: JTAG > controller reset (RESET or TRST) > Debug: 90 118 jtag.c:1630 jtag_reset_callback(): - > Error: 91 122 jtag.c:1861 jtag_validate_chain(): Could not validate JTAG > scan chain, IR mismatch, scan returned 0x00. tap=arm926ejs.cpu pos=0 > expected 0x1 got 0 > Warn : 92 128 jtag.c:2407 jtag_init_inner(): Could not validate JTAG > chain, continuing anyway... > Debug: 93 128 openocd.c:144 handle_init_command(): jtag init complete > Warn : 94 147 jtag.c:1473 jtag_check_value_inner(): value captured > during scan didn't pass the requested check: > Warn : 95 147 jtag.c:1475 jtag_check_value_inner(): captured: 0x00 > check_value: 0x01 check_mask: 0x0F > Debug: 96 148 openocd.c:153 handle_init_command(): flash init complete > Debug: 97 148 openocd.c:157 handle_init_command(): mflash init complete > Debug: 98 148 openocd.c:161 handle_init_command(): NAND init complete > Debug: 99 148 openocd.c:165 handle_init_command(): pld init complete > Debug: 100 148 gdb_server.c:2215 gdb_init(): gdb service for target > arm926ejs at port 4444 > Debug: 101 148 tcl_server.c:168 tcl_init(): no tcl port specified, using > default port 6666 > > > The init chain lines show the faliure but I've no idea why. I'm not > familiar with OpenOCD and its config things. The config files is also > from $INSTALLDIR/lib/openocd/... and with just a few changes(at > interface and flash part). > > The questions as below: > > Are there somethings wrong in those files? > When reset-init will be called and what's the function? How can I know I > need this? From core's datasheet? > > Any help is appreciated. Thanks in advance. > > -- > ZJ > > > _______________________________________________ > Openocd-development mailing list > Openocd-development@lists.berlios.de > https://lists.berlios.de/mailman/listinfo/openocd-development >
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development