代码如下:
void IOFace_Reflesh()
{
GpioDataRegs.GPBSET.bit.GPIO48 = 1; //165_PL
GpioDataRegs.GPBCLEAR.bit.GPIO50= 1; //595_STCP
SpiaRegs.SPITXBUF = (usDOState | (usDOState<<8));
Delay600(100);
usDIState = (SpiaRegs.SPIRXBUF>>8)&0xFF;
GpioDataRegs.GPBSET.bit.GPIO50= 1;
GpioDataRegs.GPBCLEAR.bit.GPIO48 = 1;
这里面的Delay600(100);在代码单步运行时总是提示Source not found.
然后我就查找了Delay600(100)这个函数,在整个工程中就看到了下面这两处
void Delay600(unsigned short usDelayNum );
void Delay100(unsigned short usDelayNum );
请问是否存在错误 谢谢
Hank Zhao:
这个Delay函数应该是库函数,在单步调试到库函数是,是会提示source not found的,用step over跳过就可以了。
代码如下:
void IOFace_Reflesh()
{
GpioDataRegs.GPBSET.bit.GPIO48 = 1; //165_PL
GpioDataRegs.GPBCLEAR.bit.GPIO50= 1; //595_STCP
SpiaRegs.SPITXBUF = (usDOState | (usDOState<<8));
Delay600(100);
usDIState = (SpiaRegs.SPIRXBUF>>8)&0xFF;
GpioDataRegs.GPBSET.bit.GPIO50= 1;
GpioDataRegs.GPBCLEAR.bit.GPIO48 = 1;
这里面的Delay600(100);在代码单步运行时总是提示Source not found.
然后我就查找了Delay600(100)这个函数,在整个工程中就看到了下面这两处
void Delay600(unsigned short usDelayNum );
void Delay100(unsigned short usDelayNum );
请问是否存在错误 谢谢
ouzhongyou:
回复 Hank Zhao:
void InitDrv_SCI(){ InitSafeBuf(&stSCIBSendBuf,CON_SBUF_LEN); InitSafeBuf(&stSCICSendBuf,CON_SBUF_LEN);
InitCirBuf (&stSCIBRecvBuf,CON_RBUF_LEN); InitCirBuf (&stSCICRecvBuf,CON_RBUF_LEN);
GpioDataRegs.GPASET.bit.GPIO20= 1; GpioDataRegs.GPASET.bit.GPIO24= 1;
ucSCIBRecvDly = 0; ucSCICRecvDly = 0; ucSCICSendDly = 0;}
代码单步运行至InitSafeBuf(&stSCIBSendBuf,CON_SBUF_LEN);同样提示no source found 然后看了一下工程里面InitSafeBuf的函数如下:
void InitSafeBuf(STSAFEBUF *pstSafeBuf , unsigned short usLen );void InitCirBuf(STCIRBUF *pstCirBuf , unsigned short usLen );void Val2Str(long lVal,unsigned char ucDot,STSAFEBUFMID *pstSafeBuf);void Val2HStr(long lVal,STSAFEBUFMID *pstSafeBuf,unsigned char ucLen);void itoa(long lVal,unsigned char * pucBuf ,unsigned char ucBufLen);
请问这个为什么呢?谢谢!
代码如下:
void IOFace_Reflesh()
{
GpioDataRegs.GPBSET.bit.GPIO48 = 1; //165_PL
GpioDataRegs.GPBCLEAR.bit.GPIO50= 1; //595_STCP
SpiaRegs.SPITXBUF = (usDOState | (usDOState<<8));
Delay600(100);
usDIState = (SpiaRegs.SPIRXBUF>>8)&0xFF;
GpioDataRegs.GPBSET.bit.GPIO50= 1;
GpioDataRegs.GPBCLEAR.bit.GPIO48 = 1;
这里面的Delay600(100);在代码单步运行时总是提示Source not found.
然后我就查找了Delay600(100)这个函数,在整个工程中就看到了下面这两处
void Delay600(unsigned short usDelayNum );
void Delay100(unsigned short usDelayNum );
请问是否存在错误 谢谢
Chris Meng:
回复 ouzhongyou:
你好,
请问你使用的TI芯片是哪一款?
代码如下:
void IOFace_Reflesh()
{
GpioDataRegs.GPBSET.bit.GPIO48 = 1; //165_PL
GpioDataRegs.GPBCLEAR.bit.GPIO50= 1; //595_STCP
SpiaRegs.SPITXBUF = (usDOState | (usDOState<<8));
Delay600(100);
usDIState = (SpiaRegs.SPIRXBUF>>8)&0xFF;
GpioDataRegs.GPBSET.bit.GPIO50= 1;
GpioDataRegs.GPBCLEAR.bit.GPIO48 = 1;
这里面的Delay600(100);在代码单步运行时总是提示Source not found.
然后我就查找了Delay600(100)这个函数,在整个工程中就看到了下面这两处
void Delay600(unsigned short usDelayNum );
void Delay100(unsigned short usDelayNum );
请问是否存在错误 谢谢
ouzhongyou:
回复 Chris Meng:
28335 这个片子。这种情况影响代码的整体运行效果吗?编译的时候没有任何问题。一旦单步执行就出现no find source 如何处理解决?谢谢!
代码如下:
void IOFace_Reflesh()
{
GpioDataRegs.GPBSET.bit.GPIO48 = 1; //165_PL
GpioDataRegs.GPBCLEAR.bit.GPIO50= 1; //595_STCP
SpiaRegs.SPITXBUF = (usDOState | (usDOState<<8));
Delay600(100);
usDIState = (SpiaRegs.SPIRXBUF>>8)&0xFF;
GpioDataRegs.GPBSET.bit.GPIO50= 1;
GpioDataRegs.GPBCLEAR.bit.GPIO48 = 1;
这里面的Delay600(100);在代码单步运行时总是提示Source not found.
然后我就查找了Delay600(100)这个函数,在整个工程中就看到了下面这两处
void Delay600(unsigned short usDelayNum );
void Delay100(unsigned short usDelayNum );
请问是否存在错误 谢谢
ouzhongyou:
回复 Denny Yang:
那这种情况需要怎么解决吗?谢谢!
代码如下:
void IOFace_Reflesh()
{
GpioDataRegs.GPBSET.bit.GPIO48 = 1; //165_PL
GpioDataRegs.GPBCLEAR.bit.GPIO50= 1; //595_STCP
SpiaRegs.SPITXBUF = (usDOState | (usDOState<<8));
Delay600(100);
usDIState = (SpiaRegs.SPIRXBUF>>8)&0xFF;
GpioDataRegs.GPBSET.bit.GPIO50= 1;
GpioDataRegs.GPBCLEAR.bit.GPIO48 = 1;
这里面的Delay600(100);在代码单步运行时总是提示Source not found.
然后我就查找了Delay600(100)这个函数,在整个工程中就看到了下面这两处
void Delay600(unsigned short usDelayNum );
void Delay100(unsigned short usDelayNum );
请问是否存在错误 谢谢
Chris Meng:
回复 ouzhongyou:
ouzhongyou 28335 这个片子
论坛是按产品分的,C2000的问题请到C2000论坛提问。谢谢!
代码如下:
void IOFace_Reflesh()
{
GpioDataRegs.GPBSET.bit.GPIO48 = 1; //165_PL
GpioDataRegs.GPBCLEAR.bit.GPIO50= 1; //595_STCP
SpiaRegs.SPITXBUF = (usDOState | (usDOState<<8));
Delay600(100);
usDIState = (SpiaRegs.SPIRXBUF>>8)&0xFF;
GpioDataRegs.GPBSET.bit.GPIO50= 1;
GpioDataRegs.GPBCLEAR.bit.GPIO48 = 1;
这里面的Delay600(100);在代码单步运行时总是提示Source not found.
然后我就查找了Delay600(100)这个函数,在整个工程中就看到了下面这两处
void Delay600(unsigned short usDelayNum );
void Delay100(unsigned short usDelayNum );
请问是否存在错误 谢谢
10#:
回复 ouzhongyou:
你的工程里没有添加或链接这个函数定义所在的源文件,就会出现单步运行时找不到源代码。
实际运行可以忽略这些信息。