OK, I've seen some other other threads about this, but nothing that seems to be definitive for me (at least, so far I cannot seem to make it work!).
I have an Arduino sketch that I imported into AS7. The sketch runs, and I can use the AVR Dragon debugger and so on. The sketch has a very simple section where I turn on an LED, delay for 1000 ms, then turn off the LED. However, the LED stays on for two seconds not one, indicating that the timer values are still calculated based upon a 16 MHz clock, instead of 8 Mhz (internal RC clock is what I want to use)
No matter what I try, I cannot seem to find a way to tell the project that I want it to use an F_CPU of 8 MHz instead of 16 MHz.
I did a "search in files" for a line that says "#define F_CPU 16000000" but the search says no results found, even when I widen the scope as much as I can.
I have tried adding #define F_CPU 8000000 to my sketch.cpp file, no good.
I have tried changing the symbols in the makefile section of the project options (both C and C++), no luck.
How does one change the F_CPU value?