NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Eclipse AVR plugin help

March 17, 2010
by fatmarik
fatmarik's Avatar

So I installed AVR plugin for eclipse and inserted this basic code

#define F_CPU 14745600

#include <avr/io.h>

#include <inttypes.hs>

#include <avr/delay.h>

// PIN DEFINITIONS: // // PC4 -- LED anode

int main() {

// LED as output

DDRC |= (1<<PC4);

// loop keeps looking forever

while(1) {

// turn on LED

PORTC |= (1<<PC4);

//delay for 500 milliseconds to let the light stay on

_delay_ms(500);

// turn off LED

PORTC &= ~(1<<PC4);

//delay for 500 milliseconds to let the light stay off

_delay_ms(500);

}

return 0;

}

and I try to use the AVR option to upload to MCU and its asking me to choose programmer hardware option, when I do ls /dev it shows my nerdkits as cu.PL2303-0000101D on my Macbook, screenshot of eclipse here http://imgur.com/x0F5j.png so what do I choose?

March 18, 2010
by Rick_S
Rick_S's Avatar

I'm pretty sure that none of those would work. They are for stand alone programmers not the serial bootloader in the Nerdkit Mcu.

What I would recommend would be to compile the program to a hex file and then use avrdude to upload it to the chip the same way you would have with the original programs done in C that were included with the Nerdkit.

I've done this with files programmed in Bascom for windows and it works out well.

Rick

March 18, 2010
by Phrank916
Phrank916's Avatar

The AVRDUDE switch that the MCU needs is -c avr109 which is the AVR 109 bootloader. The Nerdkits foodloader is based off this. Also, The Butterfly dev board runs off the 109 bootloader so it may work, although I know the "correct" switch for the butterfly in avrdude is -c butterfly.

So, if you're dead set on using that software, maybe try scrolling up in that list to the portion that can't be seen in the pic and look for something referring to 109 bootloader. Or just step through the options and look in that box on the right to say:

id = "avr109"

Ted

March 18, 2010
by Phrank916
Phrank916's Avatar

Also, what Rick said will work.

March 18, 2010
by fatmarik
fatmarik's Avatar

Alright thanks for the help guys, I will try that when I get home later.

Post a Reply

Please log in to post a reply.

Did you know that you can connect digital calipers to a microcontroller? Learn more...