<?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 Re: Bootloader protection in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bootloader-protection/m-p/241314#M5958</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Martin, &lt;/P&gt;&lt;P&gt;was this workaround useful to your project? Share with us! :smileywink:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Monica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2013 23:43:01 GMT</pubDate>
    <dc:creator>Monica</dc:creator>
    <dc:date>2013-05-21T23:43:01Z</dc:date>
    <item>
      <title>Bootloader protection</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bootloader-protection/m-p/241312#M5956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm writing custom USB generic HID bootloader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to protect bootloader from accidental execution due to malfunctional main application (jump from main application to bootloader due to eg. stack overflow and accidental erase/overwrite of application's code)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 05:23:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bootloader-protection/m-p/241312#M5956</guid>
      <dc:creator>martindusek</dc:creator>
      <dc:date>2013-05-16T05:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Bootloader protection</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bootloader-protection/m-p/241313#M5957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;I have solved a similar problem in a safety critical application where I needed to ensure that a function gets called only from a specific place, and not from a run-away program counter. That 'critical' routine was responsible to fire an airbag, so it needed to make sure it only gets called from the crash detection routine.&lt;/P&gt;&lt;P&gt;The basic idea is to ensure that that function (in your case the bootloader) gets only called from a specific location.&lt;/P&gt;&lt;P&gt;What I did is checking the stack content from the 'critical' routine to ensur that it only gets called from a well known place (PC/program counter). Additionally before calling that firing routine, the caller algorithm was writing a specific pattern in multiple places, in a very specific order.&lt;/P&gt;&lt;P&gt;I hope this gives you an idea.&lt;/P&gt;&lt;P&gt;You could do something like this in your bootloader to ensure that you only get called from the reset/startup vector, with some intermediate checking of your execution path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 05:41:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bootloader-protection/m-p/241313#M5957</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2013-05-16T05:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Bootloader protection</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bootloader-protection/m-p/241314#M5958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Martin, &lt;/P&gt;&lt;P&gt;was this workaround useful to your project? Share with us! :smileywink:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Monica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 23:43:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bootloader-protection/m-p/241314#M5958</guid>
      <dc:creator>Monica</dc:creator>
      <dc:date>2013-05-21T23:43:01Z</dc:date>
    </item>
  </channel>
</rss>

