How to reduce the size of the code even after enabling the Optimization option in KDS 2.0 ?

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

How to reduce the size of the code even after enabling the Optimization option in KDS 2.0 ?

399 Views
balaram
Contributor I

I am working on KE-02Z controller. I want to reduce my code size well within 4096 bytes. I tried enabling the optimization option in KDS. Like this149102_149102.jpgBalaSNXPDoubt1.jpg

After enabling the optimization level settings. My code got reduced to  8112 bytes as shown in the below figure.

149103_149103.jpgBala'sNXPDoubt.jpg

I want to reduce it still more. I want to reduce it to a size under 4096 bytes. Can someone help ?

Labels (1)
0 Kudos
1 Reply

259 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Bala Ram

You could check the gcc.pdf document, it has a section “options that control optimization” that describe optimization option that you could apply to your project. In KDS 2.0 you can find this document in the path ${PATH_KDS2.0_INSTALLED}\doc\pdf\gcc\gcc

I recommend you to change to KDS 3.2, it’s the last version that comes with a new gcc compiler, however, I see that you’re using “Processor expert”, and this tool comes with overalls that increase your size code and it’ll be a little difficult to reduce your size code from 8112 to 4096.

Best Regards

Jorge Alcala

0 Kudos