Debug single step painfully slow with FreeRTOS running.

Comments

7 comments

  • Avatar
    Luke Jeanmaire

    Do you have a long list of variables that is being updated with each step?  If I have the global variables window showing in our freeRTOS projectes, single step takes a very long time.

    Luke

    0
    Comment actions Permalink
  • Avatar
    Mark

    Thanks for the reply,

    But, no variables window (or anyothers for that matter)

    Anyway, if I did, how would this slowdown the debugging only AFTER FreeRTOS starts up (since these variables would be uploaded regardless of the RTOS state)... 

     

     

    0
    Comment actions Permalink
  • Avatar
    Luke Jeanmaire

    Sorry my suggestion was not helpful.  I would not expect debugging to be impacted by FreeRTOS starting up.

    0
    Comment actions Permalink
  • Avatar
    Mark

    Luke,

    ok, its getting worse!

    I can stop the issues by turning off Level 2 optimisation in the FreeROTS libraries; debugging step speed is then fine before and after FreeRTOS starts.

    Bit confused at the mo as other probs arrising with "DEV_TARGET_CMD_ERR" and loss of debug connection to the target, when I turn optimisation back on.

    Might just be down to my dodgy code...  will update as I find out more.

     

     

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    I suspect the "DEV_TARGET_CMD_ERR" is due to the debugger accessing memory that doesn't exist - try setting the "Restrict Memory Acceses" project property see if this helps.

    0
    Comment actions Permalink
  • Avatar
    Mark

    Michael, your suspicions were right - thanks.

    Is this related to a bug/config issue in my project?  Why would the optimisation of just the FreeRTOS libs make this occur?

    BTW, Still don’t know why the single stepping issue has gone; I’ll revert to a backup to see if it still there!

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    The default is to restrict memory accesses. However we may not have covered all the valid address spaces in the memory map file (this would cause peripheral registers to be read as 0xfefefefe) so you may have switched this off. The problem is backtracing out of FreeRTOS tasks - the debugger would stop at 100 backtraces on each single step.

    0
    Comment actions Permalink

Please sign in to leave a comment.