<?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: Generating encrypted BEE bootable XIP image in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Generating-encrypted-BEE-bootable-XIP-image/m-p/1453655#M190042</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/60336"&gt;@kerryzhou&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the quick response. And sorry about posting in the wrong forum.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did see the forum post you mentioned. Here are the steps followed with the SPT tool. I have attached a zip file with screenshots, bin files and logs.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;Generated a bootable XIP image of the LED blink exmple from MCUXpresso IDE with&amp;nbsp;XIP_BOOT_HEADER_ENABLE=0&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;1 - MCUXpresso Project Properties.png&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Encrypted the image using&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;the Secure Provisioning Tool&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;2 - SPT Build Image Config.png&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;3 - SPT Write Image Config.png&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;4 - SPT-image-write-log.log&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;5 - SPT-generated-evkmimxrt1020_iled_blinky_nopadding.bin&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Set&amp;nbsp; the EncryptedXIP bit to 1&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;6 - Fuse Map.png&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;7 - Fuse Map - Cfg0.png&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;When programming the first time, BEE_KEY_SEL0 fuse got burnt to SW-GP2, and the SW-GP2 was burnt with the user key&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;8 - Fuse Map - Cfg1.png&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;9 - OTP Configuration.png&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Programmed the board&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Set the SW8 switches to 1-ON, 2-OFF, 3-ON, 4-OFF and reset the board&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;10 - SW8 state.png&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;The LED was not blinking&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Read back the image from 0x60000000 to 0x60006000 for the encrypted image that was &lt;STRONG&gt;not&lt;/STRONG&gt; working and for an unencrypted image that was working fine.&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;readback-encrypted.dat&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;readback-unencrypted.dat&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Have I missed something?&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 15:10:28 GMT</pubDate>
    <dc:creator>navoda</dc:creator>
    <dc:date>2022-05-05T15:10:28Z</dc:date>
    <item>
      <title>Generating encrypted BEE bootable XIP image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Generating-encrypted-BEE-bootable-XIP-image/m-p/1452364#M189951</link>
      <description>&lt;P&gt;I have been trying to generate encrypted bootable XIP images for my MIMXRT1020 EVK.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; &lt;U&gt;&lt;STRONG&gt;Using MCUBootUtility&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;- I downloaded latest MCUBootUtility version from&amp;nbsp;&lt;A href="https://github.com/JayHeng/NXP-MCUBootUtility" target="_blank" rel="noopener"&gt;https://github.com/JayHeng/NXP-MCUBootUtility&lt;/A&gt; by&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/60336"&gt;@kerryzhou&lt;/a&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I could not access the image_enc.exe in the Baidu server. (Honestly, it doesn't make sense to me why the file is not included in the github repo or placed at a more accessible location like Google Drive. If it's something official from NXP, I would expect it to be on NXP website. I came across multiple forum posts asking for the same file). In the end I managed to download it from this forum post:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-RT/image-enc2-zip-download/m-p/1174074" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-RT/image-enc2-zip-download/m-p/1174074&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I guess the versions of MCUBootUtility and the image_enc.exe are not compatible. When I try to generate an encrypted file from the MCUBootUtility, I see an error saying "Unsupported argument" in the terminal. (Screenshot attached)&lt;/P&gt;&lt;P&gt;I tried running the image_enc.exe manually. Turned out that the "hw_eng=bee" option provided by the MCUBootUtility is not supported by image_enc.exe. But even when that is removed, I get the following error when I try to encrypt the image, even though the start and length of the region are multiples of 1024 (0x400).&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Command&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;image_enc.exe
