Pretty cool. However, won't it break if the strings are longer than 256 bytes total since then they could overlap a page? At least that used to be a problem with the PIC16F series. I tried this: M_1="\nThreadSize is %s\n" M_2="ThreadDepth is %s\n" M_3="ThreadArea is %s\n" Result was: Messages === Optimization saved 0 characters from being duplicated Most of my strings are literals used in printf statements Still, it bears looking into. Thanks. John Dammeyer Automation Artisans Inc. http://www.autoartisans.com Ph. 1 250 544 4950 > -----Original Message----- > From: piclist-bounces@mit.edu > [mailto:piclist-bounces@mit.edu] On Behalf Of Rolf > Sent: Tuesday, January 30, 2007 1:29 PM > To: Microcontroller discussion list - Public. > Subject: Re: [PIC] C Compiler > > > Have you seen this tool, by the way: > > http://piclist.org/techref/microchip/language/c/stringformat.htm > > Can re-arrange your pointers to optimize messages where they > overlap. I > use it all the time to make space.... ;-) Also it encourages > me to use > similar messages in lots of places. > > Rolf > > > > John Dammeyer wrote: > > Hi all, > > > > Yes. Currently my project is at > > > > 55824 out of 66584 program addresses used, > program memory > > utilization is 83% > > > > With all optimizations on. I haven't been able to use > debug mode for some > > time now. > > > > However, the idea of turning on debug in only one file > hadn't occurred to > > me. Good idea if it's possible. Much of the space in my > application is > > text strings for status out the serial port as the system > operates. I turn > > most of that off this way: > > > > #ifdef FULL_DIAGNOSTICS > > #define DEBUGSTR(s) printf((far rom char *)s) > > #else > > #define DEBUGSTR(s) > > #endif > > > > The Electronic Lead Screw runs a 23kHz timer giving me an > interrupt every > > 43uS. Optimization is critical there since there are times > when almost all > > of that 43uS is used inside the interrupt routine. Outside > that an LCD is > > updated periodically with floating point values so the > float to string > > functions and everything involved with floating point take > a lot of space. > > > > John Dammeyer > > > > > >> > >> -- > >> > > > > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist