<?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>LPC Microcontrollers中的主题 Re: Bytes to upload for reprogramming flash with a custom bootloader</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bytes-to-upload-for-reprogramming-flash-with-a-custom-bootloader/m-p/953725#M37862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;I would suggest you refer this article I ever wrote&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-103961"&gt;https://community.nxp.com/docs/DOC-103961&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's for Kinetis but the jumping to bootloader method is exactly the same as LPC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day,&lt;/P&gt;&lt;P&gt;Jun Zhang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Aug 2019 08:04:04 GMT</pubDate>
    <dc:creator>ZhangJennie</dc:creator>
    <dc:date>2019-08-27T08:04:04Z</dc:date>
    <item>
      <title>Bytes to upload for reprogramming flash with a custom bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bytes-to-upload-for-reprogramming-flash-with-a-custom-bootloader/m-p/953722#M37859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am writing one secondary bootloader for lpc11u6x and i can't&amp;nbsp;find any documentation that can help me..&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to write an "hello world bootloader" wich is located at 0x0 address. this app will erase and prepare sectors and it will copied one array containing the new firmware ( in hex) to the flash, from address&amp;nbsp;0x00003000.&lt;/P&gt;&lt;P&gt;With "Chip_IAP_CopyRamToFlash(APP_VECTOR_TABLE, bin , size);" i continue obtained error 6 (&amp;nbsp;COUNT_ERROR Byte count is not multiple of 4 or is not a permitted value ) ..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand from with kind of file I have to take the bytes for the new application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently using the .bin file generated from the lpcxpresso ide with the post-build-step, including checksum...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2019 16:49:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Bytes-to-upload-for-reprogramming-flash-with-a-custom-bootloader/m-p/953722#M37859</guid>
      <dc:creator>greta_sasso</dc:creator>
      <dc:date>2019-08-21T16:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Bytes to upload for reprogramming flash with a custom bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bytes-to-upload-for-reprogramming-flash-with-a-custom-bootloader/m-p/953723#M37860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="346564" data-username="greta.sasso@gfmintegration.it" href="https://community.nxp.com/people/greta.sasso@gfmintegration.it" style="color: #3d9ce7; background-color: #ffffff; border: 0px; font-weight: 600; text-decoration: none; font-size: 11.9994px;"&gt;Greta Sasso&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I suggest you refer AN12037:&amp;nbsp; LPC11U6x USB DFU Secondary Bootloader&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/application-note/AN12037_LPC11U6x.zip" title="https://www.nxp.com/docs/en/application-note/AN12037_LPC11U6x.zip"&gt;https://www.nxp.com/docs/en/application-note/AN12037_LPC11U6x.zip&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jun Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2019 01:49:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Bytes-to-upload-for-reprogramming-flash-with-a-custom-bootloader/m-p/953723#M37860</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2019-08-22T01:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Bytes to upload for reprogramming flash with a custom bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bytes-to-upload-for-reprogramming-flash-with-a-custom-bootloader/m-p/953724#M37861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;I saw the source code for some inspiration.. but I can't solve my doubts..&lt;/P&gt;&lt;P&gt;I have my app running from 0x00 addres, and it's the secondary bootloader.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to save directly one bin image ( saved into one array ) into flash at address 0x3000. So have write the bin hex ( saved directly into code in one array )&amp;nbsp; into the necessary sectors of flash, with success.&lt;/P&gt;&lt;P&gt;After that, i have tried to jump to the 0x3004 address, reloading vector table address to 0x3000 ( i have enable this function with cortex m0+).&lt;/P&gt;&lt;P&gt;But i have stiil problems with interrupts.. i obtained :&amp;nbsp;&amp;nbsp;&amp;lt;signal handler called&amp;gt;() at 0xfffffff9&amp;nbsp; ( SIGINT interurpt) and no handler was called...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I don't know if I am wrong with the bin hex file saved into flash.. or with the interrupt vector table manaement..&lt;/P&gt;&lt;P&gt;---&amp;nbsp;I have generate the .bin file from my second application "blink"&amp;nbsp; without checksum ( i don't wont check in this moment), using lpcxpresso ide. I have take bytes from 0x00 to 0x2000 ( app'size = 6KB) and copied into one uint32_t array in the bootloader that i want to persist in flash ad address 0x000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&amp;nbsp;I tried two different ways for interrupt vector table...&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;1) this will generate the interrupt after jump_to_app()&amp;nbsp;&lt;/P&gt;&lt;P&gt;cleanBoot();&lt;/P&gt;&lt;P&gt;SCB-&amp;gt;VTOR = stackPointer;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unsigned * p = (unsigned *) (applicationAddress&amp;nbsp; + 4);&lt;/P&gt;&lt;P&gt;void (*&lt;SPAN&gt;jump_to_app&lt;/SPAN&gt;)(void);&lt;/P&gt;&lt;P&gt;jump_to_app&amp;nbsp;= (void *) *p;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;jump_to_app&lt;/SPAN&gt;();&lt;/P&gt;&lt;P&gt;2) with common_handler in&amp;nbsp; cr_startup....c and the redirect common_handler function.&amp;nbsp;&lt;SPAN&gt;this will generate the interrupt&amp;nbsp;when&amp;nbsp;enter in common_handler, after jump2app();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;cleanBoot();&lt;BR /&gt; Chip_PMU_WriteGPREG(LPC_PMU, 3, APP_VECTOR_TABLE);&lt;BR /&gt; __set_MSP(*(volatile uint32_t*) (APP_VECTOR_TABLE));&lt;BR /&gt; __set_PSP(*(volatile uint32_t*) (APP_VECTOR_TABLE));&lt;BR /&gt; jump2app = (iapfun) *(uint32_t*) (APP_VECTOR_TABLE + 4);&lt;/P&gt;&lt;P&gt;jump2app();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void Common_Handler(void)&lt;BR /&gt;{&lt;BR /&gt; typedef void (*pFunction)(void);&lt;/P&gt;&lt;P&gt;pFunction Jump_To_Application;&lt;BR /&gt; volatile uint32_t JumpAddress;&lt;BR /&gt; volatile uint32_t i;&lt;BR /&gt; i = __get_IPSR();&lt;BR /&gt; JumpAddress = *(__IO uint32_t *)(Chip_PMU_ReadGPREG(LPC_PMU, 3) + (4 * i));&lt;BR /&gt; Jump_To_Application = (pFunction) JumpAddress;&lt;BR /&gt; Jump_To_Application(); &lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2019 15:26:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Bytes-to-upload-for-reprogramming-flash-with-a-custom-bootloader/m-p/953724#M37861</guid>
      <dc:creator>greta_sasso</dc:creator>
      <dc:date>2019-08-22T15:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Bytes to upload for reprogramming flash with a custom bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bytes-to-upload-for-reprogramming-flash-with-a-custom-bootloader/m-p/953725#M37862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;I would suggest you refer this article I ever wrote&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-103961"&gt;https://community.nxp.com/docs/DOC-103961&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's for Kinetis but the jumping to bootloader method is exactly the same as LPC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day,&lt;/P&gt;&lt;P&gt;Jun Zhang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2019 08:04:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Bytes-to-upload-for-reprogramming-flash-with-a-custom-bootloader/m-p/953725#M37862</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2019-08-27T08:04:04Z</dc:date>
    </item>
  </channel>
</rss>

