Build from source
This is the option you should use if you want to help develop BlocksDS, or if you want to always use the cutting edge version of BlocksDS.
-
You need to install a cross compiler to build applications for NDS. You also need to build a few host tools, including a C/C++ compiler.
If you’re on Ubuntu run the following command:
sudo apt-get install -y --no-install-recommends build-essential -
You will also need to install the ARM toolchain of Wonderful Toolchains. Follow the instructions in this link: https://wonderful.asie.pl/doc/general/getting-started/#linux
-
Now, install the ARM toolchain of Wonderful Toolchains:
export PATH=/opt/wonderful/bin:$PATH wf-pacman -Syu wf-pacman -S toolchain-gcc-arm-none-eabiYou can also install the Teak toolchain if you want to develop binaries for the DSP of the DSi. This isn’t available in all platforms (like in Windows).
wf-pacman -S toolchain-llvm-teak-llvm -
Now, clone this repository:
git clone --recurse-submodules https://github.com/blocksds/sdk.git cd sdk -
To build the SDK, run this from the root of this repository:
BLOCKSDS=$PWD make -j`nproc` -
Now, you have some options. The first one is recommended, the others are for users that may have advanced needs.
-
Recommended. Install it in your system. You won’t need to set
BLOCKSDSorBLOCKSDSEXTmanually to use the SDK. Run:sudo mkdir /opt/blocksds/ && sudo chown $USER:$USER /opt/blocksds mkdir /opt/blocksds/external make installThis will install the libraries and tools to
/opt/blocksds/core. Third party libraries and tools are expected to be installed to/opt/blocksds/external.BLOCKDSdefaults to/opt/blocksds/corein all Makefiles, andBLOCKDSEXTdefaults to/opt/blocksds/external. -
Install it in your system in a custom path. You will need to set
BLOCKSDSorBLOCKSDSEXTmanually to use the SDK. Run:BLOCKSDS=$PWD make INSTALLDIR=my/path -j`nproc`You can avoid exporting
BLOCKSDSevery time by adding it to your.bashrc,.zshenvor similar. -
Use the libraries from this path. Make sure that the environment variable
BLOCKSDSis always set to the right location when you want to use the SDK. The build system of the templates and examples will use this variable to locate the components of BlocksDS it and use them. Any other external library will need to be managed by you.You can avoid exporting
BLOCKSDSevery time by adding it to your.bashrc,.zshenvor similar.
-
-
Now you can try to build one of the BlocksDS examples. They are available in folder
examplesin the root of the repository. From there, for example, go tographics_3d/volumetric_shadowand typemake. This will generate a NDS ROM that you can try with an emulator or a flashcart.You can also try one of the open source projects made with BlocksDS that are listed here.