I am working on a project the last month and I have finally completed it. The resulting code was about 10K
and the ram used was almost 33% of the atmega16 which I chose.
Somewhere in the code I use numbers of "double" precision (ex. -1.02389234) and the function "dtostrf" to show the result to a LCD screen.
During some debugging I read the manual page for "dtostrf" and I found that I should link with "libm.a".
So I did, and wow!!!
My code decreased at about 8K and ram usage at 8.4%!!!
I need someone to explain me why this happens and what exactly are these libraries for. Why are they needed if you already have done the correct "#includes" ?
Thank you very much for your time and help.
P.S. I use AVR Studio 4.16 build 638 with WinAVR-20090313.