On Thursday 2008 February 07, Sven Schlender wrote:
> I use printf() and redirect the output to the serial line. I have done it
> in my code like suggested in avr-libc.
> The problem is, that the function which puts the characters on RS232 is
> located in the bootloader (Word-Address 0x1F000).
> The application which uses the printf is located in the application section
> (Word-Adress 0x00000). In the __file structure of stdio is only a 16-Bit
> datatype for saving the function pointers for put and get functions. So if
> I call printf() in application the AVR jumps to the Black Forest.
>
> Do somebody has an idea how to fix this without patching the avr-libc?
Just have an intermediate function that _is_ in the 0000 section?
void indirect_putch_at_0000(char ch)
{
putch_at_1f000(ch);
}
I would imagine this could be significantly simplified by writing it in
assembler as a __naked__ function; but you get the idea...
--
Dr Andy Parkins, M Eng (hons), MIET
[EMAIL PROTECTED]
_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list