Author Topic: Webbbot Lib weird errors using atmega32  (Read 1798 times)

0 Members and 1 Guest are viewing this topic.

Offline AsellithTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 648
  • Helpful? 9
  • "I'm a leaf on the wind. Watch how I soar"
Webbbot Lib weird errors using atmega32
« on: January 27, 2010, 08:52:50 PM »
I'm trying to compile my code and I'm using an atmega32.

I included this line

#include "sys/atmega32.h"

however I get the following errors

D:\Documents and Settings\JB\My Documents\My Dropbox\OSCAR\Projects\ExModO\OSCAR_Distance\..\..\..\Code\webbotavrclib-1.12/sys/../device.h:196: error: 'TIMER0_COMPAREA' undeclared (first use in this function)
D:\Documents and Settings\JB\My Documents\My Dropbox\OSCAR\Projects\ExModO\OSCAR_Distance\..\..\..\Code\webbotavrclib-1.12/sys/../device.h:196: error: (Each undeclared identifier is reported only once
D:\Documents and Settings\JB\My Documents\My Dropbox\OSCAR\Projects\ExModO\OSCAR_Distance\..\..\..\Code\webbotavrclib-1.12/sys/../device.h:196: error: for each function it appears in.)


Any ideas?
Jonathan Bowen
CorSec Engineering
www.corseceng.com

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
Re: Webbbot Lib weird errors using atmega32
« Reply #1 on: January 27, 2010, 09:26:53 PM »
You cannot access timer registers directly when using Webbot Lib. I found that out recently too,

http://www.societyofrobots.com/robotforum/index.php?topic=10073.0

edit: nm, i didn't read the filepath of the error
« Last Edit: January 27, 2010, 10:03:53 PM by madsci1016 »

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,152
  • Helpful? 110
Re: Webbbot Lib weird errors using atmega32
« Reply #2 on: January 27, 2010, 10:00:14 PM »
Aselith

No worries - you aren't trying to access the timer stuff directly (You would get other errors if you did). Perhaps its an ATMega32 issue I haven't found as its not a frequently used platform.

Can't remember off the top of my head whether the ATMega32 supports compare channels on Timer 0 - some AVR don't.

PM me with your code and I'll get back to you.

Webbot
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
Re: Webbbot Lib weird errors using atmega32
« Reply #3 on: January 27, 2010, 10:03:22 PM »
Oops, i didn't see that the fault was coming from a device.h file, and not his main code.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,152
  • Helpful? 110
Re: Webbbot Lib weird errors using atmega32
« Reply #4 on: January 28, 2010, 04:35:14 PM »
Yeah - I generate those device files from the xml files from ATmel - but they are soooooo full of errors. I've kinda given up telling ATmel about them and now keep my own version (after all ATmel ain't gonna re-release the chip) with my own fixes. Not sure - but if these files are also used by AVRstudio for debugging then it probably explains why AVRstudio has some flakey debug errors (eg it doesn't honour breakpoints for Timer 5 on the Axon).

So this is probably an error I have inherited from ATmel and not found yet.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline AsellithTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 648
  • Helpful? 9
  • "I'm a leaf on the wind. Watch how I soar"
Re: Webbbot Lib weird errors using atmega32
« Reply #5 on: January 28, 2010, 05:34:25 PM »
Well I decided to go a different route while troubleshooting last night and deleted all the previous code and start over with another base. Sorry webbot but your skills are way above mine and I don't have time to play catchup. I can barelly read your code let alone modify it. I still have no clue how you did all the things you did in that code. I decided to eliminate all your code for now and then try to insert my code into your frame work after i get the slave mode working.

I really want to use your sensor code but I need to get my code to work first before I try and use your code for the final phase.

Sorry I couldn't help you debug the code. I'll keep an eye on it after I try to compile the test when I reintroduce your code it might appear again.
Jonathan Bowen
CorSec Engineering
www.corseceng.com

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,152
  • Helpful? 110
Re: Webbbot Lib weird errors using atmega32
« Reply #6 on: January 28, 2010, 08:37:13 PM »
Fond the bug - and zapped in next release (V1.14)
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline AsellithTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 648
  • Helpful? 9
  • "I'm a leaf on the wind. Watch how I soar"
Re: Webbbot Lib weird errors using atmega32
« Reply #7 on: January 28, 2010, 09:18:30 PM »
Webbot again you deliver. Thanks. I'm done for tonight but I think I have all the I2C code written and will be testing it tomorrow. I need to modify my master controllers code as well. That should take long. When I confirm I have my slave code working I will try to build your frame work around it and use your sensor code if not I may have more questions. Thanks for the help. I might actually be in this contest yet.
Jonathan Bowen
CorSec Engineering
www.corseceng.com

 


Get Your Ad Here

data_list