go away spammer

Author Topic: error  (Read 1688 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,165
  • Helpful? 111
    • Webbot stuff
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.

 


Get Your Ad Here

data_list