I just realised that my debug / release options can generate different F_CPU frequency and I dont know why is that.
For programming my device I am using USBASP 2.0
For Debug I am using:
-c usbasp -p atmega8 -U flash:w:$(ProjectDir)Debug\$(TargetName).hex:i
and for Release:
-c usbasp -p atmega8 -U flash:w:$(ProjectDir)Release\$(TargetName).hex:i
Recently I changed my F_CPU frequency via ExtremeBurner and realised that on Debug frequency of _ms_delay() is too high (LED blinks too fast)
while on release it is fine...
My other concern connected to these 2 functions is that with big chunks of code (a lot libs included etc) sometimes Debug wasnt writing code to the device, while release was.
I suppose it is connected to the optimalization as debug option propably didnt do opt for space and just couldnt 'fit'.
However I thought for optimalization were responsible 2 functions placed here (atmel studio 7):
As you can see here it is stated however I have no idea how these AVRdude declarations are corresponding with it as they seem to be completly different set of tools...
As I am quite fresh to AVR programming could someone put some light on this please?