<?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 Re: macro call generating error A2381 &amp; A1055 in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172469#M5377</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello again iRob,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Continuing from my previous post . . .&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;After having successfully assembled the corrected source code using the stand-alone assembler tool, I then attempted to handle the same code using CW IDE, and its project structure.&amp;nbsp; When I attempted to &lt;U&gt;compile&lt;/U&gt; the primary file, some further errors and warnings occurred, but an attempt to &lt;U&gt;make&lt;/U&gt; the project resulted in a vastly greater number of errors and warnings (assumed to be caused by the default relocatable issue).&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Closer examination of the assembly errors revealed case inconsistency for some of the labels.&amp;nbsp; Whereas the assembler alone ignores the case of the labels (as does CASM08), for assembly via the IDE, case is significant.&amp;nbsp; This seems rather unusual - perhaps the IDE in fact uses a different assembler than the stand-alone tool.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The case inconsistency within the files also indicates to me an EXTREMELY SLOPPY programming technique, especially since mixed case labels seem to occur "willy-nilly" within the code.&amp;nbsp; Perhaps I am ranting . . .&amp;nbsp; but this code certainly does not have a clean and consistent layout IMHO.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Having made the further corrections, I was then able to compile without error, but not make the project.&amp;nbsp; The compile produced the correct code size, but did not generate the required S19, and other output files.&amp;nbsp; After some experimentation, I found I could make the project, provided I deleted the two secondary files, 8HID-PRO.asm and 8USB-ISR.asm, from the project structure.&amp;nbsp; Of course, the files should remain within the source folder.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Perhaps others might advise of alternative ways of handling absolute assembly from within a CW project, that would allow editing of the secondary (include)&amp;nbsp;files by the IDE.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Dec 2007 22:56:36 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2007-12-14T22:56:36Z</dc:date>
    <item>
      <title>macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172463#M5371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey, guys, I'm currently trying to port over the assembly code from Freescale's USB 3D mouse project, "RD68HC08USB3DMSESW".&amp;nbsp; This runs on the MC908JB8 microcontroller.&amp;nbsp; The code was compiled under the CASM08 assembler by RAPID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I created a new assembly project in CW 6.0.&amp;nbsp; As you can imaging, there are a lot of syntax differences, mostly with directives.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The macro definitions are a bit different.&amp;nbsp; I'm getting a puzzling error with most of the macros defined, A2381 and A1055.&amp;nbsp; Here's the macro:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;;* MACRO - copy #\1 to \2KMOV:&amp;nbsp;&amp;nbsp; MACRO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lda&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #\1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sta&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDM&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;The compiler gives me the A1055 here, complaining about the lda #\1 line.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;Here's how it's called:&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KMOV&amp;nbsp;&amp;nbsp;&amp;nbsp; {1&amp;lt;b_IDLE},V_TRANSACT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; device idle&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V_PROCESS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; reset processing status&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;This call gives me error A2381 on the macro instantiation.&lt;BR /&gt;&lt;BR /&gt;What I'm not clear on yet is that syntax with the braces.&amp;nbsp; Is the greater-than symbol some sort of bit relocation?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:20:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172463#M5371</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2020-10-29T09:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172464#M5372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello iRob,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I think at least part of your problem is the use of braces.&amp;nbsp; CW expects to see parenthesis used instead.&amp;nbsp; In fact, you should search all the assembly files for the presence of braces, and change them.&amp;nbsp; With many fonts (including the ones I use for programming), it is extremely difficult to recognize the difference at a glance.&amp;nbsp; &lt;FONT face="Courier New"&gt;{ }&amp;nbsp; ( ) This example uses Courier New font.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Another problem is that the left-shift operator in CW is &lt;FONT face="Courier New"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; rather than &lt;FONT face="Courier New"&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;KMOV&amp;nbsp;&amp;nbsp;&amp;nbsp; (1&amp;lt;&amp;lt;b_IDLE),V_TRANSACT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; device idle&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The expression within the parenthesis creates a mask value from the bit number represented by &lt;FONT face="Courier New"&gt;b_IDLE&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2007-12-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;06:59 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 03:49:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172464#M5372</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-12-13T03:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172465#M5373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks, BigMac!&amp;nbsp; You've been a big help.&amp;nbsp; Thank goodness for search &amp;amp; replace with regular expressions!&amp;nbsp; &lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;BR /&gt;&lt;BR /&gt;Still getting lots and lots of "warning, value truncated", but I'll continue to slug through them all.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 05:01:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172465#M5373</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-12-13T05:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172466#M5374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Hey Big Mac, would you care to take a look at this project?&amp;nbsp; I've got it down to 107 errors, 150 warnings (maxed out).&lt;BR /&gt;&lt;BR /&gt;I'm getting tons of "truncated byte" warnings, not sure why.&amp;nbsp; I've got the MCU specific memory map ported over to CW's include file now.&lt;BR /&gt;&lt;BR /&gt;Anyone else is invited to take a stab if they have the time.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 08:09:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172466#M5374</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-12-13T08:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172467#M5375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Rob,&lt;BR /&gt;&lt;BR /&gt;I did not take a look inside your zip, but...&lt;BR /&gt;&lt;BR /&gt;Truncated byte is usually the assembler telling you you did 16-bit maths and it is going throw away the high byte of the result. Usually the programmers response is "see if I care"&lt;BR /&gt;Something like LDA&amp;nbsp;&amp;nbsp; #(address-SlightlySmallerAddress)&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 12:28:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172467#M5375</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2007-12-13T12:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172468#M5376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello iRob,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Be aware that the CASM08 assembler provides absolute assembly, whereas CW defaults to relocatable assembly.&amp;nbsp; The process of converting your project to be relocatable would actually require a lot of effort, setting up XDEFs and XREFs for all equates, variables and sub-routines.&amp;nbsp; So I decided to stick with absolute assembly,&amp;nbsp;and the sequence of INCLUDEs.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I have previously handled absolute assembly with CW, by running the assembler tool alone, without the IDE.&amp;nbsp; When I initially assembled your code under this regime, I&amp;nbsp;obtained 79 errors and 207 warnings.&amp;nbsp; The following is an outline of the problems that I discovered -&amp;nbsp;some are due to differences between CASM08 and CW assemblers.&lt;/FONT&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Remove the line &lt;FONT face="Courier New"&gt;&lt;FONT color="#ff0000"&gt;INCLUDE "JB1-EQU.H"&lt;/FONT&gt;,&lt;/FONT&gt; since &lt;FONT face="Courier New"&gt;"derivative.inc"&lt;/FONT&gt; file is now used.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Many of the RAM variables require to reside&amp;nbsp;at page 0.&amp;nbsp; So the line &lt;FONT face="Courier New"&gt;&lt;FONT color="#ff0000"&gt;ORG RAMStart&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#666666"&gt;is&lt;/FONT&gt; incorrect, it should be &lt;FONT face="Courier New"&gt;&lt;FONT color="#009900"&gt;ORG Z_RAMStart&lt;/FONT&gt;&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Within an expression, the CW assembler does not like any whitespace either side of&amp;nbsp;the operator (any operator).&amp;nbsp; For example, &lt;FONT face="Courier New"&gt;&lt;FONT color="#ff0000"&gt;VarA + VarB&lt;/FONT&gt;&lt;/FONT&gt; is invalid.&amp;nbsp; The expression should be &lt;FONT face="Courier New"&gt;&lt;FONT color="#009900"&gt;VarA+VarB&lt;/FONT&gt;&lt;/FONT&gt;.&amp;nbsp; There are about 36 instances within a couple of the ASM files.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Instructions such as BRCLR that require to&amp;nbsp;repeat until a bit&amp;nbsp;flag becomes set often use a symbol to represent the PC value at the start of the current line (rather than use a label).&amp;nbsp; For CW, the symbol is the asterisk.&amp;nbsp; There are some instances where $ is present, which is valid for CASM08, but not CW.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;The line INCLUDE "macro.inc" was present in two of the other INCLUDE files, as well as the primary file, resulting in duplicated macro definitions.&amp;nbsp; Either remove the line from&amp;nbsp;both secondary files, or use a conditional include to prevent multiple includes, i.e.&amp;nbsp;surround the INCLUDE directive with IFNDEF and ENDIF directives, and add a distinctive label name within macro.inc, for example &lt;FONT face="Courier New"&gt;_MACROS_:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Arial"&gt;The&amp;nbsp;file&lt;/FONT&gt; USB-MSE3.H &lt;FONT face="Arial"&gt;is currently INCLUDEd at the very end of the primary file.&amp;nbsp; This line&amp;nbsp;must be moved to just prior to the start of the initialisation code, so the labels defined within will be known&amp;nbsp;to the assembler, prior to their use within the primary code.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Following these corrections, there remained three errors only, for undeclared symbols.&amp;nbsp; Once the correct MCU bit names were substitued, the code assembled without error.&amp;nbsp; However, another major error would have prevented the code from operating correctly - the _Startup entry point was incorrectly placed.&amp;nbsp; The RSP instruction will also need to be removed since you have initialised the stack to higher RAM.&amp;nbsp; You will also need to check the time delay routines for the correct delay (because of different MCU, and probably&amp;nbsp;different bus frequency).&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2007-12-15&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;12:46 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2007 21:42:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172468#M5376</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-12-14T21:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172469#M5377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello again iRob,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Continuing from my previous post . . .&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;After having successfully assembled the corrected source code using the stand-alone assembler tool, I then attempted to handle the same code using CW IDE, and its project structure.&amp;nbsp; When I attempted to &lt;U&gt;compile&lt;/U&gt; the primary file, some further errors and warnings occurred, but an attempt to &lt;U&gt;make&lt;/U&gt; the project resulted in a vastly greater number of errors and warnings (assumed to be caused by the default relocatable issue).&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Closer examination of the assembly errors revealed case inconsistency for some of the labels.&amp;nbsp; Whereas the assembler alone ignores the case of the labels (as does CASM08), for assembly via the IDE, case is significant.&amp;nbsp; This seems rather unusual - perhaps the IDE in fact uses a different assembler than the stand-alone tool.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The case inconsistency within the files also indicates to me an EXTREMELY SLOPPY programming technique, especially since mixed case labels seem to occur "willy-nilly" within the code.&amp;nbsp; Perhaps I am ranting . . .&amp;nbsp; but this code certainly does not have a clean and consistent layout IMHO.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Having made the further corrections, I was then able to compile without error, but not make the project.&amp;nbsp; The compile produced the correct code size, but did not generate the required S19, and other output files.&amp;nbsp; After some experimentation, I found I could make the project, provided I deleted the two secondary files, 8HID-PRO.asm and 8USB-ISR.asm, from the project structure.&amp;nbsp; Of course, the files should remain within the source folder.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Perhaps others might advise of alternative ways of handling absolute assembly from within a CW project, that would allow editing of the secondary (include)&amp;nbsp;files by the IDE.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2007 22:56:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172469#M5377</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-12-14T22:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172470#M5378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The ide is using the same, identical assembles as when you run it standalone.&lt;BR /&gt;But the behavior not to consider the case of labels is non default and has to be enabled.&lt;BR /&gt;When using just the assembler in absolute assembly mode, then that's all it needs.&lt;BR /&gt;When using the linker, the linker would also need to be told to ignore the case of identifiers, I think it also has an option to do that.&lt;BR /&gt;Having multiple *.asm files in the ide does not work if you are building an absolute assembly file, then only one *.asm file has to build all the files, other *.asm files can exist but either not in the same build target, or not in the project at all.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2007 23:42:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172470#M5378</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-12-14T23:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172471#M5379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I changed the extension of the secondary files from *.asm to *.inc, and the make process now seems to work fine.&amp;nbsp; The extension of the macro.asm file doesn't seem to matter, but this was also changed for consistency.&amp;nbsp; I assume that any extension, except *.asm, may be used for the secondary files.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Dec 2007 01:13:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172471#M5379</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-12-15T01:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172472#M5380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Yikes, yikes!&amp;nbsp; Did I ever underestimate the difficulty level?!&amp;nbsp; Thanks, BigMac for your help!&lt;BR /&gt;&lt;BR /&gt;I looked at your steps but didn't find any spaces between operators.&amp;nbsp; Hmm.&amp;nbsp; But after your list, I'm down to 70 errors, 106 warnings.&amp;nbsp; &lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&amp;nbsp; Now this is with using the Make option in CW.&lt;BR /&gt;&lt;BR /&gt;I think at this point, this is a wasted effort.&amp;nbsp; I'm backing up and trying again with some of Freescale's sample C code. &lt;SPAN&gt;&lt;IMG alt=":smileysad:" class="emoticon emoticon-smileysad" id="smileysad" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif" title="Smiley Sad" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks, guys.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Dec 2007 02:09:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172472#M5380</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-12-15T02:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172473#M5381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;bigmac wrote:&lt;BR /&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I changed the extension of the secondary files from *.asm to *.inc, and the make process now seems to work fine.&lt;/FONT&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;Ahh, nice find.&amp;nbsp; My project is now down to 9 errors, 6 warnings.&amp;nbsp; Getting better!&amp;nbsp; But, this is interesting, now I got a series of "A2401: Complex relocatable expression not supported" errors.&amp;nbsp; Here's an example from 8HID-PRO.inc, error on line 799:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;799:    lda     #(DEVICE_DESC/256)      ; make LONG_IDX routine        sta     V_Opd_H                 ; point to DEVICE_DESC queue&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:21:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172473#M5381</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2020-10-29T09:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: macro call generating error A2381 &amp; A1055</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172474#M5382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello iRob,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;While I did not&amp;nbsp;receive the same error message, the label DEVICE_DESC was one of about three labels affected by item 6 on my previous list.&amp;nbsp; The error should not occur if the value of the label is known prior to the expression.&amp;nbsp; Did you re-position the single line of code that I indicated?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Dec 2007 10:39:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/macro-call-generating-error-A2381-A1055/m-p/172474#M5382</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-12-15T10:39:47Z</dc:date>
    </item>
  </channel>
</rss>

