Other Parts Discussed in Thread: SYSCONFIG, C2000WARE
主题中讨论的其他器件:SysConfig、 C2000WARE
工具与软件:
大家好!
我对 C 编译器有一个问题、即使用 f280049和编译器 TI v.22.6.1的代码有疑问。 我有简单的 while 循环:
// .. int myFlag = 0; // .. while (!myFlag) NOP; // .. other code
反汇编是:
105 while (!myFlag) NOP;
C$L1:
008a86: 761F02AD MOVW DP, #0x2ad
008a88: 9211 MOV AL, @0x11
008a89: 6004 SB C$L3, NEQ
C$L2:
008a8a: 7700 NOP
008a8b: 5200 CMPB AL, #0x0
008a8c: 61FE SB C$L2, EQ
问题在于、当 myFlag 为1时、在中断例程中设置、while 循环不会中断、并继续循环。
在反汇编代码中、我看到、一旦 myFlag 的值加载到 AL (C$L1至 C$L2的结构)中、该值就不会被重新加载、并且 C$L2下方的循环也不会退出。
我缺少什么?? 我是什么样子的:
while(1) {
if (myFlag) break;
}
我的编译器选项包括:
-v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 /DE/PROGETTI/DE1240/software/sysconfig --opt_for_speed=5 /ti/c2000/C2000Ware_5_01_00_00/driverlib/f28004x/driverlib --include_path="C /ti/c2000/C2000Ware_5_01_00_00/driverlib/f28004x/driverlib/inc:/DE/PROGETTI/DE1240/software /ti/c2000/C2000Ware_5_01_00_00/device_support/f28004x/common/include /ti/c2000/C2000Ware_5_01_00_00/device_support/f28004x/headers/include /ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/include /ti/c2000/C2000Ware_5_01_00_00/driverlib/f28004x/driverlib /DE/PROGETTI/DE1240/software/Debug/syscfg
我缺少什么??
谢谢!
此致
E·佩鲁兹