DSPRelated.com
Forums

CCS v2 does not execute correctly

Started by Unknown May 8, 2007
For example, I have a for loop, for (i=0; i<5; i++). Program does not
loop; index i does not increment. Also, variable cannot be assigned
values, as what watch window indicates. I am using the CCS v2 and have
C5409 as target device.

On May 8, 2:11 am, irish...@mail2engineer.com wrote:
> For example, I have a for loop, for (i=0; i<5; i++). Program does not > loop; index i does not increment. Also, variable cannot be assigned > values, as what watch window indicates. I am using the CCS v2 and have > C5409 as target device.
Is the optimization is on ? l think compiler is optimizing the code? -Soumit
irishpat@mail2engineer.com wrote:
> For example, I have a for loop, for (i=0; i<5; i++). Program does not > loop; index i does not increment. Also, variable cannot be assigned > values, as what watch window indicates. I am using the CCS v2 and have > C5409 as target device.
What does the generated assembly code do? Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
On May 9, 5:32 am, soumit <soumit.mukher...@gmail.com> wrote:
> On May 8, 2:11 am, irish...@mail2engineer.com wrote: > > > For example, I have a for loop, for (i=0; i<5; i++). Program does not > > loop; index i does not increment. Also, variable cannot be assigned > > values, as what watch window indicates. I am using the CCS v2 and have > > C5409 as target device. > > Is the optimization is on ? l think compiler is optimizing the code? > -Soumit
Thanks for the reply, Soumit. The optimization is set to 'none'.
> What does the generated assembly code do? > > Jerry > -- > Engineering is the art of making what you want from things you can get. > =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF i =3D 0; 0000:2333 7602 ST #0h,2h // I think this is correct. It stores constant 0 to certain address(?) of i DCTArray =3D (short*) 0xC000; 0000:2335 76F8 ST #0c000h,*(DCTarray) for(i =3D 0; i< 1024; i++){ 0000:2338 F7B8 SSBX SXM 0000:2339 F020 LD #400h,0,A 0000:233B 7602 ST #0h,2h 0000:233D 0802 SUB 2h,A 0000:233E F847 BC L36,ALEQ 0000:2340 L35 *DCTArray =3D array[i++]; 0000:2340 7213 MVDM 18d3h,13h 0000:2342 4813 LDM 13h,A 0000:2343 7102 MVDK 2h,12h 0000:2345 F000 ADD #1h,0,A,A 0000:2347 6DEA MAR *+AR2(4352) 0000:2349 80F8 STL A,*(DCTarray) 0000:234B E501 MVDD *AR2,*AR3 } 0000:234C F020 LD #400h,0,A 0000:234E 6B02 ADDM 1h,2h 0000:2350 0802 SUB 2h,A 0000:2351 F846 BC L35,AGT I thought maybe the problem is with the watch window but the loop doesn't execute. Debugger just steps through the lines of code. What could've caused this?