From: Andreas F. <and...@gm...> - 2018-08-10 09:48:13
|
On Fri, Aug 10, 2018 at 9:14 AM, R. Diez <rdi...@ya...> wrote: > > OpenOCD is intended to be a daemon running in the background, why do you >> want to stop and restart it every debug session? >> > > It is an interesting suggestion. Unfortunately, I have another scenario > where I am using OpenOCD with different boards and JTAG adapters. > > Starting a clean OpenOCD every time has worked well for all my targets in > the past. The only thing missing is properly synchronising the shutdown > with GDB, in order to help troubleshoot the error messages when something > goes wrong. > OK. Have you tried the other way around, telling GDB to start OpenOCD using something like: (gdb) target extended-remote |openocd -c "gdb_port pipe" -f openocd.cfg This method has been a bit iffy at times, it has some limitations (especially on Windows) and if things exit abnormally an openocd instance may be left running in the background. But maybe you can get it to work well enough for your scenario. /Andreas |