mirror of
https://github.com/pret/pokeplatinum.git
synced 2024-11-26 23:50:36 +00:00
use debug as build target, remove unneeded README change
This commit is contained in:
parent
b8d87b25cc
commit
1dd3fc8c67
50
README.md
50
README.md
@ -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.
|
2
build.sh
2
build.sh
@ -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" "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user