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; }
Using C++ in TMS320 DSP....
Started by ●December 24, 2004
Reply by ●December 26, 20042004-12-26
On 24 Dec 2004 02:19:53 -0800, godo910848@yahoo.com.tw (Patrick910848) wrote in comp.dsp:> 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 YuAre 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