AnsweredAssumed Answered

Extra byte in bin file

Question asked by Jean-Francois Lemire on Nov 21, 2014
Latest reply on Nov 24, 2014 by Jean-Francois Lemire

Hi everyone,


I'm using IAR and K20D72 to develop a product. We actually have a concern when we compile the code. I configure the linker file to reserve 2 differents sections in the flash 0x to 0xc000 for my boot and 0x3C000 to 0x40000 for serial number and some other informations. The linker is configured correctly and everything works fine. We have a CRC validation for the user code.


Here is me problem: I declared an array (const UINT32) to test my bootloader with a user code with the max size. I observed that in the bin file, there is always an extra byte added in the next sector.  There is a lot of 0 until the end of the sector but this extra byte is in the next sector. The problem is that I lost a complet sector for this extra 0.


Why there is an extra 0? Can I configure the linker to remove it?