Unable to debug a FreeRTOS project

Sysprogs forums Forums VisualGDB Unable to debug a FreeRTOS project

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34027
    peini7
    Participant

    Hi,

    i’ve created a basic FreeRTOS Blinking Demo project which works just fine.

    But when i try to debug it, the debugger stops every second with the error message “Received a 0: Signal 0”.
    This makes me unable from debugging anything else because it stops every second approximately.

    Maybe this has something to do with the context-switching by the FreeRTOS scheduler?

    Is there a way to “ignore” this error?

    In https://visualgdb.com/tutorials/arm/stm32/stm32wb/ i found an interesting setting called “CFG_DEBUGGER_SUPPORTED” which should be set to 1 but this also doesn’t help.

    Does anyone have an idea?

    Thx.

    #34028
    support
    Keymaster

    Hi,

    The “Signal 0” error means that OpenOCD has lost connection to the target. It typically happens when the target program disables some functionality needed by JTAG/SWD (e.g. remaps the SWD pins to GPIO). The best way to troubleshoot it is as follows:

    1. Set a breakpoint very early in main() or use F10 instead of F5 to start debugging. Make sure it works.
    2. Set a breakpoint in some other code that is supposed to run slightly later and press F5 to continue
    3. If the second breakpoint worked, set another one even later. If not, restart the program and set a breakpoint between the ones in steps 1 and 2.

    If you see that a breakpoint at the beginning of a long function works, and another one at the end doesn’t, you can step that function with F10 until the debugging stops working.

    This should help quickly locate the code responsible for breaking the debugging, and comment it out (or check if it’s #ifdef-ed against some macro that you can define).

    #34030
    peini7
    Participant

    Thank you so much. This helped me finding the problem.

    I have used PC14+PC15 as output pins which is not allowed.
    As soon as they have been initialized, i was loosing the OCD connection.

    • This reply was modified 1 year, 9 months ago by peini7.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.