Skip to content

Bump probe-rs to v0.13.0#37

Open
zherendong wants to merge 2 commits intorivos/mainfrom
dev/zheren/probe-rs_bump_0.13
Open

Bump probe-rs to v0.13.0#37
zherendong wants to merge 2 commits intorivos/mainfrom
dev/zheren/probe-rs_bump_0.13

Conversation

@zherendong
Copy link

Upstream probe-rs v0.13.0 has

  • Renamed some variables in probe-rs/src/core/mod.rs
    • CoreRegisterAddress -> RegisterId
  • Changed implementation of probe.attach()
    • Introduced a new struct called Permission that "represents what a [Session] is allowed to do with a target."

probe-rs in use: https://github.com/rivosinc/probe-rs/tree/dev/zheren/humility_bump

I also updated rusb: https://github.com/rivosinc/rusb/tree/dev/zheren/test_bump_probe-rs

@zherendong zherendong self-assigned this Nov 28, 2022
Copy link

@beezow beezow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this on actual board? I think we should also verify arm still works. I also kind of feel like we should squash these first 3 commits, as they are just changes to work with the updated interface. I think it will not build unless you use the last commit, right?

core.write_core_reg(
Into::<probe_rs::CoreRegisterAddress>::into(reg_id),
Into::<probe_rs::RegisterId>::into(reg_id),
value as u32,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only cast to a u32 on a 32bit platform. I think this function is templated, so we can call a different version depending on our architecture.


self.halt_and_read(|core| {
rval = core.read_word_32(addr)?;
rval = core.read_word_32(addr.into())?;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably implement read_word_64 too. The default implementation just calls this function twice.

@beezow beezow requested a review from a team November 29, 2022 04:08
@zherendong
Copy link
Author

zherendong commented Nov 29, 2022

Did you test this on actual board? I think we should also verify arm still works.

No I haven't. Will do so tomorrow. I agree we should also verify arm.

I also kind of feel like we should squash these first 3 commits, as they are just changes to work with the updated interface. I think it will not build unless you use the last commit, right?

Correct. They might need to be squashed.

@zherendong zherendong force-pushed the dev/zheren/probe-rs_bump_0.13 branch from ceb9597 to eec4e07 Compare November 29, 2022 22:58
@zherendong zherendong changed the base branch from rivos/main to dev/zheren/bump_rust_toolchain_version November 30, 2022 01:17
@zherendong zherendong force-pushed the dev/zheren/probe-rs_bump_0.13 branch from eec4e07 to fdca14d Compare November 30, 2022 06:58
@zherendong zherendong force-pushed the dev/zheren/bump_rust_toolchain_version branch from cb4a1c4 to d88d7fe Compare December 1, 2022 00:59
Base automatically changed from dev/zheren/bump_rust_toolchain_version to rivos/main December 1, 2022 01:20
@zherendong zherendong force-pushed the dev/zheren/probe-rs_bump_0.13 branch 3 times, most recently from 3ea5821 to 5fc5daf Compare December 2, 2022 21:38
@zherendong
Copy link
Author

Bumped to upstream master branch

  • At least one change we need is not released with v0.13.0
  • Upstream's release mechanism is not rigorous and everything on master branch is tested and passed upstream's CI. So instead of using v0.13.0, we will use latest master branch.
  • I think once that change @beezow mentioned gets released (probably with v0.14.0), we may consider switch to use crates.io (so-called) "stable" release.

@zherendong zherendong force-pushed the dev/zheren/probe-rs_bump_0.13 branch from 2dcee76 to 8831295 Compare December 2, 2022 22:27
- At least one change we need is not released with v0.13.0. Upstream's
release mechanism is not rigorous and everything on master branch is
tested and passed upstream's CI. So instead of using v0.13.0, we will
use latest master branch.
- updated implementations to reflect latest upstream changes(upstream
did many refactorings)
- rusb and libusb1-sys patch also need to be updated to a newer version
 as latest probe-rs is dependent on newer versions of rusb
- deleted out-of-date comments
@zherendong zherendong force-pushed the dev/zheren/probe-rs_bump_0.13 branch from f3f73f3 to 1a7d105 Compare December 2, 2022 22:31
@meta-cla
Copy link

meta-cla bot commented Jan 14, 2026

Hi @zherendong!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

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.

3 participants