From af6208be2969204b849670924d0c70c094bda90b Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Mon, 6 Jan 2020 15:38:33 +0100 Subject: [PATCH] Improve Makefile to make easier Debug in PSP --- .vscode/launch.json | 7 ++++++- Makefile.psp1 | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 119aae5d65..28f4114a39 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -53,7 +53,12 @@ "text": "symbol-file ${workspaceFolder}/retroarchpsp.elf", "description": "read symbols for elf file", "ignoreFailures": true - } + }, + { + "description": "Enable all-exceptions", + "text": "-exec \"catch throw\"", + "ignoreFailures": true + } ], "showDisplayString": true, "targetArchitecture": "mips", diff --git a/Makefile.psp1 b/Makefile.psp1 index d57448dea1..dccef528b1 100644 --- a/Makefile.psp1 +++ b/Makefile.psp1 @@ -56,5 +56,20 @@ PSP_OBJECTS = griffin/griffin.o bootstrap/psp1/kernel_functions.o OBJS = $(PSP_OBJECTS) +pspsh-debug: + pspsh -e reset + read -p "Start debugger in VSCode and press any key to continue... \n" -n1 -s + # pspsh -e debug ./retroarchpsp.prx + pspsh + +pspsh-run: + pspsh -e reset + pspsh -e ./retroarchpsp.prx + pspsh + +debug: clean all pspsh-debug + +run: clean all pspsh-run + PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak