The stack size is the last item in the linker script, and for the=20 18F1320, the standard size is 0x40, and without changing anything else,=20 0x7F was the biggest and would still link. I had looked other places for=20 the stack size, but couldn't find any other place to adjust it. With a=20 scaled down program, I tried several stack sizes and printf's. Making=20 the stack size bigger didn't seem to affect the outcome. Here's 2 printf's This one worked, now, I am able to at least add some strings, get the 2=20 "/" and 2 variables. Both of these compiled with no warnings or errors.=20 When running in MPLAB-SIM, get the same "CORE-E0001: Stack over flow=20 error occurred from instruction at 0x000c10". Looking a little at the=20 disassembly, it looks like it hangs in putc area, maybe looking for an EOF. printf ((const rom far char*) "abcdefg%2d/%2d/abcd", month, day); And this one crashed the micro, I have a flashing LED in the while() at=20 the end. printf ((const rom far char*) "%2d/%2d/%2d", month, day, year); On 8/19/2010 3:43 PM, Brendan Gillatt wrote: Thanks everyone for your input. :) > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 19/08/2010 20:29, Isaac Marino Bavaresco wrote: > =20 >> Em 19/8/2010 16:13, Brendan Gillatt escreveu: >> =20 >>> Have you tried to increase the amount of RAM allocated to the stack? I >>> don't remember the specifics but I had to do so for another piece of >>> code. There's an option somewhere in the build configuration for the >>> project IIRC. >>> =20 >> It used to be in the linker script. >> >> Isaac >> >> =20 > You're probably right--it has been a while since I've used C18. > > - --=20 > Brendan Gillatt | GPG Key: 0xBF6A0D94 > brendan {a} brendangillatt (dot) co (dot) uk > http://www.brendangillatt.co.uk > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.14 (MingW32) > > iEUEARECAAYFAkxtiVAACgkQHEhZ5Ws5poHt6ACeIsVKqpEA1ssRQHOvChTK2X3A > 5zQAl2adC6/0Sk+dAORy26yf+kFSuCY=3D > =3D/0UV > -----END PGP SIGNATURE----- > =20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .