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.

[参考译文] LP-MSPM0L1306:我们是否能够单步执行 IF 其他函数的代码?

Guru**** 1821780 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1389551/lp-mspm0l1306-are-we-able-to-step-into-the-code-for-the-if-else-function

器件型号:LP-MSPM0L1306

工具与软件:

尊敬的专家:  

我试着进入 CCS、 但当我运行 IF else 函数时。

我无法监控我们的 MCU 正在运行哪个函数。  

如果我们正在运行其他函数、我们的 IDE 是否能够监控该函数?

此致、

Eric Chen

int main(void)
{
    SYSCFG_DL_init();

    int a = 1;
    int b = 0;

    if(a == 1)
        b = 1;
    else
        b = 0;


    while (1) {
    }
}

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的专家:

    我发现这是编译器优化问题。  

    该问题在向变量添加 volatile 或关闭编译器的优化后得到解决。  

    此致、

    Eric Chen