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

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

Re: [avr-gcc-list] stdio is only partially functional


From: Sander Pool
Subject: Re: [avr-gcc-list] stdio is only partially functional
Date: Mon, 17 Mar 2003 10:55:05 -0800

Hi Volkmar and Joerg,

thanks for the pointer regarding PSTR (:-). I got confused and thought that
constant strings get put in flash by default. Now I recall you have to put
them there explicitly. So the _P calls should not have worked but the non-_P
should have, right?

I confirmed that the terminal settings are correct as I ran Brian's m128diag
program on the same hardware with the same UDRR setting (51). In fact my
'real' UART code is a little more complex than what I published here but I
made the smallest possible code sample that would illustrate the problem.
Besides, if my timing was off I would not get those individual characters
(XY\n) correcly either, right?

I will make an even smaller sample just to make sure my external interupts
(6 and 7) aren't messing things up.

    Sander

PS Joerg, what kind of mail program do you use? When I try to reply to your
email from Outlook Express it first opens Outlook 2000. There's also a
different icon next to each message you send. You're the only one who's
emails have this behavior :-)


----- Original Message -----
From: "Volkmar Dierkes" <address@hidden>

Joerg told you already the missing PSTR() for the strings.

> I get:
>
> fS??.?d??'TA0"Q
"P?a?"T?.?{??S.?lS??.?h??Y'?'?'/'????.''?'$/
> "?"O"
> _"o"?"Y" '^f
"P?a?"T?.?{??S.?lS??.?h??Y'?'?'/'????.''?'$/"?"O"_"o
> "?"Y
> " '^XY

Did you setup the terminal with the same parameters like the mega128
(stopbits and so on?)

> int RL_tryout(char c)
> {
> if (c == '\n') {
> // first output a carriage return
> RL_tryout('\r');
> }
> loop_until_bit_is_set(UCSR1A, UDRE);
> UDR1 = c;

Here is a "return 0;" missing. But I assume it doesn't matter for your
problem.

Volkmar
____________________________________________________________________________




reply via email to

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