Newbie for codewarrior, how to setup a project and add existed file to the new project.

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

Newbie for codewarrior, how to setup a project and add existed file to the new project.

跳至解决方案
2,392 次查看
xinfan
Contributor I
Hello everyone,
 
I have some source files and header files, *.c, *.h, *.s, *.ch and makefile. I want to setup a example project. After i setup a project for MCF5206e, i remove the automade files and add my file to the project. I didnt import the makefile i used default setting. When i build the project i got a lot of wrong.
 
I read the help and find that there is a wizard for import makefile, but i didnt fint it.
 
I want to know how can make my project and how can import my makefile.
 
Can anybody help me?
Thanks a lot
 
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
876 次查看
CrasyCat
Specialist III
Hello
 
It looks like CodeWarrior Coldfire compiler has more strict type checking than the compiler you have been using before.
 
In order ti be able to build your application you can either fix the source code to avoid the conversion the compiler does not like or try to add option to the compiler to process your source file.
How to fine tune the compiler depends on the source code.
I would start with checking "Enable GCC extensions" in the target "C/C++ Language panel" .
 
If this does not help, I would recommend to submit a service request through our on-line support web page and attach the project.
Our support engineers will then be able to assist you.
 
CrasyCat

在原帖中查看解决方案

0 项奖励
回复
6 回复数
876 次查看
CrasyCat
Specialist III
Hello
 
Makefile importer wizard is not available on Coldfire tools.
In order to create your project I would proceed as follows:
  - Create a project from a stationery for a CF_M5206EC3
  - Remove the file main.c from the project window
  - Add your own source files to the project.
  - Build
 
Of this is not working I would need to see the exact error messages you are getting.
 
CrasyCat
0 项奖励
回复
876 次查看
xinfan
Contributor I
Hi CrazyCat,
 
Thanks for your reply.
 
I am a little confused about the compile and link process. I attach the compile error picture when i compile the startup.s and i want to know where to add the lib or some marco such as the error point out.
 
And when i compile other c file, more error come out.
 
I also got two *.ch file, but i cant add then to the project.
 
Thanks
 
Fanxin
0 项奖励
回复
876 次查看
xinfan
Contributor I
Here is error2 pic. When i compile lcd.c using default c/c++ language compile setting.
How to control the setting for c language in codewarrior.
 
Compiler tell me that the an implicit conversion occur.
0 项奖励
回复
877 次查看
CrasyCat
Specialist III
Hello
 
It looks like CodeWarrior Coldfire compiler has more strict type checking than the compiler you have been using before.
 
In order ti be able to build your application you can either fix the source code to avoid the conversion the compiler does not like or try to add option to the compiler to process your source file.
How to fine tune the compiler depends on the source code.
I would start with checking "Enable GCC extensions" in the target "C/C++ Language panel" .
 
If this does not help, I would recommend to submit a service request through our on-line support web page and attach the project.
Our support engineers will then be able to assist you.
 
CrasyCat
0 项奖励
回复
876 次查看
xinfan
Contributor I
Hi Cat,
 
I contact with the code owner, they told me the compiler they used is Diab. I will try it again.
 
And i will change the code and try codewarrior again too.
 
Thanks,
 
Fanxin
0 项奖励
回复
876 次查看
CrasyCat
Specialist III
Hello
 
It seems that you are using CodeWarrior for Coldfire tools.
Your assembly source file does not follow the assembly language syntax from this macro assembler.
Please refer to {Install}\Help\PDF\CF_Assem_Ref.pdf for more info on Coldfire assembly language syntax. 
 
CrasyCat
0 项奖励
回复