Skip to content

Commit

Permalink
Use OpenOCD read_memory rather than mrw
Browse files Browse the repository at this point in the history
`mrw` requires that mem_helper.tcl is sourced, whereas read_memory can be
used without any config.
  • Loading branch information
mkj committed Aug 1, 2024
1 parent 984f230 commit 4662634
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion humility-core/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ impl Core for OpenOCDCore {
}

fn read_word_32(&mut self, addr: u32) -> Result<u32> {
let result = self.sendcmd(&format!("mrw 0x{:x}", addr))?;
let result = self.sendcmd(&format!("read_memory 0x{:x} 32 1", addr))?;
Ok(parse_int::parse::<u32>(&result)?)
}

Expand Down

0 comments on commit 4662634

Please sign in to comment.