On Tue, 2011-07-19 at 13:12 -0700, JP wrote: > I want to compile and run very simple tests for the compilers (GCC and > LLVM). How do I build a simple program _without_ RTEMS and load it into > qemu? > > - What's the full compile/link command?
Have a look at programs like the Milkymist BIOS and the demo firmware, which are built without RTEMS. They are in the milkymist/milkymist (SoC) repository on Github. The Makefiles use the -rtems4.11 toolchain, but they should work as well with the -elf toolchain (in fact, they pass options to the compiler to disable OS-specific features). > - How do load and run the program in qemu? qemu-system-lm32 -M milkymist -kernel <ELF file> more options: http://www.milkymist.org/wiki/index.php?title=Using_QEMU > I tried using the "lightweight toolchain" lm32-elf-gcc: > http://www.milkymist.org/wiki/index.php?title=Compiling_a_lightweight_Mico32_toolchain > but the trivial "lm32-elf-gcc hello.c -o hello" didn't link properly. Yes, the -elf compiler does not have a C library. Such a library is searched for automatically by the -rtems4.11 compiler, and explicitly specified by the BIOS/demo build scripts. S. _______________________________________________ http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org IRC: #milkymist@Freenode Twitter: www.twitter.com/milkymistvj Ideas? http://milkymist.uservoice.com
