<?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: LPC54S018 second attempt at encryption</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54S018-second-attempt-at-encryption/m-p/1038715#M40421</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="347303" data-username="827529957@qq.com" href="https://community.nxp.com/people/827529957@qq.com"&gt;Kunsen Chen&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to the AN12352, not recommend use Jflash to program:&lt;/P&gt;&lt;P&gt;&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/92650iB0DA9BED16793B02/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;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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 style="min- padding: 0px;"&gt;&amp;nbsp;&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, 28 Nov 2019 03:35:48 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2019-11-28T03:35:48Z</dc:date>
    <item>
      <title>LPC54S018 second attempt at encryption</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54S018-second-attempt-at-encryption/m-p/1038714#M40420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the routine “lpcxpresso54s018m_xip_with_secure_boot_an_demo” provided by AN12352SW to encrypt, and do the secure boot of LPC54S018 in 5 steps referring to AN12352.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Divide the image into two parts by modifying linker script. The demo have done it and I&amp;nbsp;did not make any changes.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="微信图片_20191127105215.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94865iB4C568040213766C/image-size/large?v=v2&amp;amp;px=999" role="button" title="微信图片_20191127105215.png" alt="微信图片_20191127105215.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snap21.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/91936i8BC5636CE63647DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap21.bmp" alt="Snap21.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. Create the image.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snap22.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/92726i8A5BA08C3E2AC510/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap22.bmp" alt="Snap22.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note : In the case of normally boot, if&amp;nbsp;I&amp;nbsp;loaded the image&amp;nbsp;directly, it will run successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Split the image as secure-plain text and non-secure.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snap25.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94174i1496196275E95AD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap25.bmp" alt="Snap25.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;From the image above, the image_length equals 0x000056CC, so the total length of the image is&amp;nbsp;&lt;SPAN&gt;0x000056CC+4.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The&amp;nbsp;secure-plain&amp;nbsp;text&amp;nbsp;image&amp;nbsp;is&amp;nbsp;from&amp;nbsp;address&amp;nbsp;0&amp;nbsp;to&amp;nbsp;address&amp;nbsp;(0x000056CC+4-1) of the original image binary. This&amp;nbsp;image is&amp;nbsp;used&amp;nbsp;to&amp;nbsp;create&amp;nbsp;the&amp;nbsp;secure-bootable&amp;nbsp;part&amp;nbsp;image.&lt;BR /&gt; The&amp;nbsp;non-secure image is from address 0x0010_0000 to the end of the original image. This image is&amp;nbsp;as&amp;nbsp;non-secure part image.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Create the secure bootable part image based on secure-plain text image.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Use elftosb to generate 128 bits AES key.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="A3QI2E{0({(ZBLF46`T3RRI.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94314i5C28C872A2BCC707/image-size/large?v=v2&amp;amp;px=999" role="button" title="A3QI2E{0({(ZBLF46`T3RRI.png" alt="A3QI2E{0({(ZBLF46`T3RRI.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Use the elftosb-gui to create the secure-bootable part image.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snap26.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94262i8396FB1C6BAA703D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap26.bmp" alt="Snap26.bmp" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. Program the two parts of the image into the flash.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;program secure bootable part image into Flash.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snap28.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94480i9A7BCEFEF18A900D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap28.bmp" alt="Snap28.bmp" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snap27.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94406i83984FE088D1BB8A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap27.bmp" alt="Snap27.bmp" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It would prompt me to add check code and I clicked 'No'.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;program the non-secure part image into Flash&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snap29.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94632i248D5FC786D8C73F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap29.bmp" alt="Snap29.bmp" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4. Program the 128 bits AES key to OTP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;program the AES key use blhost.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snap30.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94741i8E0CADCFCF5C94D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap30.bmp" alt="Snap30.bmp" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snap16.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94312i838A006468242310/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap16.bmp" alt="Snap16.bmp" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5. Program the related OTP bit fields to enable secure boot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;use blhost and the following commands to program related OTP bit fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;blhost.exe -u 0x1fc9,0x01a2 -- efuse-program-once 12 00000010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;blhost.exe -u 0x1fc9,0x01a2 -- efuse-program-once 12 00000004&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;finally, I reset my board, but it was failed, because there was no any print on debug consule and the debug on Keil can not check my core. I can't connect the PC and the board with SWD.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What did I do wrong？I need some help. Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2019 04:38:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54S018-second-attempt-at-encryption/m-p/1038714#M40420</guid>
      <dc:creator>827529957</dc:creator>
      <dc:date>2019-11-27T04:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54S018 second attempt at encryption</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54S018-second-attempt-at-encryption/m-p/1038715#M40421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="347303" data-username="827529957@qq.com" href="https://community.nxp.com/people/827529957@qq.com"&gt;Kunsen Chen&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to the AN12352, not recommend use Jflash to program:&lt;/P&gt;&lt;P&gt;&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/92650iB0DA9BED16793B02/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;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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 style="min- padding: 0px;"&gt;&amp;nbsp;&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, 28 Nov 2019 03:35:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54S018-second-attempt-at-encryption/m-p/1038715#M40421</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-11-28T03:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54S018 second attempt at encryption</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54S018-second-attempt-at-encryption/m-p/1038716#M40422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason why JFlash cannot be used is because a checksum may be added. However, I have ensure that the code programming into the chip didn't add the checksum.&amp;nbsp;&lt;/P&gt;&lt;P&gt;At first, I used JFlash to load my code, and indeed added the checksum. I read back the flash code through JFlash and the code is as follow.&amp;nbsp;Except for the red box, other data is consistent with the code file to be downloaded.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snap7.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94273i39ABD97AB95DC8F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap7.bmp" alt="Snap7.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but then I cancelled the option to add the checksum, and I read the flash code through JFlash, and it did not add the checksum. I used the data comparison function of HxD for comparison, the data is completely consistent&amp;nbsp;&lt;SPAN&gt;with the code file to be downloaded.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Am I right?&amp;nbsp;I worry that I am doing something wrong elsewhere.&amp;nbsp;Do you think my other operations are OK?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2019 06:20:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54S018-second-attempt-at-encryption/m-p/1038716#M40422</guid>
      <dc:creator>827529957</dc:creator>
      <dc:date>2019-11-28T06:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54S018 second attempt at encryption</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54S018-second-attempt-at-encryption/m-p/1038717#M40423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kunsen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recommend you first completely refer to the steps in AN12352.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Dec 2019 13:48:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54S018-second-attempt-at-encryption/m-p/1038717#M40423</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-12-05T13:48:46Z</dc:date>
    </item>
  </channel>
</rss>

