<?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: LPC1114 issue with interrupt vector in application in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1277314#M45019</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/186437" target="_self" aria-label="View Profile of RizwanA"&gt;&lt;SPAN class=""&gt;RizwanA&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;About place the data into RAM, you can try to refer to MCUXpresso IDE User Guide to test:&lt;/P&gt;
&lt;P&gt;&amp;lt;MCUXpresso_IDE_User_Guide.pdf&amp;gt;&amp;nbsp; -&amp;gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;17.13.2 Placing data into different RAM blocks using Macros&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 03:06:05 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2021-05-17T03:06:05Z</dc:date>
    <item>
      <title>LPC1114 issue with interrupt vector in application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1273159#M44910</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have an old application project for&amp;nbsp;LPC1114 that is fully working with LPCXpresso v7.7.2, recently l have imported the project to MCUXpresso v 11.1.1 and the same project is not working anymore.&lt;/P&gt;&lt;P&gt;This is a bootloader (MFlash32 (rx) : ORIGIN = 0x00000000, LENGTH = 0x3000) and application (MFlash32 (rx) : ORIGIN = 0x00003000, LENGTH = 0x4000) based scenario. I have observed that jump from Bootloader to the application is looking fine and then it lost in the application (jump to "0xfffffffe") once I enable any interrupt like timer or UART. Before jump to the application in the bootloader, all interrupts are disabled.&lt;/P&gt;&lt;P&gt;From the previous posts, I came to know that this may be related to vector remapping. The application has a remapping vector function that copies the interrupt vector from flash (0x00003000) to RAM and changes the status of&amp;nbsp;&lt;SPAN&gt;SYSMEMREMAP accordingly. The declaration of the variable that is used for copy is following&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;static UINT32 aunRamVectTable[REMAP_VECTOR_COUNT] __attribute__ ((section ("vtable")));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So now I need help why the same working project stops working with&amp;nbsp;MCUXpresso v 11.1.1 (or even not working with&amp;nbsp;LPCXpresso v8.1.0_597 as well)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does this relate to the GCC compiler?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 16:16:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1273159#M44910</guid>
      <dc:creator>RizwanA</dc:creator>
      <dc:date>2021-05-06T16:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114 issue with interrupt vector in application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1273361#M44919</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/186437" target="_self" aria-label="View Profile of RizwanA"&gt;&lt;SPAN class=""&gt;RizwanA&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;How about do not copy interrupt vector from flash to RAM?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also attach your project, I help to check on my side.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 02:46:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1273361#M44919</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2021-05-07T02:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114 issue with interrupt vector in application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1273626#M44932</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/27788"&gt;@Alice_Yang&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;thanks for the quick reply,&lt;/P&gt;&lt;P&gt;Unfortunately, I can not upload the full project but the function that copies the vector table from flash to RAM is the following.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#define VTABLE_USER_RAM_MODE (0x01)&lt;/P&gt;&lt;P&gt;#define APP_START_ADDR 0x00003000&lt;/P&gt;&lt;P&gt;#define REMAP_VECTOR_COUNT (52)&lt;/P&gt;&lt;P&gt;static UINT32 aunRamVectTable[REMAP_VECTOR_COUNT] __attribute__ ((section ("vtable")));&lt;/P&gt;&lt;P&gt;static void RemapVectorTable(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;UINT16 unIndex = 0;&lt;BR /&gt;UINT32 *punFlashVectTable = (UINT32 *)APP_START_ADDR;&lt;/P&gt;&lt;P&gt;/* Disable interrupts before re-mapping interrupt vector table */&lt;BR /&gt;__disable_irq();&lt;/P&gt;&lt;P&gt;/* Copy the interrupt vector table to RAM */&lt;BR /&gt;for (unIndex = 0; unIndex &amp;lt; REMAP_VECTOR_COUNT; unIndex++)&lt;BR /&gt;{&lt;BR /&gt;aunRamVectTable[unIndex] = punFlashVectTable[unIndex];&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Indicate that the vector table has been remapped to SRAM */&lt;BR /&gt;LPC_SYSCON-&amp;gt;SYSMEMREMAP = VTABLE_USER_RAM_MODE;&lt;/P&gt;&lt;P&gt;/* Re-enable interrupts */&lt;BR /&gt;__enable_irq();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Like I said above that the project is fully working with&amp;nbsp;LPCXpresso v7.7.2_379 and also up to&amp;nbsp;LPCXpresso v8.0.0_526 and stop working with&amp;nbsp;LPCXpresso v8.1.0_597 and afterward.&lt;/P&gt;&lt;P&gt;One more thing I have observed that in the map file generated by&amp;nbsp;MCUXpresso IDE v11.1 the vtable section is not mapped to address&amp;nbsp;0x10000000 plus also the size of .data (0x20) shows that the&amp;nbsp;"aunRamVectTable" is not mapped correctly.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MCUXpresso IDE v11.1.1.PNG" style="width: 734px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/144208iD5B8C80FDAAAD716/image-size/large?v=v2&amp;amp;px=999" role="button" title="MCUXpresso IDE v11.1.1.PNG" alt="MCUXpresso IDE v11.1.1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Whereas in the map generated by&amp;nbsp;&amp;nbsp;LPCXpresso v7.7.2 they look correctly mapped.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LPCXpresso v7.7.2.PNG" style="width: 752px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/144209iD47A0DE9B7D0A7CC/image-size/large?v=v2&amp;amp;px=999" role="button" title="LPCXpresso v7.7.2.PNG" alt="LPCXpresso v7.7.2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any suggestion why vtable is not mapped correctly anymore?&lt;/P&gt;&lt;P&gt;Is there any mistake in the following declaration? which may&amp;nbsp;&lt;SPAN&gt;expose with the latest GCC version?&lt;/SPAN&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;static UINT32 aunRamVectTable[REMAP_VECTOR_COUNT] __attribute__ ((section ("vtable")));&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 09:45:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1273626#M44932</guid>
      <dc:creator>RizwanA</dc:creator>
      <dc:date>2021-05-07T09:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114 issue with interrupt vector in application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1274493#M44954</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/27788"&gt;@Alice_Yang&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;thanks for the quick reply,&lt;/P&gt;&lt;P&gt;Unfortunately, I can not upload the full project but the function that copies the vector table from flash to RAM is the following.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#define VTABLE_USER_RAM_MODE (0x01)&lt;/P&gt;&lt;P&gt;#define APP_START_ADDR 0x00003000&lt;/P&gt;&lt;P&gt;#define REMAP_VECTOR_COUNT (52)&lt;/P&gt;&lt;P&gt;static UINT32 aunRamVectTable[REMAP_VECTOR_COUNT] __attribute__ ((section ("vtable")));&lt;/P&gt;&lt;P&gt;static void RemapVectorTable(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;UINT16 unIndex = 0;&lt;BR /&gt;UINT32 *punFlashVectTable = (UINT32 *)APP_START_ADDR;&lt;/P&gt;&lt;P&gt;/* Disable interrupts before re-mapping interrupt vector table */&lt;BR /&gt;__disable_irq();&lt;/P&gt;&lt;P&gt;/* Copy the interrupt vector table to RAM */&lt;BR /&gt;for (unIndex = 0; unIndex &amp;lt; REMAP_VECTOR_COUNT; unIndex++)&lt;BR /&gt;{&lt;BR /&gt;aunRamVectTable[unIndex] = punFlashVectTable[unIndex];&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Indicate that the vector table has been remapped to SRAM */&lt;BR /&gt;LPC_SYSCON-&amp;gt;SYSMEMREMAP = VTABLE_USER_RAM_MODE;&lt;/P&gt;&lt;P&gt;/* Re-enable interrupts */&lt;BR /&gt;__enable_irq();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Like I said above that the project is fully working with&amp;nbsp;LPCXpresso v7.7.2_379 and also up to&amp;nbsp;LPCXpresso v8.0.0_526 and stop working with&amp;nbsp;LPCXpresso v8.1.0_597 and afterward.&lt;/P&gt;&lt;P&gt;One more thing I have observed that in the map file generated by&amp;nbsp;MCUXpresso IDE v11.1 the vtable section is not mapped to address&amp;nbsp;0x10000000 plus also the size of .data (0x20) shows that the&amp;nbsp;"aunRamVectTable" is not mapped correctly.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MCUXpresso IDE v11.1.1.PNG" style="width: 734px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/144370i36EC7A83D86A140B/image-size/large?v=v2&amp;amp;px=999" role="button" title="MCUXpresso IDE v11.1.1.PNG" alt="MCUXpresso IDE v11.1.1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Whereas in the map generated by&amp;nbsp;&amp;nbsp;LPCXpresso v7.7.2 they look correctly mapped.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LPCXpresso v7.7.2.PNG" style="width: 752px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/144371i59EBCE68451A8BE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="LPCXpresso v7.7.2.PNG" alt="LPCXpresso v7.7.2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is the following declaration of&amp;nbsp;aunRamVectTable correct? Maybe there is something wrong that is exposed to the latest GCC?&lt;/P&gt;&lt;P&gt;static UINT32 aunRamVectTable[REMAP_VECTOR_COUNT] __attribute__ ((section ("vtable")));&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 12:30:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1274493#M44954</guid>
      <dc:creator>RizwanA</dc:creator>
      <dc:date>2021-05-10T12:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114 issue with interrupt vector in application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1277314#M45019</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/186437" target="_self" aria-label="View Profile of RizwanA"&gt;&lt;SPAN class=""&gt;RizwanA&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;About place the data into RAM, you can try to refer to MCUXpresso IDE User Guide to test:&lt;/P&gt;
