-
Notifications
You must be signed in to change notification settings - Fork 34
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
Error: Can't communicate with the CPU #25
Comments
Hi,
This indicate that the JTAG doesn't communicate properly with the device JTAG tap. So, this has to be fixed first. especialy the 0xc0000fff vs 0x10001fff. if you can take a mesurement of the JTAG signal during that initial phase, i can take a look. |
Hi @Dolu1990, sure I can do that. Is a screenshot of an oscilloscope enough? (Hopefully I have some time on this weekend for this) |
Hi
Not realy, screenshot are too narrow. Idealy, one oscilloscope screenshot to check signal integrity, and one long logic analyser trace to check the behaviour. |
Hey, Well, now I connect to the TAP and the interface looks good but seems like the target is not halted. This log.txt was created while connecting with GDB to it. Do you see anything familiar which might help before I debug further? |
Ahhh , can you show me your openocd tcl scripts ? |
I execute openocd with
and carbon.cfg looks like
openocd binary is your latest version from GH. |
reset_config trst_only ? i would say, go more for the following after the init : |
YES! I can dump the registers :) Not sure why I changed the last two lines... however, I can now flash a simple binary but I'm not able to halt the CPU with
and when I run the
Which looks like it wants to read from 0x0 instead of 0xa :/ |
Seems like JTAG has not really a connection to the memory:
I receive this value for all address I try. |
i would say, for now do not use GDB, but instead use the telnet from openocd You can then read / write values with mdw address / mww address data Could you give a try ? |
ah okay. Just tried it without success again.
I still sometimes see the "Can't communicate with CPU" error from OpenOCD but restarting it for 1-5 times works. |
Ahhh Can't communicate with CPU is a sanity check, if it popup, there is no chance for telnet / gdb to work. Basicaly what "Can't communicate with CPU" check is : So, one thing which can be done, is to avoid testing the register file, but just testing the "lui x0, 0xABCDE" this one will not require x0 to work, it use no memories at all (unlike addi) You could give a try, commenting the 3 other tests out ? |
So, this is only to diagnostic purposes, not as a fix. |
So, all four values in the buffer have again the random, same value. I was able to track down sometimes the device is examined and sometimes not. Added the instructions directly at the beginning of the function and the values are the same as well. I need to read the HDL implementation to understand the interface more :) |
I have another question: The test instructions use x0. Is register zero writable? |
It isn't but basicaly, the debugger plugin will capture the last pipeline data value, even if it target x0, allowing to not have side effects on any real register of the register file |
Hi @Dolu1990,
I'm currently in the process of bringing up the JTAG interface on the VexRiscv silicon. After I switched the TDO and TDI signals I got the following error:
After googling a little bit, I found some similar problems but I'm sure my j-link adapter works because I used it a lot with the FPGAs and the same design.
So, I think the TAP and IR capture-related warnings/errors are not good but can be ignored. The nasty stuff is the missing communication with the CPU, right? Any idea how to debug further?
The openocd config:
The text was updated successfully, but these errors were encountered: