How to optimize the code size in KDS ?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to optimize the code size in KDS ?

Jump to solution
430 Views
Contributor IV

My Project size is

text   data    bss    dec    hexfilename
   6392     32    836   7260   1c5cBootloader.elf

How to reduce the code size ?

Am using MKE02Z64VLD2 microcontroller

KDS 2.0

I found this link while searching. But this is explained for codewarrior. For KDS I could not adopt the same method.

https://mcuoneclipse.com/2012/11/11/optimizing-the-kinetis-gcc-startup/

Labels (1)
1 Solution
39 Views
NXP Employee
NXP Employee

The simplest thing is to turn on compiler optimizations, have you done this already?

Erich

View solution in original post

3 Replies
40 Views
NXP Employee
NXP Employee

The simplest thing is to turn on compiler optimizations, have you done this already?

Erich

View solution in original post

39 Views
Contributor IV

Hey Erich, In Project -> Properties -> C/C++ build -> Settings -> Tool Settings -> Optimization. In Optimization level, I selected Optimize Size (-Os) and Built the code. From size of 6392, it has come down to 3780. But in the above quoted article of yours, you have changed the Linker flags in the settings and still reduced the size, how is it possible in KDS , as there is no such linker flags option in my IDE.

0 Kudos
39 Views
Senior Contributor I

Hi,

     Can you tell me how to turn on compiler optimizations in CodeWarrior?

0 Kudos