<?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 A way to create a binary that is copied to RAM from the ROM bootloader in RT1050 in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/803570#M982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, everyone,&lt;BR /&gt;in the last few days I have been looking for a way for the ROM bootloader to copy to DTC RAM the binary I was building. In this regard you have probably seen some posts of mine and a colleague of mine. (&lt;A href="http://tiny.cc/c8p90y"&gt;http://tiny.cc/c8p90y&lt;/A&gt; and &lt;A href="http://tiny.cc/l8p90y"&gt;http://tiny.cc/l8p90y&lt;/A&gt;)&lt;BR /&gt;We have succeeded in the task, and here I want to explain how we did it. I know that probably there will be better and more direct ways, but this one is definitely a working one.&lt;/P&gt;&lt;P&gt;First of all, I'll start by describing our scenario, which involves having a project independent of MCUXpresso. The binary must be able to be built by makefile with the least possible use of external tools (hopefully none). Our Micro is i.MX RT1051&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;The reference manual&lt;/H2&gt;&lt;P&gt;There are clues in the reference manual, but they are not conclusive.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="qspi-flowchart.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78425i20E781452F4F84C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="qspi-flowchart.png" alt="qspi-flowchart.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Given what is written it might seem that the copy can only be made to OCRAM, but I believe that it can really happen in any destination. In fact here &lt;A href="http://tiny.cc/22q90y"&gt;http://tiny.cc/22q90y&lt;/A&gt; there is an example to copy in SDRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H3&gt;BOOT Header&lt;/H3&gt;&lt;P&gt;One of the things that is unclear is the position of the BOOT Header.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ivt-mem.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78467i03A2414D7C423861/image-size/large?v=v2&amp;amp;px=999" role="button" title="ivt-mem.png" alt="ivt-mem.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you examine this image you will see that it seems that the entire Boot Header should be copied to the target memory. I haven't done much testing. I just saw that if it is not mapped to the target memory (and therefore not copied) it doesn't work, otherwise it does. Actually I still have several ideas for ways to try. I will do it in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;HowTo&lt;/H2&gt;&lt;P&gt;To simplify, we will start from an example provided by the SDK: led_blinky.&lt;/P&gt;&lt;P&gt;I imported the example keeping all the default settings:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="import-example1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78514iED944C89B4D60329/image-size/large?v=v2&amp;amp;px=999" role="button" title="import-example1.png" alt="import-example1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="import-example2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78468i3682BA5C059061E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="import-example2.png" alt="import-example2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, for what we're going to do, it doesn't matter neither the library used, nor, for example, if the SDRAM is present or not (in my board there's no SDRAM), nor if the size of the flash is different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you have imported the project, you need to change a linker setting.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="plainLoadImage.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78555i724B6219EDB7E7B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="plainLoadImage.png" alt="plainLoadImage.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This setting allows MCUXpresso to automatically create a linker script as similar as possible to the one we need.&lt;/P&gt;&lt;P&gt;So just build (Ctrl+B)&lt;/P&gt;&lt;P&gt;Once the building's over, you will find the created linker script in Debug directory:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="DebugFolder.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78556iDE52563D71DD6277/image-size/large?v=v2&amp;amp;px=999" role="button" title="DebugFolder.png" alt="DebugFolder.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;you will need to edit this script to edit the line as shown in the following figure:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="boot_hdr.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78650i27B8C9767787011C/image-size/large?v=v2&amp;amp;px=999" role="button" title="boot_hdr.png" alt="boot_hdr.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This causes the boot header to be mapped to RAM.&lt;/P&gt;&lt;P&gt;And another line to edit is:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="linker_script_image_size.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78965i5923A842CDC21B26/image-size/large?v=v2&amp;amp;px=999" role="button" title="linker_script_image_size.png" alt="linker_script_image_size.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You have to replace LOADADDR(.text) with LOADADDR(.boot_hdr). This is used to calculate the correct size of the image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then go back to the linker settings to uncheck &lt;EM&gt;Manage linker script&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="UnmanageLinkerScript.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78693iC24441B2B3842227/image-size/large?v=v2&amp;amp;px=999" role="button" title="UnmanageLinkerScript.png" alt="UnmanageLinkerScript.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This makes MCUXpresso use the linker script just edited instead of overwriting it with a new one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last steps are more tricky: there is the need to edit a file provided by the SDK, which, in my opinion, is wrong.&lt;/P&gt;&lt;P&gt;The file is xip/fsl_flexspi_nor_boot.c&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="xip_nor_boot.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78739iFFD89F3BDD32E722/image-size/large?v=v2&amp;amp;px=999" role="button" title="xip_nor_boot.png" alt="xip_nor_boot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's contents is:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="nor_boot1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78786i92477BAA493363DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="nor_boot1.png" alt="nor_boot1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here is the IVT format:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ivt.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78839i3ECA409D72587CFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="ivt.png" alt="ivt.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;if you try to follow the IMAGE_ENTRY_ADDRESS symbol you will see that it is defined as the address of the interrupt vectors. In my opinion this is wrong. According to the description of IVT format it should be the address of the ResetISR function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the Boot Data format:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="bootData.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78923iE03FC27C1BA4C5DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="bootData.png" alt="bootData.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the fsl_flexspi_nor_boot.c Boot Data is populated with the address of the flash and the size of the flash. In my opinion this is wrong. Start field sould be in DTCM and length should be the actual size of the image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I wanted to copy also boot header I modified the file as follows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="nor_boot2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/79001i6DAD50EC9042C52C/image-size/large?v=v2&amp;amp;px=999" role="button" title="nor_boot2.png" alt="nor_boot2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That's it.&lt;BR /&gt;I repeat that there are probably cleaner ways, where maybe you don't waste 8KB of the target memory for the boot header. However, this is a starting point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know your feedback, comments, corrections and improvements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Nov 2018 23:15:45 GMT</pubDate>
    <dc:creator>mastupristi</dc:creator>
    <dc:date>2018-11-26T23:15:45Z</dc:date>
    <item>
      <title>A way to create a binary that is copied to RAM from the ROM bootloader in RT1050</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/803570#M982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, everyone,&lt;BR /&gt;in the last few days I have been looking for a way for the ROM bootloader to copy to DTC RAM the binary I was building. In this regard you have probably seen some posts of mine and a colleague of mine. (&lt;A href="http://tiny.cc/c8p90y"&gt;http://tiny.cc/c8p90y&lt;/A&gt; and &lt;A href="http://tiny.cc/l8p90y"&gt;http://tiny.cc/l8p90y&lt;/A&gt;)&lt;BR /&gt;We have succeeded in the task, and here I want to explain how we did it. I know that probably there will be better and more direct ways, but this one is definitely a working one.&lt;/P&gt;&lt;P&gt;First of all, I'll start by describing our scenario, which involves having a project independent of MCUXpresso. The binary must be able to be built by makefile with the least possible use of external tools (hopefully none). Our Micro is i.MX RT1051&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;The reference manual&lt;/H2&gt;&lt;P&gt;There are clues in the reference manual, but they are not conclusive.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="qspi-flowchart.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78425i20E781452F4F84C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="qspi-flowchart.png" alt="qspi-flowchart.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Given what is written it might seem that the copy can only be made to OCRAM, but I believe that it can really happen in any destination. In fact here &lt;A href="http://tiny.cc/22q90y"&gt;http://tiny.cc/22q90y&lt;/A&gt; there is an example to copy in SDRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H3&gt;BOOT Header&lt;/H3&gt;&lt;P&gt;One of the things that is unclear is the position of the BOOT Header.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ivt-mem.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78467i03A2414D7C423861/image-size/large?v=v2&amp;amp;px=999" role="button" title="ivt-mem.png" alt="ivt-mem.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you examine this image you will see that it seems that the entire Boot Header should be copied to the target memory. I haven't done much testing. I just saw that if it is not mapped to the target memory (and therefore not copied) it doesn't work, otherwise it does. Actually I still have several ideas for ways to try. I will do it in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;HowTo&lt;/H2&gt;&lt;P&gt;To simplify, we will start from an example provided by the SDK: led_blinky.&lt;/P&gt;&lt;P&gt;I imported the example keeping all the default settings:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="import-example1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78514iED944C89B4D60329/image-size/large?v=v2&amp;amp;px=999" role="button" title="import-example1.png" alt="import-example1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="import-example2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78468i3682BA5C059061E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="import-example2.png" alt="import-example2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, for what we're going to do, it doesn't matter neither the library used, nor, for example, if the SDRAM is present or not (in my board there's no SDRAM), nor if the size of the flash is different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you have imported the project, you need to change a linker setting.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="plainLoadImage.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78555i724B6219EDB7E7B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="plainLoadImage.png" alt="plainLoadImage.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This setting allows MCUXpresso to automatically create a linker script as similar as possible to the one we need.&lt;/P&gt;&lt;P&gt;So just build (Ctrl+B)&lt;/P&gt;&lt;P&gt;Once the building's over, you will find the created linker script in Debug directory:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="DebugFolder.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78556iDE52563D71DD6277/image-size/large?v=v2&amp;amp;px=999" role="button" title="DebugFolder.png" alt="DebugFolder.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;you will need to edit this script to edit the line as shown in the following figure:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="boot_hdr.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78650i27B8C9767787011C/image-size/large?v=v2&amp;amp;px=999" role="button" title="boot_hdr.png" alt="boot_hdr.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This causes the boot header to be mapped to RAM.&lt;/P&gt;&lt;P&gt;And another line to edit is:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="linker_script_image_size.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78965i5923A842CDC21B26/image-size/large?v=v2&amp;amp;px=999" role="button" title="linker_script_image_size.png" alt="linker_script_image_size.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You have to replace LOADADDR(.text) with LOADADDR(.boot_hdr). This is used to calculate the correct size of the image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then go back to the linker settings to uncheck &lt;EM&gt;Manage linker script&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="UnmanageLinkerScript.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78693iC24441B2B3842227/image-size/large?v=v2&amp;amp;px=999" role="button" title="UnmanageLinkerScript.png" alt="UnmanageLinkerScript.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This makes MCUXpresso use the linker script just edited instead of overwriting it with a new one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last steps are more tricky: there is the need to edit a file provided by the SDK, which, in my opinion, is wrong.&lt;/P&gt;&lt;P&gt;The file is xip/fsl_flexspi_nor_boot.c&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="xip_nor_boot.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78739iFFD89F3BDD32E722/image-size/large?v=v2&amp;amp;px=999" role="button" title="xip_nor_boot.png" alt="xip_nor_boot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's contents is:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="nor_boot1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78786i92477BAA493363DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="nor_boot1.png" alt="nor_boot1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here is the IVT format:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ivt.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78839i3ECA409D72587CFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="ivt.png" alt="ivt.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;if you try to follow the IMAGE_ENTRY_ADDRESS symbol you will see that it is defined as the address of the interrupt vectors. In my opinion this is wrong. According to the description of IVT format it should be the address of the ResetISR function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the Boot Data format:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="bootData.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78923iE03FC27C1BA4C5DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="bootData.png" alt="bootData.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the fsl_flexspi_nor_boot.c Boot Data is populated with the address of the flash and the size of the flash. In my opinion this is wrong. Start field sould be in DTCM and length should be the actual size of the image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I wanted to copy also boot header I modified the file as follows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="nor_boot2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/79001i6DAD50EC9042C52C/image-size/large?v=v2&amp;amp;px=999" role="button" title="nor_boot2.png" alt="nor_boot2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That's it.&lt;BR /&gt;I repeat that there are probably cleaner ways, where maybe you don't waste 8KB of the target memory for the boot header. However, this is a starting point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know your feedback, comments, corrections and improvements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2018 23:15:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/803570#M982</guid>
      <dc:creator>mastupristi</dc:creator>
      <dc:date>2018-11-26T23:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: A way to create a binary that is copied to RAM from the ROM bootloader in RT1050</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/803571#M983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great work, Max!&lt;/P&gt;&lt;P&gt;Just one caveat: if you plan to execute from QSPI, you also need to modify the flexspi_nor_config.c file with the correct decoration.&lt;/P&gt;&lt;P&gt;Moreover, the default project adds a DCD block. It is important to ensure that the commands inside are what you need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2018 11:44:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/803571#M983</guid>
      <dc:creator>giuseppescarpi</dc:creator>
      <dc:date>2018-11-27T11:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: A way to create a binary that is copied to RAM from the ROM bootloader in RT1050</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/803572#M984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also try this tool, with this tool, You can flash bare image into various boot devices easily and don't need to care about headers (ivt, boot data...)&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/JayHeng/nxp-sec-boot-ui" title="https://github.com/JayHeng/nxp-sec-boot-ui"&gt;GitHub - JayHeng/nxp-sec-boot-ui: A one-stop GUI tool to work with NXP MCU (Kinetis, i.MXRT, LPC) ROM bootloader, It can…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2018 05:12:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/803572#M984</guid>
      <dc:creator>jay_heng</dc:creator>
      <dc:date>2018-12-23T05:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: A way to create a binary that is copied to RAM from the ROM bootloader in RT1050</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/803573#M985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What an incredibly helpful post!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An additional thing that I needed to do to get it working was to add some linker flags:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;-Wl,--undefined=hyperflash_config&lt;/P&gt;&lt;P&gt;-Wl,--undefined=image_vector_table&lt;/P&gt;&lt;P&gt;-Wl,--undefined=dcd_data&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Without these flags, the linker was discarding all the boot info. (This was because the boot info was not referenced from 'main' and also was being compiled into some '.a' archive before being linked together into the binary.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A good explanation is at &lt;A class="link-titled" href="https://stackoverflow.com/questions/44675582/gcc-how-to-tell-linker-not-to-skip-unused-sections" title="https://stackoverflow.com/questions/44675582/gcc-how-to-tell-linker-not-to-skip-unused-sections"&gt;cmake - GCC - how to tell linker not to skip unused sections - Stack Overflow&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a side note, I didn't need to change the IVT's entry point to 'ResetISR' as described by Massimiliano. Booting worked both when I left it pointing at the interrupt vectors or changed it 'ResetISR'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 09:45:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/803573#M985</guid>
      <dc:creator>richarddonkin</dc:creator>
      <dc:date>2019-07-25T09:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: A way to create a binary that is copied to RAM from the ROM bootloader in RT1050</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/803574#M986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="266483" data-username="mastupristi" href="https://community.nxp.com/people/mastupristi" style="color: #3d9ce7; background-color: #ffffff; border: 0px; font-weight: 600; text-decoration: underline; font-size: 11.9994px;"&gt;Massimiliano Cialdi&lt;/A&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for sharing this it is really helpful! Just one thing as heads-up for anyone who's using this approach. The modifications made to the linkerscript didn't take into consideration the initialized global variables, so if you have an initialized global variable you won't see the correct value on it. As a workaround, you can declare global variables but don't initialize them until you are on the main of your application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Victor&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2020 22:43:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/803574#M986</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2020-03-13T22:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: A way to create a binary that is copied to RAM from the ROM bootloader in RT1050</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/1273886#M14148</link>
      <description>&lt;P&gt;Hi i cant seem to get this to work, could some one point me to an example git repo.&amp;nbsp;&lt;BR /&gt;here is the ivt...&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;0001000 00d1 4120 231d 2000 0000 0000 0000 0000&lt;BR /&gt;0001010 5040 2000 1000 2000 0000 0000 0000 0000&lt;BR /&gt;0001020 ffff ffff ffff ffff ffff ffff ffff ffff&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;which is obviously wrong&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 23:25:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/1273886#M14148</guid>
      <dc:creator>Mr-Bossman</dc:creator>
      <dc:date>2021-05-07T23:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: A way to create a binary that is copied to RAM from the ROM bootloader in RT1050</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/1385914#M17525</link>
      <description>&lt;P&gt;Hello world,&lt;/P&gt;&lt;P&gt;If you are using the imxrt1060 you need to set GPR_FLEXRAM_BANK_CFG to&amp;nbsp;&lt;SPAN&gt;0xaaaaaaaa so it uses the DTCM on the 1050 it is not cleared by the boot-loader. I have tried using the OCRAM on the 1050 and 1060 but cant seem to get it to work as the boot-loader&amp;nbsp;seems to use the DTCM.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To configure ram banking I used the DCD. Although it is weird that the 1050 has the&amp;nbsp;BANK_CFG set to 0x55555555 after the boot-loader&amp;nbsp;exits and the 1060 sets it to 0.&lt;BR /&gt;&lt;BR /&gt;Mabey some one can figure out how to boot into OCRAM and not DTC&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 00:35:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/1385914#M17525</guid>
      <dc:creator>Mr-Bossman</dc:creator>
      <dc:date>2021-12-14T00:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: A way to create a binary that is copied to RAM from the ROM bootloader in RT1050</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/1580701#M23255</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/126273"&gt;@victorjimenez&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;yes it's true, you have to add the boot_hdr size as offset as below:&lt;/P&gt;&lt;P&gt;/* MAIN TEXT SECTION */&lt;BR /&gt;.text : ALIGN(4)&lt;BR /&gt;{&lt;BR /&gt;FILL(0xff)&lt;BR /&gt;__vectors_start__ = ABSOLUTE(.) ;&lt;BR /&gt;KEEP(*(.isr_vector))&lt;BR /&gt;/* Global Section Table */&lt;BR /&gt;. = ALIGN(4) ;&lt;BR /&gt;__section_table_start = .;&lt;BR /&gt;__data_section_table = .;&lt;BR /&gt;LONG((LOADADDR(.data) - LOADADDR(.text) + &lt;STRONG&gt;0x2000&lt;/STRONG&gt;) + __base_SRAM_ITC);&lt;BR /&gt;LONG( ADDR(.data));&lt;BR /&gt;LONG( SIZEOF(.data));&lt;BR /&gt;LONG((LOADADDR(.data_RAM2) - LOADADDR(.text) + &lt;STRONG&gt;0x2000&lt;/STRONG&gt;) + __base_SRAM_ITC);&lt;BR /&gt;LONG( ADDR(.data_RAM2));&lt;BR /&gt;LONG( SIZEOF(.data_RAM2));&lt;BR /&gt;LONG((LOADADDR(.data_RAM3) - LOADADDR(.text) + &lt;STRONG&gt;0x2000&lt;/STRONG&gt;) + __base_SRAM_ITC);&lt;BR /&gt;LONG( ADDR(.data_RAM3));&lt;BR /&gt;LONG( SIZEOF(.data_RAM3));&lt;BR /&gt;LONG((LOADADDR(.data_RAM4) - LOADADDR(.text) + &lt;STRONG&gt;0x2000&lt;/STRONG&gt;) + __base_SRAM_ITC);&lt;BR /&gt;LONG( ADDR(.data_RAM4));&lt;BR /&gt;LONG( SIZEOF(.data_RAM4));&lt;BR /&gt;__data_section_table_end = .;&lt;BR /&gt;__bss_section_table = .;&lt;BR /&gt;LONG( ADDR(.bss));&lt;BR /&gt;LONG( SIZEOF(.bss));&lt;BR /&gt;LONG( ADDR(.bss_RAM2));&lt;BR /&gt;LONG( SIZEOF(.bss_RAM2));&lt;BR /&gt;LONG( ADDR(.bss_RAM3));&lt;BR /&gt;LONG( SIZEOF(.bss_RAM3));&lt;BR /&gt;LONG( ADDR(.bss_RAM4));&lt;BR /&gt;LONG( SIZEOF(.bss_RAM4));&lt;BR /&gt;__bss_section_table_end = .;&lt;BR /&gt;__section_table_end = . ;&lt;BR /&gt;/* End of Global Section Table */&lt;/P&gt;&lt;P&gt;*(.after_vectors*)&lt;/P&gt;&lt;P&gt;*(.text*)&lt;BR /&gt;KEEP(*freertos*/tasks.o(.rodata*)) /* FreeRTOS Debug Config */&lt;BR /&gt;*(.rodata .rodata.* .constdata .constdata.*)&lt;BR /&gt;. = ALIGN(4);&lt;BR /&gt;} &amp;gt; SRAM_ITC AT&amp;gt; PROGRAM_FLASH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 09:11:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p/1580701#M23255</guid>
      <dc:creator>GiulioDallaVecchia</dc:creator>
      <dc:date>2023-01-11T09:11:16Z</dc:date>
    </item>
  </channel>
</rss>

