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.

在CCS2(C2000)中使用lib的问题



我使用CCS2(C2000)新建了一个lib工程,输出test.lib

lib工程里的代码如下:

unsigned int increment(unsigned int a)
{
unsigned int b=0;
b = ++a;
return(b);
}

再新建一个out工程,调用test.lib

#include "test_lib.h"

void main(void)
{
volatile unsigned int result,result1, result2,a,b;
a = 10;
b = 78;
result1 = increment(a);
while(1);
}

很奇怪,软件仿真的时候,a并不自增1,只是赋值,这是为什么?感觉lib文件没被调用,但是也没报错