<?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中的主题 How to add an include file to inline assembly</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-add-an-include-file-to-inline-assembly/m-p/157631#M4176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to use inline assembly, within a 'C' environment to implement some functions. I need to add an "include file" so that I don't get undefined errors. How do I include an "include file" in inline assembly? I'm using CodeWarrior 10.2 for microcontrollers and an&amp;nbsp;&lt;EM&gt;MC12311CHN chip&amp;nbsp;&lt;/EM&gt;which contains an HCS08 microcontroller.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;void foo (void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; asm&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;sta FCMD&lt;/SPAN&gt; ; command the flash&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Without an include file such as mc9s08qe32.inc, FCMD is undefined.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Apr 2012 01:58:17 GMT</pubDate>
    <dc:creator>snickface</dc:creator>
    <dc:date>2012-04-26T01:58:17Z</dc:date>
    <item>
      <title>How to add an include file to inline assembly</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-add-an-include-file-to-inline-assembly/m-p/157631#M4176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to use inline assembly, within a 'C' environment to implement some functions. I need to add an "include file" so that I don't get undefined errors. How do I include an "include file" in inline assembly? I'm using CodeWarrior 10.2 for microcontrollers and an&amp;nbsp;&lt;EM&gt;MC12311CHN chip&amp;nbsp;&lt;/EM&gt;which contains an HCS08 microcontroller.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;void foo (void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; asm&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;sta FCMD&lt;/SPAN&gt; ; command the flash&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Without an include file such as mc9s08qe32.inc, FCMD is undefined.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 01:58:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-add-an-include-file-to-inline-assembly/m-p/157631#M4176</guid>
      <dc:creator>snickface</dc:creator>
      <dc:date>2012-04-26T01:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an include file to inline assembly</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-add-an-include-file-to-inline-assembly/m-p/157632#M4177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, and welcome to the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a .c file that references any hardware registers, you should&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#include "derivative.h"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or alternatively&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#include &amp;lt;mc9s08qe32.h&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first file is created by the project wizard, and references the header file for the device.&amp;nbsp; For the second method, you are doing this directly.&amp;nbsp; The first method is preferred - should you ever change the device used for a project, derivative.h will be automatically updated by the wizard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a macro for FCMD within the device header file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 08:37:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-add-an-include-file-to-inline-assembly/m-p/157632#M4177</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2012-04-26T08:37:43Z</dc:date>
    </item>
  </channel>
</rss>

