Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| mips_cross_compiler [2014/02/16 17:57] – [MIPS Cross Compiler build] - used HOME variable beckmanf | mips_cross_compiler [2014/06/04 17:52] (current) – simple project added beckmanf | ||
|---|---|---|---|
| Line 536: | Line 536: | ||
| make check-gcc RUNTESTFLAGS=--target_board=mips-sim | make check-gcc RUNTESTFLAGS=--target_board=mips-sim | ||
| </ | </ | ||
| + | |||
| + | ===== Install git and download a simple project | ||
| + | |||
| + | Install git and download a simple project | ||
| + | |||
| + | < | ||
| + | sudo apt-get install git | ||
| + | cd | ||
| + | mkdir projects | ||
| + | cd projects | ||
| + | git clone https:// | ||
| + | </ | ||
| + | |||
| + | Now you have the simple project " | ||
| + | |||
| + | === Try the MIPS Cross Compiler === | ||
| + | |||
| + | Change to the src directory and compile the code with the cross compiler. | ||
| + | |||
| + | < | ||
| + | cd myfirst | ||
| + | cd src | ||
| + | mipsel-none-elf-gcc -S hello.c | ||
| + | less hello.s | ||
| + | </ | ||
| + | |||
| + | Now you have the compiled assembler code " | ||
| + | |||
| + | < | ||
| + | mipsel-none-elf-gcc -o hello -Tidt.ld hello.c | ||
| + | </ | ||
| + | |||
| + | Now you have the binary " | ||
| + | |||
| + | < | ||
| + | mipsel-none-elf-run hello | ||
| + | </ | ||
| + | |||
| + | This will run the binary with the mips instruction set simulator. You should see "Hello World" | ||
| + | |||
| + | |||
| ===== Open OCD ===== | ===== Open OCD ===== | ||