Skip to content

Commit 3cc9a84

Browse files
JarmouniAjhedberg
authored andcommitted
scripts: west runners: ST-LINK GDB Server: add external-init cmd
When debugging boards with external Flash, to make it accessible for read and write by the debugger, we need the --external-init option together with --extload <file_path> option. It allows the ST-LINK GDB server to make external memory accessible after reset without any need for the app to set it up. The external memory must be memory mapped and directly accessed because normal memory read/write is used by gdb. Signed-off-by: Abderrahmane JARMOUNI <[email protected]>
1 parent e8a4b9e commit 3cc9a84

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/west_commands/runners/stlink_gdbserver.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ def do_attach_debug_debugserver(self, command: str):
174174
extldr_path = cubeprg_path / "ExternalLoader" / self._external_loader
175175
if not extldr_path.exists():
176176
raise RuntimeError(f"External loader {self._external_loader} does not exist")
177+
gdbserver_cmd += ["--external-init"]
177178
gdbserver_cmd += ["--extload", str(extldr_path)]
178179

179180
self.require(gdbserver_cmd[0])

0 commit comments

Comments
 (0)