<?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>Kinetis Design Studioのトピックkinetis with fPIC (position independent code)</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/kinetis-with-fPIC-position-independent-code/m-p/380128#M2037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Enabling -fPIC in kinetis design studio results in this error:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;c:/freescale/kds_1.1.1/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.0/../../../../arm-none-eabi/bin/ld.exe: section .got loaded at [000012bc,000012cf] overlaps section .romp loaded at [000012bc,000012df]&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using kds 1.1.1 with FRDM-K22F, project has ksdk disabled and processor expert enabled.&amp;nbsp; Is there a way to use -fPIC or otherwise compile for position independent code on kinetis?&amp;nbsp; If not, is there a way to compile code to be placed in a specific flash address?&amp;nbsp; I'm trying to implement a bootloader.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Nov 2014 18:19:53 GMT</pubDate>
    <dc:creator>robotjosh</dc:creator>
    <dc:date>2014-11-28T18:19:53Z</dc:date>
    <item>
      <title>kinetis with fPIC (position independent code)</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/kinetis-with-fPIC-position-independent-code/m-p/380128#M2037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Enabling -fPIC in kinetis design studio results in this error:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;c:/freescale/kds_1.1.1/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.0/../../../../arm-none-eabi/bin/ld.exe: section .got loaded at [000012bc,000012cf] overlaps section .romp loaded at [000012bc,000012df]&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using kds 1.1.1 with FRDM-K22F, project has ksdk disabled and processor expert enabled.&amp;nbsp; Is there a way to use -fPIC or otherwise compile for position independent code on kinetis?&amp;nbsp; If not, is there a way to compile code to be placed in a specific flash address?&amp;nbsp; I'm trying to implement a bootloader.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 18:19:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/kinetis-with-fPIC-position-independent-code/m-p/380128#M2037</guid>
      <dc:creator>robotjosh</dc:creator>
      <dc:date>2014-11-28T18:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis with fPIC (position independent code)</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/kinetis-with-fPIC-position-independent-code/m-p/380129#M2038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Josh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GCC does support the compiler directive for position independent code, here are some links that might be helpful for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;A href="https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html"&gt;https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;A href="http://www.delorie.com/gnu/docs/gcc/gccint_143.html"&gt;http://www.delorie.com/gnu/docs/gcc/gccint_143.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;A href="http://www.embedded.com/design/mcus-processors-and-socs/4026075/Building-Bare-Metal-ARM-Systems-with-GNU-Part-2"&gt;http://www.embedded.com/design/mcus-processors-and-socs/4026075/Building-Bare-Metal-ARM-Systems-with-GNU-Part-2&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your question on how to place code in a specific flash address, here is a document that explains this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-101433"&gt;Relocating Code and Data Using the CW GCC Linker File for Kinetis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2014 18:45:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/kinetis-with-fPIC-position-independent-code/m-p/380129#M2038</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2014-12-03T18:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis with fPIC (position independent code)</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/kinetis-with-fPIC-position-independent-code/m-p/380130#M2039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Carlos,&lt;/P&gt;&lt;P&gt;According to the first webpage you listed ( &lt;A href="https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html" title="https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html"&gt;Code Gen Options - Using the GNU Compiler Collection (GCC)&lt;/A&gt; ), it says:&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;-fpic&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&amp;nbsp; Generate position-independent code (PIC) suitable for use in a shared library, &lt;EM&gt;if supported for the target machine&lt;/EM&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So gcc supports -fpic and -fPIC, but does it work for Kinetis MCUs, specifically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In terms of Josh's original question, this is a good article: &lt;A href="https://community.nxp.com/docs/DOC-256669"&gt;Adapting KDS project for KBOOT flash resident bootloader&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 19:53:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/kinetis-with-fPIC-position-independent-code/m-p/380130#M2039</guid>
      <dc:creator>jonathanwong</dc:creator>
      <dc:date>2015-11-12T19:53:37Z</dc:date>
    </item>
  </channel>
</rss>

