Modifying the lcf link file will cause the BIN file size to change

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modifying the lcf link file will cause the BIN file size to change

1,465 Views
hanghang
Contributor I

mpc5554CPU, the same application, modify the lcf link file, adjust the size of the SRAM memory partition, the following phenomenon occurred:

1. Changing the start address of pseudo_rom area will affect the BIN file size. The smaller the start address is, the larger the BIN file will be.

2. Change the internal_ram area start address, will affect the BIN file size, the smaller the start address, the smaller the BIN file.

3. Changing the start address and length of init, heap and stack has no effect on the BIN file size.

Why is it possible to change the BIN file size by modifying the lcf file?

0 Kudos
Reply
3 Replies

1,450 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @hanghang 

the binary file is continuous image of data.It does not cover only useful data but also gaps between blocks of data. If you change the linker file as you described, it makes sense that the size of binary file is also changed. This is expected behavior. If you use s-record file instead of bin file, the size should be still about the same in this case.

Regards,

Lukas

0 Kudos
Reply

1,443 Views
hanghang
Contributor I

Thanks, in that case, change the start address of init, heap and stack, why does the BIN file size not change? Simply changing the start address of the internal_ram and internal_rom will affect the BIN file size.

0 Kudos
Reply

1,434 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

lukaszadrapa_0-1676447597943.png

 

You obviously use debug RAM version. In this case, pseudo_rom, init and exception_handlers belong to "flash" (because it's debug RAM version, it's RAM too). Other segments are in RAM. But bin file always cover only flash. So changing of init, heap and stack does not affect "flash" image.

Regards,

Lukas

0 Kudos
Reply