реклама на сайте
подробности

 
 
> OpenOCD + MT_link v5: проблемы
Doka
сообщение Jan 20 2009, 20:18
Сообщение #1


Electrical Engineer
******

Группа: СуперМодераторы
Сообщений: 2 163
Регистрация: 4-10-04
Пользователь №: 778



при попытке запуска OpenOCD с MT_link v5 (с подключенным target)
вываливается такое:

Код
$ openocd -f SK-MLPC2468.cfg -f mt-link.cfg
Open On-Chip Debugger 1.0 (2008-12-27-22:43) svn:1282

$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
Debug: 8 8 command.c:91 script_command(): script_command - fast
Debug: 9 10 command.c:108 script_command(): script_command - fast, argv[0]=ocd_fast
Debug: 10 11 command.c:108 script_command(): script_command - fast, argv[1]=disable
Debug: 12 12 command.c:91 script_command(): script_command - jtag_speed
Debug: 13 13 command.c:108 script_command(): script_command - jtag_speed, argv[0]=ocd_jtag_speed
Debug: 14 13 command.c:108 script_command(): script_command - jtag_speed, argv[1]=3
Debug: 15 14 jtag.c:2581 handle_jtag_speed_command(): handle jtag speed
User : 16 14 command.c:383 command_print(): jtag_speed: 3
Debug: 18 16 command.c:91 script_command(): script_command - jtag_nsrst_delay
Debug: 19 16 command.c:108 script_command(): script_command - jtag_nsrst_delay, argv[0]=ocd_jtag_nsrst_delay
Debug: 20 17 command.c:108 script_command(): script_command - jtag_nsrst_delay, argv[1]=200
Debug: 22 18 command.c:91 script_command(): script_command - jtag_ntrst_delay
Debug: 23 19 command.c:108 script_command(): script_command - jtag_ntrst_delay, argv[0]=ocd_jtag_ntrst_delay
Debug: 24 19 command.c:108 script_command(): script_command - jtag_ntrst_delay, argv[1]=200
Debug: 26 20 command.c:91 script_command(): script_command - reset_config
Debug: 27 21 command.c:108 script_command(): script_command - reset_config, argv[0]=ocd_reset_config
Debug: 28 21 command.c:108 script_command(): script_command - reset_config, argv[1]=trst_and_srst
Debug: 29 22 command.c:108 script_command(): script_command - reset_config, argv[2]=srst_pulls_trst
Debug: 30 23 jtag.c:1854 jim_newtap_cmd(): Creating New Tap, Chip: lpc2468, Tap: cpu, Dotted: lpc2468.cpu, 8 params
Debug: 31 24 jtag.c:1873 jim_newtap_cmd(): Processing option: -irlen
Debug: 32 24 jtag.c:1873 jim_newtap_cmd(): Processing option: -ircapture
Debug: 33 24 jtag.c:1873 jim_newtap_cmd(): Processing option: -irmask
Debug: 34 24 jtag.c:1873 jim_newtap_cmd(): Processing option: -expected-id
Debug: 35 24 jtag.c:1986 jim_newtap_cmd(): Created Tap: lpc2468.cpu @ abs position 0, irlen 4, capture: 0x1 mask: 0xf
Debug: 36 25 target.c:3911 jim_target(): Target command params:
Debug: 37 25 target.c:3912 jim_target(): target create lpc2468.cpu arm7tdmi -endian little -chain-position lpc2468.cpu -variant arm7tdmi-s_r4
Debug: 39 26 command.c:91 script_command(): script_command - bank
Debug: 40 26 command.c:108 script_command(): script_command - bank, argv[0]=ocd_flash_bank
Debug: 41 26 command.c:108 script_command(): script_command - bank, argv[1]=lpc2000
Debug: 42 26 command.c:108 script_command(): script_command - bank, argv[2]=0x0
Debug: 43 26 command.c:108 script_command(): script_command - bank, argv[3]=0x7d000
Debug: 44 27 command.c:108 script_command(): script_command - bank, argv[4]=0
Debug: 45 27 command.c:108 script_command(): script_command - bank, argv[5]=0
Debug: 46 28 command.c:108 script_command(): script_command - bank, argv[6]=0
Debug: 47 28 command.c:108 script_command(): script_command - bank, argv[7]=lpc2000_v2
Debug: 48 29 command.c:108 script_command(): script_command - bank, argv[8]=12000
Debug: 50 30 command.c:91 script_command(): script_command - gdb_flash_program
Debug: 51 31 command.c:108 script_command(): script_command - gdb_flash_program, argv[0]=ocd_gdb_flash_program
Debug: 52 31 command.c:108 script_command(): script_command - gdb_flash_program, argv[1]=enable
Debug: 54 33 command.c:91 script_command(): script_command - fast
Debug: 55 33 command.c:108 script_command(): script_command - fast, argv[0]=ocd_fast
Debug: 56 33 command.c:108 script_command(): script_command - fast, argv[1]=enable
Debug: 58 34 command.c:91 script_command(): script_command - jtag_khz
Debug: 59 35 command.c:108 script_command(): script_command - jtag_khz, argv[0]=ocd_jtag_khz
Debug: 60 35 command.c:108 script_command(): script_command - jtag_khz, argv[1]=100
Debug: 61 36 jtag.c:2606 handle_jtag_khz_command(): handle jtag khz
User : 62 36 command.c:383 command_print(): 100 kHz
Debug: 64 37 command.c:91 script_command(): script_command - debug_level
Debug: 65 38 command.c:108 script_command(): script_command - debug_level, argv[0]=ocd_debug_level
Debug: 66 38 command.c:108 script_command(): script_command - debug_level, argv[1]=1
Error: J-Link command 0x01 failed (-1)
Error: J-Link command EMU_CMD_VERSION failed (-1)

