How to optimize the code size in KDS ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to optimize the code size in KDS ?

跳至解决方案
1,918 次查看
ganeshramachand
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/

标签 (1)
1 解答
1,527 次查看
BlackNight
NXP Employee
NXP Employee

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

Erich

在原帖中查看解决方案

3 回复数
1,528 次查看
BlackNight
NXP Employee
NXP Employee

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

Erich

1,527 次查看
ganeshramachand
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 项奖励
回复
1,527 次查看
vigneshbalaji
Senior Contributor I

Hi,

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

0 项奖励
回复