We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
C51 returns the following error:
*** ERROR C249: 'DATA': SEGMENT TOO LARGE
Rather than switching to the COMPACT or LARGE memory model I would like to manually declare some variables into xdata. I would however like to know what the compiler is actually putting in the data segment and what is taking up the most space. Is there some way I can get this information in the absence of the .MAP file?
Thanks,
Stijn
Given the special needs of the 8051 processor, it's quite easy for the compiler to spot a single object file that alone adds more data than what may fit. Why wait for the linker to confirm? It's even likely that Keil has one-byte offset values in the object file format and already there knows that they have no free offset values to assign to the pre-linked data object offsets.
When porting code from other compilers, it's meaningful to locate arrays and larger structs and tag them for XDATA storage and leave DATA for smaller variables.