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

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

[avr-gcc-list] AVR environment on Solaris 10


From: Andreas Höschler
Subject: [avr-gcc-list] AVR environment on Solaris 10
Date: Wed, 16 Dec 2009 00:36:23 +0100

Hi Eric,

Am I missing an environment variable?


I've been bitten by this several times. IIRC, you're supposed to use GNU make 3.81. That should solve the problem.

I have followed the guide

http://www.micahcarrick.com/02-15-2006/installing-gnu-tools-avr- gcc.html

and have avr-gcc and avr-libc built on my Solaris machine. I have purchased a

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

from Electrodome. I have used Arduino.app on my Mac to upload a few sketches to the board and tried them out (blinking LEDs). This works!

I now would like to make use of the gnu tool chain on the Solaris machine but am not sure how to get started there. I wrote a simple 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 was able to build toggle_led.c  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

The question is, how do I get the toggle_led.hex onto the Arduino board now using my Solaris environment? My plan is to put a Sun Ray on my work bench and connecti the Arduino board to the USB-port of the Sun Ray. Has anybody ever tried that? I could also keep using the Mac for setting up the Arduino board initially or for programming purposes, but in the end I would like to have a program on the Arduino that opens a TCP-socket (Arduino Ethernet Shield ) and awaits commands from a Solaris application. What steps are necessary to accomplish that? Any missing device (programmer) I still need to purchase?

Thanks a lot in advance!

Regards,

 Andreas







reply via email to

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