<?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 How to define an absolute section with C in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-define-an-absolute-section-with-C/m-p/126682#M191</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to define an absolute data section. How am I going to implement this with c. I tried to declare a global array but it is stored in RAM. I want it to be stored in flash memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you all in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anastasios&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Feb 2006 03:25:02 GMT</pubDate>
    <dc:creator>Anastasios</dc:creator>
    <dc:date>2006-02-21T03:25:02Z</dc:date>
    <item>
      <title>How to define an absolute section with C</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-define-an-absolute-section-with-C/m-p/126682#M191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to define an absolute data section. How am I going to implement this with c. I tried to declare a global array but it is stored in RAM. I want it to be stored in flash memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you all in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anastasios&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2006 03:25:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-define-an-absolute-section-with-C/m-p/126682#M191</guid>
      <dc:creator>Anastasios</dc:creator>
      <dc:date>2006-02-21T03:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to define an absolute section with C</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-define-an-absolute-section-with-C/m-p/126683#M192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="3"&gt;Hello Anastasios,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;If you just need to store the array data in flash, without concern over the precise location, the following declaration seems to work:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;const char string_array1[] = "String1";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2006 09:52:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-define-an-absolute-section-with-C/m-p/126683#M192</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-02-21T09:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to define an absolute section with C</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-define-an-absolute-section-with-C/m-p/126684#M193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks Mac and you are right this works.But although I don't mind where it goes in the flash i care that different arrays follow one another in memory. This happens if you declare them one next to the other but arrays have the \0 character in the end so information is not continuous.&lt;BR /&gt;&lt;BR /&gt;I tried to declare a struct&lt;BR /&gt;&lt;BR /&gt;struct Mem_Function{&lt;BR /&gt;char point1;&lt;BR /&gt;char point2;&lt;BR /&gt;char slope1;&lt;BR /&gt;char slope2;&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;typedef struct Mem_Function Mem_Func;&lt;BR /&gt;&lt;BR /&gt;I declare o const instance&lt;BR /&gt;&lt;BR /&gt;const Mem_Func foo;&lt;BR /&gt;&lt;BR /&gt;but I don't now how to initialize it,I can't do it in main neither before it(compiler errors).&lt;BR /&gt;&lt;BR /&gt;I think I always can do a trick like declaring continious "const long" variables but I really woud like a C data structure so I can handle it in functions.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Anastasios&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2006 23:47:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-define-an-absolute-section-with-C/m-p/126684#M193</guid>
      <dc:creator>Anastasios</dc:creator>
      <dc:date>2006-02-21T23:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to define an absolute section with C</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-define-an-absolute-section-with-C/m-p/126685#M194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Found it,I should have initialized it in declaration&lt;BR /&gt;&lt;BR /&gt;const Mem_Func foo={a,b,..};&lt;BR /&gt;&lt;BR /&gt;Anastasios&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2006 01:01:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-define-an-absolute-section-with-C/m-p/126685#M194</guid>
      <dc:creator>Anastasios</dc:creator>
      <dc:date>2006-02-22T01:01:41Z</dc:date>
    </item>
  </channel>
</rss>

