On Tue, May 26, 2009 at 9:41 PM, Carl Denk wrote: > I have an 18F1320 with a C18 program and MPLAB (latest version). The > program has been running fine for several years, and recently I wanted > to add software averaging/filtering to the 3 ADC inputs, which included > declaring 3 int extern arrays [10]. Apparently I was just under the > maximum data locations. The memory gauge shows 1683/4096 program and > 152/256 data before any changes. It would seem that 256 - 152 = 104 > would be sufficient, but even declaring one additional "int a[10]" array > creates the ".udata_c018i.o' can not fit the section. Section > '.udata_c018i.o' length=0x0000000a" error. I had been assuming that the > memory usage gauge reflected the actual memory used, including those > locations added by the compiling/assembling process, but after reviewing > the map file, that does not appear to be the case. I thought the gauge > info was generated at link time, and should include all the memory used. > Is this a MPLAB error? Is it in line with your map file? Memory gauge is only approximate as far as I know. The map file is the real one. Your linker script may play a part as well. Maybe you want to post it and let other people chime in to see whether changing that would help. You can also play with the optimization settings or even different C18 versions. -- Xiaofan http://mcuee.blogspot.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist