<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic --SREC-LEN 0X10 not aligning to 16 bytes in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SREC-LEN-0X10-not-aligning-to-16-bytes/m-p/765188#M46576</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As many others before me, I am trying to make a custom bootloader (reinventing the wheel, I guess).&amp;nbsp; 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.&amp;nbsp; I need to make my boot loader more robust to handle these situation, but then I found an "easy" answer.&amp;nbsp; 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.&amp;nbsp; It seems to do something (after experimenting with different lengths), but not fully work correctly.&amp;nbsp; I still have lines in my srec file that are shorter than 16 bytes, like some of the lines below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S214080CA00000FF1FF8B500BFF8BC08BC9E4670479A&lt;BR /&gt;S210080CB0F8B500BFF8BC08BC9E467047AC&lt;BR /&gt;S20C080CBCA8F7FF7F0100000005&lt;BR /&gt;S208080CC435040800DE&lt;BR /&gt;S208080CC811040800FE&lt;BR /&gt;S214080CCC000000000000000000000000000000000B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I could make these all be 16 byte lengths, my bootloader would work fine.&amp;nbsp; Is there anything I am doing wrong that would&amp;nbsp;make this feature work correctly?&amp;nbsp; I have attached a snip of my output.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2018 15:28:08 GMT</pubDate>
    <dc:creator>barrypurtymun</dc:creator>
    <dc:date>2018-04-24T15:28:08Z</dc:date>
    <item>
      <title>--SREC-LEN 0X10 not aligning to 16 bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SREC-LEN-0X10-not-aligning-to-16-bytes/m-p/765188#M46576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As many others before me, I am trying to make a custom bootloader (reinventing the wheel, I guess).&amp;nbsp; 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.&amp;nbsp; I need to make my boot loader more robust to handle these situation, but then I found an "easy" answer.&amp;nbsp; 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.&amp;nbsp; It seems to do something (after experimenting with different lengths), but not fully work correctly.&amp;nbsp; I still have lines in my srec file that are shorter than 16 bytes, like some of the lines below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S214080CA00000FF1FF8B500BFF8BC08BC9E4670479A&lt;BR /&gt;S210080CB0F8B500BFF8BC08BC9E467047AC&lt;BR /&gt;S20C080CBCA8F7FF7F0100000005&lt;BR /&gt;S208080CC435040800DE&lt;BR /&gt;S208080CC811040800FE&lt;BR /&gt;S214080CCC000000000000000000000000000000000B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I could make these all be 16 byte lengths, my bootloader would work fine.&amp;nbsp; Is there anything I am doing wrong that would&amp;nbsp;make this feature work correctly?&amp;nbsp; I have attached a snip of my output.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 15:28:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SREC-LEN-0X10-not-aligning-to-16-bytes/m-p/765188#M46576</guid>
      <dc:creator>barrypurtymun</dc:creator>
      <dc:date>2018-04-24T15:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: --SREC-LEN 0X10 not aligning to 16 bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SREC-LEN-0X10-not-aligning-to-16-bytes/m-p/765189#M46577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Barry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not a good idea to require the SREC to be aligned. It is better if the Flash driver has a long word/phrase buffer to temporarily store any dangling bytes in until they can be written; this will avoid potential problems in the future and give you a correctly engineered solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can copy this from the uTasker flash driver [see /Hardware/Kinetis/kinetis_FLASH.h] and see how its SREC/iHEX boot loader does it [\Applications\uTaskerSerialBoot\serial_loader.c] which supports this via USB-MSD, USB-CDC or UART.&lt;EM&gt;Git link below.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;uTasker developer and supporter (+5'000 hours experience on +60 Kinetis derivatives in +80 product developments)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN&gt;Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Free Open Source solution: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FuTasker%2FuTasker-Kinetis" rel="nofollow" target="_blank"&gt;https://github.com/uTasker/uTasker-Kinetis&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Working project in 15 minutes video: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fyoutu.be%2FK8ScSgpgQ6M" rel="nofollow" target="_blank"&gt;https://youtu.be/K8ScSgpgQ6M&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Serial loader user's guide: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerSerialLoader.pdf" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 00:03:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SREC-LEN-0X10-not-aligning-to-16-bytes/m-p/765189#M46577</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-04-25T00:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: --SREC-LEN 0X10 not aligning to 16 bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SREC-LEN-0X10-not-aligning-to-16-bytes/m-p/765190#M46578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;in addition to what Marc said:&lt;/P&gt;&lt;P&gt;--SREC-LEN affects the number of bytes per line, not the alignment.&lt;/P&gt;&lt;P&gt;For alignment see&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuoneclipse.com/2015/09/23/aligning-s19-records-to-64-bit-boundaries/" title="https://mcuoneclipse.com/2015/09/23/aligning-s19-records-to-64-bit-boundaries/"&gt;Aligning S19 Records to 64-bit Boundaries | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 04:27:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SREC-LEN-0X10-not-aligning-to-16-bytes/m-p/765190#M46578</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2018-04-25T04:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: --SREC-LEN 0X10 not aligning to 16 bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SREC-LEN-0X10-not-aligning-to-16-bytes/m-p/765191#M46579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree with your advice.  You will have to forgive my inexperience.  I notice many great applications and drivers are available from utasker.  Can you point me to some instructions on how to implement these with KDS.  I have always just started projects from scratch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Barry Purtymun&lt;/P&gt;&lt;P&gt;Link Engineering Company&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;623-505-9245 Direct&lt;/P&gt;&lt;P&gt;480-862-5015 Mobile&lt;/P&gt;&lt;P&gt;623-505-9250 Main&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.linkeng.com&amp;lt;http://www.linkeng.com/&amp;gt;" target="test_blank"&gt;http://www.linkeng.com&amp;lt;http://www.linkeng.com/&amp;gt;&lt;/A&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 14:20:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SREC-LEN-0X10-not-aligning-to-16-bytes/m-p/765191#M46579</guid>
      <dc:creator>barrypurtymun</dc:creator>
      <dc:date>2018-04-25T14:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: --SREC-LEN 0X10 not aligning to 16 bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SREC-LEN-0X10-not-aligning-to-16-bytes/m-p/765192#M46580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is a video at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fyoutu.be%2FK8ScSgpgQ6M" rel="nofollow" target="_blank"&gt;https://youtu.be/K8ScSgpgQ6M&lt;/A&gt;&lt;SPAN&gt; showing how to download the project and import it to KDS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Additional details relevant for KDS are at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2Fcompilers.html%23KDS" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/compilers.html#KDS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once imported you can select the processor that you work with and configure a serial loader of your choice. The SREC UART one has been used for many years (and since 2011 in many Kinetis devices) so you will immediately have a complete and industrially proven solution that will need no further maintenance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;uTasker developer and supporter (+5'000 hours experience on +60 Kinetis derivatives in +80 product developments)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN&gt;Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 17:33:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SREC-LEN-0X10-not-aligning-to-16-bytes/m-p/765192#M46580</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-04-25T17:33:31Z</dc:date>
    </item>
  </channel>
</rss>

