Components installation
The bmde CLI does not build, run or debug anything by itself: each command wraps a component of the BMDE, a tool
of the course (devkitARM, DeSmuME, Insight...). Every installation method needs some of them,
installed in one of these ways, which are always the same and can be mixed (e.g. build with the devkitARM of your
computer and run in Docker):
- Docker: the image of the component, which the
dockerbackend ofbmderuns. Nothing to install besides Docker. - Host: the component installed in your computer by
scripts/install.sh, which thehostbackend ofbmdeand the Makefiles of the course use. - Flatpak: only DeSmuME, for the
flatpakbackend ofbmde run.
| Component | Used by | Docker image | scripts/install.sh |
Flatpak |
|---|---|---|---|---|
devkitarm |
bmde build, make |
aleixmt/devkitarm-nds |
✅ | |
desmume |
bmde run, make run |
aleixmt/desmume |
✅ | ✅ |
insight |
bmde debug, make debug |
aleixmt/insight |
✅ | |
dlditool |
bmde patch |
aleixmt/dlditool |
✅ | |
grit |
converting images into graphics data | aleixmt/grit |
✅ | |
git |
bmde git, git |
aleixmt/git-sshpass |
✅ | |
vpn |
bmde git (VPN of the URV) |
aleixmt/forticlient |
✅ | |
vscode |
editing, with the ARM assembly extension | aleixmt/vscode |
✅ |
Docker components
- Install Docker and let your user run it, as explained in the prerequisites.
- That's all: the first time a command of
bmdeuses thedockerbackend, it downloads the image of its component (and on every run it checks for a newer one).
To download the images in advance (e.g. before a lab session, or to work offline later), use the --docker option of
scripts/install.sh, with the components you want (all of them by default):
bmde runs the images of its own version (bmde 1.15.0 runs aleixmt/desmume:1.15.0); docker.image_tag of
bmde.toml pins another one (see images).
Host components
scripts/install.sh of the repository of bmde installs the components in an Ubuntu / Debian computer, with the
install scripts of each component: the same ones that build their Docker images, so both installations are the same.
It needs sudo and an internet connection.
- Download the repository of
bmde(the script checks out the repositories of the components it installs): - Run the script as your user, not with
sudo(it callssudoitself, and the extension of VS Code is installed for the user that runs it). With no arguments it installs every component; with arguments, only those: - Open a new session (or log out and in), which loads the environment of the components (
PATH,DEVKITPRO,DESMUME...). To load it in the current terminal: - Check the installation, e.g. with
arm-none-eabi-gcc --version, or withbmde checkif you use the CLI.
For each component, the script downloads its assets (scripts/download_assets.sh of the component) and runs its
install scripts (src/install_*.sh), always in the order that the components depend on each other. The programs go to
/URV/bmde (set BMDE_ROOT to change it) and their environment to /etc/profile.d/bmde-*.sh. Running it again is
safe: a program that is already installed is not built again. Some components take a while: DeSmuME is built from its
sources.
Insight needs the toolchain of Ubuntu 14.04 to be built, so the script takes it from the Docker image of Insight
(aleixmt/insight), which needs Docker. Without Docker, build its tarball elsewhere with
components/insight-docker/scripts/build_tarball.sh and pass it in INSIGHT_TARBALL.
Without a copy of the repository, the script can be run directly from GitHub, and then it clones the components into
~/.cache/bmde/components:
curl -fsSL https://raw.githubusercontent.com/URV-teacher/bmde/master/scripts/install.sh | bash -s -- devkitarm
The host components installation guide explains each install script, step by step,
and how to test each component. To uninstall the components, remove /URV/bmde and /etc/profile.d/bmde-*.sh (the
packages installed with apt stay).
Flatpak DeSmuME
bmde run --backend flatpak runs the DeSmuME of Flathub, a newer version than the 0.9.11 of the course. It only opens
the ROM: the debug, FAT image and controls options of bmde run need the docker or host backends.
sudo apt install -y flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub org.desmume.DeSmuME
Choosing the backend of each command
By default, each command of bmde uses the first backend that is available, by order of preference: docker and then
host (docker, flatpak and host for bmde run, and host first for bmde debug). bmde check shows which ones
are available. To choose one, use --backend (e.g. bmde build --backend host), or set it in bmde.toml: