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

Request: debug_memory support of peripherals #9

Open
U2654 opened this issue Feb 22, 2021 · 3 comments
Open

Request: debug_memory support of peripherals #9

U2654 opened this issue Feb 22, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@U2654
Copy link

U2654 commented Feb 22, 2021

It seems that only flash and ram is supported for reading in debug-mode. It would be great if memory on-chip peripherals (e.g. gpio) could be viewed, too. Currently, reading these leads to the following error.

hifive-vp: ...riscv-vp/vp/src/core/common/debug_memory.cpp:56: std::__cxx11::string DebugMemoryInterface::read_memory(uint64_t, unsigned int): Assertion `nbytes_read == nbytes && "not all bytes read"' failed.

@Cirromulus Cirromulus added the enhancement New feature or request label Feb 22, 2021
@Cirromulus
Copy link
Member

This is not that easy, because memory mapped peripherals are not directly accessible by the debugger.
If they would access over memory, unwanted side-effects would change a perihperal's state.
A dedicated debugging interface would be needed (which is part in an ongoing publication).

As a work-around, I would suggest returning zero on an unmapped memory location instead of failing away.

@Cirromulus
Copy link
Member

Can you try this build if it is at least usable that way?

@U2654
Copy link
Author

U2654 commented Feb 25, 2021

It allows vscode/platformio to continue debugging after opening the peripherals view. No feature but at least no exit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants