<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Phase</id>
	<title>3dbrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Phase"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/Phase"/>
	<updated>2026-04-14T16:31:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=17906</id>
		<title>Setting up Development Environment</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=17906"/>
		<updated>2016-08-07T05:41:19Z</updated>

		<summary type="html">&lt;p&gt;Phase: /* Unix-like platforms */ Change SourceForge link to GitHub link for Perl installer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Setup =&lt;br /&gt;
* Install [http://devkitpro.org/ devkitARM]. If it&#039;s already installed, update it.&lt;br /&gt;
** On Windows, there&#039;s a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ graphical installer].&lt;br /&gt;
** On Unix-like platforms such as Linux/macOS, there&#039;s a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl/download Perl script]. Make sure you also select libctru and the 3ds examples when installing.&lt;br /&gt;
* Depending on the kind of homebrew you want to develop, you may be interested in installing and using additional libraries and tools which don&#039;t ship alongside devkitARM/libctru. A list of them can be found in [[Homebrew Libraries and Tools]].&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
devkitPro provides Win32-native precompiled versions of devkitARM which can be run directly on Windows.&lt;br /&gt;
* [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ download the latest version of the graphical installer] from SourceForge and run it, following the instructions as you go.&lt;br /&gt;
* An Internet connection is required.&lt;br /&gt;
* You will want to make sure devkitARM is selected during the installation process to develop for the 3DS (and also the DS and GBA) - you can also install devkitPPC (for GameCube/Wii development) and devkitPSP (for PlayStation Portable development) if you wish.&lt;br /&gt;
* Once the installer has finished, launch MSYS from:&lt;br /&gt;
** Windows 7 and earlier: Start -&amp;gt; All Programs -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
** Windows 8 and 8.1: Right click on the Start screen and select &#039;All Apps&#039;. You should find MSYS there.&lt;br /&gt;
** Windows 10 (pre-Anniversary Update): Start -&amp;gt; All Apps -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
** Windows 10 (post-Anniversary Update): Start -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
&lt;br /&gt;
Alternatively starting with Windows 10 Anniversary Update (Version 1607), the [https://msdn.microsoft.com/en-us/commandline/wsl/install_guide Windows Subsystem for Linux (WSL)] may also be used to run the Linux version of devkitARM. Due to the fact that GCC was originally designed for Unix-like platforms its use may yield performance and convenience improvements. For instructions on how to set up devkitARM under WSL refer to the &#039;&#039;Unix-like platforms&#039;&#039; section. For WSL installation instructions, see the MSDN page linked just above, but ignore the part about having to be a Windows Insider; as long as you have the Anniversary Update or later it will work just fine.&lt;br /&gt;
&lt;br /&gt;
==Unix-like platforms==&lt;br /&gt;
Currently devkitPro provides precompiled versions of devkitARM for the following Unix-like platforms: Linux (x86/x64), macOS (universal binary). Note that Linux x64 binaries are usable under WSL.&lt;br /&gt;
&lt;br /&gt;
* First, you need to install curl so the installer can download the devkitARM packages, and you should also install Git - you&#039;ll need it to update ctrulib or share your code on GitHub, among many other things.&lt;br /&gt;
&lt;br /&gt;
* Find your way into a shell (eg. by opening a Terminal window), and follow the instructions for your OS:&lt;br /&gt;
** Debian/Ubuntu/Linux Mint/WSL: &amp;lt;code&amp;gt;sudo apt-get install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** Fedora/CentOS/RHEL: &amp;lt;code&amp;gt;sudo yum install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** openSUSE: &amp;lt;code&amp;gt;sudo zypper install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** macOS: Download Git from [http://git-scm.com/download/mac] and install it. Curl is included with the OS.&lt;br /&gt;
&lt;br /&gt;
* Next, we need to download, make executable and run the devkitARM updater (don&#039;t worry, the updater is also the installer.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl -L https://raw.githubusercontent.com/devkitPro/installer/master/perl/devkitARMupdate.pl -o devkitARMupdate.pl&lt;br /&gt;
chmod +x ./devkitARMupdate.pl&lt;br /&gt;
sudo ./devkitARMupdate.pl /opt/devkitpro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Finally, we need to tell your shell where to find the devkitARM binaries.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;export DEVKITPRO=/opt/devkitpro&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;export DEVKITARM=/opt/devkitpro/devkitARM&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;export PATH=$PATH:/opt/devkitpro/devkitARM/bin&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Building the examples =&lt;br /&gt;
3DS examples are still being created; however, there are a growing number of examples available from the [https://github.com/devkitPro/3ds-examples devkitPro/3ds-examples GitHub repository].&lt;br /&gt;
There are now too many to list here in detail, so go ahead and browse them.&lt;br /&gt;
&lt;br /&gt;
* To download these, if you installed Git (as you will have if you followed the above instructions), simply type &amp;lt;code&amp;gt;git clone https://github.com/devkitPro/3ds-examples.git&amp;lt;/code&amp;gt; into your shell in the directory you wish to store the 3ds-examples folder in.&lt;br /&gt;
** To overwrite the (almost certainly outdated) examples installed by the devkitPro updater, type &amp;lt;code&amp;gt;git clone https://github.com/devkitPro/3ds-examples.git $DEVKITPRO/examples/3ds&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These can be built from the command line.&lt;br /&gt;
&lt;br /&gt;
To start a new homebrew project from the &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; shell, simply type the following (replacing &amp;lt;code&amp;gt;&#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&amp;lt;/code&amp;gt; with the place you would like your project to be stored, with &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; meaning your HOME directory):&lt;br /&gt;
 cp -r $DEVKITPRO/examples/3ds/templates/application &#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&lt;br /&gt;
 cd &#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To compile it, type &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; in the project directory.&lt;br /&gt;
To run it on your 3DS, start the Homebrew Launcher, press Y to open the network loader, then on your PC type: &amp;lt;code&amp;gt;$DEVKITARM/bin/3dslink -a &#039;&#039;&#039;192.168.X.X&#039;&#039;&#039; &#039;&#039;&#039;my3dsproject&#039;&#039;&#039;.3dsx&amp;lt;/code&amp;gt;, replacing &#039;&#039;&#039;192.168.X.X&#039;&#039;&#039; with your 3DS&#039;s IP address (displayed in the network loader screen) and &#039;&#039;&#039;my3dsproject&#039;&#039;&#039; with the name of the folder your project is in (ie. the folder you have the source folder in and the README file.)&lt;br /&gt;
Don&#039;t type the full path, just the last segment - eg. for &amp;lt;code&amp;gt;C:\a\b\&#039;&#039;&#039;verygood3dsapp&#039;&#039;&#039;&amp;lt;/code&amp;gt;, you would type &amp;lt;code&amp;gt;&#039;&#039;&#039;verygood3dsapp&#039;&#039;&#039;.3dsx&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If all goes well, you&#039;ll soon see your application running on your 3DS.&lt;br /&gt;
&lt;br /&gt;
==Building the examples on Linux with Netbeans==&lt;br /&gt;
* Go to File-&amp;gt;New Project...&lt;br /&gt;
* Select C/C++ Project with existing code&lt;br /&gt;
* Navigate to the examples directory and select the folder for the project you want to build; eg.    /home/vtsingaras/3ds/examples/app_launch&lt;br /&gt;
* Leave Configuration Mode to &#039;Automatic&#039; and click &#039;Finish&#039;.&lt;br /&gt;
* It will fail to build. Now edit Makefile and insert these two lines, adjusting for your devkitpro path, at the top:&lt;br /&gt;
&amp;lt;pre&amp;gt;export DEVKITPRO=/opt/devkitpro&lt;br /&gt;
export DEVKITARM=/opt/devkitpro/devkitARM&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Right-click the project and go to Properties-&amp;gt;Code Assistance and click C Compiler.&lt;br /&gt;
* In include directories enter &lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/devkitpro/devkitARM/include;/opt/devkitpro/ctrulib/libctru/include&amp;lt;/pre&amp;gt;&lt;br /&gt;
adjusting again for your devkitPro path.&lt;br /&gt;
* Do the same for &#039;C++ Compiler&#039;.&lt;br /&gt;
* Go to &#039;Run&#039; and click &#039;Clean and Build Project&#039;.&lt;br /&gt;
* Now right-click on the project and select Code Assistance-&amp;gt;Reparse Project.&lt;br /&gt;
&lt;br /&gt;
Now you can use Netbeans&#039; code completion feature and build your project from the Run menu.&lt;br /&gt;
&lt;br /&gt;
= Building homebrew for distribution =&lt;br /&gt;
To build your homebrew, open a Bash shell as described above, browse to the folder of the homebrew you wish to compile, and run &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* This will build a .elf file and a .3dsx file (the homebrew executable itself) together with a .smdh file (the icon).&lt;br /&gt;
** The Homebrew Launcher can only run homebrew in the 3DSX format, and can only display SMDH icons.&lt;br /&gt;
&lt;br /&gt;
* To build a CCI (.3ds) file, you need to strip the .elf file and use makerom on it (with the provided RSF file):&lt;br /&gt;
 arm-none-eabi-strip &#039;&#039;&#039;[ELF file]&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cci -o &#039;&#039;&#039;[.3ds file]&#039;&#039;&#039; -rsf &#039;&#039;&#039;[RSF file]&#039;&#039;&#039; -target t -exefslogo -elf &#039;&#039;&#039;[ELF file]&#039;&#039;&#039; -icon &#039;&#039;&#039;[icon file]&#039;&#039;&#039; -banner &#039;&#039;&#039;[banner file]&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Phase</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=File:Homebrew_launcher.png&amp;diff=13226</id>
		<title>File:Homebrew launcher.png</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=File:Homebrew_launcher.png&amp;diff=13226"/>
		<updated>2015-09-09T00:26:49Z</updated>

		<summary type="html">&lt;p&gt;Phase: A picture of the Homebrew Channel on a 3DS.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A picture of the Homebrew Channel on a 3DS.&lt;/div&gt;</summary>
		<author><name>Phase</name></author>
	</entry>
</feed>