This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Help redirecting stdio to embedded target's serial port
- From: "Hamilton, Ian" <Ian dot Hamilton at gbr dot xerox dot com>
- To: "'newlib at sources dot redhat dot com'" <newlib at sources dot redhat dot com>
- Date: Mon, 3 Nov 2003 11:28:57 -0000
- Subject: Help redirecting stdio to embedded target's serial port
Hi there.
I'm trying to use newlib for an embedded target, and I'm having some
problems getting stdio to redirect to my embedded target's serial port. My
target uses the AMD SC520 processor, which is a 486 core combined with a set
of PC standard peripherals, such as UARTs, DMA controllers, clocks, etc., so
the target is very close to a PC platform.
I've got my own read(), write(), fstat(), sbrk(), etc. but when I use puts()
(for example) in my code, the library never calls my write() function.
I've traced the code through, and the library's puts() function ends up
calling __sfvwrite(), which seems to just copy the string to a memory
buffer.
I configured newlib with a very simple configure line, containing just
--target=i386-pc-none specified. I've also tried i386-pc-linux, but the
effect is the same.
What am I doing wrong?
Ian.