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?
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
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.
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