Program flash: Segment overflow: .p_Code for MC56F8345 with CW 7.3

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Program flash: Segment overflow: .p_Code for MC56F8345 with CW 7.3

3,307 Views
Francois_Gentec
Contributor I
Hi,
 
I am a newbie trying to compile a project on a MC56F8345. 
I'm using CodeWarrior version v.7.3 with Processor Expert.
I get this error when linking:
 
"Link error: Segment overflow: .p_Code
 
I know a have only 128Kb on program flash
But on my projet I saw on my project view (.mcp)
- User Modules is using 77K
- Support is using 47K
 
Is this normal that those 4 libraries using 47K of the program flash
- MSL C 56800E.lib                   (44186)
- MSL C 56800E lmm.lib           (n/a)
- Runtime 56800E.lib                (4526)
- Runtime 56800E lmm.lib        (n/a)
 
Did someone have a hint to optimize program flash memory?
I know my program is big, but i don't realize CodeWarrior will take so much of the 8345 .
 
Thank you.


J2MEJediMaster added MCU type and CW version


Message Edited by J2MEJediMaster on 2007-11-28 04:10 PM
Labels (1)
Tags (1)
0 Kudos
2 Replies

504 Views
J2MEJediMaster
Specialist I
Have you tried any of the compiler/linker optimizations? The linker should strip out unused functions from the libraries.

---Tom
0 Kudos

504 Views
Francois_Gentec
Contributor I
Thank's
 
Its working!
I change optimize for smaller code size with Level 1, and now i reduce my code to less than 128Kb.
It was so simple. I change all my bean from speed to code size optimization.
Also I remove some debug instruction with this compiler directive: #define NDEBUG
0 Kudos