[avr-gcc-list] very simple program

2005-10-02 Thread Timothy Smith
i'm learning the in's and out's of microcontroller programming, but i've run into a really fundamental problem. i get the following error when i attempt to use _BV to shift a shit and set port b pin 0 to output 4: undefined reference to `__stack' and here is my code #include avr/io.h int

Re: [avr-gcc-list] very simple program

2005-10-02 Thread Timothy Smith
Timothy Smith wrote: i'm learning the in's and out's of microcontroller programming, but i've run into a really fundamental problem. i get the following error when i attempt to use _BV to shift a shit and set port b pin 0 to output 4: undefined reference to `__stack' and here is my code

Re: [avr-gcc-list] very simple program

2005-10-02 Thread Parthasaradhi Nayani
Hello, In order to set the bit, you need to logical OR the bit. DDRB |= _BV (PB0); to clear it DDRB = ~_BV(PB0); Nayani 4: undefined reference to `__stack' #include avr/io.h int main(void){ while (1) { DDRB = _BV(PB0); }; }

RE: [avr-gcc-list] very simple program

2005-10-02 Thread niklo
Only if you don't want to change the rest of the port! /niklo -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Parthasaradhi Nayani Sent: den 2 oktober 2005 19:35 To: Timothy Smith; avr-gcc Subject: Re: [avr-gcc-list] very simple program Hello, In order

Re: [avr-gcc-list] very simple program

2005-10-02 Thread Timothy Smith
David Kelly wrote: On Oct 2, 2005, at 7:21 AM, Timothy Smith wrote: i'm learning the in's and out's of microcontroller programming, but i've run into a really fundamental problem. i get the following error when i attempt to use _BV to shift a shit and set port b pin 0 to output 4:

[avr-gcc-list] Problem with structure

2005-10-02 Thread wbounce
I have the following structure typedef struct ranges_t { uint16_t Front; uint16_t Left; uint16_t Right; } RANGES; With this definition of an array of that structure RANGES Sonar[2]; I get this error DoSonar.c:110: error: request for member `Front' in

Re: [avr-gcc-list] Problem with structure

2005-10-02 Thread Daniel O'Connor
On Monday 03 October 2005 11:59, wbounce wrote: I get this error DoSonar.c:110: error: request for member `Front' in something not a structure or union On this line. Sonar[SonarIndex].Front = SonarRange; What am I doing wrong? Have you tried building with -Wall? Is this your only error