From: Peter V. E. <va...@sf...> - 2010-03-16 01:13:37
|
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. 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; 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 |