<?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=Ante0</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=Ante0"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/Ante0"/>
	<updated>2026-04-16T09:35:35Z</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=15830</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=15830"/>
		<updated>2016-02-19T17:41:28Z</updated>

		<summary type="html">&lt;p&gt;Ante0: /* Linux */ edited to echo full path to .bashrc instead of using variables&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. On Windows there&#039;s a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ GUI installer]. On Linux/Mac 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;
==Linux==&lt;br /&gt;
* First get the devkitARM updater Perl script for Linux.&lt;br /&gt;
* Run it with superuser privileges if your /opt directory is not marked world read-writeable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apt-get install git curl&lt;br /&gt;
curl -L http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl/download -o devkitARMupdate.pl&lt;br /&gt;
chmod +x ./devkitARMupdate.pl&lt;br /&gt;
sudo ./devkitARMupdate.pl /opt/devkitpro&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. Currently there are a few examples distributed by the devkitPro supplied updaters - these can be found in $DEVKITPRO/examples/3ds and the [https://github.com/devkitPro/3ds-examples 3ds examples repository]. There are now too many to list here in detail.&lt;br /&gt;
&lt;br /&gt;
These can be built from the command line - on Windows devkitPro supply msys which can be started using the msys shortcut in the devkitPro Start Menu entry or by browsing to &amp;lt;installdir&amp;gt;\devkitPro\msys and double clicking the msys.bat file found there. This will launch a bash shell. On Linux/OSX you can just open your system supplied shell.&lt;br /&gt;
&lt;br /&gt;
To start a new homebrew project from here simply type&lt;br /&gt;
&amp;lt;pre&amp;gt;cp -r $DEVKITPRO/examples/3ds/templates/application ~/projects/my3dsproject&lt;br /&gt;
cd ~/projects/my3dsproject&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt; To run it on your 3DS start up The Homebrew Launcher, press the Y button to open the netloader then&lt;br /&gt;
&amp;lt;pre&amp;gt;$DEVKITARM/bin/3dslink my3dsproject.3dsx&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hopefully you&#039;ll see it boot on the 3DS.&lt;br /&gt;
&lt;br /&gt;
Obviously you can add $DEVKITARM/bin to your PATH from the shell then simply run 3dslink as normal. You shouldn&#039;t add this permanently - it could potentially interfere with other tools.&lt;br /&gt;
&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 terminal, browse to your homebrew&#039;s folder and run make.&lt;br /&gt;
&lt;br /&gt;
* This will build a .elf file and a .3dsx file together with an icon. The icon and .3dsx file are the format required for the [[Homebrew Channel]].&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 [ELF file]&lt;br /&gt;
 makerom -f cci -o [.3ds file] -rsf [RSF file] -target t -exefslogo -elf [ELF file] -icon [icon file] -banner [banner file]&lt;/div&gt;</summary>
		<author><name>Ante0</name></author>
	</entry>
</feed>