probe-rs: ESP32-C3 error reading variable
Describe the bug The debugger sucessfully connects and can step through and pause breakpoints. But the variable values are not working.
Edit: Link to code
To Reproduce Steps to reproduce the behavior:
- Connect to cargo-embed with RTT off (due to #1221)
- Connect vscode to gdb (I am using this launch.json)
- Try to look at the value of a variable
Expected behavior The value of the variable is present without error
Stacktrace I get this in the variables list for my variable:
<error reading variable: Cannot access memory at address 0x3fccf608>
Desktop (please complete the following information):
- macOS Monterey (12.5.1)
Additional context I am on an arm64 mac (apple m1) and using the espressif-provided gdb
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 30 (30 by maintainers)
Created #1230 and #1231
This should fix it, I deleted that branch after it got merged to
esp-hal:That being said, even after doing this the code no longer produces any rtt info with
cargo embed. I’m very confused, as this most definitely used to work. Here is my log:Could it be that I set too many breakpoints, and they are still saved on the hardware somehow? And probe-rs is having trouble clearing them (the last WARN)?
I did this once already, and then to save time I simply turned off flashing. But I can keep it on going forward while we debug this 😃
Sure, I should have posted that in the original github issue from the start. I’ve edited the first post with a link to the repo.
@TheButlah Are you open to testing this with the
probe-rs-debuggerand probe-rs extension for VSCode? That way we can determine where the issue lies, and if it is in the probe-rs libs, then it gives us the ability to debug to where exactly the problem lies.Install the probe-rs-debugger extension in VS Code, by downloading the latest available
probe-rs-debugger-x.x.x.vsixfrom the Releases page in our repo (we will publish to the Microsoft Extension marketplace when we exit the ‘Alpha’ phase of this project)code --install-extension probe-rs-debugger-0.3.3.vsixin the terminalInstall the probe-rs-debugger server component, from the comand line with:
cargo install --git https://github.com/probe-rs/probe-rs --force --branch master probe-rs-debuggerInstructions and samples for setting up launch.json are in the official docs
sure, this is with passing
RUST_LOG=tracetocargo embed?