Skip to content

Commit

Permalink
Fixed task switching
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcekay committed Sep 13, 2024
1 parent 8dd263e commit 23a0e19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/emdbg/debug/px4/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def write_registers(self, values: dict[str, int]):
if name in ["sp", "r13"]:
name = "msp"
if name == "msp":
self.write_register("r13", value)
# NuttX stores the SP incorrectly (is off by 4 bytes)
self.write_register("r13", value + 4)
# Remove double FP registers
if name.startswith("d"): continue
self.write_register(name, value)
Expand Down

0 comments on commit 23a0e19

Please sign in to comment.