Open U2654 opened 3 years ago
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.
Can you try this build if it is at least usable that way?
It allows vscode/platformio to continue debugging after opening the peripherals view. No feature but at least no exit.
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.