<?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>CodeWarrior Development Tools中的主题 How to set a NO-INIT var in C startup runtime?</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-set-a-NO-INIT-var-in-C-startup-runtime/m-p/594350#M4816</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I konw I can edit *.PRM file to do this.&lt;/P&gt;&lt;P&gt;Is there a way like ARM compiler using "__no_init" command?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Aug 2016 06:21:25 GMT</pubDate>
    <dc:creator>w_tension</dc:creator>
    <dc:date>2016-08-12T06:21:25Z</dc:date>
    <item>
      <title>How to set a NO-INIT var in C startup runtime?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-set-a-NO-INIT-var-in-C-startup-runtime/m-p/594350#M4816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I konw I can edit *.PRM file to do this.&lt;/P&gt;&lt;P&gt;Is there a way like ARM compiler using "__no_init" command?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2016 06:21:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-set-a-NO-INIT-var-in-C-startup-runtime/m-p/594350#M4816</guid>
      <dc:creator>w_tension</dc:creator>
      <dc:date>2016-08-12T06:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a NO-INIT var in C startup runtime?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-set-a-NO-INIT-var-in-C-startup-runtime/m-p/594351#M4817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for posting your questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can't do this for a specific variable but we can do it for a section. I suggest you use NO_INIT qualifier to the RAM section that you don't want be initialized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NO_INIT: used for address ranges where read/write accesses are allowed. The linker does not initialize memory area defined with this qualifier at application startup. This is useful if your target has a battery-buffered RAM or to speed up application startup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;///////////////////////&lt;/P&gt;&lt;P&gt;SECTIONS&lt;/P&gt;&lt;P&gt;&amp;nbsp; ROM&amp;nbsp;&amp;nbsp; = READ_ONLY&amp;nbsp; 0x1000 SIZE 0x2000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLOCK = NO_INIT&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xFF00 TO&amp;nbsp;&amp;nbsp; 0xFFFF;&lt;/P&gt;&lt;P&gt;&amp;nbsp; RAM&amp;nbsp;&amp;nbsp; = READ_WRITE 0x3000 TO&amp;nbsp;&amp;nbsp; 0x3EFF;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Page0 = PAGED&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x4000 TO&amp;nbsp;&amp;nbsp; 0x4FFF;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Page1 = PAGED&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x4000 TO&amp;nbsp;&amp;nbsp; 0x4FFF;&lt;/P&gt;&lt;P&gt;END&lt;/P&gt;&lt;P&gt;/////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CLOCK section is a READ_WRITE memory area. It starts at address 0xFF00 and ends at 0xFFFF (size = 100 bytes). Variables allocated in this segment are not initialized at application startup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this answer your questions?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2016 07:09:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-set-a-NO-INIT-var-in-C-startup-runtime/m-p/594351#M4817</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2016-08-12T07:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a NO-INIT var in C startup runtime?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-set-a-NO-INIT-var-in-C-startup-runtime/m-p/1162598#M8460</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/13026"&gt;@ZhangJennie&lt;/a&gt;&amp;nbsp;your answer is helpful. I want to carve out a section of RAM with a NO_INIT qualifier for improved start up time.&lt;/P&gt;&lt;P&gt;How do I assign a variable to this particular segment?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 20:35:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-set-a-NO-INIT-var-in-C-startup-runtime/m-p/1162598#M8460</guid>
      <dc:creator>mihir_rajput</dc:creator>
      <dc:date>2020-10-03T20:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a NO-INIT var in C startup runtime?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-set-a-NO-INIT-var-in-C-startup-runtime/m-p/1162643#M8461</link>
      <description>&lt;P&gt;&lt;STRONG&gt;In a c file:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG restart_detection_ram_data&lt;BR /&gt;static RestartStruct_t restart;&lt;BR /&gt;#pragma DATA_SEG DEFAULT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In prm file:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SEGMENTS&lt;/P&gt;&lt;P&gt;/* RAM 8k */&lt;BR /&gt;STARTUP_RAM = NO_INIT 0x001000 TO 0x00103F; // 64 bytes&lt;/P&gt;&lt;P&gt;RAM = READ_WRITE 0x001040 TO 0x002DFF; // 8k - 64 - 512 bytes&lt;/P&gt;&lt;P&gt;PLACEMENT&lt;/P&gt;&lt;P&gt;SSTACK, /* allocate stack first to avoid overwriting variables on overflow */&lt;BR /&gt;DEFAULT_RAM INTO RAM;&lt;BR /&gt;restart_detection_ram_data INTO STARTUP_RAM;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 23:45:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-set-a-NO-INIT-var-in-C-startup-runtime/m-p/1162643#M8461</guid>
      <dc:creator>mihir_rajput</dc:creator>
      <dc:date>2020-10-04T23:45:32Z</dc:date>
    </item>
  </channel>
</rss>

