go_away

Author Topic: error on build - a2d.h - line 140 - help!  (Read 5841 times)

0 Members and 1 Guest are viewing this topic.

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
error on build - a2d.h - line 140 - help!
« on: February 12, 2008, 06:18:17 PM »
Hi all,

In a2d.h the compiler has a problem with line 140

//! return TRUE if conversion is complete
u08 a2dIsComplete(void);



Any ideas?



Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: error on build - a2d.h - line 140 - help!
« Reply #1 on: February 12, 2008, 06:20:58 PM »

probably

u08 = a2dIsComplete(void);

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: error on build - a2d.h - line 140 - help!
« Reply #2 on: February 12, 2008, 06:53:31 PM »
not the case.  it works with the makefile that comes with the $50 robot.  It's a return type, i just want to use a different chip....

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,657
  • Helpful? 169
    • Society of Robots
Re: error on build - a2d.h - line 140 - help!
« Reply #3 on: February 12, 2008, 10:01:22 PM »
Quote
u08 = a2dIsComplete(void);

u08 means int, or 8 bit int

use this to change from $50 ATmega8 code to code for your microcontroller:
http://www.societyofrobots.com/step_by_step_atmega168_swapout.shtml

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: error on build - a2d.h - line 140 - help!
« Reply #4 on: February 12, 2008, 10:25:45 PM »
admin,

where / what library is u08 defined?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,657
  • Helpful? 169
    • Society of Robots
Re: error on build - a2d.h - line 140 - help!
« Reply #5 on: February 12, 2008, 10:35:29 PM »
Its part of the C language, as defined by gnc :P

doing this:
u08 a2dIsComplete(void);

is the same as this:
int a2dIsComplete(void);

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: error on build - a2d.h - line 140 - help!
« Reply #6 on: February 12, 2008, 10:38:14 PM »
admin,

thanks!  I guess the silly AVR Studio 4 doesn't know u08 ?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,657
  • Helpful? 169
    • Society of Robots
Re: error on build - a2d.h - line 140 - help!
« Reply #7 on: February 12, 2008, 10:41:27 PM »
Which microcontroller are you using?

Did you change all of the code to reflect that microcontroller?

What is the exact error you are getting?

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: error on build - a2d.h - line 140 - help!
« Reply #8 on: February 12, 2008, 10:46:18 PM »
I've changed all the ports and timing files

I'm using the Atmega 2560 ...

I have the following error: 

C:\..\..\Program Files\AVRlib/a2d.h:141: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a2dIsComplete'

It compiles with your makefile , just not with settings in the AVR Studio ....

I wanted to try to compile it in the studio, because I'm not able to get debug values back over the JTAG interface properly....

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: error on build - a2d.h - line 140 - help!
« Reply #9 on: February 12, 2008, 11:43:57 PM »
Admin,

After searching I found this:

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=58058 

Was this you?  ;)   If so, did you ever get that new .h file working?

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: error on build - a2d.h - line 140 - help!
« Reply #10 on: February 15, 2008, 04:34:54 PM »
hmm .... really no more ideas?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,657
  • Helpful? 169
    • Society of Robots
Re: error on build - a2d.h - line 140 - help!
« Reply #11 on: February 17, 2008, 10:13:31 AM »
yeap, that avrfreaks post basically highlights the solution

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: error on build - a2d.h - line 140 - help!
« Reply #12 on: February 17, 2008, 10:17:38 AM »
excellent.  Oh, after updating AVR Studio and putting the "globals.h" header before the others - it finally works no problem.

Thanks again for all your help! 

 


Get Your Ad Here