Devkitppc setup (Linux)

From WiiBrew
Jump to navigation Jump to search

Installing devkitPPC from devkitPro packages

  • Optionally, find out your Wii's IP with the homebrew channel and add
export WIILOAD=tcp: # Replace this with your Wii's IP found by pressing the home button in the homebrew channel.
  • Restart your terminal or type
source ~/.bashrc

Compiling a Hello World

  • Copy devkitpro/examples/wii/template to your projects folder cd into the new folder and simply type make i.e:
   mkdir ~/projects
   cp -r /opt/devkitpro/examples/wii/template ~/projects/wii-template
   cd ~/projects/wii-template
  • To run the example on your Wii, start the homebrew channel and type
make run

Voilà! You just compiled your first Wii program!

Compiling Insight Debugger

A custom version of the Insight graphical debugger is distributed by devkitPro, however currently there are no linux binaries available. In order to successfully compile the source under linux, you need to run the following sequence of commands from the directory where you unpacked the source:

for f in `find`; do dos2unix ${f}; done
./configure --target=powerpc-gekko
make install prefix=/directory/to/install/to

Using DDD (GNU Data Display Debugger)

An alternative to Insight is DDD

It has the advantage that you won't have to compile it on linux

For instance to install it on ubuntu just use the following command:

sudo apt-get install ddd

Then you use ddd with powerpc-eabi-gdb with the following:

ddd --debugger path-to-powerpc-eabi-gdb

And finally you can use the console at the bottom to connect to your wii and load the symbols as you would using gdb from the console

For instructions on how to use gdb or insight for remote debugging, see Remote Debugging with GDB