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! |
|
printf on C6713
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
.. |
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 |
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... |
|