I did some more research, and here's what I found:
printf() (in embedded.c) calls va_start() (a macro) which looks like it should get the number arguements for printf, but it just gets 0 for mine.
Any help?
Hello
Did you include stdio.h in the source file where you are using printf?
CrasyCat
1) I've tried %u, %d, %x, %i and even specifying digits, i.e. %5d, %4u, etc (this just insterts spaces in my output, i.e. "SP 0").
2) I prefaced the function call with ( void ) to tell the compliler I don't care about the return value (otherwise I get a warning).
Thanks,
Tomahawk
CompilerGuru wrote:
strange case.
First, you say that dtTarget is a unsigned int, and I belive you. But because of the lack of any argument checking for printf, I would actually cast it to unsigned int anyway.
( void )printf("SP %u\n\r", (unsigned int)dtTarget );
Then, did you modify the default type sizes? Especially configuring int as 4 byte would explain it, unless you did recompile the library with this option.
I haven't modified the default type sizes. I'll work on getting the generated code (I back-burnered this for awhile).
-Tomahawk
CompilerGuru wrote:
I get exactly the same code when I compile the code below in the tiny memory model (well I also get the same code in the small memory model when I explicitely allocate bufpos in the zero page).
Did you allocate bufpos in the zero page? If not, this would explain it.
1) Tiny
2) I've got CodeWarrior 5.7.0. How do I find out the compiler version?
3) It appears as if I have plenty of stack.