User forums > Embedded development

calling avrdude in a user defined tool

(1/2) > >>

noobiept:
Hello, I'm trying to have a tool that calls avrdude to send the program to the board.

The command parameters I have: -p m328p -c arduino -P /dev/ttyACM0 -U flash:w:${TARGET_OUTPUT_BASENAME}.elf.hex

Is there a macro for the microcontroller? - to have instead of m328p.


Anyway, I already have the tool defined, but I'm having a problem with permissions.

When I call the tool, it tells me that I don't have permissions. Ok, I used to execute this as root in the terminal, but I'm not sure how do I do that here.

I've also tried to add permissions: chmod 777 /dev/ttyACM0 and it works, but when I turn off the board and reconnect it, the permissions I set are lost! I think this is probably how linux works...

any ideas?

scarphin:
U can try my modified AVR wizard attached at this post:
http://forums.codeblocks.org/index.php/topic,13616.msg97519.html#msg97519
It saves the avr type to use on the 'tools' commands. U can find information about how to manage this here:
http://forums.codeblocks.org/index.php/topic,13616.msg93862.html#msg93862

noobiept:
Hey, I don't really know how to add a new template, I tried copying to /usr/share/codeblocks/templates/wizard/ but doesn't show in codeblocks.

Anyway, how would this deal with the permissions problem?

scarphin:
Right click on the template u want to edit on the new project menu and copy paste the code. That won't deal with the permissions problem, it's out of scope. The new template will make ur tools menu more general like u won't have to change ur mcu type on the 'avrdude' tool command everytime u start a new project. U may need to change other options though. I suggest u read all the topic I gave links.

Jenna:

--- Quote from: noobiept on July 23, 2011, 12:55:25 am ---Anyway, how would this deal with the permissions problem?

--- End quote ---

Which owner and group has the device (/dev/ttyACM0) ?
If you want to use it as normal user, you have to be member of the appropriate group in almost any cases.

Navigation

[0] Message Index

[#] Next page

Go to full version