From: Paul S. <pa...@pj...> - 2007-02-05 10:41:44
|
Andreas Schweiger wrote: > Hi, > > thanks for the tips. > My application is quite big (60kByte binary) and I have one recursive > function so this needs to be reentrant. > Why not declare just that one function with SDCC's reentrant modifier? (refer to the manual for details). > That was the reason why I used the stack_auto. > I will have a look if I can use the tiny printf function. > Can I use small with 64k xdata and 64k code? > Maybe. In small model, variables will default to internal ram, including some of SDCC's internal variables which you can't control. So you may be able to specify enough as xdata to be able to compile in small. Maybe. Usually SDCC generates much more compact code in small model, so your 60K binary will likely be much smaller, and probably faster too. > Thanks, > Andreas > > Am 05.02.2007 um 03:09 schrieb Paul Stoffregen: > > >> 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 >>> Sdc...@li... >>> 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 >> Sdc...@li... >> 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 > Sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > > > |