Re: [avr-libc-dev] Re: snprintf bug ?

2005-10-14 Thread Björn Haase
Dmitry K. wrote on Freitag, 14. Oktober 2005 05:23 : On Thursday 13 October 2005 21:46, Russell Strong wrote: You have exclude frame pointer (r28/r29) initialization by defining 'naked' for main. But with automatic string 'heading_tmp' this is not work: frame pointer is used as base

Re: [avr-libc-dev] Re: snprintf bug ?

2005-10-14 Thread Marek Michalkiewicz
On Fri, Oct 14, 2005 at 07:27:52PM +0200, Björn Haase wrote: Background is, that when changing the prologue for main the way Marek has suggested a couple of weeks ago, 'main' would become a normal function. Marek suggested to use the attribute 'naked' in order to avoid the unnecessary

RE: [avr-libc-dev] Re: snprintf bug ?

2005-10-14 Thread Darcy Watkins
Hi, I use a naked main function in a system because I have to use .init... sections to set up an external SRAM interface and locate the stack somewhere else than at the top of internal SRAM. In the one system, the naked main just calls another function that never returns. The stack initialized

Re: [avr-libc-dev] Re: snprintf bug ?

2005-10-14 Thread Russell Strong
Thanks for the analysis Dmitry, I removed the naked from main and ran it again. It worked fine. Thanks, Russell On Fri, 2005-10-14 at 14:23 +1100, Dmitry K. wrote: On Thursday 13 October 2005 21:46, Russell Strong wrote: Hi, The following is the full source and Makefile for my snprintf

[avr-libc-dev] Re: snprintf bug ?

2005-10-13 Thread Joerg Wunsch
As Russell Strong wrote: Am I doing something illegal? Do snprintf pointers need to be static? No, and no. Can you provide a full, compilable example that demonstrates the problem? -- cheers, Jorg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/

Re: [avr-libc-dev] Re: snprintf bug ?

2005-10-13 Thread Russell Strong
Hi, The following is the full source and Makefile for my snprintf bug / * * * Dasboot Navigation Module* *

Re: [avr-libc-dev] Re: snprintf bug ?

2005-10-13 Thread Dmitry K.
On Thursday 13 October 2005 21:46, Russell Strong wrote: Hi, The following is the full source and Makefile for my snprintf bug [...] static void update_heading_string (int hdg_reading) { long delta = 0; unsigned char i; static int base_hdg = 0; //static char