avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] <ot> porting a generic libc to an arbitrary uC


From: Steve Franks
Subject: Re: [avr-libc-dev] <ot> porting a generic libc to an arbitrary uC
Date: Thu, 19 Apr 2007 15:24:00 -0700

All,

Just to close out this thread, I've discovered the process is very
similar, just completely undocumented (someone needs to beat someone
over the head with doxygen, or even put a comment in the stdio.h file,
something! anything!).

If you ever find yourself in this situation:

* google WinARM (even for unix users - you are stealing code, not installing it)
* download WinARM and unzip it somewhere
* search the <unzip>/examples directory for syscalls.c and serial.c
* modify them for your processor/pcb
* compile/link with them
* note that "iprintf()" on ARM is the rough equivalent of specifying
one of the watered-down vsprintf's in your makefile for AVR.
* note that if you find "rprintf()" in the code you are looking at,
move on to another example - rprintf appears to be the defacto
standard on ARM for anyone who wants to write a 'fake' printf function
with no stdio.h or libc.a linkage.
* beware that the syscalls.c file has a comment mentionins that it was
adapted from Keil's gcc toolset, and so may have unpleasant copyright
strings attached, even though none are mentioned specifically - I am
looking into it myself.

That's what I've found.  Hope it helps someone else.  Note that gnuarm
also requires a crt0.S file and .ld scripts in addition to a makefile
to generate a usable .hex.  You might steal those from WinARM while
you are at it.  Note they usually need customized as well - no nice
coordinated efforts like avr-libc to make everything work "out of the
box".

Steve




reply via email to

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