CodeWarrior Command Line Assembler Questions

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

CodeWarrior Command Line Assembler Questions

2,011 次查看
Glacier
Contributor I
Hello,
     I am new to this Forum. I have looked through most articles posted on the forum and hoped to find some answers that I need, but I failed. I decided to post some questions and hope some experts in this field may help me out.
I worked on a project that uses MCF5235 and the MetroWorks IDE. I am new to the CodeWarrior's tools but I am very familiar with Diab compiler. I am trying to port some code from Diab to CodeWarrior and I have encountered some problems. I got used to use the DOS style make file to compile and link all files in the project so I am sure what exactly the compiler is doing. I started with the MetroWorks's command line tools such as mwccmcf,exe, mwasmmcf.exe and mwldmcf.exe.
 
First, I set all necessary environmental variables and paths, then I tried to compile a assembly file use mwasmmcf.exe
 
Since I cannot find MCF5235 in the processor list, I used CF2.
 
ASM = mwasmmcf.exe
SFLAGS=-c -g -cwd proj -DDEBUG=1 -proc CF2 >asm.err
INCLUDE_FILES="$(INCLUDE_DIR)\b.inc"
"$(OBJDIR)\a.o" : $(SOURCE_DIR)\a.s $(INCLUDE_FILES)
       $(ASM) $(SFLAGS) $**
I got the following error message:

### mwasmmcf.exe Driver Warning:

# No file mapping matches 'include_dir\b.inc' (unrecognized file contents or

# filename extension); treating as source text

 

I tried different extension of b.inc, b.s, b.a and so on. I got the same message.

 

Any help will be appreciated.

标签 (1)
标记 (1)
0 项奖励
2 回复数

455 次查看
CompilerGuru
NXP Employee
NXP Employee
According to the error message, I would guess that the assembler is called with include_dir\b.inc as explicit argument, I guess that's was not intended, or?
What does the $** makefile macro expand to (well, I did not write makefiles for some time now), but I would try

"$(OBJDIR)\a.o" : $(SOURCE_DIR)\a.s $(INCLUDE_FILES)
$(ASM) $(SFLAGS) $(SOURCE_DIR)\a.s

instead, just pass the assembly file to be compiled/assembled. Don't pass all the dependencies.

Daniel
0 项奖励

455 次查看
Glacier
Contributor I
Thank you.
MWASMMCF.exe worked after I changed the assembler option search include path even though .inc file extension is not recognized file extension. As a result, it generated some warning message. I am working on the coldfire M5235 processor. MWASMMCF does not directly support this processor but it supports the CF2 (version 2), so I used CF2 as a target.
Regarding to mwccmcf.exe, it does not support the CF2. I have to look at which one is close to M5235. Any suggestions are appreciated.
 
Thanks again
Glacier
  
0 项奖励