AnsweredAssumed Answered

--SREC-LEN 0X10 not aligning to 16 bytes

Question asked by Barry Purtymun on Apr 24, 2018
Latest reply on Apr 25, 2018 by Mark Butcher

As many others before me, I am trying to make a custom bootloader (reinventing the wheel, I guess).  I have found the same problem as others with the K64 (I am using the K60). My srec lines are not aligned to 16 bytes, and when I write to flash, this causes a hard fault.  I need to make my boot loader more robust to handle these situation, but then I found an "easy" answer.  I am supposed to be able to put --srec-leg 0x10 in my project flash file settings and have the srec lines aligned to 8 byte lengths.  It seems to do something (after experimenting with different lengths), but not fully work correctly.  I still have lines in my srec file that are shorter than 16 bytes, like some of the lines below.




If I could make these all be 16 byte lengths, my bootloader would work fine.  Is there anything I am doing wrong that would make this feature work correctly?  I have attached a snip of my output.