User forums > Embedded development

F_CPU not visible/changeable in project settings

(1/2) > >>

invexceptn:
I'm using C::B for AVR development and, having created a new project with a given MCU type & CPU speed, i wonder how i can change the clock speed of that project lateron. From the build log i do see that the project gets compiled with the correct -DF_CPU=12000000UL setting, but nowhere neither in the general nor the project compiler settings i can see a tiny trace of a particular #define entry for the clock speed.

Looking into the projects. .cbp file i can clearly see the entry for F_CPU with the correct value and as a workaround i can quit C::B and change the setting in the .cbp file, then firing C::B up again, and it now would use the changed setting, but from what i can see, this entry in the .cbp file never makes it into the #defines tab in the compiler options page. Adding an entry in the #defines tab will lead to a warning "F_CPU redefined".

Did i oversee something, is this intended behaviour, other ways to change it?

Thanks a lot!

oBFusCATed:
Look at Projects->Build options it is there if you have it in the cbp file.

invexceptn:
Sorry to disagree, but having spent quite a while in the project settings, especially in the compiler settings page, including the tab labeled "#defines" i can assure you that the is nothing/nil/nada/rien in there, neither in the general settings nor in the project-specific settings.

oBFusCATed:
If you have it in the cbp file, then you can edit it in GUI.
If you don't believe me you can post the cbp file and I'll tell you where you can find the option.  ::)

invexceptn:
Well, it's not a matter of not believing you, i always try to take a statement of a 4star forum poster as being dominating about my personal faults. But, while i would love to believe you, this is not a religion thing, and i'm more of a facts-driven type. So, i simply do not see (not by overlooking obvious things, but due to the fact that they aren't there) any entry in any of the setup pages. As i said, adding an entry in the #defines tab, i.e. -DF_CPU=12000000UL, leads to a warning of duplicate definitions, but the #defines tab has been totally empty before i added the above line.

My cbp file is attached below, had to rename it to .txt... I see that the clock setting is describved as being an option, but on the options tab there's nothing as well.

Oooops: just saw that you're a 5star poster! :-)

Navigation

[0] Message Index

[#] Next page

Go to full version