Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle different OpenOCD configuration, hex bytes #500

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mkj
Copy link

@mkj mkj commented Aug 1, 2024

These are a couple of small fixes for things that were preventing humility working with OpenOCD (in my setup at least). I'm not certain of the internals of OpenOCD that would cause differences between what was previously tested, maybe adapters handle their own formatting?

mkj added 2 commits August 1, 2024 11:37
OpenOCD may return hex values from mem2array or mrw, so allow those.

mem2array output:
0 0xb8 1 0xba 2 0xc 3 0x0 4 0xb8 5 0xba

This might depend on the particular adapter driver being used but
parsing either is more robust. The problem was observed with OpenOCD
0.12.0 and cmsis-dap.

Failed with:

cargo xtask humility app/.../recovery.toml -- tasks
    Finished `dev` profile [optimized + debuginfo] target(s) in 0.09s
     Running `target/debug/xtask humility app/.../recovery.toml -- tasks`
humility: attached via OpenOCD
humility tasks failed: failed to read image ID at 0xcaec0; board mismatch?

Caused by:
    invalid digit found in string
Error: humility failed
`mrw` requires that mem_helper.tcl is sourced, whereas read_memory can be
used without any config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant