Tutorial to build a 'Hello World' on MIPS

José Ruiz ja_rd at hotmail.com
Fri Jun 3 10:41:10 UTC 2011


Hello,


I'm using CodeSourcery for MIPS (mips-elf-11-03.52) on an XP machine. As long as my code does not use any standard function, everything works fine (I am running this code on an emulator and on real hardware with no problem). 

The problem is I can't even compile a 'Hello World' if it uses printf, for instance. I have tried to follow the 'getting started' instructions to the letter, I have tried using the supplied linker scripts... Either I get linker errors or I get a program that crashes on gdb. I will save you a the details because what I need is a 'getting started' guide.

What I need is a step-by-step guide to compiling a 'Hello World' program on an unmodified, out-of-the-box install of code sourcery (mips-elf-11-03.52) on bare metal or just on anything that will work on gdb -- so at least I have a starting point that is known to work. 
If this information is available in the documentation I have failed to find it. I think many CodeSourcery users would benefit from this short tutorial that needs not be more than a few lines long. 

This operation (building a 'hello world') is extremely trivial in all other embedded C toolchains I have used so it must surely be trivial here too, but I just can't do it without your help. I am sure that many members of this forum can answer this request, and any help will be greatly appreciated.


Thank you very much.

José A. Ruiz



 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/mips-gnu-discuss/attachments/20110603/6c33c1d6/attachment.html>


More information about the mips-gnu-discuss mailing list