On Mon, May 24, 2010 at 6:56 PM, John Porubek <[email protected]> wrote: > I'm now using MSPDebug properly as a user and not as root. I'll detail > my udev rule information in a follow-up message.
As promised, here's some information about udev and my udev rule that allows MSPDebug to be run as a user. Back in March, Daniel announced the release of version 0.6 of MSPDebug. In the thread that followed (http://sourceforge.decenturl.com/sourceforge.net-gcc-toolchain), the topic of udev rules came up. Thanks to Peter and Xiaofan for info that got me started. In particular, Xiaofan included a link that led to other links that led to still more links... Probably the single most-important document to read is "Writing udev rules" by Daniel Drake (http://www.reactivated.net/writing_udev_rules.html). One thing that tripped me up at first was that, in this and other older documents, they talk about utilities like "udevinfo" and "udevtest". These utilities no longer exist as separate entities but have been subsumed under a single program called "udevadm". So the previously mentioned utilities become "udevadm info" and "udevadm test". Also check out the man pages for "udev" and "udevadm" for additional useful reference information. So what did all this research lead to? According to Drake: "Files in /etc/udev/rules.d/ are parsed in lexical order, and in some circumstances, the order in which rules are parsed is important. In general, you want your own rules to be parsed before the defaults, so I suggest you create a file at /etc/udev/rules.d/10-local.rules and write all your rules into this file." Here's the contents of my /etc/udev/rules.d/10-local.rules for use with the eZ430-RF2500: SUBSYSTEM=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f432", MODE="660", GROUP="plugdev" The idVendor and idProduct attributes show up when "lsusb" is run - "Bus 003 Device 002: ID 0451:f432 Texas Instruments, Inc." in my case. Note that this is very similar to the rule that Xiaofan said should be good enough. However, the magic addition that made it all work for me is the SUBSYSTEM=="usb" at the beginning of the line. HTH, --John
