use debug as build target, remove unneeded README change

This commit is contained in:
Joshua Smith 2024-10-22 19:08:37 -05:00
parent b8d87b25cc
commit 1dd3fc8c67
2 changed files with 2 additions and 50 deletions

View File

@ -7,53 +7,3 @@ This repository builds the following ROMs:
* [**pokeplatinum.us.nds**](https://datomatic.no-intro.org/index.php?page=show_record&s=28&n=3541) `sha1: ce81046eda7d232513069519cb2085349896dec7`
For contacts and other pret projects, see [pret.github.io](https://pret.github.io/). In addition to the pret Discord, also see the [VoidMatrix Discord (#decomp)](https://discord.gg/prUAgd5).
## Debugging with GDB + overlays
1. Download and build custom GDB debugger from https://github.com/joshua-smith-12/binutils-gdb-nds - this build includes changes to help aid overlay debugging. There is a release available from the repo, which was built for Ubuntu 24.04. (Regular gdb-multiarch works for basic debugging but will handle overlays poorly)
2. Create or update a `.vscode/launch.json` with the below contents, updating `miDebuggerPath`:
```
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug in melonDS",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/debug.nef",
"MIMode": "gdb",
"cwd": "${workspaceFolder}",
"externalConsole": true,
"miDebuggerServerAddress": "localhost:3333",
"miDebuggerPath": "/path/to/custom/build/gdb/gdb",
"setupCommands": [
{
"description": "Enable pretty-printing",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set architecture",
"text": "set architecture armv5te"
},
{
"description": "Enable overlays",
"text": "overlay auto"
},
{
"description": "Enable overlay map",
"text": "overlay map build/overlay.map"
}
],
"stopAtConnect": false,
"stopAtEntry": false
}
]
}
```
3. Launch melonDS with GDB stub enabled and launch the pokeplatinum ROM (you may need to fiddle with the config file to make this work, melonDS GDB stub config is odd and may not actually enable properly through the UI)
4. Run debugger through VS Code, it should connect to melonDS automatically and configure overlay debugging for you.

View File

@ -21,6 +21,8 @@ export MESON_RSP_THRESHOLD=16387
if [ "$target" = test ]; then
"${MESON:-meson}" test -C build "$@"
elif [ "$target" = rom ]; then
"${MESON:-meson}" compile -C build "pokeplatinum.us.nds"
elif [ "$target" = debug ]; then
"${MESON:-meson}" compile -C build "pokeplatinum.us.nds" "debug.nef" "overlay.map"
else
"${MESON:-meson}" compile -C build "$target" "$@"