OPENOCD error


(Balaji V) #1

What is this error??
I am getting this error often after running my code via OpenOCD launch.

But my HiFive board is connected and working fine.
When i hit the reset button on the board it runs the previous code and displays the output in the Terminal.

@bruce @jackckang @castelloDev @erasmussen1 please answer me.


(Tommy Murphy) #2

What error?


(Balaji V) #3

Open On-Chip Debugger 0.10.0+dev (SiFive OpenOCD 0.10.0-2019.08.2)
Licensed under GNU GPL v2
For bug reports:


debug_level: 0
adapter speed: 10000 kHz
Error: Timed out waiting for debug int to clear.Increase timeout with riscv set_command_timeout_sec.
Error: Debug interrupt didn’t clear.
Error: Debug RAM 0x0: 0xfff04493
Error: Debug RAM 0x1: 0x01f4d493
Error: Debug RAM 0x2: 0x40902023
Error: Debug RAM 0x3: 0x01f4d493
Error: Debug RAM 0x4: 0x40902223
Error: Debug RAM 0x5: 0x3f00006f
Error: Debug RAM 0x6: 0x060c1218
Error: Debug RAM 0x7: 0xf5dffff3
Error: Debug RAM 0x8: 0x00000000
Error: Debug RAM 0x9: 0x00000000
Error: Debug RAM 0xa: 0x00000000
Error: Debug RAM 0xb: 0x00000000
Error: Debug RAM 0xc: 0x00000000
Error: Debug RAM 0xd: 0x00000000
Error: Debug RAM 0xe: 0x00000000
Error: Debug RAM 0xf: 0x00000000
Error: Failed to discover xlen; word0=0xfff04493, word1=0x1f4d493, exception=0x60c1218
Error: Debug RAM 0x0: 0xfff04493
Error: Debug RAM 0x1: 0x01f4d493
Error: Debug RAM 0x2: 0x40902023
Error: Debug RAM 0x3: 0x01f4d493
Error: Debug RAM 0x4: 0x40902223
Error: Debug RAM 0x5: 0x3f00006f
Error: Debug RAM 0x6: 0x060c1218
Error: Debug RAM 0x7: 0xf5dffff3
Error: Debug RAM 0x8: 0x00000000
Error: Debug RAM 0x9: 0x00000000
Error: Debug RAM 0xa: 0x00000000
Error: Debug RAM 0xb: 0x00000000
Error: Debug RAM 0xc: 0x00000000
Error: Debug RAM 0xd: 0x00000000
Error: Debug RAM 0xe: 0x00000000
Error: Debug RAM 0xf: 0x00000000
Error: Target not examined yet

This is the error can u please resolve it.

The board is connected to the computer and when i reset the board it gives the previous code output in the terminal.


(Tim Newsome) #4

Can you run OpenOCD with -d, collect the full output, and attach it here? It sounds like a connectivity issue, although the error message you pasted doesn’t really give me enough information to tell for sure.


(Balaji V) #5

This is the error I am getting:

Open On-Chip Debugger 0.10.0+dev (SiFive OpenOCD 0.10.0-2019.08.2)
Licensed under GNU GPL v2
For bug reports:
https://github.com/sifive/freedom-tools/issues
debug_level: 0
adapter speed: 10000 kHz
Error: Timed out waiting for debug int to clear.Increase timeout with riscv set_command_timeout_sec.
Error: Debug interrupt didn’t clear.
Error: Debug RAM 0x0: 0xfff04493
Error: Debug RAM 0x1: 0x01f4d493
Error: Debug RAM 0x2: 0x40902023
Error: Debug RAM 0x3: 0x01f4d493
Error: Debug RAM 0x4: 0x40902223
Error: Debug RAM 0x5: 0x3f00006f
Error: Debug RAM 0x6: 0x060c1218
Error: Debug RAM 0x7: 0xf5dffff3
Error: Debug RAM 0x8: 0x00000000
Error: Debug RAM 0x9: 0x00000000
Error: Debug RAM 0xa: 0x00000000
Error: Debug RAM 0xb: 0x00000000
Error: Debug RAM 0xc: 0x00000000
Error: Debug RAM 0xd: 0x00000000
Error: Debug RAM 0xe: 0x00000000
Error: Debug RAM 0xf: 0x00000000
Error: Failed to discover xlen; word0=0xfff04493, word1=0x1f4d493, exception=0x60c1218
Error: Debug RAM 0x0: 0xfff04493
Error: Debug RAM 0x1: 0x01f4d493
Error: Debug RAM 0x2: 0x40902023
Error: Debug RAM 0x3: 0x01f4d493
Error: Debug RAM 0x4: 0x40902223
Error: Debug RAM 0x5: 0x3f00006f
Error: Debug RAM 0x6: 0x060c1218
Error: Debug RAM 0x7: 0xf5dffff3
Error: Debug RAM 0x8: 0x00000000
Error: Debug RAM 0x9: 0x00000000
Error: Debug RAM 0xa: 0x00000000
Error: Debug RAM 0xb: 0x00000000
Error: Debug RAM 0xc: 0x00000000
Error: Debug RAM 0xd: 0x00000000
Error: Debug RAM 0xe: 0x00000000
Error: Debug RAM 0xf: 0x00000000
Error: Target not examined yet

