<?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中的主题 Re: How do I declare an array in a different segment?</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/How-do-I-declare-an-array-in-a-different-segment/m-p/321075#M353</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Don,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you’d like to see how the GCC build tools in KDS can do this, you can use KDS to create a new project, and use it as an example.  The interrupt vector table is forced to a specific memory section.  I created a project with Processor Expert for the K64, and in vectors.c, the line below forces the vector table array into the .vectortable memory section.  You can also review the linker file *.ld added to the project to see how .vectortable is used in the linker file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__attribute__ ((section (".vectortable"))) const tVectorTable __vect_table = { /* Interrupt vector table */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jul 2014 22:14:15 GMT</pubDate>
    <dc:creator>dereksnell</dc:creator>
    <dc:date>2014-07-16T22:14:15Z</dc:date>
    <item>
      <title>How do I declare an array in a different segment?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/How-do-I-declare-an-array-in-a-different-segment/m-p/321074#M352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In CodeWarrior, I did this:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: Consolas;"&gt;&lt;SPAN style="color: #931a68;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt; define_section my_ram2 &lt;SPAN style="color: #3933ff;"&gt;".display"&lt;/SPAN&gt; abs32 RW&lt;/P&gt;&lt;P&gt;__declspec(section "my_ram2") uint8 Display[511];&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not work in KDS.&amp;nbsp; I get an error saying that Display is undeclared.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 21:10:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/How-do-I-declare-an-array-in-a-different-segment/m-p/321074#M352</guid>
      <dc:creator>dporada</dc:creator>
      <dc:date>2014-07-16T21:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I declare an array in a different segment?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/How-do-I-declare-an-array-in-a-different-segment/m-p/321075#M353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Don,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you’d like to see how the GCC build tools in KDS can do this, you can use KDS to create a new project, and use it as an example.  The interrupt vector table is forced to a specific memory section.  I created a project with Processor Expert for the K64, and in vectors.c, the line below forces the vector table array into the .vectortable memory section.  You can also review the linker file *.ld added to the project to see how .vectortable is used in the linker file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__attribute__ ((section (".vectortable"))) const tVectorTable __vect_table = { /* Interrupt vector table */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 22:14:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/How-do-I-declare-an-array-in-a-different-segment/m-p/321075#M353</guid>
      <dc:creator>dereksnell</dc:creator>
      <dc:date>2014-07-16T22:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I declare an array in a different segment?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/How-do-I-declare-an-array-in-a-different-segment/m-p/321076#M354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Donald:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The response by colleague Derek Snell is correct, you need &lt;STRONG&gt;__attribute__&lt;/STRONG&gt; ((section (...) )), and modify the linker file as necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some tutorials and code examples about this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/" title="http://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;&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;&lt;A href="https://community.nxp.com/message/391758"&gt;Re: Controlling data and function placement in memory&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/364619"&gt;Re: Re: Syntax to allocate memory assignments to faster memory&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge_Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 01:01:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/How-do-I-declare-an-array-in-a-different-segment/m-p/321076#M354</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2014-07-17T01:01:48Z</dc:date>
    </item>
  </channel>
</rss>

