|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
complie error can not fit the section. Section xxxx
The error is:
.code__UF8.O' can not fit the section. Section '.code__UF8.O' length=0x0000005e Reading through the forums it looks like it is a memory error. I cleaned things up. Largest array is three 10 array int. I do use float with trig math only a few variables. I went back to code that compiled a few days ago and it has as similar compile error but might be in a different function. |
|
#2
|
|||
|
|||
|
Re: complie error can not fit the section. Section xxxx
If any of your arrays are constant, try putting them in rom.
The C18 User's Guide shows how to do this in section 2.4.3 Basically, you use it like you would use "const", but any pointers to rom data must also be specified as rom pointers. If you can't stick anything in rom, you can avoid using floats and trig functions by approximating them with integers. You would probably have to approximate the trig functions with lookup tables, which can be placed in rom as well. |
|
#3
|
|||
|
|||
|
Re: complie error can not fit the section. Section xxxx
How much program code & romdata do you have!?
Look at the partial map file that was generated. Code:
CODEPAGES:
Memory Start End Section Address Size(Bytes)
--------- --------- --------- --------- --------- ---------
page 0x0800 0xffff _entry_scn 0x0800 0x0006
InterruptVectorHigh 0x0808 0x0006
InterruptVectorLow 0x0818 0x0006
.cinit 0x081e 0x00b6
.romdata_drv_Interrupts.o 0x08d4 0x7700
Not generating a map file? Project->Build options->Project, MPLINK Linker tab, check "Generate map file", Apply, OK, Project->Clean, Project->Build All. Last edited by dcbrown : 11-02-2008 at 16:06. |
|
#4
|
||||
|
||||
|
Re: complie error can not fit the section. Section xxxx
When we saw a similar problem, we also had some floating point code that seemed to be contributing. The code was doing a bunch of floating point calculations, and then casting the result back to a double. I think that generated a lot of compiler generated temporary floating point variables that filled up a .udata section.
We are still trying to figure out what went wrong, since it looks like there should have been enough room if the addressing went to another section, but it didn't (couldn't?). Check out the mplink manual from Microchip. (Assembler/Linker/Librarian User's Guide). http://ww1.microchip.com/downloads/e...Doc/33014J.pdf |
|
#5
|
||||
|
||||
|
Re: complie error can not fit the section. Section xxxx
Turns out my error was nothing related to the issues.
I had programmed a VEX and then went back to FRC. In the process I had not realized it set the processor back to the 2004 RC. Once that changed the problems went away. |
|
#6
|
|||
|
|||
|
Re: complie error can not fit the section. Section xxxx
The issue was the linker ran out program rom space as the message indicated. The reason was not large amounts of code or big rom tables but because the processor selected in the project file (the 2004/2005 PIC was the PIC18F8520 w/32kb of program space) has very little program space as compared to the current PIC18F8722 which has 128kb program space -- a lot more.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MATH_DATA can not fit the section | neutrino15 | Programming | 7 | 03-02-2008 21:04 |
| Program error - "can not fit the section" | miketwalker | Programming | 9 | 20-02-2005 01:21 |
| Error - section 'UTIL_LIB' can not fit the section. Section 'UTIL_LIB' length=0x00000 | BookerT | Programming | 13 | 27-01-2005 09:49 |
| Error - section 'UTIL_LIB' can not fit the section. Section 'UTIL_LIB' length=0x00000 | BookerT | Programming | 0 | 25-01-2005 19:17 |
| Linking Errors: "section '????' can not fit the section. ..." | Astronouth7303 | Programming | 3 | 16-01-2005 21:36 |