Hi all!
I have a problem about debuging by GDB.I have tried some methods explained there and still the same problem. What i have done shown as below.
open a screen window:
screen /dev/ttyUSB1 115200
run openocd and GDB on a window(by the way, i also tried open them on differnt window, and the same problem)
make run_debug PROGRAM=mytest
the message shown on the GDB window:
Open On-Chip Debugger 0.10.0-dev-g9bab078 (2017-03-31-16:32)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 10000 kHz
Info : auto-selecting first available session transport âjtagâ. To override use 'transport select '.
GNU gdb (GDB) 7.12.50.20170109-git
Copyright © 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and âshow warrantyâ for details.
This GDB was configured as ââhost=x86_64-pc-linux-gnu --target=riscv32-unknown-elfâ.
Type âshow configurationâ for configuration details.
For bug reporting instructions, please see:
<://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<://www.gnu.org/software/gdb/documentation/>.
For help, type âhelpâ.
Type âapropos wordâ to search for commands related to âwordââŠ
Reading symbols from /home/chris/HiFive/freedom-e-sdk/software/mytest/mytestâŠdone.
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 10000 kHz
Info : JTAG tap: riscv.cpu tap/device found: 0x10e31913 (mfg: 0x489 (), part: 0x0e31, ver: 0x1)
Info : Examined RISCV core; XLEN=32, misa=0x40001105
riscv.cpu: target state: halted
halted at 0x20405c68 due to debug interrupt
Remote debugging using localhost:3333
Info : accepting âgdbâ connection on tcp/3333
Info : Found flash device âissi is25lp128â (ID 0x0018609d)
0x20405c68 in ?? ()
And, after a while,there is always a warning shown on the GDB window:
Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (5105). Workaround: increase âset remotetimeoutâ in GDB
keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (5105). Workaround: increase âset remotetimeoutâ in GDB
Then, i set a breakpoint on main function and run, it shows:
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/chris/HiFive/freedom-e-sdk/software/mytest/mytest
Info : JTAG tap: riscv.cpu tap/device found: 0x10e31913 (mfg: 0x489 (), part: 0x0e31, ver: 0x1)
riscv.cpu: target state: halted
halted at 0x404 due to software breakpoint
The message shown on the screen window:
trap
Progam has exited with code:0x00000003
Any recomendation is welcome!
Thanks!