avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Getting started with Arduino on Solaris


From: Andreas Höschler
Subject: [avr-gcc-list] Getting started with Arduino on Solaris
Date: Thu, 17 Dec 2009 18:27:16 +0100

Hi all,

I have purchased

       • Arduino Duemilanove 2009 (ATmega328) USB
       • Arduino Ethernet Shield Addon RJ45

boards and got the gcc tool chain (avr-gcc, avrdude,...) installed on my Solaris 10 machine. I have written a first program

#define F_CPU 16000000UL  /* 16 MHz CPU clock */
#include <util/delay.h>
#include <avr/io.h>
int main (void)
{
        DDRC = _BV (PC0);               /* PC0 is digital output */
        while (1)                       /* loop forever */
        {
/* set PC0 on PORTC (digital high) and delay for 500mS */
                PORTC &= ~_BV(PC0);
                _delay_ms(500);
                /*  PC0 on PORTC (digital 0) and delay for 500mS */
                PORTC |= _BV(PC0);
                _delay_ms(500);
        }
        return (0);
}

and built that with

        avr-gcc -mmcu=atmega328p -Wall -o toggle_led.elf toggle_led.c
        avr-objcopy -j .text -O ihex toggle_led.elf toggle_led.hex

I now want to transfer this program to the board. Here I get lost! What do I need for that? I have a Sun Ray on my desk which has a serial port and a USB port. The Arduino Duemilanove has an USB port. Can I just connect the Sun Ray and the Arduino board with an USB cable and then use avrdude to transfer the file into the ship? If yes, how? If not, what else do I need? I googled and found AvrUsb500, STK500 and USBprog being mentioned over and over, but I am not sure yet what exactly these things are and whether I need them in my case (Solaris 10 environment). I was bale to transfer a sketch with Arduino.app from my Mac to the Arduino board, but I wantto use the gcc tool chain on the Solaris machine instead. I am not sure when to transfer the software via the USB connector and when to use the SPI contacts and how. I know these are a bloody newbie questions. Thanks a lot in advance for any hints/URLs/...

Thanks,

   Andreas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]