Using C++ in TMS320 DSP....
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Using C++ in TMS320 DSP....

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP
Author Message
Patrick910848
Guest





Posted: Fri Dec 24, 2004 3:19 pm    Post subject: Using C++ in TMS320 DSP.... Reply with quote

Dear all:
I've a problem about TMS320F2812 DSP using C++. I could run
my code correctly at the first time. When i pressed CCS "Debug->Rest
CPU",the code stuff at "new memory". what's wrong?? Could you help
me??

Patrick Yu

int main()
{

for(;;)
{
Initial();
while(!CtrData->Reset)
{ MainProcess();}
End();
}

}

void Initial(void)
{
CtrData = new CCtrSysData; //Stuff when Reset CPU???
ReadFifo = new CFifo<U16>(300); //Stuff when Reset CPU???
DecSendData = new CComData(3);
CtrSendData = new CComData(1000);
Decoder = new CDecode(ReadFifo,DecSendData,CtrSendData,CtrData);
CtrSys = new CCtrSys(CtrData,CtrSendData);
TimerTriger = new CTimerTriger;
SendMsg = new CSendMsg(DecSendData,CtrSendData);
TimerTriger->DecodeTrgTime = DECODER_TRIG_RATE;
CtrData->Reset = false;
EINT; // Enable Global interrupt INTM

}

void End(void)
{

delete SendMsg;
delete CtrSys;
delete Decoder;
delete CtrSendData;
delete DecSendData;
delete ReadFifo;
delete CtrData;
delete TimerTriger;
}
Back to top
Jack Klein
Guest





Posted: Sun Dec 26, 2004 7:57 am    Post subject: Re: Using C++ in TMS320 DSP.... Reply with quote

On 24 Dec 2004 02:19:53 -0800, godo910848@yahoo.com.tw (Patrick910848)
wrote in comp.dsp:

Quote:
Dear all:
I've a problem about TMS320F2812 DSP using C++. I could run
my code correctly at the first time. When i pressed CCS "Debug->Rest
CPU",the code stuff at "new memory". what's wrong?? Could you help
me??

Patrick Yu

Are you running your code from RAM, internal or external, for testing?
If so, Debug->Reset CPU does not do the entire job. It sets the
processor to pick up the start address from flash, not from your
downloaded image.

After the reset, do Debug->Restart. This will set the processor to
start at the address specified in the image you loaded into RAM, not
at whatever is or is not in the flash.

Personally, I always use Debug->Reset CPU and then File->Reload
Program, since the reload only takes a few seconds.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB