diff --git a/boards/wr3.json b/boards/wr3.json index ec9bdbb..d2dcfe3 100644 --- a/boards/wr3.json +++ b/boards/wr3.json @@ -19,7 +19,7 @@ ], "openocd_config": "amebaz.cfg", "gdb_init": [ - "mem 0x8000000 0x8010000 ro" + "mem 0x8000000 0x8200000 ro" ] }, "flash": { diff --git a/docs/platform/realtek/debugging.md b/docs/platform/realtek/debugging.md index db43ff7..4ff531a 100644 --- a/docs/platform/realtek/debugging.md +++ b/docs/platform/realtek/debugging.md @@ -71,7 +71,6 @@ To disable auto reset before and after debugging: ```ini [env:my_board] debug_init_cmds = - mem 0x8000000 0x8010000 ro target extended-remote $DEBUG_PORT ; remove this line if you're debugging locally $INIT_BREAK ; monitor reset halt @@ -82,7 +81,7 @@ debug_init_cmds = ## Technical details -GDB is first configured with `mem 0x8000000 0x8010000 ro` in order to mark flash section as read-only. This makes GDB use hardware breakpoints, as software BPs don't work on these boards. +GDB is first configured with `mem 0x8000000 0x8200000 ro` in order to mark flash memory as read-only. This makes GDB use hardware breakpoints, as software BPs don't work on these boards. ## More powerful playground diff --git a/platform.py b/platform.py index 1c4289b..ba80554 100644 --- a/platform.py +++ b/platform.py @@ -112,6 +112,7 @@ class LibretuyaPlatform(PlatformBase): if "custom" not in debug["tools"]: debug["tools"]["custom"] = {} init = debug.get("gdb_init", []) + init += ["set mem inaccessible-by-default off"] for link in protocols: if link == "openocd":