image size

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

image size

跳至解决方案
2,354 次查看
mehdikarimibiuk
Contributor V

I have a bareboard project for my MK10DN512ZVLL10 MCU with image afx file size of 124KB. This seems to be a large file! It seems that I am using a quarter of my flash space! Is that true?

I have started this project and as I am adding components and developing my code, this project might grow up to 400KB mybe! But this does not make sense if my image is going to take up my whole flash memory!

This is even without having the MQX!

标记 (2)
1 解答
2,140 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

the elf file includes debug information, so this file is big. the real flash image(for example, s19 file) is much smaller than elf file. see this link for how to create s19 file. http://mcuoneclipse.com/2012/09/13/s-record-generation-with-gcc-for-armkinetis/ can this help?

在原帖中查看解决方案

0 项奖励
回复
7 回复数
2,141 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

the elf file includes debug information, so this file is big. the real flash image(for example, s19 file) is much smaller than elf file. see this link for how to create s19 file. http://mcuoneclipse.com/2012/09/13/s-record-generation-with-gcc-for-armkinetis/ can this help?

0 项奖励
回复
2,140 次查看
mehdikarimibiuk
Contributor V

Thanks it is 49KB now!

So how can I know where and at what address this image is exactly loaded?

Is this something that I can set or see at least?

I am going to have two images, one factory image and the other upgraded image, therefore I need to know the detail about at what location exactly these images are going to be saved.

0 项奖励
回复
2,140 次查看
BlackNight
NXP Employee
NXP Employee

Have a look at the format/content of the S19 file (SREC (file format) - Wikipedia, the free encyclopedia): it contains the address in clear text.

2,140 次查看
mehdikarimibiuk
Contributor V

n/a

0 项奖励
回复
2,140 次查看
mjbcswitzerland
Specialist V

The SREC format contains the binary code represented in ASCII HEX (2 bytes for each byte) plus a header (about 10 extra bytes per line) and a checksum (another 2 bytes per line) so it will generally by about 2.4x larger than the binary content that it represents (ignoring holes between areas of data).

Any Flash sectors that are not occupied by program code can be used to store other things. When the chip is fully erased the content of all sectors is 0xff, oxff,...

Regards

Mark

2,140 次查看
mjbcswitzerland
Specialist V

Hi

afx is an elf file containing program code and debug information. It is several times larger than the actual binary code. Create a binary output to see the actual code size you have.

Regards

Mark

0 项奖励
回复
2,140 次查看
mehdikarimibiuk
Contributor V

My elf and afx files are of same size! but when I generate srec, it is more than fifty percent overhead savings!

0 项奖励
回复