Author Topic: error  (Read 541 times)

0 Members and 1 Guest are viewing this topic.

Offline zdoll11Topic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
error
« on: October 20, 2010, 08:17:07 PM »
does anyone know what this error is that i get when i try to build my program:

libdefs.h:278: error: 'F_CPU' undeclared here (not in a function)

thanks for the help.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,072
  • Helpful? 107
Re: error
« Reply #1 on: October 21, 2010, 06:10:57 PM »
Your build command isn't specifying the speed of the processor crystal/clock.

I presume you are building using AVRStudio - in which case you need  to set it up via Project | Configuration Options and make sure there is a value in the Frequency box ie 16000000 for a 16MHz board.

If you are using Project Designer to generate the .aps file then this should have been set up correctly for you. If not then what board are you using?

NOTE that you MUST open the .aps project file (in the same folder where you saved the project file .prj) - don't just create a new blank project in AVRStudio and then add the generated C and H files. Otherwise you are throwing away all the setup info that Project Designer has already set up for you in the .aps file.
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 zdoll11Topic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
Re: error
« Reply #2 on: October 21, 2010, 07:27:28 PM »
cool thanks a lot bro.

 

Related Topics

  Subject / Started by Replies Last post
9 Replies
3883 Views
Last post August 09, 2008, 02:50:51 AM
by newbie
4 Replies
3312 Views
Last post March 31, 2008, 07:13:18 PM
by orchid
12 Replies
6846 Views
Last post June 19, 2012, 07:34:17 PM
by Proctor
0 Replies
340 Views
Last post May 07, 2012, 12:25:17 PM
by aaa3a


Get Your Ad Here