go_away

Author Topic: Trying to get started with Axon and AVR  (Read 1212 times)

0 Members and 1 Guest are viewing this topic.

Offline madmanTopic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Trying to get started with Axon and AVR
« on: March 03, 2010, 06:15:28 AM »
I'm trying to get started with this great little micro-controller (Axon 1), but I'm having some problems.
I created a folder under the C: root directory called Axon, named my project file Axon, loaded everything as instructed in the Getting
Started mht.  I tried doing a 'build all' without doing any modifications to the text in the control.c or the Axon.c.
The errors and warnings that were generated are as follows:

Build started 3.3.2010 at 04:23:31
(green dot here)  avr-gcc  -mmcu=atmega640 -Wall  gdwarf-2 -0s -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD  -MP  -MT  Axon.o 
                        In file included from ../Axon.c:19:
(yellow dot here) ../sensors.c:111:1:  warning:  "DDR"  redefined
                        In file included from ../global.h:25,
                                            from../SoR_Utils.h:26,
                                            from../Axon.c:16:
(yellow dot here)../avrlibdefs.h:72:1: warning: this is the location of the previous definition
                       In file included from ../Axon.c:19:
(yellow dot here)../sensors.c:113:1: warning: "PIN" redefined
                       In file included from ../global.h:25,
                                           from ../SoR_Utils.h:26,
                                           from ../Axon.c:16:
(yellow dot here)../avrlibdefs.h:73:1: warning: this is the location of the previous definition
                       In file included from ../Axon.c:23:
(yellow dot here)../control.c:29: warning:return type of 'main' is not 'init'
(red dot here)    ../Axon.c:28 error: conflicting types for 'main'
(red dot here)    ../control.c:30: error:previous definition of 'main' was here
                       ../Axon.c: In function 'main':
(yellow dot here)../Axon.c:116: warning: implicit declaration of fuinction 'control'
                       make: *** [Axon.o]  Error 1
                       Build failed with 2 errors and 6 warnings...


Can anyone help me out.  I'm coming into this stuff for the first time and I'm probably making some false assumption or doing something sutpid, I was a 'C' programmer at The Washington Post in the 90s ... I don't think I've forgotten everything.  Any help would be appreciated.
Thanks.

Madman

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Trying to get started with Axon and AVR
« Reply #1 on: March 03, 2010, 06:36:19 AM »
looking at the error output,
this bit:
Code: [Select]
(red dot here)    ../Axon.c:28 error: conflicting types for 'main'
(red dot here)    ../control.c:30: error:previous definition of 'main' was here
tells you you have 2 'main' functions.
the first in ../Axon.c on line 28.
the second in ../control.c on line 30.
you only want one 'main' function.

the Getting Started doc here: http://www.societyofrobots.com/axon/axon_getting_started_software.shtml suggests you copy/paste from Axon.c rather than include it.
maybe this is where you are going wrong?

i'm going to be out for the next few hours so won't be able to help for a while but someone else will probably pick this up if you have more questions.


dunk.

 


Get Your Ad Here

data_list