<?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: AN4370: Modifying the application linker file in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4370-Modifying-the-application-linker-file/m-p/291595#M11699</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The IMAGE_ADDR is defined as 0xA000 in the bootloader.h file.&lt;/P&gt;&lt;P&gt;Linker file can be modified as below:&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_intvec_start__ = 0x0000A000;&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_region_ROM_start__ = 0x0000A000;&lt;/P&gt;&lt;P&gt;define symbol __code_start__ = 0x0000A410;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bootloader code actually does not occupy so large code size. You may change the IMAGE_ADDR to 0x4000 and change the linker file to.&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_intvec_start__ = 0x00004000;&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_region_ROM_start__ = 0x00004000;&lt;/P&gt;&lt;P&gt;define symbol __code_start__ = 0x00004410;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 May 2013 03:25:40 GMT</pubDate>
    <dc:creator>DerekLau</dc:creator>
    <dc:date>2013-05-02T03:25:40Z</dc:date>
    <item>
      <title>AN4370: Modifying the application linker file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4370-Modifying-the-application-linker-file/m-p/291594#M11698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working with a &lt;SPAN style="color: #ff0000;"&gt;TWR-K20D50M&lt;/SPAN&gt; and the software that goes along with &lt;SPAN style="color: #ff0000;"&gt;AN4370&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using IAR for ARM v6.5, and am currently able to upload the dfu bootloader application to the board.&amp;nbsp; The microusb port can enumerate as a DFU device, and I can use the dfu_example.exe to flash the example k20 binary to the board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When it comes to uploading a different binary, whether it be an MQX or bare metal application, I am unsure exactly what to modify in the linker application file.&amp;nbsp; I have tried fiddling with different values in a bare metal hello world example, but it is not generating a usable binary (it will upload with the dfu_example.exe, but it does not run properly).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In sections 4.1.3 and 4.2.2.3, it describes what needs to be changed for Kinetis boards.&amp;nbsp; It even shows a modified linker file, but in a code warrior context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I translate this process to the IAR environment?&amp;nbsp; It is just different enough to where I am unable to generate a working binary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help or tips would be greatly appreciated.&amp;nbsp; Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2013 17:23:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4370-Modifying-the-application-linker-file/m-p/291594#M11698</guid>
      <dc:creator>vincentdin</dc:creator>
      <dc:date>2013-04-30T17:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: AN4370: Modifying the application linker file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4370-Modifying-the-application-linker-file/m-p/291595#M11699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The IMAGE_ADDR is defined as 0xA000 in the bootloader.h file.&lt;/P&gt;&lt;P&gt;Linker file can be modified as below:&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_intvec_start__ = 0x0000A000;&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_region_ROM_start__ = 0x0000A000;&lt;/P&gt;&lt;P&gt;define symbol __code_start__ = 0x0000A410;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bootloader code actually does not occupy so large code size. You may change the IMAGE_ADDR to 0x4000 and change the linker file to.&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_intvec_start__ = 0x00004000;&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_region_ROM_start__ = 0x00004000;&lt;/P&gt;&lt;P&gt;define symbol __code_start__ = 0x00004410;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 03:25:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4370-Modifying-the-application-linker-file/m-p/291595#M11699</guid>
      <dc:creator>DerekLau</dc:creator>
      <dc:date>2013-05-02T03:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: AN4370: Modifying the application linker file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4370-Modifying-the-application-linker-file/m-p/291596#M11700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DerekLau,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;I got it to work!&lt;/P&gt;&lt;P&gt;Here is what I did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) leave bootloader linker file unchanged&lt;/P&gt;&lt;P&gt;2) change application linker file as follows&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define symbol __ICFEDIT_intvec_start__ = 0x0000A000;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define symbol __ICFEDIT_region_ROM_start__ = 0x0000A000;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define symbol __code_start__ = 0x0000A410;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define exported symbol __VECTOR_TABLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x0000A000;&amp;nbsp; //had to modify this line, too&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I did try changing image address to 0x4000 along with the changes you suggested (for the bootloader application), but this caused problems with the dfu application (it would no longer enumerate as a DFU device).&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;-Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 18:37:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4370-Modifying-the-application-linker-file/m-p/291596#M11700</guid>
      <dc:creator>vincentdin</dc:creator>
      <dc:date>2013-05-02T18:37:54Z</dc:date>
    </item>
  </channel>
</rss>

