Author
Topic: Webbotlib - avr studio 4- errors (Read 2204 times)

I just received my Axon2, I loaded all of the required programs and was going through the "Getting started" tutorial. I got to the step where you "rebuild all" and got errors ...a lot of them . I am new to micro controllers and c programming, could someone shed some light on my situation so I can proceed on. Thanks in advance for any help . Below are the errors i receivedBuild started 10.3.2011 at 19:57:44avr-gcc -I"C:\Users\wes lubee\Documents\..\..\..\My_Robots\Webbotlib" -mmcu=atmega640 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=16000000UL -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT Axon2_webbotlib.o -MF dep/Axon2_webbotlib.o.d -c ../Axon2_webbotlib.c

Ok well i think i might have found part of my problem, Step 6 tells you to..

"Copy/paste all code in Photovore.c into the .c file with the same name as your project (found in Source Files on the left). For example, if your project is called 'Axon2_WebblotLib', paste the code into Axon2_WebbotLib.c. Push the 'Save' icon at the top left in AVR Studio. This is the main() file"

to do this i opened the programmers notepad - copied the text from photovore.c and went into AVRstudio 4 and in the box just to the right of the source files list i pasted the photovore.c text i hit save and rebuild all now i get less errors but i am obviously still doing something incorrectly below is m latest try - 20 errors 3 warnings

Build started 11.3.2011 at 06:45:57avr-gcc -mmcu=atmega128 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT Axon2_webbotlib.o -MF dep/Axon2_webbotlib.o.d -c ../Axon2_webbotlib.c../Axon2_webbotlib.c:38:90: error: sys/axon2.h: No such file or directory../Axon2_webbotlib.c:39:38: error: servos.h: No such file or directory../Axon2_webbotlib.c:40:32: error: a2d.h: No such file or directory../Axon2_webbotlib.c:41:36: error: rprintf.h: No such file or directory../Axon2_webbotlib.c:42:38: error: i2c_master.h: No such file or directory../Axon2_webbotlib.c:46:22: error: hardware.h: No such file or directory../Axon2_webbotlib.c: In function 'appInitHardware':../Axon2_webbotlib.c:53: warning: implicit declaration of function 'uartInit'../Axon2_webbotlib.c:53: error: 'GPS_UART' undeclared (first use in this function)../Axon2_webbotlib.c:53: error: (Each undeclared identifier is reported only once../Axon2_webbotlib.c:53: error: for each function it appears in.)../Axon2_webbotlib.c:53: error: 'GPS_BAUD' undeclared (first use in this function)../Axon2_webbotlib.c:54: error: 'USB_UART' undeclared (first use in this function)../Axon2_webbotlib.c:54: error: 'USB_BAUD' undeclared (first use in this function)../Axon2_webbotlib.c:55: error: 'WIRELESS_UART' undeclared (first use in this function)../Axon2_webbotlib.c:55: error: 'WIRELESS_BAUD' undeclared (first use in this function)../Axon2_webbotlib.c:56: error: 'OTHER_UART' undeclared (first use in this function)../Axon2_webbotlib.c:56: error: 'OTHER_BAUD' undeclared (first use in this function)../Axon2_webbotlib.c:59: warning: implicit declaration of function 'rprintfInit'../Axon2_webbotlib.c:59: error: 'USB_ACTIVATE' undeclared (first use in this function)../Axon2_webbotlib.c:62: warning: implicit declaration of function 'servoPWMInit'../Axon2_webbotlib.c:62: error: 'bank1' undeclared (first use in this function)../Axon2_webbotlib.c: At top level:../Axon2_webbotlib.c:72: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'appInitSoftware'../Axon2_webbotlib.c:82: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'appControl'make: *** [Axon2_webbotlib.o] Error 1Build failed with 20 errors and 3 warnings...

Thanks, I thought i entered the correct information as i was very careful. I have gone thorough the setup process twice but I will redo the setup again when i get home from work to see if that fixes the problem. Maybe i missed something.

