On Wed, Feb 17, 2010 at 4:01 AM, David Brownell <[email protected]> wrote:
> On Tuesday 16 February 2010, Xiaofan Chen wrote:
>> I have not set up the udev permission of the EK-LM3S1968 on board debugger. 
>> Then
>> it segfaults if running as normal user. Running as root it is okay.
>
> Seems buglike.  You should get some kind of permission
> error ... which is what ISTR other folk have reported
> in such cases.

Strange, latest git seems to be ok.

I have set up the udev rules. I am using the lazy modification
by modifying MODE="0664"
to "0666" for the file /lib/udev/rules.d/50-udev-default.rules
This is good for personal user.

# libusb device nodes
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"

mc...@ubuntu:~/Desktop/build/openocd/lm3s1968$ lsusb
Bus 001 Device 010: ID ffff:0000
Bus 001 Device 009: ID 1366:0101
Bus 001 Device 008: ID 0403:bcd9 Future Technology Devices
International, Ltd Stellaris Evaluation Board
Bus 001 Device 007: ID 046d:c216 Logitech, Inc. Dual Action Gamepad
Bus 001 Device 004: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub /
D-Link DUB-H4 USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 005: ID 04d8:0033 Microchip Technology, Inc.
Bus 002 Device 004: ID 0925:7001 Lakeview Research
Bus 002 Device 003: ID 046d:c054 Logitech, Inc.
Bus 002 Device 002: ID 058f:9360 Alcor Micro Corp. 8-in-1 Media Card Reader
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
mc...@ubuntu:~/Desktop/build/openocd/lm3s1968$ ls -la /dev/bus/usb/001/
total 0
drwxr-xr-x 2 root root    160 2010-02-19 20:58 .
drwxr-xr-x 4 root root     80 2010-02-20 04:58 ..
crw-rw-rw- 1 root root 189, 0 2010-02-20 04:58 001
crw-rw-rw- 1 root root 189, 3 2010-02-20 04:58 004
crw-rw-rw- 1 root root 189, 6 2010-02-20 04:58 007
crw-rw-rw- 1 root root 189, 7 2010-02-19 21:25 008
crw-rw-rw- 1 root root 189, 8 2010-02-20 04:58 009
crw-rw-rw- 1 root root 189, 9 2010-02-19 20:58 010
mc...@ubuntu:~/Desktop/build/openocd/lm3s1968$ cp
/usr/local/share/openocd/scripts/board/ek-lm3s1968.cfg
./ek-lm3s1968_ver4.cfg
mc...@ubuntu:~/Desktop/build/openocd/lm3s1968$ openocd -f ek-lm3s1968_ver4.cfg
Open On-Chip Debugger 0.4.0-rc2-dev-00007-g3f30563 (2010-02-19-21:22)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
3000 kHz
jtag_nsrst_delay: 100
srst_only separate srst_gates_jtag srst_open_drain
Info : clock speed 3000 kHz
Info : JTAG tap: lm3s1968.cpu tap/device found: 0x3ba00477 (mfg:
0x23b, part: 0xba00, ver: 0x3)
Info : lm3s1968.cpu: hardware has 6 breakpoints, 4 watchpoints
^C

So I change the permission of the FTDI based Luminary debugger to be 0x0664
instead of 0x0666. No more segmentation fault.

mc...@ubuntu:~/Desktop/build/openocd/lm3s1968$ sudo chmod o-w
/dev/bus/usb/001/008
mc...@ubuntu:~/Desktop/build/openocd/lm3s1968$ ls -la /dev/bus/usb/001/
total 0
drwxr-xr-x 2 root root    160 2010-02-19 20:58 .
drwxr-xr-x 4 root root     80 2010-02-20 04:58 ..
crw-rw-rw- 1 root root 189, 0 2010-02-20 04:58 001
crw-rw-rw- 1 root root 189, 3 2010-02-20 04:58 004
crw-rw-rw- 1 root root 189, 6 2010-02-20 04:58 007
crw-rw-r-- 1 root root 189, 7 2010-02-19 21:25 008
crw-rw-rw- 1 root root 189, 8 2010-02-20 04:58 009
crw-rw-rw- 1 root root 189, 9 2010-02-19 20:58 010
mc...@ubuntu:~/Desktop/build/openocd/lm3s1968$ openocd -f ek-lm3s1968_ver4.cfg
Open On-Chip Debugger 0.4.0-rc2-dev-00007-g3f30563 (2010-02-19-21:22)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
3000 kHz
jtag_nsrst_delay: 100
srst_only separate srst_gates_jtag srst_open_drain
Error: unable to open ftdi device: unable to fetch product description
Command handler execution failed



-- 
Xiaofan http://mcuee.blogspot.com
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to