Changes

Jump to navigation Jump to search
reorganised a little, made some corrections, binary parser.
Line 31: Line 31:  
Provided you have wiiload set up correctly, double clicking this will allow you to easily send your most recently compiled .dol/.elf to your Wii. Your makefile entry for wiiload should look something like this, if not set up already:
 
Provided you have wiiload set up correctly, double clicking this will allow you to easily send your most recently compiled .dol/.elf to your Wii. Your makefile entry for wiiload should look something like this, if not set up already:
 
<pre>
 
<pre>
run:  
+
run: $(BUILD)
make
   
wiiload $(TARGET).dol
 
wiiload $(TARGET).dol
 
</pre>
 
</pre>
This is the same as the standard makefile from the template, but "make" is added simply to be sure we have a compiled version before trying to send our .elf/.dol file.
+
This is the same as the standard makefile from the template, but the $(BUILD) dependency is added simply to be sure we have a compiled version before trying to send our .elf/.dol file.
    
== More Settings ==
 
== More Settings ==
Line 90: Line 89:  
*Hit next, accept the terms, then finish. It will install, and ask you if you want to restart Eclipse, and I suggest you do.
 
*Hit next, accept the terms, then finish. It will install, and ask you if you want to restart Eclipse, and I suggest you do.
   −
=== Debug Method & Settings ===
+
=== Debug Settings ===
In order to debug a Wii application, you have to connect your debugger to it somehow. Your options consist of the use of a USB Gecko or a libogc wifi patch. Either way, the base setup is the same.
+
In order to debug a Wii application, you have to connect your computer based debugger to it somehow. You can use a [[#USB Gecko|USB Gecko]] or a [[#Wifi Debugging Patch|libogc wifi patch]]. Either way, the base setup is outlined here first.
*Head to Run > Debug Configurations. Select "Zylin Embedded debug (Native)" and create a new configuration.
+
 
 +
*Head to Project > Properties then C/C++ Build ¬ Settings.
 +
*On the Binary Parsers tab, check "GNU Elf Parser" and move it to the top of the list.
 +
*Select it and enter
 +
C:\devkitPro\devkitPPC\bin\powerpc-gekko-addr2line.exe
 +
in the addr2line field, and
 +
C:\devkitPro\devkitPPC\bin\powerpc-gekko-c++filt.exe
 +
in the c++filt field.
 +
*Next, head to Run > Debug Configurations. Select "Zylin Embedded debug (Native)" and create a new configuration.
 
*Name it HelloWorld GDB or other relevant name, but bear in mind that it will need to be unique across all Eclipse projects.
 
*Name it HelloWorld GDB or other relevant name, but bear in mind that it will need to be unique across all Eclipse projects.
 
From here, I'll explain settings tab by tab, as there are several ways to achieve the same setup.
 
From here, I'll explain settings tab by tab, as there are several ways to achieve the same setup.
    
==== Main tab ====
 
==== Main tab ====
*Adding your project name is optional, and may or may not be filled in for you already. It only seem to enable the Search Project button below, which doesn't actually do anything useful for us.
+
*Specify your project if it is not filled in for you already.
*In ''C/C++ Application'' you can specify your project's .elf (not.dol) to be used by GDB as a symbol file. Alternatively, it can be done via the commands tab.
+
*In ''C/C++ Application'' you can specify your project's .elf (not.dol) to be used by GDB as a symbol file. If your project is currently compiled you should be able to use "Search Project". An absolute path to the relevant .elf file will also work fine.
 +
*Alternatively you can specify the .elf in the [[#Commands tab|commands tab]], with a symbol-file command, instead of here.
    
==== Debugger tab ====
 
==== Debugger tab ====
Line 107: Line 115:     
==== Commands tab ====
 
==== Commands tab ====
*If you are not using an external gdb command file, "Initialize" should contain your "target" command, and if you did not specify a path to your project .elf in the C/C++ on the main tab, a "symbol-file" command.
+
*If you are not using an external gdb command file, "Initialize" should contain your target command, which varies depending on your debug method ([[#Debug Method|see relevant example below]]).
 +
*If you did not specify a path to your project .elf in the C/C++ on the main tab, you also need a "symbol-file" command, like so:
 +
symbol-file C:/WiiDev/projects/HelloWorld/HelloWorld.elf
 +
The path does need to use forward slashes.
 
*I don't personally use "run" for any gdb commands, but it probably has a use for more seasoned developers.
 
*I don't personally use "run" for any gdb commands, but it probably has a use for more seasoned developers.
   Line 118: Line 129:  
*If you don't want to be able to use the Eclipse console to enter GDB commands, you have the option to disable it, but I'd recommend that you leave it enabled.
 
*If you don't want to be able to use the Eclipse console to enter GDB commands, you have the option to disable it, but I'd recommend that you leave it enabled.
 
*You can also have an external file process the output from GDB.
 
*You can also have an external file process the output from GDB.
 +
 +
=== Debug Method ===
    
==== USB Gecko ====
 
==== USB Gecko ====
Line 129: Line 142:  
*Eclipse has a SVN client plugin that you may like. [http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA Subclipse]
 
*Eclipse has a SVN client plugin that you may like. [http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA Subclipse]
 
*Apply tcpipwifi.patch from: http://sourceforge.net/tracker/?func=detail&aid=2707076&group_id=114505&atid=668553
 
*Apply tcpipwifi.patch from: http://sourceforge.net/tracker/?func=detail&aid=2707076&group_id=114505&atid=668553
 +
*Within Eclipse, applying a patch is as easy as right clicking the project and heading to Team > Apply Patch. Stay with default settings.
 
*Compile libogc and install.
 
*Compile libogc and install.
  
78

edits

Navigation menu