Build started 11.3.2011 at 19:13:54avr-gcc -I"C:\My_Robots\Axon2_webbotlib\..\WebbotLib" -mmcu=atmega640 -Wall -gdwarf-2 -std=gnu99 -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT Axon2_webbotlib.o -MF dep/Axon2_webbotlib.o.d -c ../Axon2_webbotlib.cIn file included from ../Axon2_webbotlib.c:38:C:\My_Robots\Axon2_webbotlib\..\WebbotLib/sys/axon2.h:82:2: warning: #warning No CPU speed specified - assuming Axon is running at 16MHz../Axon2_webbotlib.c:42:38: error: i2c_master.h: No such file or directory../Axon2_webbotlib.c:46:22: error: hardware.h: No such file or directory../Axon2_webbotlib.c: In function 'appInitHardware':../Axon2_webbotlib.c:53: error: 'GPS_UART' undeclared (first use in this function)../Axon2_webbotlib.c:53: error: (Each undeclared identifier is reported only once../Axon2_webbotlib.c:53: error: for each function it appears in.)../Axon2_webbotlib.c:53: error: 'GPS_BAUD' undeclared (first use in this function)../Axon2_webbotlib.c:54: error: 'USB_UART' undeclared (first use in this function)../Axon2_webbotlib.c:54: error: 'USB_BAUD' undeclared (first use in this function)../Axon2_webbotlib.c:55: error: 'WIRELESS_UART' undeclared (first use in this function)../Axon2_webbotlib.c:55: error: 'WIRELESS_BAUD' undeclared (first use in this function)../Axon2_webbotlib.c:56: error: 'OTHER_UART' undeclared (first use in this function)../Axon2_webbotlib.c:56: error: 'OTHER_BAUD' undeclared (first use in this function)../Axon2_webbotlib.c:59: error: 'USB_ACTIVATE' undeclared (first use in this function)../Axon2_webbotlib.c:62: error: 'bank1' undeclared (first use in this function)../Axon2_webbotlib.c: In function 'appControl':../Axon2_webbotlib.c:85: error: 'bank1' undeclared (first use in this function)../Axon2_webbotlib.c:99: warning: implicit declaration of function 'update_sensors'../Axon2_webbotlib.c:101: error: 'lightLeft' undeclared (first use in this function)../Axon2_webbotlib.c:101: error: 'lightRight' undeclared (first use in this function)../Axon2_webbotlib.c:104: error: 'left_wheel' undeclared (first use in this function)../Axon2_webbotlib.c:105: error: 'right_wheel' undeclared (first use in this function)make: *** [Axon2_webbotlib.o] Error 1Build failed with 19 errors and 2 warnings...

thanks for the tip AdminI commented the line #include "i2c_master.h" out ( i am assuming // is what i should put in front of it since it turned green when i did that)and it removed one of the errors one thing i also noticed - in the start up guide there is some text in the IO box to the right of avr studio, i don't have anything in that box. Is that box populated by a file i may have missed ? i am on my 5 th try at setting up avr studio and being a computer geek by trade i find it odd that i would have missed something 5 times ( although i do admit i have and will make mistakes from time to time)

do you think it was a step missed installing webbotlib or a step in avr studio? for source file in avr studio it points to the File name i gave it when i selected new file during setup, should that point directly to the webbotlib folder ? or did you possibly mean it was a header or dependency file ? i have hardware .h in the header and the 3 files specified as dependencies.

The project designer program worked. I was able to set up 2 servos to turn on when i turn on the power switch although they go forward and backward instead of one direction. I am waiting for some hitech connectors to come in the mail so i can get the photo diodes connected. 1 more question - for now..lol in the project designer there are 2 options for the servos, center and range. I am playing around with the settings and notice a change in how the servos act. how would i increase the speed of the servo and keep them going in one direction without reversing backwards and forwards. I am using 2 hsr-1425 constant rotation digital servos