|
From: RayeR <ra...@us...> - 2017-03-07 23:58:17
|
Would be good to know. I simply increased GDB timeout a bit in my gdbinit.cfg set remotetimeout 5 to wait a while when OOCD is ready. --- ** [tickets:#147] How to know when OpenOCD is fully ready?** **Status:** new **Milestone:** 0.9.0 **Created:** Tue Mar 07, 2017 11:29 PM UTC by Tommy Murphy **Last Updated:** Tue Mar 07, 2017 11:29 PM UTC **Owner:** nobody Hi there - I searched the existing tickets but didn't see any obvious mention of this issue. I cannot see any way to know that OpenOCD is fully initialized and ready to accept connections - e.g. GDB/MI connections on port 3333 (by default). For example the GNU ARM Eclipse plugins call OpenOCD with any user specified command line options as well as -c 'echo "Started by GNU ARM Eclipse"' and then waits for OpenOCD to output the string "Started by GNU ARM Eclipse" before starting gdb which will then connect to OpenOCD's GDB/MI socket interface via target remote ... etc. See https://github.com/gnuarmeclipse/plug-ins/issues/186#issuecomment-284703073. Liviu Ionescu (creator of GNU ARM Eclipse) chose this as the only way he could see to attempt to synchronize OpenOCD with gdb so that gdb was only launched when OpenOCD was ready. However there is still a race condition here as OpenOCD processes the echo command before it has fully initialized the target interface, opened/initialized the GDB/MI socket interface etc. In some cases OpenOCD may be fuly ready for gdb by the time that gdb connects but if the OpenOCD startup/init code takes "too long" then it may not and then gdb fails to connect. Is there any mechanism whereby a process can know that OpenOCD is "fully ready" before starting another process such as gdb which will connect to it? Even if OpenOCD output a simple string indicating that the relevant interface was initialized and ready for connections would help (e.g. Ready for GDB/MI connections on port 3333"). Any suggestions? Thanks a lot. --- Sent from sourceforge.net because ope...@li... is subscribed to https://sourceforge.net/p/openocd/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/openocd/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |