<?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>8-bit MicrocontrollersのトピックHelp Implementing a Bootloader</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Implementing-a-Bootloader/m-p/142849#M6424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently attempting to implement a bootloader application residing on an MC9S08GQ8 based upon the information located in AN2295. Ultimately, the bootloader will perform in-system (re)programing via the SCI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm envisaging the bootloader residing in an area of protected Flash, with the interrupt vectors relocated to an area of unprotected Flash. The PE has taken care of that for me but i'm slightly unsure to whether or not interrupts can be executed by the bootloader itself. I've placed a 16-bit timer interrupt routine in the bootloader code but it never actually gets executed - that would suggest the former...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some threads i've read state that a bootloader cannot execute interrupts whilst others i've read suggest that they can with some "work". Can some one please clarify this ? If they can, are there any C code examples around that demonstrate this ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gary&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jan 2007 20:11:28 GMT</pubDate>
    <dc:creator>airbusboy</dc:creator>
    <dc:date>2007-01-15T20:11:28Z</dc:date>
    <item>
      <title>Help Implementing a Bootloader</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Implementing-a-Bootloader/m-p/142849#M6424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently attempting to implement a bootloader application residing on an MC9S08GQ8 based upon the information located in AN2295. Ultimately, the bootloader will perform in-system (re)programing via the SCI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm envisaging the bootloader residing in an area of protected Flash, with the interrupt vectors relocated to an area of unprotected Flash. The PE has taken care of that for me but i'm slightly unsure to whether or not interrupts can be executed by the bootloader itself. I've placed a 16-bit timer interrupt routine in the bootloader code but it never actually gets executed - that would suggest the former...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some threads i've read state that a bootloader cannot execute interrupts whilst others i've read suggest that they can with some "work". Can some one please clarify this ? If they can, are there any C code examples around that demonstrate this ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gary&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2007 20:11:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Implementing-a-Bootloader/m-p/142849#M6424</guid>
      <dc:creator>airbusboy</dc:creator>
      <dc:date>2007-01-15T20:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help Implementing a Bootloader</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Implementing-a-Bootloader/m-p/142850#M6425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;When the flash is protected the vectors (except reset) actually move to the highest addresses in the&amp;nbsp; unprotected flash.&amp;nbsp;&amp;nbsp; Since&amp;nbsp; the processor cannot change the protected region on the fly. this does indeed make it difficult to use interrupts while in boot programming mode.&amp;nbsp; I wrote non-interrupt code that ran the SCI enough for boot programming to work.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I guess it would be possible to temporarily modify the&amp;nbsp;vectors at the top of the unprotected section to point to routines in the protected section (boot&amp;nbsp;code) and use&amp;nbsp;those interrupts.&amp;nbsp;&amp;nbsp;You would&amp;nbsp;then have to, as the last thing you do, program the top of the unprotected section with the new vectors.&amp;nbsp; Although&lt;/DIV&gt;&lt;DIV&gt;this is possible, I believe you increase your odds at "paperweighting" your product if something goes wrong.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2007 05:59:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Implementing-a-Bootloader/m-p/142850#M6425</guid>
      <dc:creator>Sampson</dc:creator>
      <dc:date>2007-01-16T05:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help Implementing a Bootloader</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Implementing-a-Bootloader/m-p/142851#M6426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Just thinking out loud -&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;What if the SCI vector, where ever it may reside, actually pointed to a fixed location in RAM, that contained a JMP instruction to the required ISR.&amp;nbsp; The bootloader could&amp;nbsp;initialize the RAM&amp;nbsp;for its own purpose, however&amp;nbsp;when the user program is run,&amp;nbsp;one of the first tasks would be to initialize the RAM to jump to the correct user ISR.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;No doubt others will reveal the flaws in this reasoning.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2007 09:32:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Implementing-a-Bootloader/m-p/142851#M6426</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-01-16T09:32:39Z</dc:date>
    </item>
  </channel>
</rss>

