Sign in

username:

password:



Not a member?

Search code-comp



Search tips

Subscribe to code-comp



code-comp by Keywords

ARM7 | BIOS | Bug | EVM | JTAG | Linker | LOG_printf | McBSP | Profiling | Relocation | RTDX | Simulator | Target | Watch


Discussion Groups

Discussion Groups | Code-Composer | several consecutive "printf" lines causes infinite loops

Technical discussions about Code Composer Studio.

  

Post a new Thread

several consecutive "printf" lines causes infinite loops - pransis korpuz - Jun 15 9:16:08 2007



good day everybody!

im having a bit of a problem with coding in CCS Studio DSK 2.12

i have several "printf" lines in my code and it causes infinite loops
in  execution. i usually tend to have many consecutive "printf" lines
as a way of debugging (in order to see the values of my variables in
specific parts of my program.

my code is as simple as this:

include <stidio.h>
void main(){
//some intializations here

printf("RESULT 1 = %d \n", X1);
.
.
.
printf("RESULT 10 = %d \n", X10);

//some code here

}

but CCS only outputs lines until RESULT7 and goes on with the infinite
loop even though there's no instructions in the program to repeat.

im thinking its some sort of a bug in the stdio.h header file but i'm
not really sure.

any ideas?

big thanks!

- francis



(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )

Re: several consecutive "printf" lines causes infinite loops - Jeff Brower - Jun 18 16:23:15 2007

Francis-

> im having a bit of a problem with coding in CCS Studio DSK 2.12
> 
> i have several "printf" lines in my code and it causes infinite loops
> in  execution. i usually tend to have many consecutive "printf" lines
> as a way of debugging (in order to see the values of my variables in
> specific parts of my program.
> 
> my code is as simple as this:
> 
> include <stidio.h>
> void main(){
> //some intializations here
> 
> printf("RESULT 1 = %d \n", X1);
> .
> .
> .
> printf("RESULT 10 = %d \n", X10);
> 
> //some code here
> 
> }
> 
> but CCS only outputs lines until RESULT7 and goes on with the infinite
> loop even though there's no instructions in the program to repeat.
> 
> im thinking its some sort of a bug in the stdio.h header file but i'm
> not really sure.

Try using LOG_printf() instead.  printf() places a heavy strain on the JTAG interface
between DSP target and host CCS software.  Some of the newer DSK cards, like 6713 and
5510, have a turtle slow JTAG bitrate, and enough printf() will shut them down
depending on what other DSP code is running.

-Jeff



(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )