Society of Robots - Robot Forum

Software => Software => Topic started by: zdoll11 on October 20, 2010, 08:17:07 PM

Title: error
Post by: zdoll11 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.
Title: Re: error
Post by: Webbot 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.
Title: Re: error
Post by: zdoll11 on October 21, 2010, 07:27:28 PM
cool thanks a lot bro.