Author Topic: Debuging my build.  (Read 6093 times)

0 Members and 1 Guest are viewing this topic.

Offline NOOBinDistressTopic starter

  • Robot Overlord
  • ****
  • Posts: 209
  • Helpful? 0
Debuging my build.
« on: April 14, 2007, 07:33:52 PM »
The tutorial for 50 dollar robot says  "If you get errors, and you are new to programming, it may be a little difficult to debug at first." Well I have errors and I am new to programing so what should I do. Here are my errors:

Build started 14.4.2007 at 21:25:51

-------- begin --------
avr-gcc (GCC) 4.1.1 (WinAVR 20070122)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Compiling: Photovore_v1.c
re_v1.o

In file included from Photovore_v1.c:20:
SoR_Utils.h:22:48: error: global.h: No such file or directory
SoR_Utils.h:27:60: error: a2d.h: No such file or directory
Photovore_v1.c: In function 'main':
Photovore_v1.c:41: warning: implicit declaration of function 'a2dInit'
Photovore_v1.c:42: warning: implicit declaration of function 'a2dSetPrescaler'
Photovore_v1.c:42: error: 'ADC_PRESCALE_DIV32' undeclared (first use in this function)
Photovore_v1.c:42: error: (Each undeclared identifier is reported only once
Photovore_v1.c:42: error: for each function it appears in.)
Photovore_v1.c:43: warning: implicit declaration of function 'a2dSetReference'
Photovore_v1.c:43: error: 'ADC_REFERENCE_AVCC' undeclared (first use in this function)
Photovore_v1.c:56: warning: implicit declaration of function 'a2dConvert8bit'
make: *** [Photovore_v1.o] Error 1
Build failed with 6 errors and 4 warnings...

What should I do? Please help me someone.

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
    • Jon's Place
Re: Debuging my build.
« Reply #1 on: April 15, 2007, 05:58:05 AM »
SoR_Utils.h:22:48: error: global.h: No such file or directory
SoR_Utils.h:27:60: error: a2d.h: No such file or directory

This is the key to your problem. It can't find the include files global.h and a2d.h. Since both those files are included in the zip file, you might need to re-extract them.

After you fix that, all the other errors will go away...

- Jon

Offline NOOBinDistressTopic starter

  • Robot Overlord
  • ****
  • Posts: 209
  • Helpful? 0
Re: Debuging my build.
« Reply #2 on: April 15, 2007, 07:42:50 AM »
How exactly do I extract or what ever. Can you give me quick step by step instructions on how to do this. I am getting rid of the files right?

Offline NOOBinDistressTopic starter

  • Robot Overlord
  • ****
  • Posts: 209
  • Helpful? 0
Re: Debuging my build.
« Reply #3 on: April 15, 2007, 07:52:51 AM »
Please give me step by step instructions on how to "re-extract" because I am very new to programing. Thanks!

Offline hazzer123

  • Supreme Robot
  • *****
  • Posts: 460
  • Helpful? 3
Re: Debuging my build.
« Reply #4 on: April 15, 2007, 08:20:44 AM »
The header files (global.h and a2d.h) cannot be found. They are in the zip file that you downloaded from this site.

Now i have never used the software that you are dealing with, but i think that if you stick the global.h and a2d.h into the project folder, then it should build correctly. If that doesn't work, then look for an INCLUDE folder in the software folders, try copying the header files into there and rebuilding.

Harry
Imperial College Robotics Society
www.icrobotics.co.uk

Offline Somchaya

  • Robot Overlord
  • ****
  • Posts: 180
  • Helpful? 0
  • You know it's cute!
Re: Debuging my build.
« Reply #5 on: April 15, 2007, 08:33:34 AM »
Hmm in case you're having trouble extracting the zip file, I've converted it into a self-extracting exe for you.

http://somchaya.intuios.com/temp/sbs_source_photovore_v1.exe

Just download it, run it and extract the files to the directory that the tutorial says, and try it from there.
Somchaya - Back after a year of misc things
http://whisker.scribblewiki.com

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline NOOBinDistressTopic starter

  • Robot Overlord
  • ****
  • Posts: 209
  • Helpful? 0
Re: Debuging my build.
« Reply #7 on: April 15, 2007, 03:25:49 PM »
Ok I did what Somchaya said and I got this:

gcc plug-in: Error: Object file not found on expected location C:\My_Robots\Phtovore_v1\Phtovore_v1.elf
Make sure your makefile specifies the output .elf file as Photovore_v1.elf

What should I do now???

Offline NOOBinDistressTopic starter

  • Robot Overlord
  • ****
  • Posts: 209
  • Helpful? 0
Re: Debuging my build.
« Reply #8 on: April 15, 2007, 04:01:42 PM »
Yaaaaaaaah thankyou somchaya. I was wrong it did work. Thanks.

Offline Somchaya

  • Robot Overlord
  • ****
  • Posts: 180
  • Helpful? 0
  • You know it's cute!
Re: Debuging my build.
« Reply #9 on: April 15, 2007, 04:32:38 PM »
Hmm.. so from the looks of it, the trouble in the beginning was just the extraction process..

In case you need to do something like this in the future, I'll briefly describe how to extract the zip file  :)

So, in Windows XP, there's a zip file handling thing, so if you double click the zip file, it opens up a folder, and all you need to do is to copy and paste the files from there into your working directory, eg C:\Robot or something.

Alternatively, you can right-click the file and select "Extract All', then choose which directory you want to extract the files to.

So, even though you got the code to work now, I highly recommend trying the zip extraction some time and making sure that it works for you, cos most tutorials online include a .zip file and not a self-extracting .exe.

Congratulations on getting it to work though! ;D
Somchaya - Back after a year of misc things
http://whisker.scribblewiki.com

Offline NOOBinDistressTopic starter

  • Robot Overlord
  • ****
  • Posts: 209
  • Helpful? 0
Re: Debuging my build.
« Reply #10 on: April 15, 2007, 06:15:08 PM »
Thanks I will try that in the next time I have a zip file thing. I dont want to do it on this one because I dont want to mess it up. It took me a while. Although I could just make another project with the same steps. Anyway do you no any other good somewhat simple programing projects I can do with my 50 dollar robot board? And would would be another good project after 50 dollar robot is finished? thanks for everything. 

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: Debuging my build.
« Reply #11 on: April 15, 2007, 06:58:29 PM »
you can reprogram it to anything you want to. since you probably don't know C get the avrlib. it has a good bit of source codes
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Debuging my build.
« Reply #12 on: April 16, 2007, 12:52:54 PM »
Quote
Anyway do you no any other good somewhat simple programing projects I can do with my 50 dollar robot board? And would would be another good project after 50 dollar robot is finished?

get another servo and a sharp IR to make a stampy like robot :P

. . . or perhaps get a sonar and try it out.

or perhaps mod your $50 robot to go as fast as possible without colliding into anything :P

or try to use all 5 photoresistors on the same robot. or attempt to do robot line following.

 


Get Your Ad Here