...Timeout... error when using JLinkClGDB.exe #7
Comments
I think you need to add a custom init-script to get the device flashed. You can pass that to the runner with the option Another thing you might wanna try is my WIP (!) of a python port, so you can skip the
But keep in mind it's not done and I've only used it for exitcode & test so far. |
Hi, Thanks for the quick response! I have a script, but I forgot to attach it, now added. It is based on your openocd script
|
Did that fix it? |
Sorry no, I had that init-script originally, I just forgot to include it in the issue at the start. Unfortunately,
But this does not work either, getting the same timeout error. |
It's probably that the target isn't running, try pass the --debug flag to the runner, that should tell you the interaction with gdb. You just need to install python2.7 and gdb-py should work. I probably will give up the gdb runner in favor of the python version some time in the future. |
Thanks again I install python2.7, and libpython2.7, but no joy unfortunately. I suspect its an issue with using WSL Checking the interaction with GDB, I get the same log file as I posted before, key final lines
If I check the log for JLink.exe though (saved using the -log-other parameter), I get it repeatedly hitting a breakpoint at main (0x0000D70E). Using GDB's
|
Are you sure it actually hits any breakpoint? You should be able to manually check, by breaking for
when executing gdb manually. It's weird that it doesn't work in the WSL. Works for me though I got a newer build. |
Great news, I got the python version working! Thanks for your help! (I must not have installed Python properly), and it seems to hit the _exit breakpoint fine, and produces what I think is a test report. I needed to modify your script to add an extra
Running JLinkGDB and gdb-py
This gives me the output finishing with:
I presume this is JSON to feed into something else? I am happy to read this manually for now, especially as it has a summary line first. If I change the gdb script for the C++ metal.runner to match the gdb python script, I still get the timeout error. That is OK for me, I prefer this python option as then I don't need to compile anything host side. However the C++ bug still stands, so I think I should leave this issue open for now? |
You should be able to redirect the json output by adding
I am actively working on the python port for precisely that reason. The C++ version brings little advantages with a huge amount of work for me and a painful build for users. That's why I am working on the python version, plus it is way easier for you to extend. So I think once the python port is done I'll just merge that into master, but sure we can keep the issue open until then. Also please feel free to ping me anytime, I'd be very interested if you run into some problems or need some extensions. |
Great, thanks! Really appreciate the offer of help, I have not yet added any of my unit tests yet, so I will get going with those and get back to you if I run into any difficult issues or have any thoughts on an extension that might be useful for more than just me. |
Hi,
Thanks for this tool, I think it fills quite a unique space and I enjoy how standalone it is. I am trying to use it with a JLink using the JLink GDB Server instead of OpenOCD, but although it runs the server sucessfully and seems to connect to the port, I get a timeout error from metal.runner.
As far as I can see from the JLink log, the code has flashed correctly, and the breakpoint in
metal_func_stub
inmetal_newlib_syscalls.c
is hit. Grepping the sources, the string...Timeout...
is from metal.runnerMy command line is
metal.runner --config-file="../test/metal_runner.cfg" --init-script="../test/test_script_gdb" --exe=bin/executable_unittest.elf
metal_runner.log
metal_runner_jlink.log
[Linked as very long]
metal_runner.cfg
test_script_gdb
The text was updated successfully, but these errors were encountered: