Peter, > I'm compiling stuff for the Wiznet W7100 8051 varient and hit the > dreaded "can't allocate DSEG" error. A search through the forum indicates > that --stack-auto and/or large model may fix this. Large model alone didn't > seem to so I rebuilt from source (vi Cygwin) from a recent snap and modified > the makefile (probably incorrectly by hand, is there a more proper way via > a build option?) to create all the -stack-auto librarys apparantly correctly.
It was not meant as first try --model-large and if that's not enough than put --stack-auto on top of it. It means try either --model-large or --stack-auto and if both don't work you might go for the combination. And the small-stack-auto library is in the installer. But the better solution is to find a few bigger variables in data/idata that can be moved to idata/pdata/xdata and stick to --model-small. > Compiling like this: > > /usr/local/bin//sdcc -c wiz.c --model-large --stack-auto --funsigned-char > wiz.c:89: error 16: variable 'tmpEA' must be static to have storage class in > ree > ntrant function > > gets lots of these error messages here (I'm converting from Keil): > > volatile unsigned char xdata tmpEA; > > this is fixable by adding a static as it requests: > > static volatile unsigned char xdata tmpEA; > > or by > > volatile unsigned char tmpEA; What was the memory model you used with Keil? It looks like it was not written for any reentrant model. I guess it will fail with Keil too when you choose a reentrant model. > but the code which works when compiled like this (for this smaller case than > the original failure): > > "/cygdrive/c/program files/sdcc"/bin/sdcc -c wiz.c --model-medium > --funsigned-ch > ar > > Doesn't actually run any more (a network connection is refused by the > stack-auto compiled code). I'm just about to add printf statements to try and > figure out whats wrong (and therefore a fix) but thought I'd inquire in case > I'm just missing some needed step in this process. > > Peter Van Epp Greets, Maarten ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user