DSPRelated.com
Forums

printf on C6713

Started by stino_rides April 20, 2004
Hi
I'm having this weird problem on the C6713DSK: printf doesn't output
anything to the stdout window, but it does return the number of bytes
'written'. The code is the same I used on the C6711 where it worked
ok. Anyone has an idea where to search for the solution?
Thanks!




It was doing similar thing for me too.. in my code printf statement would b executed properly but it would only print on the stdout window when it encountered another printf statement in my code with \n embedded in it.. i dont know why it was doing so .. mabbe this mite not the case with u .. just a thot ..

Regards,
Tarang

On Tue, 20 Apr 2004 stino_rides wrote :
>Hi
>I'm having this weird problem on the C6713DSK: printf doesn't output
>anything to the stdout window, but it does return the number of bytes
>'written'. The code is the same I used on the C6711 where it worked
>ok. Anyone has an idea where to search for the solution?
>Thanks! >_____________________________________
>Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.
>
>_____________________________________
>About this discussion group:
>
>To Join:  Send an email to c...@yahoogroups.com
>
>To Post:  Send an email to c...@yahoogroups.com
>
>To Leave: Send an email to c...@yahoogroups.com
>
>Archives: http://www.yahoogroups.com/group/c6x
>
>Other Groups: http://www.dsprelated.com
>
>Yahoo! Groups Links
>
><*> To visit your group on the web, go to:
>      http://groups.yahoo.com/group/c6x/
>
><*> To unsubscribe from this group, send an email to:
>      c...@yahoogroups.com
>
><*



It is pretty tough to give help with the information provided...
 
BTW, printf does work on the 6713 DSK.
 
1. Does the TI provided 'hello world' example work??
If so, you may have to actually troubleshoot your problem.
2. Is your linker command file correct??
3. I have no idea how big your program is - does "everything work"??
4. have you taken any steps to identify or isolate your problem??
 
shooting in the dark,
mikedunn

stino_rides <s...@skynet.be> wrote:
Hi
I'm having this weird problem on the C6713DSK: printf doesn't output
anything to the stdout window, but it does return the number of bytes
'written'. The code is the same I used on the C6711 where it worked
ok. Anyone has an idea where to search for the solution?
Thanks!_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join: Send an email to c...@yahoogroups.com

To Post: Send an email to c...@yahoogroups.com

To Leave: Send an email to c...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/c6x

Other Groups: http://www.dsprelated.com

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/c6x/

<*> To unsubscribe from this group, send an email to:
c...@yahoogroups.com

<*>




Most probably, as I can imagine, there is not enough stack
for proper stdio functioning. I usually use stack size = 0x2000
to get stdio work.

Regards,
Andrew

P.S. I don't know why, but I always get a ranaway scanf() when
several variables are to be input, separated by spaces. I
suspect that it is the space symbol that confuses scanf().
This might be the front-end problem in the CCS v.2.20.00.

> Date: Wed, 21 Apr 2004 19:47:37 -0700 (PDT)
> From: Mike Dunn <>
> Subject: Re: printf on C6713
>
> It is pretty tough to give help with the information provided...
>
> BTW, printf does work on the 6713 DSK.
>
> 1. Does the TI provided 'hello world' example work??
> If so, you may have to actually troubleshoot your problem.
> 2. Is your linker command file correct??
> 3. I have no idea how big your program is - does "everything work"??
> 4. have you taken any steps to identify or isolate your problem??
>
> shooting in the dark,
> mikedunn
>
> stino_rides <> wrote:
> Hi
> I'm having this weird problem on the C6713DSK: printf doesn't output
> anything to the stdout window, but it does return the number of bytes
> 'written'. The code is the same I used on the C6711 where it worked
> ok. Anyone has an idea where to search for the solution?
> Thanks!



stijn,
 
I am not familiar with the NDK, but this is how CCS works.
 
 [this is from memory -I believe that it is accurate]
symbol 'C$$IO$$' - CCS sets a 'hidden breakpoint' at this address.  When the DSP stops and this address is recognized, a few bytes are fetched from '__CIOBUF_'.  One of these is a command [0xFx] and another few bytes reflect "buffer length".  You should be able to see your buffer start about 14 bytes from the start.
 
Set a BP at 'C$$IO$$'.  When you hit this BP you should have just printed and you should be able to see your data in the buffer.
 
TIP:
Open two memory windows at '__CIOBUF_'. Display one in hex bytes and one as 'characters', then adjust the width until each is 2 or 4 bytes wide.
 
BTW, for each printf you will hit the 'C$$IO$$' BP about six times [I am not sure why].
 
I hope this helps,
mikedunn
stijn <s...@skynet.be> wrote:
> It is pretty tough to give help with the information provided...

yeah I know, my apologies for that but I was in a hurry yesterday evening..
The problem seems to be, that I use the NDK; this has its own printf
implementation and there seems to be a problem.
I'm still trying to isolate the problem now..

Regards
Stijn



In the DSP/BIOS config under the MEM section there is a "segment for
malloc() / mfree()" option, which pointed to MEM_NULL in my config.
I changed this to SDRAM and now everything is fine.