for this program:

/* Copyright 2019 SiFive, Inc /
/
SPDX-License-Identifier: Apache-2.0 */
#include <stdio.h>
int main() {
printf(“Hello, World!\n”);
return 22;
}

I have attached the screen shot for your reference, below

The Terminal displays the previous flashed code (example of SPI), the program stops after printing the first line.


(Balaji V) #6

Even though i give return 0 instead of return 22 i get the same error


(Balaji V) #7

I tried this code with the same cable and same board HiFive1 but with arduino IDE
I get the following error

Arduino: 1.8.10 (Windows 10), Board: “HiFive 1, Default, ~320 MHz HFROSC+PLL”

Sketch uses 5260 bytes (0%) of program storage space. Maximum is 8388608 bytes.
Open On-Chip Debugger 0.10.0+dev-gdd0dd7f64e03-dirty (2018-01-09-17:24)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
adapter speed: 10000 kHz
Error: Timed out waiting for debug int to clear.Increase timeout with riscv set_command_timeout_sec.
Error: Debug interrupt didn’t clear.
Error: Debug interrupt didn’t clear.

Error: Debug RAM 0x0: 0xfff04493
Error: Debug RAM 0x1: 0x01f4d493
Error: Debug RAM 0x2: 0x40902023
Error: Debug RAM 0x3: 0x01f4d493
Error: Debug RAM 0x4: 0x40902223
Error: Debug RAM 0x5: 0x3f00006f
Error: Debug RAM 0x6: 0x060c1218
Error: Debug RAM 0x7: 0xf5dffff3
Error: Debug RAM 0x8: 0x00000000
Error: Debug RAM 0x9: 0x00000000
Error: Debug RAM 0xa: 0x00000000
Error: Debug RAM 0xb: 0x00000000
Error: Debug RAM 0xc: 0x00000000
Error: Debug RAM 0xd: 0x00000000
Error: Debug RAM 0xe: 0x00000000
Error: Debug RAM 0xf: 0x00000000
Error: Failed to discover xlen; word0=0xfff04493, word1=0x1f4d493, exception=0x60c1218
Error: Debug RAM 0x0: 0xfff04493
Error: Debug RAM 0x1: 0x01f4d493
Error: Debug RAM 0x2: 0x40902023
Error: Debug RAM 0x3: 0x01f4d493
Error: Debug RAM 0x4: 0x40902223
Error: Debug RAM 0x5: 0x3f00006f
Error: Debug RAM 0x6: 0x060c1218
Error: Debug RAM 0x7: 0xf5dffff3
Error: Debug RAM 0x8: 0x00000000
Error: Debug RAM 0x9: 0x00000000
Error: Debug RAM 0xa: 0x00000000
Error: Debug RAM 0xb: 0x00000000
Error: Debug RAM 0xc: 0x00000000
Error: Debug RAM 0xd: 0x00000000
Error: Debug RAM 0xe: 0x00000000
Error: Debug RAM 0xf: 0x00000000
Error: Target not examined yet

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

The code i used is in picture i attached as follows,


(Balaji V) #8

When i upload the example code RGB led Blink,
I get the following error

Arduino: 1.8.10 (Windows 10), Board: “HiFive 1, Default, ~320 MHz HFROSC+PLL”

Sketch uses 3886 bytes (0%) of program storage space. Maximum is 8388608 bytes.
Open On-Chip Debugger 0.10.0+dev-gdd0dd7f64e03-dirty (2018-01-09-17:24)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
adapter speed: 10000 kHz
Error: Timed out waiting for debug int to clear.Increase timeout with riscv set_command_timeout_sec.
Error: Debug interrupt didn’t clear.
Error: Debug RAM 0x0: 0xfff04493
Error: Debug RAM 0x1: 0x01f4d493
Error: Debug RAM 0x2: 0x40902023
Error: Debug RAM 0x3: 0x01f4d493
Error: Debug RAM 0x4: 0x40902223
Error: Debug RAM 0x5: 0x3f00006f
Error: Debug RAM 0x6: 0x060c1218
Error: Debug RAM 0x7: 0xf5dffff3
Error: Debug RAM 0x8: 0x00000000
Error: Debug RAM 0x9: 0x00000000
Error: Debug RAM 0xa: 0x00000000
Error: Debug RAM 0xb: 0x00000000
Error: Debug RAM 0xc: 0x00000000
Error: Debug RAM 0xd: 0x00000000
Error: Debug RAM 0xe: 0x00000000
Error: Debug RAM 0xf: 0x00000000
Error: Timed out waiting for debug int to clear.Increase timeout with riscv set_command_timeout_sec.
Error: Debug interrupt didn’t clear.
Error: Debug interrupt didn’t clear.

Error: Debug RAM 0x0: 0xfff04493
Error: Debug RAM 0x1: 0x01f4d493
Error: Debug RAM 0x2: 0x40902023
Error: Debug RAM 0x3: 0x01f4d493
Error: Debug RAM 0x4: 0x40902223
Error: Debug RAM 0x5: 0x3f00006f
Error: Debug RAM 0x6: 0x060c1218
Error: Debug RAM 0x7: 0xf5dffff3
Error: Debug RAM 0x8: 0x00000000
Error: Debug RAM 0x9: 0x00000000
Error: Debug RAM 0xa: 0x00000000
Error: Debug RAM 0xb: 0x00000000
Error: Debug RAM 0xc: 0x00000000
Error: Debug RAM 0xd: 0x00000000
Error: Debug RAM 0xe: 0x00000000
Error: Debug RAM 0xf: 0x00000000
Error: Failed to discover xlen; word0=0xfff04493, word1=0x1f4d493, exception=0x60c1218
Error: Debug RAM 0x0: 0xfff04493
Error: Debug RAM 0x1: 0x01f4d493
Error: Debug RAM 0x2: 0x40902023
Error: Debug RAM 0x3: 0x01f4d493
Error: Debug RAM 0x4: 0x40902223
Error: Debug RAM 0x5: 0x3f00006f
Error: Debug RAM 0x6: 0x060c1218
Error: Debug RAM 0x7: 0xf5dffff3
Error: Debug RAM 0x8: 0x00000000
Error: Debug RAM 0x9: 0x00000000
Error: Debug RAM 0xa: 0x00000000
Error: Debug RAM 0xb: 0x00000000
Error: Debug RAM 0xc: 0x00000000
Error: Debug RAM 0xd: 0x00000000
Error: Debug RAM 0xe: 0x00000000
Error: Debug RAM 0xf: 0x00000000
Error: Target not examined yet

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

The code i used is

/*
Example of the HiFive1 builtin RGB LED blinking with RGBL library.

On HiFive1 the RGB LED is connected to the following GPIOs:
Red - GPIO6
Green - GPIO3
Blue - GPIO5

This example code is in the public domain.

By Michael Zaidman michael.zaidman@wdc.com, 2018
*/

#include <RGBL.h>

RGBL led;

void setup() {
led.offAll();
}

void loop() {
led.blink(RED, 1000);
led.blink(GREEN, 1000);
led.blink(BLUE, 1000);
}