Line 19: |
Line 19: |
| *Head to the workbench by clicking the far right arrow icon. | | *Head to the workbench by clicking the far right arrow icon. |
| *You now see the main IDE with Project Explorer, File Editor, Console and others panes. | | *You now see the main IDE with Project Explorer, File Editor, Console and others panes. |
− | *There will be an error and a probably warning in the problems pane. Don't worry about them for now, and open C:\devkitPro\examples\wii\template\ in Windows Explorer. Select the Source folder and makefile, and copy them to clipboard. Return to Eclipse, right click the HelloWorld project in Project Explorer, and paste. The files should now be a part of your project. | + | *There will be an error and a probably warning in the problems pane. Don't worry about them for now, and open C:\devkitPro\examples\wii\template\ in Windows Explorer. Select the source folder and makefile, and copy them to clipboard. Return to Eclipse, right click the HelloWorld project in Project Explorer, and paste. The files should now be a part of your project. |
| *Head to Projects > Properties, or do the same from the right click menu of HelloWorld. Click "C/C++ Build" then choose the "behaviour" tab. Here, change the value of "Build (Incremental Build)" to "build" or simply blank, then hit OK. Alternatively, use a [[#Custom Make Targets|custom make target]] instead of the built in build. | | *Head to Projects > Properties, or do the same from the right click menu of HelloWorld. Click "C/C++ Build" then choose the "behaviour" tab. Here, change the value of "Build (Incremental Build)" to "build" or simply blank, then hit OK. Alternatively, use a [[#Custom Make Targets|custom make target]] instead of the built in build. |
| *With default settings, Eclipse will immediately build your project. The error should no longer be there to pester you. | | *With default settings, Eclipse will immediately build your project. The error should no longer be there to pester you. |
Line 86: |
Line 86: |
| === Zylin Plug-in === | | === Zylin Plug-in === |
| From Eclipse, head to Help > Software Updates. | | From Eclipse, head to Help > Software Updates. |
− | *On the Available Software tab click Add Site... , enter <nowiki>"http://opensource.zylin.com/zylincdt"</nowiki> and Hit OK. (You may need to add the zylin site via the "manage sites" section) | + | *On the Available Software tab click "Add Site..." , enter <nowiki>"http://opensource.zylin.com/zylincdt"</nowiki> and Hit OK. (You may need to add the zylin site via the "manage sites" section) |
| *Next, check the box in the list next to <nowiki>"http://opensource.zylin.com/zylincdt"</nowiki> and hit Install... It will now go through the motions of downloading relevant files, and another box will pop up, letting you confirm the changes. | | *Next, check the box in the list next to <nowiki>"http://opensource.zylin.com/zylincdt"</nowiki> and hit Install... It will now go through the motions of downloading relevant files, and another box will pop up, letting you confirm the changes. |
| *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. |
Line 92: |
Line 92: |
| === Debug Method & Settings === | | === Debug Method & 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 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. |
− | *Head to Run > Debug Configurations. Select ''Zylin Embedded debug (Native)'' and create a new configuration. | + | *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. |
Line 135: |
Line 135: |
| *In your makefile's LIBS section add -ldb '''before -logc''' . For your CFLAGS/CXXFLAGS, change -O2 to -O0 for any debug builds. | | *In your makefile's LIBS section add -ldb '''before -logc''' . For your CFLAGS/CXXFLAGS, change -O2 to -O0 for any debug builds. |
| *You need to add "#include <debug.h>" in template.c | | *You need to add "#include <debug.h>" in template.c |
− | Debugging can needs to be started by adding these lines to your application's code: | + | Debugging can be started by adding these lines to your application's code: |
| <pre> | | <pre> |
| DEBUG_Init(GDBSTUB_DEVICE_WIFI, 8000); // Port 8000 (use whatever you want) | | DEBUG_Init(GDBSTUB_DEVICE_WIFI, 8000); // Port 8000 (use whatever you want) |
Line 141: |
Line 141: |
| </pre> | | </pre> |
| There doesn't seem to be an issue with where you place it, but I'd advise that it is shortly after video is initialised and the console is ready. This allows the Wii-side of the debugger to output text: | | There doesn't seem to be an issue with where you place it, but I'd advise that it is shortly after video is initialised and the console is ready. This allows the Wii-side of the debugger to output text: |
− | <!-- Verbatim output - Typo is part of patch. ---> | + | <!-- Verbatim output - Typo is part of wifi patch. ---> |
| <pre> | | <pre> |
| Getting Wii IP adress. | | Getting Wii IP adress. |