This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: Modifying ARM syscalls.c for terminal I/O
- From: Mark Salter <msalter at redhat dot com>
- To: paulmgriffin at hotmail dot com
- Cc: newlib at sources dot redhat dot com
- Date: Tue, 4 Feb 2003 10:15:47 -0500 (EST)
- Subject: Re: Modifying ARM syscalls.c for terminal I/O
- References: <F19GLTJpRzged3Qpjj5000051c4@hotmail.com>
>>>>> Paul Griffin writes:
> Hi all,
> i'm using gcc3.1.2 built for an arm-elf target running on a i686-pc-cygwin
> host. At present all I/O is achieved using my own arm assembly routines that
> make use of the on chip uart. I would now like to be able to use printf!! I
> do not have the use of Angel or Demon i/o services.
> So far i've gathered that i need to modify libc/sys/arm/syscalls.c in order
> to achieve this. The approach i'm taking at the moment is to replace the
> function _swiwrite() with a function that would wrap my own assembly
> routine. The assembly routine simply bit bangs individual characters down
> the serial port.
> My question is are my modifcations in the correct area? would anyone have
> any alternative suggestions to this "wrapper" approach???
> Any suggestions or advice would be very much appreciated!
The right place to do this is in libgloss.
For an example, look at src/libgloss/arm/redboot-syscalls.c, etc.
--Mark