For mcs51 there are several printf functions. Perhaps you might try
using printf_tiny. For example, near the top of your code, use
#define printf printf_tiny
A table was recently added to the SDCC manual showing the difference
between the various printf functions.
Also, I'd suggest you avoid using --stack-auto unless absolutely
necessary. As Maarten pointed out, the library needs to be recompiled.
SDCC produces far better code using the default --model-small without
reentrant functions.
-Paul
Andreas Schweiger wrote:
> Hello everybody,
>
> I try to use SDCC for my project but I had several problems.
> Now I wrote a small test app and found that the following happens:
> (Printf goes to an LCD through putchar)
>
> printf("text") ; // Works fine
>
> but:
>
> char *version="1.00";
> printf("test %s",version);
>
> produces crap on the LCD when the string through %s should be printed.
>
> Controller : SAB 80C515
> 64kB Flash, 64kB XRAM
>
> Makefile options:
>
> CFLAGS = -V --model-large --stack-auto --xstack-loc 0x0FFF0
> --iram-size 0x100 --xram-size 0x10000 --code-size 0x10000 --verbose -L
> /Developer/sdcc/share/sdcc/lib/large
>
> Thanks for all help,
>
> Andreas
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ------------------------------------------------------------------------
>
> _______________________________________________
> Sdcc-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user