Actions

Running avrdude from eclipse under linux: Difference between revisions

From Just in Time

(Created page with 'When I run avrdude under linux, it needs to run with superuser privileges (don't know why). Running from the command line is fine if I use sudo, but I hadn't been able to figure …')
 
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
When I run avrdude under linux, it needs to run with superuser privileges (don't know why). Running from the command line is fine if I use sudo, but I hadn't been able to figure out how to tell avr-eclipse to do the same. The solution that I use is to rename <code>/usr/bin/avrdude</code> to something like <code>/usr/bin/true-avrdude</code> and create a script under the name <code>/usr/bin/avrdude</code> with the following content:
I'm using the excellent [https://marketplace.eclipse.org/content/avr-eclipse-plugin AVR-Eclipse] plugin for my AVR development.
When running avrdude on ubuntu (from eclipse) I get the error message "avrdude: error: usbtiny_transmit: error sending control message: Operation not permitted". The solution to this is described [http://avr-eclipse.sourceforge.net/wiki/index.php/Known_Issues#.22Operation_not_permitted.22_error here]. Only thing: I use a USBTiny, which is not in the text file that needs to be added. So, the solution that works for me, supporting USBTiny in avrdude under ubuntu is: create a new file by typing
sudo gedit /etc/udev/rules.d/41-atmega.rules
With the following content
<syntaxhighlight lang="bash">
# Please test and place config for other programmers here
# JTAGICE mkII
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2103", GROUP="plugdev", MODE="0666"
# AVRISP mkII
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2104", GROUP="plugdev", MODE="0666"
# Dragon
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2107", GROUP="plugdev", MODE="0666"
# USBTiny
ATTR{idVendor}=="1781", ATTR{idProduct}=="0c9f", GROUP="plugdev", MODE="0666"
</syntaxhighlight>
==Old instructions==
'''The following are what I <u>used</u> to do. This is not necessary anymore when following the guidelines above'''.
 
When I run avrdude under linux to program through my USBTiny device, it needs to run with superuser privileges (don't know why). Running from the command line is fine if I use sudo, but I hadn't been able to figure out how to tell avr-eclipse to do the same. The solution that I use is to rename <code>/usr/bin/avrdude</code> to something like <code>/usr/bin/true-avrdude</code> and create a script under the name <code>/usr/bin/avrdude</code> with the following content:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
#!/bin/sh
#!/bin/sh
Line 6: Line 24:


Don't forget to <code>sudo chmod 755 /usr/bin/true-avrdude</code> after creating the file.
Don't forget to <code>sudo chmod 755 /usr/bin/true-avrdude</code> after creating the file.
==Comments? Questions?==
{{ShowComments|show=True}}
[[Category:AVR]]
[[Category:AVR]]

Latest revision as of 13:38, 31 October 2015

I'm using the excellent AVR-Eclipse plugin for my AVR development. When running avrdude on ubuntu (from eclipse) I get the error message "avrdude: error: usbtiny_transmit: error sending control message: Operation not permitted". The solution to this is described here. Only thing: I use a USBTiny, which is not in the text file that needs to be added. So, the solution that works for me, supporting USBTiny in avrdude under ubuntu is: create a new file by typing

sudo gedit /etc/udev/rules.d/41-atmega.rules

With the following content

# Please test and place config for other programmers here
# JTAGICE mkII 
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2103", GROUP="plugdev", MODE="0666" 
# AVRISP mkII 
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2104", GROUP="plugdev", MODE="0666" 
# Dragon
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2107", GROUP="plugdev", MODE="0666"
# USBTiny
ATTR{idVendor}=="1781", ATTR{idProduct}=="0c9f", GROUP="plugdev", MODE="0666"

Old instructions

The following are what I used to do. This is not necessary anymore when following the guidelines above.

When I run avrdude under linux to program through my USBTiny device, it needs to run with superuser privileges (don't know why). Running from the command line is fine if I use sudo, but I hadn't been able to figure out how to tell avr-eclipse to do the same. The solution that I use is to rename /usr/bin/avrdude to something like /usr/bin/true-avrdude and create a script under the name /usr/bin/avrdude with the following content:

#!/bin/sh
gksudo --user root -- true-avrdude $@

Don't forget to sudo chmod 755 /usr/bin/true-avrdude after creating the file.

Comments? Questions?

{{#ifeq:true|true|

nopreview

{{#set: |Article has average rating={{#averagerating:}} }} {{#showcommentform:}}

{{#ask: Belongs to article::Running avrdude from eclipse under linuxModification date::+

 | ?Has comment person
 | ?Has comment date
 | ?Has comment text
 | ?Has comment rating
 | ?Belongs to comment
 | ?Comment was deleted#true,false
 | ?Has comment editor
 | ?Modification date
 | ?Has attached article
 | format=template
 | template=CommentResult
 | sort=Has comment date
 | order=asc
 | link=none
 | limit=100

}}

|}}