[leon_sparc] Re: CRLF vs (just) LF
Jarl Friis
jarl at diku.dk
Thu Jan 17 16:58:02 UTC 2002
Joel Sherrill <joel.sherrill at OARcorp.com> writes:
> Jarl Friis wrote:
> >
> > I guess we are now talking about the terminal I run tsim from (on the
> > host coputer), right?
> > Assuming I pipe the output to a file I can be sure no interpretation
> > by any terminal is done to the output from UART1 on LEON (i.e. tsim)
> > or the messages generated by tsim itself.
> >
> > That makes me wonder where the implementation of printf when making
> > boot prom programs.
> >
> > I was even wrong on my state on the hello-world program as boot prom,
> > for each "\n" printf emits "\n\r" (note the non-standard order of the two
> > bytes), further printf does not emit the two last bytes of a
> > string. Issuing printf("Hello") just gives you a "Hel" on the
> > output. Normally you don't notice since "\n" will be exactly the two
> > ("\n\r") last bytes that are not emitted.
> >
> > Well, where ever that printf-implementation comes from I gotta have a
> > look on that, actually I should not, making a boot prom I probably
> > should implement my own.
>
> The rtems printk() routine is pretty simple and shouldn't be difficult
> to use in a bootloader. Some BSPs build the bootloader side-by-side
> the BSP, carefully splitting files to share things.
So what you are saying is, I should have a look at the rtems source
code for printk to implement or reuse it to implement a print(f|k)
function for boot prom programs. Am I right?
Thanks for the tip.
Anyway someone should fix it in the leccs source code.
Jarl
More information about the users
mailing list