avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] sprintf problem


From: Parthasaradhi Nayani
Subject: [avr-gcc-list] sprintf problem
Date: Wed, 18 Jan 2006 23:36:05 -0800 (PST)

Hello all,
In one of my projects (ATMega128 based) I am using floating point numbers and sprintf to write a formatted record to a buffer. Tthe buffer contents is then sent to a mini printer. The first two records print properly and thereafter I am getting garbage from sprintf!! The optimisation was set to 0. When I change the optimisation to s, then correct data is being printed!! Moreover there is a difference in the way _delay_loop_2 and _delay_loop_1 delays are generated with different optimisations. I would like to know the reason why this is happening (specially with sprintf) to avoid any pitfalls in my coding. Thanks in advance.

Nayani P


Yahoo! Photos – Showcase holiday pictures in hardcover
Photo Books. You design it and we’ll bind it!
reply via email to

[Prev in Thread] Current Thread [Next in Thread]