Running newlib programs using libgloss on or32 platforms

If you have an OpenRISC platform and want to run programs which require a libc on it without the overhead/complexity of a full operating system then this page is for you. Provided here should be enough to get a reasonably confident Linux/Cygwin user going with my port of libgloss (low-level I/O part of newlib) to the or32 platform. This basically provides enough infrastructure to start executing a C program on an or32 platform and perform simple text I/O via the Opencores UART commonly used with OpenRISC designs. The advantage of using newlib is that many standard C functions including printf (to the UART), malloc/free, string functions and math functions should all be available.

For more details on newlib, please visit http://sources.redhat.com/newlib/.

Please also note that everything on this page is provided as-is without any kind of warranty. I hope what's here useful, however use it at your own risk!

Approximate instructions

Now, if you're lucky, you should now be able to compile and run programs with relative ease on your OpenRISC platforms. For example a simple hello-world program might be compiled as follows:

or32-elf-gcc hello.c -o hello

I personally use gdb to upload and run programs generated in this way to my or32 platform.

If and you have a problem which specifically relates to newlib and libgloss I might be able to help you: jacob.bower at ic dot ac dot uk. If however your problem is to do with a lack of understanding of a Unix like environment or problems with other or1k tools then I'm afraid you're asking the wrong person. You might try the openrisc mailing list or your local Unix/Linux guru instead.

Todo