<?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: #define register</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/define-register/m-p/168027#M5035</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Ignore my previous message.&amp;nbsp; It works as long as I assign a value to the memory register inside of main().&amp;nbsp; Thanks again.&amp;nbsp; Erik&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Nov 2007 03:13:03 GMT</pubDate>
    <dc:creator>elee40</dc:creator>
    <dc:date>2007-11-30T03:13:03Z</dc:date>
    <item>
      <title>#define register</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/define-register/m-p/168024#M5032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I am using a freescale hc12 with codewarrior and trying to use a #define to refer to a memory register but continue to receive an error.&amp;nbsp; The error I get is&lt;/DIV&gt;&lt;DIV&gt;C2450: Expected ~ (IDENT&amp;nbsp;auto const extern register static typedef volatile__interrupt friend inline operator virtual) .&amp;nbsp; I realize that these definitions are already in the header files....But for educational purposes I am trying to define my own references to the memory registers. Any help or suggestions would be much appreciated.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#include &amp;lt;hidef.h&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* common defines and macros */&lt;BR /&gt;#include &amp;lt;mc9s12dt256.h&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* derivative information */&lt;BR /&gt;#pragma LINK_INFO DERIVATIVE "mc9s12dt256b"&lt;/DIV&gt;&lt;DIV&gt;#define EPCNT 0x000000AC&lt;BR /&gt;EPCNT = 0;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; Thanks&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Erik&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2007 00:44:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/define-register/m-p/168024#M5032</guid>
      <dc:creator>elee40</dc:creator>
      <dc:date>2007-11-29T00:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: #define register</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/define-register/m-p/168025#M5033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;try something like this:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#define PORTA&amp;nbsp;&amp;nbsp;&amp;nbsp; (*((volatile unsigned char*) (0x0000)))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;what you are doing is only defining the number to a word.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;you will probably get a link error about duplicate register names.&amp;nbsp; i usually change that to a warning and ignore.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2007 04:44:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/define-register/m-p/168025#M5033</guid>
      <dc:creator>joeservo</dc:creator>
      <dc:date>2007-11-29T04:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: #define register</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/define-register/m-p/168026#M5034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Still getting error C2450: Expected: ~ (IDENT operator .&amp;nbsp; Also getting error C1067: Object is missing decl specifiers.&amp;nbsp; I looked at the help under these errors, but as I am not the greatest programmer the explanation was not clear.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#include &amp;lt;hidef.h&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* common defines and macros */&lt;BR /&gt;#include &amp;lt;mc9s12dt256.h&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* derivative information */&lt;BR /&gt;#pragma LINK_INFO DERIVATIVE "mc9s12dt256b"&lt;/DIV&gt;&lt;DIV&gt;#define EPWM (*((volatile unsigned char*) (0x000000AC)))&lt;BR /&gt;EPWM = 0;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Erik&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2007 03:10:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/define-register/m-p/168026#M5034</guid>
      <dc:creator>elee40</dc:creator>
      <dc:date>2007-11-30T03:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: #define register</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/define-register/m-p/168027#M5035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Ignore my previous message.&amp;nbsp; It works as long as I assign a value to the memory register inside of main().&amp;nbsp; Thanks again.&amp;nbsp; Erik&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2007 03:13:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/define-register/m-p/168027#M5035</guid>
      <dc:creator>elee40</dc:creator>
      <dc:date>2007-11-30T03:13:03Z</dc:date>
    </item>
  </channel>
</rss>

