[patch] Altera Nios II support
Sandra Loosemore
sandra@codesourcery.com
Fri Apr 19 19:29:00 GMT 2013
The attached patch adds minimal support for building newlib for Altera
Nios II ELF (nios2-elf). Altera did the initial toolchain port for this
processor some years ago and now Mentor Graphics is helping to update
the patches and get them in the upstream repositories. The binutils
patches were committed a couple of months ago and the gcc port has just
been posted. gdb will be posted soon and glibc (for nios2-linux-gnu
target) will follow in due course.
For this target, we are not contributing a libgloss port, only newlib
proper. Most people developing code for bare-metal applications on Nios
II will probably use a HAL BSP, which Altera's tools generate directly
from the hardware description. If the hardware description includes a
serial interface, the HAL BSP implements the low-level system calls to
make it work for console I/O, as well as providing all the necessary
startup and initialization code. In addition to testing with a HAL BSP,
at Mentor we also have a BSP built using our own proprietary framework
that supports semihosted I/O when used with an appropriate debug probe.
We re-used the same semihosting API as is implemented by the m68k
libgloss port and we would recommend borrowing that code if there is
future demand for a semihosted libgloss implementation on this target.
Besides running the newlib testsuite, we've also run the complete
gcc/g++/libstdc++ and gdb testsuites using newlib on nios2-elf, so the
newlib port has been well-tested overall.
I've elided the automatically-generated files from the attached patch to
make it easier to review. I also didn't include the aclocal.m4 file in
the diff because it is an exact copy of the one from the mips directory.
Of course these files will be checked in with the rest of the patch
per the ChangeLog, but I saw no point in asking maintainers to wade
through the diffs when reviewing this patch.
OK to commit?
-Sandra
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newlib.log
Type: text/x-log
Size: 824 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20130419/ce5b32b6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newlib.patch
Type: text/x-patch
Size: 6593 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20130419/ce5b32b6/attachment-0001.bin>
More information about the Newlib
mailing list