<?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>Kinetis Microcontrollers中的主题 Re: How to configure the vector table properly ?</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-configure-the-vector-table-properly/m-p/496513#M30879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Alice, in Cpu.c, there is this piece of code &lt;span class="lia-inline-image-display-wrapper" image-alt="doubttozhang1.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56480i9933AC3AF69883A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="doubttozhang1.jpg" alt="doubttozhang1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;In your code you have used '&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;SCB-&amp;gt;VTOR'&lt;/SPAN&gt;, whereas I have used '&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;' . Should I change the word '&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;'&amp;nbsp; to '&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;SCB-&amp;gt;VTOR&lt;/SPAN&gt;' in all instances of my code ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote" style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;void BL_CheckForUserApp(void) {&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; uint32_t &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;; /* assuming 32bit function pointers */&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt; = ((uint32_t*)APP_FLASH_VECTOR_START)[1]; /* this is the reset vector */&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; if (&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;!=-1 &amp;amp;&amp;amp; !BL_CheckBootloaderMode()) { /* Check for the presence of a valid application vector. -1 (or) 0xfffffff would mean flash erased */&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((void(*)(void))&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;)(); /* Jump to the application startup code */&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive-quote" style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;#if 0&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *handled = TRUE;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt; = ((uint32_t*)BL_FLASH_VECTOR_TABLE)[1];&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((void(*)(void))&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;)(); /* Jump to startup code */&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;#else&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; KIN1_SoftwareReset();&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;#endif&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Or is there any other way to make SCB_VTOR point to 0x1000&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 May 2016 06:38:06 GMT</pubDate>
    <dc:creator>ganeshramachand</dc:creator>
    <dc:date>2016-05-04T06:38:06Z</dc:date>
    <item>
      <title>How to configure the vector table properly ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-configure-the-vector-table-properly/m-p/496511#M30877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am designing a boot loader for MKE02z64VLD2 microcontroller in Kinetis Design Studio. I have configured the Flash Memory area as per the AN 4775 documentation (IIC Boot Loader Design on the Kinetis E series). In this document, in page number 9, I found this.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;IMG alt="pastedImage_0.png" src="https://community.nxp.com/t5/image/serverpage/image-id/56658iA7A6C11D6DE0DF1C/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_0.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So I implemented the same for my boot loader. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="Text and Interrupts.jpg"&gt;&lt;IMG alt="Text and Interrupts.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/56750iE39D115E2FADCDC2/image-size/large?v=v2&amp;amp;px=999" title="Text and Interrupts.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is how my memory map looks like.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="Bootloader Memory Map.jpg"&gt;&lt;IMG alt="Bootloader Memory Map.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/56679i7ECF2AB2F862A3F9/image-size/large?v=v2&amp;amp;px=999" title="Bootloader Memory Map.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But when I flashed this into my board using J link debugger, This message popped up. &lt;SPAN style="color: #333333; font-family: Lato, sans-serif; font-size: 16px; background-color: #cecece;"&gt;Semihosting process monitor job failed, Java.lang.IllegalThreadStateException .&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;After this failed flash job, I tried to debug a simple LED blink code, but it didn't get executed. It threw me these errors.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="Hwtest1.jpg"&gt;&lt;IMG alt="Hwtest1.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/56853i9362FD8E2F2A6B6A/image-size/large?v=v2&amp;amp;px=999" title="Hwtest1.jpg" /&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;When I inquired about my issues to experts in this field, they said I have not configure Vector Table properly, they said &lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;Your vector table for the bootloader (at 0x00000000) is different from the application vector table. You need to set the VTOR to point to the application vector table.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="info" __jive_macro_name="alert" alert="info" class="jive_text_macro jive_macro_alert"&gt;&lt;SPAN style="color: #333333; font-family: Lato, sans-serif; font-size: 16px; background-color: #cecece;"&gt;Since I am an yet to be graduated Electronics Engineering student with NULL experience in Kinetis Controllers, Kinetis Design Studio or the Boot loader itself, I don't know how to configure VTOR properly. Can Someone help me configuring the Vector Table properly ? &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:27:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-configure-the-vector-table-properly/m-p/496511#M30877</guid>
      <dc:creator>ganeshramachand</dc:creator>
      <dc:date>2020-11-02T13:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure the vector table properly ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-configure-the-vector-table-properly/m-p/496512#M30878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ganesh,&lt;/P&gt;&lt;P&gt;I think maybe you have some mi@sunderstand about the bootloader code and the Application .&lt;/P&gt;&lt;P&gt;On the bootloder project, you needn't change the linker file and vector table , you need change the&lt;/P&gt;&lt;P&gt;linker file of APP project . For example , if the APP run from 0x1000, you need configure the linker file&lt;/P&gt;&lt;P&gt;m_interrupts area from 0x1000.&lt;/P&gt;&lt;P&gt;An important place is the jump code , when want to jump to the APP, please use the SCB_VTOR&lt;/P&gt;&lt;P&gt;point to the 0x1000.&lt;/P&gt;&lt;P&gt;There is a bootloader demo about KE02z64vll4, you can refer to the jump code :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56611i6DD25843CEDC21A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2016 11:39:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-configure-the-vector-table-properly/m-p/496512#M30878</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-05-03T11:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure the vector table properly ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-configure-the-vector-table-properly/m-p/496513#M30879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Alice, in Cpu.c, there is this piece of code &lt;span class="lia-inline-image-display-wrapper" image-alt="doubttozhang1.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56480i9933AC3AF69883A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="doubttozhang1.jpg" alt="doubttozhang1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;In your code you have used '&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;SCB-&amp;gt;VTOR'&lt;/SPAN&gt;, whereas I have used '&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;' . Should I change the word '&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;'&amp;nbsp; to '&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;SCB-&amp;gt;VTOR&lt;/SPAN&gt;' in all instances of my code ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote" style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;void BL_CheckForUserApp(void) {&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; uint32_t &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;; /* assuming 32bit function pointers */&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt; = ((uint32_t*)APP_FLASH_VECTOR_START)[1]; /* this is the reset vector */&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; if (&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;!=-1 &amp;amp;&amp;amp; !BL_CheckBootloaderMode()) { /* Check for the presence of a valid application vector. -1 (or) 0xfffffff would mean flash erased */&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((void(*)(void))&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;)(); /* Jump to the application startup code */&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive-quote" style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;#if 0&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *handled = TRUE;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt; = ((uint32_t*)BL_FLASH_VECTOR_TABLE)[1];&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((void(*)(void))&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;startup&lt;/SPAN&gt;)(); /* Jump to startup code */&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;#else&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; KIN1_SoftwareReset();&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;#endif&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Or is there any other way to make SCB_VTOR point to 0x1000&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 06:38:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-configure-the-vector-table-properly/m-p/496513#M30879</guid>
      <dc:creator>ganeshramachand</dc:creator>
      <dc:date>2016-05-04T06:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure the vector table properly ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-configure-the-vector-table-properly/m-p/496514#M30880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ganesh,&lt;/P&gt;&lt;P&gt;On my code , the SCB_VTOR is not one simple variable, it is a register Vector Table Offest Register,&lt;/P&gt;&lt;P&gt;you can find on the cortex-m0+ Devices Generic User Guide:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56559i4396464AEA2EE1BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56512iFC15CB94D7E1C626/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;ALice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 08:49:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-configure-the-vector-table-properly/m-p/496514#M30880</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-05-04T08:49:24Z</dc:date>
    </item>
  </channel>
</rss>

