Embedded development targeting the Nintendo Game Boy Advance.
The DEVKITPRO
and DEVKITARM
environment variables must be set.
./configure.sh -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build/
If a build type is not specified, CMake is configured to produce a debug build.
Pass the ELF file or GBA ROM to mGBA. If using the SDL version of mGBA, pass a viewport size option for a better viewing experience.
mgba -2 ./build/untitled.gba
Run a debug build with a debug session. mGBA will wait for a connection on the localhost port 2345.
mgba -g ./build/untitled
In another window, attach to the session. The file .gdbinit
specifies the binary to load debug symbols from and the remote target. GDB must
be configured to allow loading this file (local-gdbinit
, safe-path
).
$ gdb -q -iex "set auto-load safe-path ."
0x00000000 in ?? ()
(gdb) cont
Continuing.
This software is made available under the terms of the Mozilla Public License, version 2.0. See LICENSE for details.