MPLAB linker. Link step failed.. can not fit section

Mar 01, 2009 3 Replies
[quote]Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4550 /i"C:\MCC18\h" "enumeration_na_ni.c" -fo="enumeration_na_ni.o" -D__DEBUG -mL

MPLAB C18 v3.22 (demo) Copyright 2000-2008 Microchip Technology Inc. Days remaining until demo becomes feature limited: 10



WARNING: The procedural abstraction optimization will not be supported when the demo becomes feature limited.


Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4550 /i"C:\MCC18\h" "SPI.c"



-fo="SPI.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-



MPLAB C18 v3.22 (demo) Copyright 2000-2008 Microchip Technology Inc. Days remaining until demo becomes feature limited: 10 Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4550 /i"C:\MCC18\h" "error.c"



-fo="error.o" -D__DEBUG -mL



MPLAB C18 v3.22 (demo) Copyright 2000-2008 Microchip Technology Inc. Days remaining until demo becomes feature limited: 10



WARNING: The procedural abstraction optimization will not be supported when the demo becomes feature limited.


Executing: "C:\MCC18\bin\mplink.exe" /l"C:\MCC18\lib" "..\..\..\..\..\..\MCC18\lkr\18f4550.lkr" "enumeration_na_ni.o" "SPI.o" "error.o" /u_CRUNTIME /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"enumeration_na_ni.cof" /M"enumeration_na_ni.map" /W



MPLINK 4.22, Linker Copyright (c) 2008 Microchip Technology Inc. Error - section '.udata_enumeration_na_ni.o' can not fit the section. Section '.udata_enumeration_na_ni.o' length=0x000007ea



Errors : 1



Link step failed.



---------------------------------------------------------------------- Debug build of project `C:\Documents and Settings\user\Desktop\usb new files\_my_works\feb_11dawn_enumeration\enumeration_na_ni.mcp' failed.



Preprocessor symbol `__DEBUG' is defined. Sun Mar 01 23:26:58 2009



---------------------------------------------------------------------- BUILD FAILED [/quote]


This is the error message I got while compiling my code.. It failed on the linker, I assume my code is working properly now but something is wrong with size I guess.



If you need to take a look at the code, I will be happy to email it for you..



Please help, I'm very new to MPLAB.. Thanks


Looks like you ran out of RAM. The part has only 2K (0x800) and some of that is reserved for stack.

Old place to post a Question. Microchips has a sub fourm for it USB chips.

You ran out of something. Did it ever compiler are you using the Microchip USB Libray? Ar you using the linker file from one of their projects? The USB buffer RAM is a special case and may require special handling.

Note PIC18 compilers have a compiled stack since the do not have any stack data opcodes.

urefowei schrieb:

The generated uninitialized data section with length of 2026 bytes does not fit into the device, which only has a total of 2048 bytes. In addition to this the PICs are limited to 4K of RAM minus one page (128 byte) architecturally, so no 8 bit PIC device will ever have more than

3968 bytes of RAM.

You have got exactly two options: either reduce RAM usage dramatically or use another architecture. Didn't I tell you this months ago?

Mit freundlichen Grüßen Dipl.-Ing. Frank-Christian Krügel

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required