오늘 저는 opiscial Arch Linux 저장소에서 Openocd를 설치했으며 현재 JTAG 어댑터 ULINK-ME과 함께 사용하려고합니다. ULINK-ME는 CMSIS-DAP 디버깅 펌웨어를 사용한다는 것을 알게되었습니다. Openocd는 CMSIS-DAP 드라이버를 가지고 있으므로 어댑터와 통신 할 수 있어야하지만 아래 명령을 작성한 후에 오류가 발생했습니다.JTAG 어댑터 ULINK-ME 및 openocd (ArchLinux에서)
ULINK-ME는 마이크로 컨트롤러 LPC3141을 통합 한 보드 EA3141에 연결합니다. 이는 구성 파일을로드하는 LPC3131과 관련이 있습니다.
sudo openocd -f /usr/local/share/openocd/scripts/interface/cmsis-dap.cfg -f /usr/local/share/openocd/scripts/target/lpc3131.cfg -d3
Open On-Chip Debugger 0.8.0-dev-00175-g8b7acca-dirty (2014-10-14-19:53)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
User : 13 1 command.c:549 command_print(): debug_level: 3
Debug: 14 1 configuration.c:45 add_script_search_dir(): adding /root/.openocd
Debug: 15 1 configuration.c:45 add_script_search_dir(): adding /usr/local/share/openocd/site
Debug: 16 1 configuration.c:45 add_script_search_dir(): adding /usr/local/share/openocd/scripts
Debug: 17 1 configuration.c:86 find_file(): found /usr/local/share/openocd/scripts/interface/cmsis-dap.cfg
Debug: 18 1 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_interface cmsis-dap
Debug: 19 2 command.c:145 script_debug(): command - interface ocd_interface cmsis-dap
Debug: 21 2 command.c:369 register_command_handler(): registering 'ocd_cmsis-dap'...
Debug: 22 2 command.c:369 register_command_handler(): registering 'ocd_cmsis_dap_vid_pid'...
Debug: 23 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 24 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 25 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 26 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 27 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 28 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 29 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 30 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 31 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Info : 32 2 transport.c:118 allow_transports(): only one transport option; autoselect 'cmsis-dap'
Debug: 33 2 adi_v5_cmsis_dap.c:246 cmsis_dap_select(): CMSIS-ADI: cmsis_dap_select
Debug: 34 2 command.c:404 register_command(): command 'cmsis-dap' is already registered in '<global>' context
Debug: 35 2 command.c:369 register_command_handler(): registering 'ocd_cmsis-dap'...
Error: 36 7 cmsis_dap_usb.c:175 cmsis_dap_usb_open(): unable to open CMSIS-DAP device
Error: 37 7 adi_v5_cmsis_dap.c:266 cmsis_dap_select(): unable to init CMSIS-DAP driver
Error: 38 7 transport.c:83 transport_select(): Error selecting 'cmsis-dap' as transport
Debug: 39 7 command.c:631 run_command(): Command failed with error code -4
User : 40 7 command.c:669 command_run_line(): Runtime Error: /usr/local/share/openocd/scripts/interface/cmsis-dap.cfg:7:
in procedure 'script'
at file "embedded:startup.tcl", line 58
in procedure 'interface' called at file "/usr/local/share/openocd/scripts/interface/cmsis-dap.cfg", line 7
왜 오류가 발생하는지 아는 사람이 있습니까?
나는 또한 다른 방법으로 시작하려고했지만 다시 오류를 인쇄합니다. 이번엔 약간 다르다.
sudo openocd -c "interface cmsis-dap" -f /usr/local/share/openocd/scripts/target/lpc3131.cfg -d3
Open On-Chip Debugger 0.8.0-dev-00175-g8b7acca-dirty (2014-10-14-19:53)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
User : 13 2 command.c:549 command_print(): debug_level: 3
Debug: 14 2 configuration.c:45 add_script_search_dir(): adding /root/.openocd
Debug: 15 2 configuration.c:45 add_script_search_dir(): adding /usr/local/share/openocd/site
Debug: 16 2 configuration.c:45 add_script_search_dir(): adding /usr/local/share/openocd/scripts
Debug: 17 2 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_interface cmsis-dap
Debug: 18 2 command.c:145 script_debug(): command - interface ocd_interface cmsis-dap
Debug: 20 2 command.c:369 register_command_handler(): registering 'ocd_cmsis-dap'...
Debug: 21 2 command.c:369 register_command_handler(): registering 'ocd_cmsis_dap_vid_pid'...
Debug: 22 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 23 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 24 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 25 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 26 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 27 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 28 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 29 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 30 2 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Info : 31 2 transport.c:118 allow_transports(): only one transport option; autoselect 'cmsis-dap'
Debug: 32 2 adi_v5_cmsis_dap.c:246 cmsis_dap_select(): CMSIS-ADI: cmsis_dap_select
Debug: 33 2 command.c:404 register_command(): command 'cmsis-dap' is already registered in '<global>' context
Debug: 34 2 command.c:369 register_command_handler(): registering 'ocd_cmsis-dap'...
Error: 35 7 cmsis_dap_usb.c:175 cmsis_dap_usb_open(): unable to open CMSIS-DAP device
Error: 36 7 adi_v5_cmsis_dap.c:266 cmsis_dap_select(): unable to init CMSIS-DAP driver
Error: 37 7 transport.c:83 transport_select(): Error selecting 'cmsis-dap' as transport
Debug: 38 7 command.c:631 run_command(): Command failed with error code -4
User : 39 7 command.c:669 command_run_line(): in procedure 'interface'
는
UPDATE : 대한`sudo는 lsusb -v 명령의
출력 ULINK는-ME는 다음과 같습니다
Bus 005 Device 018: ID c251:2721 Keil Software, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0xc251 Keil Software, Inc.
idProduct 0x2721
bcdDevice 1.00
iManufacturer 4 Keil Software
iProduct 32 Keil ULINK-ME
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 25
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Device Status: 0x0000
(Bus Powered)
에는 문자열 "CMSIS-DAP는"이 없기 때문에 그것에서 CMSIS-DAP 펌웨어가없는 오래된 ULINK-ME (2013 년에 구입 한) 어댑터가 있음을 의미합니다. Keil은 CMSIS-DAP를 기존의 ULINK-ME에 깜박이는 방법을 제공하기를 바랍니다.
는 해결책 :
나는 카일에게 쓴 그들은 ULINK-ME의 펌웨어를 업데이트 할 수 있다고 주장하고 사실이다. 그들은이 세 가지 링크에 나를 지적 :
2. - upgrade if Keil uVision hasn't done this by itself in point 1.
3. - manipulate your ULINK-ME even further
내가 (매우 숨겨진 아이콘을 클릭 한 후 Windows 시스템에서 MDK-ARM의 V5를 설치하고 마법을했다 지팡이). 디버깅 중에 ULINK2/ME 옵션을 선택하고 자체적으로 펌웨어를 업데이트했습니다. 지금은 내 ULINK-ME (구형 모델)에 CMSIS-DAP를하고 난 sudo lsusb -v
이것을 확인할 수 있습니다
Bus 005 Device 026: ID c251:2723 Keil Software, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0xc251 Keil Software, Inc.
idProduct 0x2723
bcdDevice 1.00
iManufacturer 1 Keil Software
iProduct 2 Keil ULINK-ME CMSIS-DAP
iSerial 3 M0489MAE
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 4 CMSIS-DAP
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 33
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Device Status: 0x0000
(Bus Powered)
내가 와인을 사용하여이 작업을 수행하려고하지만 가능하지 않았다. 적어도 이제는 Windows가 더 이상 필요하지 않습니다.
Archlinux 공식 리포지토리를 사용하여 openocd를 설치해야하기 때문에 문제가됩니다. Archlinux 공식 저장소는 오래된 것 같습니다. – 71GA
'공무원'은 종종 (어떤 이유로) 문제가있는 버전을 선택합니다. 자신이 직접 제작할 수 있다면 기꺼이 안내해 드리겠습니다. 그러나 재건축을하기 때문에 다소 시간이 걸릴 것이므로 SWD를 먼저 사용해보십시오. 이것은 매우 간단해야합니다. –
내 JTAG 어댑터에 CMSIS-DAP 펌웨어가 없기 때문에 의미가 없습니다. :) 나는 더 나은 JTAG 어댑터 (J-link EDU)를 구입했다. – 71GA