View unanswered posts | View active topics It is currently Sun Apr 22, 2018 7:56 am

Reply to topic  [ 1 post ] 
 Getting DevKitPPC up and running on Mavericks & Xcode 5 
Author Message

Joined: Tue Oct 08, 2013 12:42 am
Posts: 1
Hey guys,
I wanted to pass along some updated instructions for how to get a really sweet dev setup for anyone else who wants to develop comfortably from their laptop&couch. Some of these instructions have been posted before, but I just spent some time getting the updated steps figured out for anyone else who has moved on to the latest and greatest Xcode. The last tutorial I saw was a few years old, and hopefully this helps more people into the excellent work that Dave/WinterMute has created.

Here's what you'll need:
1. A Wii that's been letterbombed and Homebrew channel installed.
2. A Mac with Xcode 5 up and running, on the same network as your Wii.
3. DevKitPro (with DevKitPPC and the examples downloaded and placed as per WinterMute's instruction)

Here's what you'll end up with by the end of this:
1. A hello world app that will automatically build, transfer, and run on your Wii when you build&run from Xcode.

Here's how to do it:
1. Start a new Xcode Project > Other > External Build System.

2. Take the Wii template example (hello world) and copy over the make file to the root of your new project.

3. Make a folder called "source", and copy over the .c file; I called it main.c, but really whatever you'd like.

4. Drag main.c into Xcode to add it to the project (don't copy files, don't add it to a target).

5. Now, we're going to set the devkit env variables. Click on the blue project icon in the file browser (left side), which will bring up a list of projects and targets. (This list may be hidden, look for a small right-facing triangle. Clicking that will slide out the list. Argh.)

6. Click on the only target available. Under "Build Settings", we will add two more user-defined env variables. Do this by going to the Editor menu>Add Build Setting. (If this is grayed out, click in the list of other variables to give the list focus)

7. Add your two variables. I explicitly call them out like this:
Setting & Value:
DEVKITPRO /opt/devkitpro
DEVKITPPC /opt/devkitpro/devkitPPC
If you put your DevKit somewhere other than /opt, adjust these instructions accordingly.

8. Now, Xcode isn't going to like your destination when you try to build and run later. We're going to change the existing "ARCHS" variable to "i386". It should be in that long list of other variables, so feel free to search/filter to find it. This doesn't have any impact on what is compiled, just what Xcode is expecting to work with, since this is an 'external build system.'

9. Next, we're going to set up a custom executable to use wiiload. Head up to the menu to find Product>Scheme>Edit Scheme...

10. In here, go to the "Run" step on the left, and the first tab "Info" to the right.

11. Under "Executable", navigate to /opt/devkitpro/devkitPPC/bin/ and find wiiload. (again, adjust if your devkit isn't in /opt)

12. Now, skip over one tab to "Arguments". Here, add one argument that reads $(SRCROOT)/$(PROJECT_NAME).dol
Under Environment Variables, add one with the name of "WIILOAD" and a value of "tcp:", but obviously replace that IP address with the address of YOUR Wii!

13. Finally, and this is the big one that tripped me up: Under the Environment Variables section, be sure to find "Expand Variables Based On" and choose YOUR TARGET, instead of "none."

Hit Ok. Move over to the Wii for a second and load up your home-brew channel. ProTip: If you hit the home button on the HBC, you'll get a menu screen with your IP address in the upper left hand corner. Leave your Wii in this state, and jump over to your mac. BUILD AND RUN and watch the magic. Your code will compile and then get sent over to the wii (assuming they're both on the same local network) and start running.

If you've copied the template project from the DevKitPPC folder, you'll see hello world, and pressing the home button on the wiimote will bring you back to the HBC. Rinse and repeat.

I hope this is helpful, and I'm sure there's going to be more soon. And thanks again to Dave!

Sun Nov 03, 2013 11:52 am
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at Fast, secure and Free Open Source software downloads