How to increase the default mem limit of Codewarrior 10.6?

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

How to increase the default mem limit of Codewarrior 10.6?

870 Views
Futures666
Contributor I

Dear Experts,

     I have a big code to compile by using Codewarrior 10.6. The default optimization mem limit  is 150 M . Does anyone kown How to increase the default mem limit ?

     Thanks for your Reply.

0 Kudos
4 Replies

867 Views
Futures666
Contributor I

supplement:

There is a Error message in the command window while compiling:

>Optimizer computes it would need more than 161 M of memory to compute register

>def-use chains. Key Optimizations Failed   

>Limit currently set to 150 M

>Increase limit using ' #pragma opt_usedef_mem_limit 161'

If I modify the code (deleting some tables) the warning disappear and the micro controller works. I tried to search for help contents, and then found the description for it, but there is no entry for increase it .

0 Kudos

855 Views
stanish
NXP Employee
NXP Employee

You can enter the pragma into Compiler -> Other flags as:

-pragma "ppc_opt_defuse_mem_limit 161"

 

stanish_0-1672751256904.png

hope it helps.

Stan

0 Kudos

846 Views
Futures666
Contributor I
Thank you very much for your answer. According to your method, my program has been compiled and passed. But I encountered a new problem. The newly generated executable file is much smaller than the normal executable file. The newly generated executable file cannot run normally after being brushed on the controller. Is there anything else we need to set?
Look forward to your reply.
0 Kudos

769 Views
stanish
NXP Employee
NXP Employee

Hello,

Could you identify the place during a debugging session where the the code does not work fine? This might help to identify specific function that causes the problem.

Could you try to compare generated linker map files (with and without pragma)?

Can you see the size differnence related to a specific function?

Thanks,

Stan

0 Kudos