Searching \ for '[PIC] - ?? - error - vprintf cannot fit section' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: '- ?? - error - vprintf cannot fit section'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] - ?? - error - vprintf cannot fit section'
2007\02\28@124724 by Carl Denk

flavicon
face
This is with a 18F1320 and MCC18 compiler. Added this code to a working
program

printf((const far rom char *)"%d   %d  ",adc_data[0], well_pressure);
printf((const far rom char *)"%d   %d  ",adc_data[1], regulated_pressure);
printf((const far rom char *)"%d   %d  ",adc_data[2], temperature);

and I get this error message back:

Executing: "C:\MCC18\bin\mplink.exe" /l"C:\MCC18\lib"
"C:\MCC18\lkr\18f1320.lkr" "E:\data\MICROCHIP\WELL
SENSORS\calibration\WELL SENSORS-cal.o" /o"WELL SENSOR-CAL.cof"
/M"E:\data\MICROC~1\WELLSE~1\CAL\WELL SENSOR-CAL.map"
MPLINK 4.02, Linker
Copyright (c) 2006 Microchip Technology Inc.
Error - section '.romdata_vfprintf.o' can not fit the section. Section
'.romdata_vfprintf.o' length=0x00000011
Errors    : 1

BUILD FAILED: Wed Feb 28 11:44:57 2007


If I comment out any one of the 3 printf's, builds OK.


2007\02\28@144634 by Harold Hallikainen

face
flavicon
face
How's your overall rom usage? I get these errors when stuff gets tight.
The linker just goes along stuffing stuff in rom until it runs out of
room, which appears to have happened with the printf code.

Harold


{Quote hidden}

> -

2007\02\28@172730 by Carl Denk

flavicon
face
Thanks for the reply. From MPLAB >view > memory useage gauge > program
memory 2259/4096 and data memory 155/256 if those are the correct place
to look, should be lots to go. The normal output of this is via
"putcUSART" in a loop. I'm trying to use the printf a minimum work to
output 6 integer variables to scale/calibrate the ADC.

Harold Hallikainen wrote:
{Quote hidden}

>> --


'[PIC] - ?? - error - vprintf cannot fit section'
2007\03\01@063055 by Nigel Duckworth
picon face
I was getting out of memory errors using Hi-Tech PICC-18 with an 18F452
at around 50% ROM usage.

Hi-Tech support told me it was due to a bug in the silicon and the fix
was to split my program into multiple files which could be linked
separately.

No further problems since doing this.

Regards,

Nigel


Carl Denk wrote:
{Quote hidden}

2007\03\01@075750 by Carl Denk

flavicon
face
Thanks for the reply, for the calibration work, I just commented out
some things that I didn't need at the moment including the WDT and it's
working, but for the future I'll save this.

Nigel Duckworth wrote:
{Quote hidden}

2007\03\01@104952 by Harold Hallikainen

face
flavicon
face
I wonder if that's a silicon "bug" or a silicon "feature." I suspect the
compiler wants to put everything in one source file on one page of memory.

Harold


{Quote hidden}

> -

2007\03\01@112943 by Alan B. Pearce

face picon face
>I wonder if that's a silicon "bug" or a silicon "feature." I suspect the
>compiler wants to put everything in one source file on one page of memory.
>
>Harold
>
>
>> I was getting out of memory errors using Hi-Tech PICC-18 with an 18F452
>> at around 50% ROM usage.
>>
>> Hi-Tech support told me it was due to a bug in the silicon and the fix
>> was to split my program into multiple files which could be linked
>> separately.

Yes, I couldn't quite see how it could be a "silicon bug". It sounded to me
more like a lack of ability for the compiler to move things around.

I wonder if it is related to the memory model being used, and doing modular
compiling and linking works around it?

2007\03\01@120940 by John Temples

flavicon
face
On Thu, 1 Mar 2007, Harold Hallikainen wrote:

> I wonder if that's a silicon "bug" or a silicon "feature." I suspect the
> compiler wants to put everything in one source file on one page of memory.

Refer to the 18F452 B2 silicon errata.  This part had problems with
certain types of crossings of the 0x4000 program memory boundary.
Hi-Tech's compiler provides the necessary workaround.

{Quote hidden}

>> --

2007\03\01@131541 by Harold Hallikainen

face
flavicon
face
Wow! It really was a silicon bug!

Harold


{Quote hidden}

2007\03\01@161331 by Nigel Duckworth

picon face
These are the man from Hi-Techs words;

You would appear to be compiling for one of the PIC18 chips which suffers from the "0x4000 boundary" silicon bug.  The workaround which our compiler implements requires that each compiled module fit entirely within 0x4000 words of Program Memory.  To do this, you will need to split at least one function from your largest source file into a different source file to be compiled separately.  If you are unsure how to do this, please send a .ZIP file of your complete project directory to me and I will show you what changes to make.

... so I did... and he did.

Excellent support from Hi-Tech.

Regards,

Nigel




Harold Hallikainen wrote:
>  
> Wow! It really was a silicon bug!
>
> Harold
>
>  


More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...