<?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>MCUXpresso General中的主题 Re: How to allocate an array</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743013#M354</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Giovanni,&lt;/P&gt;&lt;P&gt;see that article above: you can decide at which address you want the data and tell this the linker.&lt;/P&gt;&lt;P&gt;Additionally, you can configure the linker file of the MCUXPresso IDE with your own linker file script extensions using the managed linker script, see &lt;A class="link-titled" href="https://mcuoneclipse.com/2017/08/29/tutorial-porting-blenrf-kinetis-design-studio-project-to-mcuxpresso-ide/" title="https://mcuoneclipse.com/2017/08/29/tutorial-porting-blenrf-kinetis-design-studio-project-to-mcuxpresso-ide/"&gt;Tutorial: Porting BLE+NRF Kinetis Design Studio Project to MCUXpresso IDE | MCU on Eclipse&lt;/A&gt;&amp;nbsp; as a possible use case. It shows how to add custom sections to the linker file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Nov 2017 13:34:55 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2017-11-02T13:34:55Z</dc:date>
    <item>
      <title>How to allocate an array</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743008#M349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using LPC54608 with MCUXPresso IDE. I'd like to allocate an array of const uint8:t at a fixed address of read only memory. ( address 0x7ffc) I tried to use the keywoord __allocate__at&amp;nbsp; but it doesn't work. Someone could help me ?&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Giovanni Grondona&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 08:24:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743008#M349</guid>
      <dc:creator>giannigrondona</dc:creator>
      <dc:date>2017-11-02T08:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to allocate an array</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743009#M350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Giovanni,&lt;/P&gt;&lt;P&gt;this one should help you: &lt;A class="link-titled" href="https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/" title="https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/"&gt;Defining Variables at Absolute Addresses with gcc | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition to that, check the MCUXpresso IDE user Guide (in the Help menu):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/18065i5052F0F485376B02/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 10:22:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743009#M350</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-11-02T10:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to allocate an array</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743010#M351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Enrich thnak you for upir help, I know I can place&amp;nbsp; my code or my data in different memory support ( internal flash memory&amp;nbsp; or serial flash memory or external RAM) but&amp;nbsp;&lt;EM&gt; cannot choose the address where to put my data. The address is choosen by linker,&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 10:54:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743010#M351</guid>
      <dc:creator>giannigrondona</dc:creator>
      <dc:date>2017-11-02T10:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to allocate an array</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743011#M352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A custom section needs added to the linker script file with the fixed address that you want to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quickly hacked example of far from complete linker section for GCC from linker script I had at hand:&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;MYTABLE = 0x7FFC;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.mtb : /* Micro Trace Buffer (MTB) memory buffer address as defined by the hardware */&lt;BR /&gt; {&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; _mtb_start = .;&lt;/P&gt;&lt;P&gt;. = 1K; /* Allocate 1K of space for MYTABLE */&lt;BR /&gt; KEEP(*(.mtb_buf)) /* Need to KEEP MBT as not referenced by application */&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; _mtb_end = .;&lt;BR /&gt; } &amp;gt; MYTABLE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do define it in C:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define SA_MTB_ALIGNEMENT (64U) /* Alignment of the MTB buffer */&lt;BR /&gt;uint8_t __attribute__((section (".mtb_buf"))) mtb_buf[__SA_MTB_SIZE] __attribute__ ((aligned (SA_MTB_ALIGNEMENT)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure to align the table to a 4, 8, or 64 byte boundary as needed using the ALIGN directive to prevent bus faults on some parts.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;BTW 0x7FFC seems like an unlikely address to use for all but the smallest of parts, it will collide with code in the .text section.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 12:43:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743011#M352</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2017-11-02T12:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to allocate an array</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743012#M353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bob&lt;/P&gt;&lt;P&gt;Thank you for your help. I use MCUXpresso as IDE and it generates in automatic way the script file, so I am not able to add&amp;nbsp; custom sections .How can I do ?&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Giovanni Grondona&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 13:29:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743012#M353</guid>
      <dc:creator>giannigrondona</dc:creator>
      <dc:date>2017-11-02T13:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to allocate an array</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743013#M354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Giovanni,&lt;/P&gt;&lt;P&gt;see that article above: you can decide at which address you want the data and tell this the linker.&lt;/P&gt;&lt;P&gt;Additionally, you can configure the linker file of the MCUXPresso IDE with your own linker file script extensions using the managed linker script, see &lt;A class="link-titled" href="https://mcuoneclipse.com/2017/08/29/tutorial-porting-blenrf-kinetis-design-studio-project-to-mcuxpresso-ide/" title="https://mcuoneclipse.com/2017/08/29/tutorial-porting-blenrf-kinetis-design-studio-project-to-mcuxpresso-ide/"&gt;Tutorial: Porting BLE+NRF Kinetis Design Studio Project to MCUXpresso IDE | MCU on Eclipse&lt;/A&gt;&amp;nbsp; as a possible use case. It shows how to add custom sections to the linker file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 13:34:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-allocate-an-array/m-p/743013#M354</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-11-02T13:34:55Z</dc:date>
    </item>
  </channel>
</rss>

