<?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 for MCU中的主题 Re: _startupData and start08.c</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/startupData-and-start08-c/m-p/162865#M4565</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The startup structure is created by the linker and contains information processed at application startup.&lt;/DIV&gt;&lt;DIV&gt;Different fields and their usage are documented in the Build Tools reference manual.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Take a look at {Install}\Help\PDF\Build_Tools_Utilities.pdf.&lt;/DIV&gt;&lt;DIV&gt;In chapter "SmartLinker" section "Program Startup" you should be able to find information of the startup&amp;nbsp;structure.&lt;/DIV&gt;&lt;DIV&gt;Looking into the .map file you can also see how this structure is initialized (and check what did change since last build).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You can decide to get rid of the startup code and startup structure but in that case you have to make sure that all global variables are initialized through assignment in the application code.&lt;/DIV&gt;&lt;DIV&gt;You cannot have any global variable defined with an initialization value in that case.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If this is the way you want to go just add the option -D__ONLY_INIT_SP to your compiler command line and make sure you rebuild at least the file start08.c&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Be careful if you are working in that configuration it is your responsibility as a programmer to ensure that application global variables are initialized properly.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jun 2008 19:02:31 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2008-06-10T19:02:31Z</dc:date>
    <item>
      <title>_startupData and start08.c</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/startupData-and-start08-c/m-p/162864#M4564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Every time I change my source code and I rebuilt it, the startupData changes (I can notice a difference by looking in the s19 file). The problem I am having is that I am working on some in-chip programmability and I can not update the part of the flash where the startup routine is stored. And the startupData is stored in this particular section. Is there any way to keep this part constant? What are this startupData used for ?, is it possible to know where it takes its initialization?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cyril&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2008 16:36:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/startupData-and-start08-c/m-p/162864#M4564</guid>
      <dc:creator>CyrilG_</dc:creator>
      <dc:date>2008-06-10T16:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: _startupData and start08.c</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/startupData-and-start08-c/m-p/162865#M4565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The startup structure is created by the linker and contains information processed at application startup.&lt;/DIV&gt;&lt;DIV&gt;Different fields and their usage are documented in the Build Tools reference manual.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Take a look at {Install}\Help\PDF\Build_Tools_Utilities.pdf.&lt;/DIV&gt;&lt;DIV&gt;In chapter "SmartLinker" section "Program Startup" you should be able to find information of the startup&amp;nbsp;structure.&lt;/DIV&gt;&lt;DIV&gt;Looking into the .map file you can also see how this structure is initialized (and check what did change since last build).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You can decide to get rid of the startup code and startup structure but in that case you have to make sure that all global variables are initialized through assignment in the application code.&lt;/DIV&gt;&lt;DIV&gt;You cannot have any global variable defined with an initialization value in that case.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If this is the way you want to go just add the option -D__ONLY_INIT_SP to your compiler command line and make sure you rebuild at least the file start08.c&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Be careful if you are working in that configuration it is your responsibility as a programmer to ensure that application global variables are initialized properly.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2008 19:02:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/startupData-and-start08-c/m-p/162865#M4565</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2008-06-10T19:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: _startupData and start08.c</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/startupData-and-start08-c/m-p/162866#M4566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks for this information. I tried what you said and I was able to pinpoint exactly what variable changes everytime I change the source code. It is the variable&amp;nbsp; toCopyDownBeg. Is there any way to keep this value constant (maybe by modifying the prm file?)&amp;nbsp;or the only way is like you said, use the __ONLY_INIT_SP compiler option ? In the latter&amp;nbsp;option,&amp;nbsp; I just have to ensure that all the global variables are initialized somewhere in the code (and not when I declare them), is that right?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;DIV&gt;Cyril&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2008 19:49:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/startupData-and-start08-c/m-p/162866#M4566</guid>
      <dc:creator>CyrilG_</dc:creator>
      <dc:date>2008-06-10T19:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: _startupData and start08.c</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/startupData-and-start08-c/m-p/162867#M4567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;toCopyDownBeg points to the .copy section. As this section must be the last in a section list,&lt;BR /&gt;you could allocate .copy into its own segment in the prm file.&lt;BR /&gt;And yes, with __ONLY_INIT_SP globals wont be initialized, not even to 0.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;PS: I think the more usual setup is to have multiple applications for the fixed and the updated part just to make sure those are really independent and changes like this do not break the compatibility. Of course this approach works too, one just needs to be quite careful with all changes.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2008 21:51:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/startupData-and-start08-c/m-p/162867#M4567</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2008-06-10T21:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: _startupData and start08.c</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/startupData-and-start08-c/m-p/162868#M4568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thank you, it worked perfectly. In the prm file I added to a line to put the .copy in a particular location in memory and now I don't have any problem.&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Cyril&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 16:35:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/startupData-and-start08-c/m-p/162868#M4568</guid>
      <dc:creator>CyrilG_</dc:creator>
      <dc:date>2008-06-11T16:35:20Z</dc:date>
    </item>
  </channel>
</rss>

