Society of Robots - Robot Forum

Software => Software => Topic started by: silo_xtreme on February 12, 2008, 06:18:17 PM

Title: error on build - a2d.h - line 140 - help!
Post by: silo_xtreme 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?


Title: Re: error on build - a2d.h - line 140 - help!
Post by: paulstreats on February 12, 2008, 06:20:58 PM

probably

u08 = a2dIsComplete(void);
Title: Re: error on build - a2d.h - line 140 - help!
Post by: silo_xtreme 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....
Title: Re: error on build - a2d.h - line 140 - help!
Post by: Admin 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
Title: Re: error on build - a2d.h - line 140 - help!
Post by: silo_xtreme on February 12, 2008, 10:25:45 PM
admin,

where / what library is u08 defined?
Title: Re: error on build - a2d.h - line 140 - help!
Post by: Admin 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);
Title: Re: error on build - a2d.h - line 140 - help!
Post by: silo_xtreme on February 12, 2008, 10:38:14 PM
admin,

thanks!  I guess the silly AVR Studio 4 doesn't know u08 ?
Title: Re: error on build - a2d.h - line 140 - help!
Post by: Admin 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?
Title: Re: error on build - a2d.h - line 140 - help!
Post by: silo_xtreme 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....
Title: Re: error on build - a2d.h - line 140 - help!
Post by: silo_xtreme 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?
Title: Re: error on build - a2d.h - line 140 - help!
Post by: silo_xtreme on February 15, 2008, 04:34:54 PM
hmm .... really no more ideas?
Title: Re: error on build - a2d.h - line 140 - help!
Post by: Admin on February 17, 2008, 10:13:31 AM
yeap, that avrfreaks post basically highlights the solution
Title: Re: error on build - a2d.h - line 140 - help!
Post by: silo_xtreme 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!