&lt;P&gt;&amp;lt;MCUXpresso_IDE_User_Guide.pdf&amp;gt;&amp;nbsp; -&amp;gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;17.13.2 Placing data into different RAM blocks using Macros&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 03:06:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1277314#M45019</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2021-05-17T03:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114 issue with interrupt vector in application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1292558#M45476</link>
      <description>&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;I have tried the macros as well but the result is the same, the only solution I found is if I add in "&lt;STRONG&gt;volatile&lt;/STRONG&gt;" to the variable(aunRamVectTable) then it works and also visible in the map file that "vtable" contains this variable&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;static &lt;STRONG&gt;volatile&lt;/STRONG&gt; UINT32 aunRamVectTable[REMAP_VECTOR_COUNT] &amp;nbsp; __attribute__ ((section ("vtable")));&lt;/P&gt;&lt;P&gt;I don't know why this is working? is this a known issue, that if "&lt;STRONG&gt;volatile&lt;/STRONG&gt;" is not used then the mapping of a variable to ram will not work?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 11:36:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1114-issue-with-interrupt-vector-in-application/m-p/1292558#M45476</guid>
      <dc:creator>RizwanA</dc:creator>
      <dc:date>2021-06-15T11:36:08Z</dc:date>
    </item>
  </channel>
</rss>

