# Using RTOS support in OpenOCD

I can see that OpenOCD is RTOS aware and it supports FreeRTOS, which I'm using at the moment.

I have looked at various sources and cannot seem to figure how to use this feature.

1. pass -rtos auto to {TARGET_NAME}.cpu configure in the Tcl configuration script
2. use thread commands in gdb, where info threads is the probably the one you will use most
• For those struggling (like me); here is how to start openocd for smt32f4 discovery: openocd -f /usr/share/openocd/scripts/board/stm32f4discovery.cfg -c "stm32f4x.cpu configure -rtos auto" – HeyYO Nov 16 '16 at 12:53