This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC Debugger Stability with IAR and BLE Stack

I've begun development on my BLE keyfob hardware and have noticed some limitations when working with IAR and the CC Debugger. I was wondering if anyone else has witnessed unusual behavior with breakpoints and debug output.

  • For instance, I cannot set breakpoints while the program is running.  
  • Sometimes breakpoints jump around from line to line.
  • Hitting too many breakpoints or stepping through them too fast causes IAR crash
  • printf's to the output console lag and are very slow. seem to make the whole interface crash sometimes
Perhaps there are some settings that I can adjust to make it run more smoothly?
  • Jonathan Cohn said:

    I've begun development on my BLE keyfob hardware and have noticed some limitations when working with IAR and the CC Debugger. I was wondering if anyone else has witnessed unusual behavior with breakpoints and debug output.

    • For instance, I cannot set breakpoints while the program is running.  
    • Sometimes breakpoints jump around from line to line.
    • Hitting too many breakpoints or stepping through them too fast causes IAR crash
    • printf's to the output console lag and are very slow. seem to make the whole interface crash sometimes
    Perhaps there are some settings that I can adjust to make it run more smoothly?

    Hi Jonathan,

          The first problem could be an issue with the debugger driver (which is written by the debugger manufacturer and not by IAR).  The second problem usually happens when the source code you have open doesn't match the debug information in the executable...usually a Rebuild All fixes this.  The third one again sounds like a debugger driver issue.  The fourth one can be fixed by clicking Project-Options-GeneralOptions-LibraryConfig and checking the box for buffered terminal output.  If you continue to have problems with your debugger after updating your driver and rebuilding your code, please send your code and the problem to support@iar.com so we can take a closer look at it.  Good luck!

    Shawn

  • Hey Shawn, so i wasn't able to find the checkbox you were talking about for buffering outputs in Project>Options>General Options> Library Config, but i was able to find it under the Linker section.

    Unfortunately, the checkbox is grayed out.  Any other ideas?

  • Jonathan Cohn said:
    • For instance, I cannot set breakpoints while the program is running.   
    • Sometimes breakpoints jump around from line to line.
    • Hitting too many breakpoints or stepping through them too fast causes IAR crash
    • printf's to the output console lag and are very slow. seem to make the whole interface crash sometimes

    For 1) This is expected based on the driver implementation. 2) This may be because of the compiler's optimization setting. When code is optimized, parts of the code may be shared/reused. To avoid this, optimization should be turned off when debugging.

    Br,
    ABO