Skip to content

Commit

Permalink
Merge pull request #466 from cnlohr/gdb-port-to-3333
Browse files Browse the repository at this point in the history
Update GDB Port to 3333
  • Loading branch information
cnlohr authored Dec 4, 2024
2 parents 9dd076b + c4377f0 commit 885e227
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ch32v003fun/ch32v003fun.mk
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ gdbserver :
-$(MINICHLINK)/minichlink -baG

gdbclient :
gdb-multiarch $(TARGET).elf -ex "target remote :2000"
gdb-multiarch $(TARGET).elf -ex "target remote :3333"

clangd :
make clean
Expand Down
2 changes: 1 addition & 1 deletion examples/debugprintfdemo/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
"svdPath": "${workspaceFolder}/../../misc/CH32V003xx.svd", // extension 'Peripheral Viewer' by mcu-debug (cortex-debug)
"miDebuggerPath": "gdb-multiarch",
"miDebuggerServerAddress": "127.0.0.1:2000",
"miDebuggerServerAddress": "127.0.0.1:3333",
},
{
"name": "Flash and run in terminal",
Expand Down
2 changes: 1 addition & 1 deletion examples/template/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
"svdPath": "${workspaceFolder}/../../misc/CH32V003xx.svd", // extension 'Peripheral Viewer' by mcu-debug (cortex-debug)
"miDebuggerPath": "gdb-multiarch",
"miDebuggerServerAddress": "127.0.0.1:2000",
"miDebuggerServerAddress": "127.0.0.1:3333",
},
{
"name": "Flash and run in terminal",
Expand Down
2 changes: 1 addition & 1 deletion minichlink/microgdbstub.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* 4: If you want to let this manage the server as a network device, simply #define MICROGDBSTUB_SOCKETS
*
* To connect to your GDBStub running, you can:
* gdb-multiarch -ex 'target remote :2000' ./blink.elf
* gdb-multiarch -ex 'target remote :3333' ./blink.elf
*
*/

Expand Down
6 changes: 3 additions & 3 deletions minichlink/minichgdb.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// This file is loosely based on aappleby's GDBServer.

// Connect in with:
// gdb-multiarch -ex "set debug remote 1" -ex "target extended-remote :2000" ./blink.elf
// gdb-multiarch -ex "target extended-remote :2000" ./blink.elf
// gdb-multiarch -ex "set debug remote 1" -ex "target extended-remote :3333" ./blink.elf
// gdb-multiarch -ex "target extended-remote :3333" ./blink.elf

#include "minichlink.h"

#define MICROGDBSTUB_IMPLEMENTATION
#define MICROGDBSTUB_SOCKETS
#define MICROGDBSTUB_PORT 2000
#define MICROGDBSTUB_PORT 3333

const char* MICROGDBSTUB_MEMORY_MAP = "l<?xml version=\"1.0\"?>"
"<!DOCTYPE memory-map PUBLIC \"+//IDN gnu.org//DTD GDB Memory Map V1.0//EN\" \"http://sourceware.org/gdb/gdb-memory-map.dtd\">"
Expand Down
Binary file modified minichlink/minichlink.exe
Binary file not shown.

0 comments on commit 885e227

Please sign in to comment.