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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
2,394 Views
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
 
Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
878 Views
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

View solution in original post

0 Kudos
Reply
6 Replies
878 Views
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 Kudos
Reply
878 Views
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 Kudos
Reply
878 Views
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 Kudos
Reply
879 Views
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 Kudos
Reply
878 Views
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 Kudos
Reply
878 Views
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 Kudos
Reply