-
Notifications
You must be signed in to change notification settings - Fork 11
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 loading programs: Error: Target not examined yet
#5
Comments
Looks like there is an open issue with riscv-openocd. Has this board programmed successfully in the past? In the past, I was able to get fresh boards to program by manually pressing the reset just before running the openocd command but it took a few tries some times. |
I have the exact same problem, I ordered two boards from Digi-Key and really wanted to work with them the weekend, but if I cannot load a program that is going to be quite difficult. I am using the following versions: Both the latest from the SiFive website. Pressing reset just before running the openocd command did not help. |
Mine is also from Digi-Key. @mwelling which versions of the toolchain bundles are you using? |
Sorry, forgot to respond to this part. No, this is my first time trying to program this board.
I was trying that too, thinking that maybe I needed to catch it before it had changed the pinmux to take JTAG off of the pins. That's how I ended up with the two different behaviors in my original issue post. |
I will have to find a fresh LoFive to see if I can replicate and fix this issue. |
So I have been able to replicate this issue on the LoFive R1 with a fresh module. I think I originally programmed the ones I had here with the old SDK so that is why I never ran into this issue when updating the bootloader to the new one. Once the board has a program installed on the flash it works just fine. Let me dig into OpenOCD and see if I can fix this. |
@gkelly What distribution / version of Linux are you using? I found that the prebuilt Ubuntu toolchain was causing the issue on my computer. I am using Debian 10 and it does not have libncurses5 by default and the gdb instance was failing to launch.
Once I installed the legacy libncurses5, I was able to program the board. |
Maybe that was a fluke. I went back and erased the flash and now it won't program again. |
Okay try pulling the latest changes on the lofive-r1 branch of the mwelling/freedom-e-sdk. See if that fixes the issue for you. If it doesn't work the first time, press the reset button and try again. If you still can't get it to work send me the debugging output from openocd. |
Here is my log, still some issues: What version of OpenOCD are you using? |
I am using the latest version provided on the SiFive website. https://static.dev.sifive.com/dev-tools/riscv-openocd-0.10.0-2019.08.2-x86_64-linux-ubuntu14.tar.gz |
Provide the output of the console from the launching of the programming command. I want to make sure that the gdb instance is running as well. |
Ah sorry, the previous log was OpenOCD only. I now added the -d flag to the upload script so I can use the "make PROGRAM=lofive-boot TARGET=lofive-r1-bootloader upload" command and get a complete log with OpenOCD and GDB: |
Does pressing the reset button before starting the upload help? |
The result remains the same. I tried a few times, pressing the reset button just before, during or a few seconds before upload.. |
Can you try with the prebuilt versions of openocd and the toolchain provided here so we can make sure that we have the same setup? See "Prebuilt RISC‑V / GCC Toolchain and Emulator" section. |
I am already using the latest binaries from there. |
Yeah JLink supports this SoC as well. Sorry this is being so difficult. |
The dreaded messages Pushbutton SW1 (and JTAG Default programming in the Mask ROM for the RC combination of 150K Ohms and 10 uF (R4, C17 on LoFive; R32, C22 on HiFive) attempt to provide ~670 mS delay for the reset pulse. However, this is where the problem lies: HiFive U8 is a RT9080-18GJ5 device whose In other words, on the LoFive board, regardless how long the pushbutton SW1 (or JTAG The only recourse is complete removal of the 5V power or momentarily shorting across C17 with a tweezer (which won't hurt the |
I have a LoFive R1 and am trying to follow the instructions for using the new SDK. When I get to the programming step the program upload always fails.
The following is from me trying to run:
If I don't press the reset button first:
If I do press the reset button first:
Here's the openocd invocation when run with
-d
: logsThis seems to point to
riscv013_halt_go(): unable to halt hart 0
. Unclear why it can't halt the HART. I tried both with the riscv-openocd from the sifive site and built from the riscv-openocd github repo.Any debugging hints?
The text was updated successfully, but these errors were encountered: