Processor Expert generate too much code as expected

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

Processor Expert generate too much code as expected

跳至解决方案
545 次查看
gschelotto
Contributor V

Hello,

I'm using KDS v3.2 with KDSK 1.3 and PE. After creating a new project for FRDM-KL03Z I've initialized some PE components as spiCom1, gpio1... as shown in the next screenshot. Then I've just added a while(1) in main.c and the compilation result ends up in almost 14KB for the .text section that means a half of the total flash memory (32KB of the MKL03Z32VFK4).

166047_166047.pngUntitled.png

Can anybody help me to reduce the generated/compiled code? I find it too much for a few components initialization.

Here I attach the whole project for better understanding.

regards,

gaston

Original Attachment has been moved to: testing.zip

标签 (1)
0 项奖励
1 解答
387 次查看
therealfreegeek
Contributor IV

The problem is less to do with PE and more to do with the KSDK components which are large, this is compounded by  KSDK's usage of ‘assert()’ in the driver code which uses the PRINTF function call which is huge.

Have a look at this https://mcuoneclipse.com/2016/03/09/dealing-with-code-size-in-kinetis-sdk-v2-x-projects/ it refers to KSDK 2 but I guess it is also relevant for 1.3.

在原帖中查看解决方案

0 项奖励
1 回复
388 次查看
therealfreegeek
Contributor IV

The problem is less to do with PE and more to do with the KSDK components which are large, this is compounded by  KSDK's usage of ‘assert()’ in the driver code which uses the PRINTF function call which is huge.

Have a look at this https://mcuoneclipse.com/2016/03/09/dealing-with-code-size-in-kinetis-sdk-v2-x-projects/ it refers to KSDK 2 but I guess it is also relevant for 1.3.

0 项奖励