<?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: How to run application by boot loader in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-run-application-by-boot-loader/m-p/614145#M24028</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the memory configuration editor (documented in the LPCXpresso IDE User Guide) to modify the memory layout of your application. That way you don't need to touch the linker scripts directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More background information on LPCXpresso IDE's use of linker scripts can be found in the FAQ&amp;nbsp;&lt;A href="https://community.nxp.com/thread/389125"&gt;Using your own linker scripts&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : The code that&amp;nbsp;jeremyzhou &amp;nbsp;posted is missing the setup of the stack pointer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;LPCXpresso Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Nov 2016 09:34:04 GMT</pubDate>
    <dc:creator>lpcxpresso_supp</dc:creator>
    <dc:date>2016-11-04T09:34:04Z</dc:date>
    <item>
      <title>How to run application by boot loader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-run-application-by-boot-loader/m-p/614142#M24025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone.&lt;/P&gt;&lt;P&gt;First of all please forgive me my bad English.&lt;/P&gt;&lt;P&gt;I'm quite new to programming microcontrollers never the less i'd like to run a boot loader, that loads an application on LPC11u68.&lt;/P&gt;&lt;P&gt;Let's say I want to locate demos_switch_blinky in flash at 0x2000 and want to execute it by running a boot loader. Am I right to store 0x2000 in VTOR-register, update sp and finally branch there? Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ldr r0, =0xE000ED08 /*VTOR*/&lt;BR /&gt;ldr r1, =0x20000 /*base adress of application in flash*/&lt;BR /&gt;str r1, [r0]&lt;BR /&gt;ldr r0, [r1]&lt;BR /&gt;mov sp, r0&lt;BR /&gt;ldr r0, [r1, #4]&lt;BR /&gt;bx r0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how can I locate an application at a certain address in flash with lpcxpresso explicitly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks for any help in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 08:08:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-run-application-by-boot-loader/m-p/614142#M24025</guid>
      <dc:creator>jnssp</dc:creator>
      <dc:date>2016-10-31T08:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to run application by boot loader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-run-application-by-boot-loader/m-p/614143#M24026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="289928" data-username="jnssp" href="https://community.nxp.com/people/jnssp" rel="nofollow noopener noreferrer" target="_blank"&gt;Jonas Spahn&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;1. You can refer to the following demo to jump to the application code.&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;execute_user_code&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;user_code_entry&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;unsigned&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;p&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// used for loading address of reset handler from user flash&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;/* Change the Vector Table to the USER_FLASH_START 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in case the user application uses interrupts */&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCB&lt;SPAN class="operator token"&gt;-&amp;gt;&lt;/SPAN&gt;VTOR &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; USER_FLASH_START &lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// Load contents of second word of user flash - the reset handler address&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// in the applications vector table&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;unsigned&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;USER_FLASH_START &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// Set user_code_entry to be the address contained in that second word&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// of user flash&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user_code_entry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;p&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// Jump to user application&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;user_code_entry&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;2. The relocation implementation should be done in the linker file .ld file and you can learn the more information about the linker file through the path: &lt;SPAN style="color: #000000; font-family: 微软雅黑; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;"&gt;C:\nxp\LPCXpresso_8.0.0_526\lpcxpresso\tools\share\doc\gcc-arm-none-eabi\html\ld.html\index.html&lt;/SPAN&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&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, 04 Nov 2016 01:41:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-run-application-by-boot-loader/m-p/614143#M24026</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-11-04T01:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to run application by boot loader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-run-application-by-boot-loader/m-p/614144#M24027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jeremyzhou"&gt;jeremyzhou&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;Thanks for responding&lt;/P&gt;&lt;P&gt;I read about Linker Scripts and with the MCU-Settings I was able to split the flash memory in two sections. By unticking the "Manage linker script"-option and using my own linker script, I was even able to locate the Application in the second Flash section completely. But when I tried to debug it there was an error. Anyway. With the article I'm&amp;nbsp;convinced to handle it somehow.&lt;/P&gt;&lt;P&gt;My other question&amp;nbsp;refers to the example described in the link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://visualgdb.com/tutorials/arm/bootloader/" title="http://visualgdb.com/tutorials/arm/bootloader/"&gt;Creating an embedded bootloader with VisualGDB | VisualGDB Tutorials&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example the application is "merged" with the bootloader by modifying the makefile. Is there a similar way to do that in lpcxpresso?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2016 07:02:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-run-application-by-boot-loader/m-p/614144#M24027</guid>
      <dc:creator>jnssp</dc:creator>
      <dc:date>2016-11-04T07:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to run application by boot loader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-run-application-by-boot-loader/m-p/614145#M24028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the memory configuration editor (documented in the LPCXpresso IDE User Guide) to modify the memory layout of your application. That way you don't need to touch the linker scripts directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More background information on LPCXpresso IDE's use of linker scripts can be found in the FAQ&amp;nbsp;&lt;A href="https://community.nxp.com/thread/389125"&gt;Using your own linker scripts&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : The code that&amp;nbsp;jeremyzhou &amp;nbsp;posted is missing the setup of the stack pointer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;LPCXpresso Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2016 09:34:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-run-application-by-boot-loader/m-p/614145#M24028</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2016-11-04T09:34:04Z</dc:date>
    </item>
  </channel>
</rss>

