-
Notifications
You must be signed in to change notification settings - Fork 99
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
RTT implementation CH32V307 #60
Comments
Some updates:
The big problem now is enable RTT on openocd. You can see the progress in my repository (add-rtt branch): https://github.com/martinribelotta/openwch-makefile/tree/add-rtt |
This is my probed code of static inline unsigned int disable_interrupt()
{
unsigned int state;
__asm__ volatile("csrr %0, 0x800\n\t"
"csrci 0x800, 8\n\t"
"andi %0, %0, 8\n\t"
: "=r"(state)
:
:);
return state;
}
static inline void restore_interrupt(unsigned int state)
{
__asm__ volatile("csrr a1, 0x800\n\t"
"or %0, %0, a1\n\t"
"csrs 0x800, %0\n\t"
:
: "r"(state)
: "a1");
} |
A patched wch openocd with rtt risc-v thread support can be found here: https://github.com/martinribelotta/openocd-wch/tree/rtt-riscv-wch-support VSCode working with cortex-debug RTT support: You can check the code in this repository: |
Hi!
I'm trying to implement RTT (real-time-transfer) feature for debug and tracing of code with OpenOCD.
Wiki of Segger said that
RTT background memory accesses are performed either via via RISC-V system bus access (SBA) or via AHB/AXI-AP.
( https://wiki.segger.com/RTT#RISC-V_specifics )
Could you tell - are SBA and/or AHB/AXI-AP access available in CH32V307 core?
Have you tried to implement RTT or some similar soft for CH32V307?
The text was updated successfully, but these errors were encountered: