How to build a Library using codewarrior for coldfire?

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

How to build a Library using codewarrior for coldfire?

跳至解决方案
1,811 次查看
bluehacker
Contributor III

I developed a algorithm library for coldfire, and hope build as a library (NOT application). I use codewarrior for coldfire V7.2

and select MCU as MCF52259.

 I create a default project using wizard, and then remove all project files (such as main.c, mcf52259 link file etc).,then add my c source code in the project, then choose "coldfire Target" in the project setting panel. then build.

finally ,I get a "*.a" binrary file. but one trouble is this *.a file is very big!.

for example, a simple c source code file, only contain about 200 lines c code., and all source code is simple operation ,no use any external library ,such as "printf, strlen....“ functions are also never called.

BUT the final binary library file has about 1.6MB size, it is very big.  I disassemble the *.a file, find many items related to EWL C library, it seems link the EWL C library into my binary library.

 

my question is :what is the matter? how to reduce the binary file size?

 

thanks for your help !

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
701 次查看
stanish
NXP Employee
NXP Employee

Hi bluehacker,

 

I'd suggest you to try to disable "Control libraries" option in the "Librarian" settings panel. (see attached screenshot).

Then the final library doesn't include EWL C library functions.

 

Stanish

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
702 次查看
stanish
NXP Employee
NXP Employee

Hi bluehacker,

 

I'd suggest you to try to disable "Control libraries" option in the "Librarian" settings panel. (see attached screenshot).

Then the final library doesn't include EWL C library functions.

 

Stanish

 

0 项奖励
回复