Building CodeWarrior 10.x/KDS Project from command line

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Building CodeWarrior 10.x/KDS Project from command line

Building CodeWarrior 10.x/KDS Project from command line

   CodeWarrior v10.6 and KDS are integrated development tools which are based on Eclipse, these two IDEs provide easy way to build project when using the GUI, but some engineers still want to build their projects from command line to do automated builds.

This document provides examples on how to do it!

Build project in CodeWarrior from command line:

For a CW v10.6 created project, CW provides the “Make” tool and can also generate the needed “MakeFile” to build this project out of eclipse GUI.

The below are the steps:

  1. Create and new project “k22_makefile” in CW v10.6, you will see there are two build configurations: RAM & FLASH
    pastedImage_3.png
  2. Launch “cmd prompt” in Windows and go to “eclipse” folder of CW installation

    pastedImage_4.png
  3. Now, you can generate the makefile for configuration FLASH by executing the below command
    ecd.exe –generateMakefiles –project “C:\workspace_cmd\k22_makefile” –config FLASH

Now, checking the “FLASH” subfolder in project location, you will see “makefile” is generated.

pastedImage_5.png

4.To use “make” tool convenient, we can define an environment variable pointing to {CW}\gnu\bin where “make” is located. See command as below:

pastedImage_10.png

5. Go to the configuration folder “FLASH” where the project’s makefiles are located and run the follow commands to build the project.
%MCU_BIN%\make.exe

pastedImage_13.png

PS: to get more information of make and ecd, please just run the below command:

  1. Ecd.exe –help
  2. Make.exe –help

Build project in KDS from command line:

Compare with CodeWarrior, it is much easier to build an application in command mode. KDS provides a command “eclipse.exe” with which you can build a project with only two steps.

In this example, I have created an application with name “cmd_ke02”, and the workspace path is “C:\wks_kdscmd”.

  1. To build the application in cmd, please first launch command mode in Windows system and then go to {KDS}\eclipse.
  2. Then, you need import the application into current workspace in the below command:
    eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data "C:\wks_kdscmd" -import "C:\wks_kdscmd\cmd_ke02"
  3. then, build the project with the below command:
    eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data "C:\wks_kdscmd" -build "cmd_ke02"

For more details of building project from command line in KDS, please refer:

http://mcuoneclipse.com/2014/09/12/building-projects-with-eclipse-from-the-command-line/

ラベル(1)
コメント

Hi Yong Lin

You have to make sure that PATH add these two path for "make.exe" and "arm-none-eabi-gcc.exe".

Otherwise KDS will got error message while compiling.

C:\Freescale\KDS_3.0.0\bin

C:\Freescale\KDS_3.0.0\toolchain\bin

評価なし
バージョン履歴
最終更新日:
‎07-15-2015 01:26 AM
更新者: