debrajdeb wrote on Tuesday, March 04, 2008:
Hi,
I was trying out the port for 18F452 (MPLAB).
The code building works fine and the entire code fits in the Flash memory. I get the following info in "map" file: -
-------------------------------------------------------------------------------------------
Program Memory Usage
Start End
--------- ---------
0x000000 0x000005
0x000008 0x000025
0x00003a 0x0043be
17321 out of 33048 program addresses used, program memory utilization is 52%
-------------------------------------------------------------------------------------------
But my final application is on 18F4520 (successor to 18F452). Hence I changed the device and linker script to 18F4520. But then, I get the following linker error: -
-------------------------------------------------------------------------------------------
MPLINK 4.15, Linker
Copyright (c) 2007 Microchip Technology Inc.
Error - section ‘.udata_heap_1.o’ can not fit the section. Section ‘.udata_heap_1.o’ length=0x00000404
Errors : 1
-------------------------------------------------------------------------------------------
I think, the error means that the code for "heap_1.c" is too big to be fitted in the memory. Why is this error? I know that the memory of 18F4520 >= memory of 18F452.
I also noticed that even if I revert the device and linker script back to 18F452 (same as original), the same linker error appears. Why is that?
Best regards.