<?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: Giving access to a program residing at different location in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Giving-access-to-a-program-residing-at-different-location/m-p/873816#M34865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="334870" data-username="akhiljoy" href="https://community.nxp.com/people/akhiljoy"&gt;AKHIL JOY&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;In addition to configuring the application firmware's address, the clock mode should be identical, in other words, the clock status of bootloader before jumping should be as same as the initialization clock status of application firmware.&lt;BR /&gt;In further, I'd highly recommend you to refer to the thread to adapt your jump function.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.onarm.com/forum/59541/" title="http://www.onarm.com/forum/59541/"&gt;Clean bootloader to application Jump&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Back to your question, So don't we need to change the TOP flash address in application linker file? The answer is no.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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>Fri, 01 Feb 2019 03:11:11 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2019-02-01T03:11:11Z</dc:date>
    <item>
      <title>Giving access to a program residing at different location</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Giving-access-to-a-program-residing-at-different-location/m-p/873813#M34862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am developing a secondary bootloader for LPC1517.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current status: Able to load new firmware from UART to the location 0x8000. Now i have to give access to the new firmware. Currently, the code is written as below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;asm volatile("ldr r0, =0x8000");&lt;BR /&gt; asm volatile("ldr r0, [r0]");&lt;BR /&gt; asm volatile("mov sp, r0");&lt;/P&gt;&lt;P&gt;/* Load program counter with application reset vector address, located at&lt;BR /&gt; second word of application area. */&lt;BR /&gt; asm volatile("ldr r0, =0x8004");&lt;BR /&gt; asm volatile("ldr r0, [r0]");&lt;BR /&gt; asm volatile("mov pc, r0");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bootloader linker memory code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt; /* Define each memory region */&lt;BR /&gt; MFlash256 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 /* 256K bytes (alias Flash) */ &lt;BR /&gt; Ram0_16 (rwx) : ORIGIN = 0x2000000, LENGTH = 0x4000 /* 16K bytes (alias RAM) */ &lt;BR /&gt; Ram1_16 (rwx) : ORIGIN = 0x2004000, LENGTH = 0x4000 /* 16K bytes (alias RAM2) */ &lt;BR /&gt; Ram2_4 (rwx) : ORIGIN = 0x2008000, LENGTH = 0x1000 /* 4K bytes (alias RAM3) */ &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Define a symbol for the top of each memory region */&lt;BR /&gt; __base_MFlash256 = 0x0 ; /* MFlash256 */ &lt;BR /&gt; __base_Flash = 0x0 ; /* Flash */ &lt;BR /&gt; __top_MFlash256 = 0x0 + 0x2000 ; /* 256K bytes */ &lt;BR /&gt; __top_Flash = 0x0 + 0x2000 ; /* 256K bytes */&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Application code linker&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Define each memory region */&lt;BR /&gt; MFlash64 (rx) : ORIGIN = 0x8000, LENGTH = 0x8000 /* 64K bytes */&lt;BR /&gt; Ram0_4 (rwx) : ORIGIN = 0x2000000, LENGTH = 0x1000 /* 4K bytes */&lt;BR /&gt; Ram1_4 (rwx) : ORIGIN = 0x2001000, LENGTH = 0x1000 /* 4K bytes */&lt;BR /&gt; Ram2_4 (rwx) : ORIGIN = 0x2004000, LENGTH = 0x1000 /* 4K bytes */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;}&lt;BR /&gt; /* Define a symbol for the top of each memory region */&lt;BR /&gt; __top_MFlash64 = 0x8000 + 0x8000;&lt;BR /&gt; __top_Ram0_4 = 0x2000000 + 0x1000;&lt;BR /&gt; __top_Ram1_4 = 0x2001000 + 0x1000;&lt;BR /&gt; __top_Ram2_4 = 0x2004000 + 0x1000;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following things done :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Unticked managed linked script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)is there anything additional to be done, to give access to the program at 0x8000 ?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2019 14:14:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Giving-access-to-a-program-residing-at-different-location/m-p/873813#M34862</guid>
      <dc:creator>akhiljoy</dc:creator>
      <dc:date>2019-01-30T14:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Giving access to a program residing at different location</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Giving-access-to-a-program-residing-at-different-location/m-p/873814#M34863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="334870" data-username="akhiljoy" href="https://community.nxp.com/people/akhiljoy"&gt;AKHIL JOY&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.&lt;BR /&gt;1. Linker modification&lt;BR /&gt;The application is able to use the full area of RAM after jumping successful, so you'd better increase the size of RAM.&lt;BR /&gt;In my opinion, drive the “managed&lt;BR /&gt;linker script” mechanism in MCUXpresso or LPCXpresso IDE is the best way to generate an appropriate linker file, you can give a try.&lt;BR /&gt;2)is there anything additional to be done, to give access to the program at 0x8000? &lt;BR /&gt;You need to reconfigure the Vector Table Offset Register register, just like the below code shows.&lt;BR /&gt;&lt;STRONG&gt;SCB-&amp;gt;VTOR = VTOR_NEW_ADDR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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>Thu, 31 Jan 2019 02:58:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Giving-access-to-a-program-residing-at-different-location/m-p/873814#M34863</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2019-01-31T02:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Giving access to a program residing at different location</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Giving-access-to-a-program-residing-at-different-location/m-p/873815#M34864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremyzhou ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply,&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;SCB-&amp;gt;VTOR = 0x8000 ;&lt;/P&gt;&lt;P&gt;// boot_jump(0x8000);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; asm volatile("ldr r0, =0x8000");&lt;BR /&gt; asm volatile("ldr r0, [r0]");&lt;BR /&gt; asm volatile("mov sp, r0");&lt;/P&gt;&lt;P&gt;/* Load program counter with application reset vector address, located at&lt;BR /&gt; second word of application area. */&lt;BR /&gt; asm volatile("ldr r0, =0x8004");&lt;BR /&gt; asm volatile("ldr r0, [r0]");&lt;BR /&gt; asm volatile("mov pc, r0");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the code to above, and still, didn't&amp;nbsp;worked.&lt;/P&gt;&lt;P&gt;i verified&amp;nbsp;the SP and PC which is getting the correct values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also tried the below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;SCB-&amp;gt;VTOR = 0x8000 &amp;amp; 0x1FFFFF80;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and regarding the managed linker script. So don't&amp;nbsp;we need to change the TOP flash address in application linker file ?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 06:20:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Giving-access-to-a-program-residing-at-different-location/m-p/873815#M34864</guid>
      <dc:creator>akhiljoy</dc:creator>
      <dc:date>2019-01-31T06:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Giving access to a program residing at different location</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Giving-access-to-a-program-residing-at-different-location/m-p/873816#M34865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="334870" data-username="akhiljoy" href="https://community.nxp.com/people/akhiljoy"&gt;AKHIL JOY&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;In addition to configuring the application firmware's address, the clock mode should be identical, in other words, the clock status of bootloader before jumping should be as same as the initialization clock status of application firmware.&lt;BR /&gt;In further, I'd highly recommend you to refer to the thread to adapt your jump function.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.onarm.com/forum/59541/" title="http://www.onarm.com/forum/59541/"&gt;Clean bootloader to application Jump&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Back to your question, So don't we need to change the TOP flash address in application linker file? The answer is no.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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>Fri, 01 Feb 2019 03:11:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Giving-access-to-a-program-residing-at-different-location/m-p/873816#M34865</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2019-02-01T03:11:11Z</dc:date>
    </item>
  </channel>
</rss>

