I have searched the documentation for a good while and not been able to find the answer to the above. since similar may come up again a link to the answer, may be more helpful than just the answer.
in advance, thanx,
Erik
Try searching for "retargeting". That should explain it all.
Ho sorry - I misread your post!
sprintf()?
It prints to a string - string print formatted. So obviously, the output goes to the buffer you supply as parameter.
Are you sure you don't mean the reverse - where do the input come from?
I hsve, due to doing '51s for ages where using things like sprintf are "space excessive", forgotten much in this area - it's coming back.
thanx,
So you did mean printf() and not sprintf()?
Then it is up to you to supply the function that maps where "serial console" data should be sent.
nope, I ment sprintf(), my rustiness made me think of printf() - it is all coming back :)
A useful online reference to the Standard 'C' library functions:
www.cplusplus.com/.../ (don't worry about the "plusplus" - it is the 'C' library)
And a useful online 'C' textbook:
publications.gbdirect.co.uk/.../
(don't worry about the "plusplus" - it is the 'C' library)
Have you noted that very few people are capable of writing 'C' any more, it automatically comes out as 'C++'
The last 3 places I have consulted have requested 'C++' although the code (current and added) was pure 'C'
Actually, for at least a decade now, what you typically get is talk about a non-existant language supposedly called "C/C++". I blame that on a whole slew of books that mashed the two together like that, both in the title and in the text.
I have searched the documentation for a good while and not been able to find the answer to the above.
Makes one wonder what documentation you searched. The Keil Cx51 manual could hardly be any clearer on the issue: "... and stores the resulting string in buffer."
Makes one wonder what documentation you searched I clicked and clicked at the Keil site, the search gave a lot of useless hits
But the Keil MDK-ARM online documentation could hadly be any more impenetrable!
Once you find it, the content is OK - but trying to find stuff is a complete nightmare!
Yes, it does take a bit of time to learn how to use the Keil web site. And to know when it shouldn't be used because the required information has to be fetched from another ARM site.
Ah, that might be the difference --- as you'll note, I was looking in the C51 docs.
But then again, that's a fundamental feature of a C Standard Library function Erik was looking for, so it shouldn't matter which compiler's documentation you look it up in. That much has to be the same everywhere.
so it shouldn't matter which compiler's documentation you look it up in.
sure, but if you drove an Audi, would you look up the conversion kpH/MpH in a Mercedes manual it shouldn't matter which.