Error: J-Link command 0x01 failed (-1)
Error: J-Link command EMU_CMD_VERSION failed (-1)

Error: J-Link command 0x01 failed (-1)
Error: J-Link command EMU_CMD_VERSION failed (-1)

Error: J-Link command 0xdd failed (-1)
Error: J-Link command 0xdf failed (-1)
Error: usb_bulk_write failed (requested=6, result=-1)
Error: jlink_tap_execute, wrong result -1, expected 1
Error: usb_bulk_write failed (requested=6, result=-1)
Error: jlink_tap_execute, wrong result -1, expected 1
Error: J-Link command 0xdd failed (-1)
Error: J-Link command 0xde failed (-1)
Error: usb_bulk_write failed (requested=6, result=-1)
Error: jlink_tap_execute, wrong result -1, expected 1
Error: usb_bulk_write failed (requested=6, result=-1)
Error: jlink_tap_execute, wrong result -1, expected 1
Error: J-Link command 0xdc failed (-1)
Error: J-Link command 0xde failed (-1)
Error: usb_bulk_write failed (requested=6, result=-1)
Error: jlink_tap_execute, wrong result -1, expected 1
Error: J-Link command 0xdd failed (-1)
Error: J-Link command 0xdf failed (-1)
Error: usb_bulk_write failed (requested=6, result=-1)
Error: jlink_tap_execute, wrong result -1, expected 1
Error: usb_bulk_write failed (requested=6, result=-1)
Error: jlink_tap_execute, wrong result -1, expected 1
Error: usb_bulk_write failed (requested=6, result=-1)
Error: jlink_tap_execute, wrong result -1, expected 1
Warn : no tcl port specified, using default port 6666


сам MT_link v5 дееспособный, висит на шине с правильными ID:
Код
$ /sbin/lsusb
Bus 002 Device 012: ID 1366:0101


конфиг такой:
Код
$ cat mt-link.cfg
interface jlink


Код
$ cat SK-MLPC2468.cfg
#  OpenOCD configuration for LPC23xx/LPC24xx

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface

# slow and verbose during init:
debug_level 3
fast disable
#jtag_speed 100
jtag_speed 3


if { [info exists CHIPNAME] } {
   set  _CHIPNAME $CHIPNAME
} else {
   set  _CHIPNAME lpc2468
}

if { [info exists ENDIAN] } {
   set  _ENDIAN $ENDIAN
} else {
   set  _ENDIAN little
}

if { [info exists CPUTAPID ] } {
   set _CPUTAPID $CPUTAPID
} else {
  # force an error till we get a good number
   set _CPUTAPID 0x4f1f0f0f
}


# delays on reset lines
jtag_nsrst_delay 200
jtag_ntrst_delay 200

# use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst

#jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID

set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
$_TARGETNAME configure -event reset-init {
        # Force target into ARM state
        soft_reset_halt
        #do not remap 0x0000-0x0020 to anything but the flash
        mwb 0xE01FC040 0x01

}

#
# scipts/macros/user commands - this is TCL (variant JIM):
#
proc mt_internal_rc {} {
         jtag_khz 20
         reset run
         sleep 100
         reset halt
         wait_halt 2
         # PLL disconnect PLLCON
         mww 0xE01FC080 0x01
         mww 0xE01FC08C 0xAA
         mww 0xE01FC08C 0x55
         # PLL disable PLLCON
         mww 0xE01FC080 0x00
         mww 0xE01FC08C 0xAA
         mww 0xE01FC08C 0x55
         # no prescaler CCLKCFG
         mww 0xE01FC104 0x00
         #  internal RC CLKSRCSEL
         mww 0xE01FC10C 0x00
         #### main oscil. CLKSRCSEL
         #### mww 0xE01FC10C 0x01
         # remap to internal flash
         mww 0xE01FC040 0x01
         jtag_khz 100
         flash probe 0
}

proc mt_flash_bin {IMGFILE OFFSET} {
         mt_internal_rc
         flash write_image erase $IMGFILE $OFFSET
         sleep 100
         verify_image $IMGFILE $OFFSET
         sleep 100
}

proc mt_flash {IMGFILE} {
         mt_internal_rc
         flash write_image erase $IMGFILE
         sleep 100
         verify_image $IMGFILE
         sleep 100
}

flash bank lpc2000 0x0 0x7d000 0 0 0 lpc2000_v2 12000

gdb_flash_program enable

#init
fast enable
jtag_khz 100
debug_level 1



опции сборки OpenOCD такие:
Код
./configure --enable-ioutil --enable-usbprog   --enable-jlink


кто виноват и что делать?


--------------------
Блог iDoka.ru
CV linkedin.com/in/iDoka
Sources github.com/iDoka


Never stop thinking...........................
Go to the top of the page
 
+Quote Post



Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 21st July 2025 - 09:16
Рейтинг@Mail.ru


Страница сгенерированна за 0.01376 секунд с 7
ELECTRONIX ©2004-2016