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.

breakpoint cannot be stepped into when using IAR to develop zstack with cc2530.

Other Parts Discussed in Thread: CC2530

IAR version:8.1.01

Zstack version:zstack2.3.0-1.4.0

hardware platform:cc2530

hi guys:

    Recently I am suffering  from a problem. When I debug my program,I set a preakpoint . When the program halt at the breakpoint,I click step into(F11),the program won't cross the breakpoint Immediately. I must click F11 a few times(3-5 times) to cross the breakpoint .This problem really confuses me.

   PS:when I debug my program not using zstack,the problem won't appear.Will program with large size cause the problem?

   Thank you!

  • Linus,

    What is happening in disassembly window? Did you turn off all optimizations?

    Does this happen for you for all functions or just macros. IAR will not step over a macro neither show macro code definition.

    Regards,
    Maciej 

  • hi Maciej 

    thanks for your answer.

    the instruction in disassembly window also halt .

    I turned off the optimizations at the function where the breakpoint is located by add "#pragma optimize = none" in front of the function.

    this happen for all functions not just macro.

    Here the image shows my code.


    Regards,
    Linus

  • Linus, I suspect that this is related to the fact that you have ISR there. Maybe there are multiple interrupt calls and debugger is not able to step out because new interrupt is happening (and execution stops in the same place). Does stepping work outside interrupt? 

    You should direct your questions about IAR EWB to IAR Systems.

    Regards,
    Maciej 

  • Hi Maciej 

    thanks for your answer. 

            You are absolutely right!The ISR from other place cause the problem.I disable the interrupt before the breakpoint and enable it after breakpoint,the problem won't appear.

          Then  I want to know, can I solve this problem just by modify the project options,not  by disable the interrupt. 

    Regards,

    Linus

  • This is more an inconvenience than a problem and it is a result of microcontroller architecture. Unfortunately in embedded world even debugging is not strait forward sometimes.

    There is no project option you are looking for. If you want to debug inside interrupt you must disable the other ones that have higher priority.

    Regards,
    Maciej