Setting up crt0 and libs for arm-unknown-coff

Richard Earnshaw rearnsha@arm.com
Wed May 10 02:47:00 GMT 2000


scott@CS.Princeton.EDU said:
> There are no link errors.  However, I know that my UART code is not in
> the executable.  When I run the code, I get a "software interrupt". My
> guess is that the library is making some incorrect assumptions about
> the underlying environment.  (This software interrupt sounds
> suspiciously like a system call.)

> How can I use my simple little polling UART routines for stdio?


Newlib's libc is written using the "user+OS" mode, where accessing IO 
devices is considered a privileged operation that has to be performed by 
the operating system.  The normal method for communicating with the 
operating system in these circumstances is to call a software interrupt 
(SWI) that asks the OS to perform the required action.  To make newlib 
tickle your UART routines you will either have to map the underlying SWI 
handler to call your code, or you will have to rewrite the OS bits of 
newlib to call your routines directly.  Take a look in new/libc/sys/arm 
for details.




------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list