ifile=ivt_evkmimxrt1020_iled_blinky_unsigned.bin
ofile=ivt_evkmimxrt1020_iled_blinky_unsigned_bee_encrypted.bin
base_addr=0x60000000
region0_key=0123456789abcdeffedcba9876543210
region0_arg=1,[0x60001000,0x2000,0]
region0_lock=0
use_zero_key=1
is_boot_image=1 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Invalid FAC region range, both start and length must be 1024-byte aligned.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; &lt;U&gt;&lt;STRONG&gt;Using MCUXpresso Secure Provisioning Tool (SPT)&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;- I managed to generate an unsigned bootable image and run successfully.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Then I generated images with "Boot Type" set to "XIP Encrypted (BEE User Keys) Unsigned". This generated 3 files.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;1. evkmimxrt1020_iled_blinky_bootable.bin&lt;BR /&gt;2. evkmimxrt1020_iled_blinky_bootable_nopadding.bin&lt;BR /&gt;3. evkmimxrt1020_iled_blinky_nopadding.bin&lt;/P&gt;&lt;P&gt;Of these 3 files, only (3) seems to be encrypted. But when I load it to the EVK, it doesn't run.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pleas let me know if I am doing something wrong/missing any steps.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 18:46:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Generating-encrypted-BEE-bootable-XIP-image/m-p/1452364#M189951</guid>
      <dc:creator>navoda</dc:creator>
      <dc:date>2022-05-03T18:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Generating encrypted BEE bootable XIP image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Generating-encrypted-BEE-bootable-XIP-image/m-p/1453142#M189992</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/200231"&gt;@navoda&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Next time, if you have the RT issues, please post the question here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-RT/bd-p/imxrt" target="_blank"&gt;https://community.nxp.com/t5/i-MX-RT/bd-p/imxrt&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Answer your questions:&lt;/P&gt;
&lt;P&gt;1. MCUbootUtility tool&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;image_enc.exe&amp;nbsp; download&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; Yes, it is not the official one, maybe you have limit to access it, so you can use our official tool, SPT tool&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. About SPT tool&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; Do you already read my post:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/RT1015-APP-BEE-encryption-operation-method/ta-p/1120298" target="_blank"&gt;https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/RT1015-APP-BEE-encryption-operation-method/ta-p/1120298&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The BEE need to burn the fuse, and&amp;nbsp;BOOT_CFG1[0],&amp;nbsp;Encrypted&amp;nbsp;XIP should be enabled:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kerryzhou_0-1651717599621.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/178827i08A88BDCB25AEA4C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kerryzhou_0-1651717599621.png" alt="kerryzhou_0-1651717599621.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Otherwise, the BEE boot will be failed.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 02:26:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Generating-encrypted-BEE-bootable-XIP-image/m-p/1453142#M189992</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2022-05-05T02:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Generating encrypted BEE bootable XIP image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Generating-encrypted-BEE-bootable-XIP-image/m-p/1453655#M190042</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/60336"&gt;@kerryzhou&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the quick response. And sorry about posting in the wrong forum.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did see the forum post you mentioned. Here are the steps followed with the SPT tool. I have attached a zip file with screenshots, bin files and logs.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;Generated a bootable XIP image of the LED blink exmple from MCUXpresso IDE with&amp;nbsp;XIP_BOOT_HEADER_ENABLE=0&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;1 - MCUXpresso Project Properties.png&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Encrypted the image using&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;the Secure Provisioning Tool&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;2 - SPT Build Image Config.png&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;3 - SPT Write Image Config.png&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;4 - SPT-image-write-log.log&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;5 - SPT-generated-evkmimxrt1020_iled_blinky_nopadding.bin&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Set&amp;nbsp; the EncryptedXIP bit to 1&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;6 - Fuse Map.png&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;7 - Fuse Map - Cfg0.png&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;When programming the first time, BEE_KEY_SEL0 fuse got burnt to SW-GP2, and the SW-GP2 was burnt with the user key&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;8 - Fuse Map - Cfg1.png&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;9 - OTP Configuration.png&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Programmed the board&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Set the SW8 switches to 1-ON, 2-OFF, 3-ON, 4-OFF and reset the board&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;10 - SW8 state.png&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;The LED was not blinking&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Read back the image from 0x60000000 to 0x60006000 for the encrypted image that was &lt;STRONG&gt;not&lt;/STRONG&gt; working and for an unencrypted image that was working fine.&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;readback-encrypted.dat&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;EM&gt;readback-unencrypted.dat&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Have I missed something?&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 15:10:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Generating-encrypted-BEE-bootable-XIP-image/m-p/1453655#M190042</guid>
      <dc:creator>navoda</dc:creator>
      <dc:date>2022-05-05T15:10:28Z</dc:date>
    </item>
  </channel>
</rss>

