I have been trying to get sprintf() to work in the pic16 port and haven't had any luck. It looks like there are header files for this, but I'm not sure where to find the library to link against.
Has anyone had any luck with this, or is this still work in progress?
I have "solved" my problem by implementing snprintf() - a buffer bound variant of sprintf() in C that is basically stand alone. It can be found in the patches.
I have (at great pain) tested this on my 18f452 pic and it seems to work pretty well.
Hope this saves someone some time.
I just figured out that there is some sort of stack leak in my implementation. Something about va_arg() as it looks.
Be warned that too many calles to this snprintf() function will cause your program to go off into space.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.