CodeWarrior 10.3 Tutorial

This document is meant to walk a user through the process of Adding a file to a CodeWarrior workspace, build the project, set up the project for debugging, download the project onto the hardware, and run the project. This documents assumes the user already has downloaded CodeWarrior version 10.3 from the Freescale web site and is using wither a K-60 or K-70 TWR-Kit from Freescale.

Adding a Project to CodeWarrior 10.3:

1.  Open CodeWarrior in your working directory.

2.  Right click in the ‘CodeWarrior Project’ pane and selected ‘Import’.

3.  Expand the ‘General’ folder and double-click on ‘Existing projects into Workspace’.

4.  Click the ‘Browse’ button and navigate to where your existing project using the ‘Browse For Folder’ window.

5.  Check the ‘Copy projects into workspace’ and click finish.

6.  Now all of the folders and files from the project will be added to your working director. This could take several seconds to several minutes depending on the project size.

Building a Project:

Note: The project used in the example uses Processor Expert, so the following steps only work for projects built using this feature.

1.  On the main title bar, click ‘Processor Export’ and select ‘Show Views’.

2.  Two new panes will be added to the work space. Shown in red rectangles in the image below.

3.  Select the working project and then click the ‘generate’ icon (indicated by the red rectangle in the image below) in the ‘Components’ pane.

4.  Wait for all of the components and code to be generated. This could take several minutes.

5.  Next, right-click on the project name in the ‘CodeWarrior Projects’ pane and select ‘Build’. Again this could take several minutes.

6.  Fix any errors that come up. If no errors are found, the project has been built.

Setting up Debug for Project:

Note: These steps assume the JTAG RAM debug option has not been set up already.

1.  Right-click on the working project, move to ‘Debug As’ and select ‘Debug Configurations…’.

2.  Right-click on ‘CodeWarrior Download’ and select ‘New’.

3.  Using the drop-down ‘Connection:’ menu, select ‘XXX_RAM_OSJTAG’. ‘XXX’ represents the working project name, for this example, the project name is ‘PEV’.

4.  Select the ‘Common’ tab and chose ‘Share file’. Then click ‘Browse…’. Using the Folder Selection window, expand the top folder, then ‘Project_Settings’, select ‘Debugger’ and click ok.

5.  Finally click ‘Apply’ then ‘Close’.

Downloading and Running Project:

Note: The tower kit must be connected to the computer in order for this to work.

1.  Right-click on the working project and move to ‘Debug As’ and select ‘CodeWarrior Download’.

2.  Next select the ‘XXX RAM’ option in the Launch Configuration Selection window. Again ‘XXX’ represents the working project name. Click ‘OK’

3.  The download could take several minutes.

4.  Once the download is complete, the view will change to the debug view.

5.  Start the program by clicking the ‘Resume’ icon in the Debug pane.

6.  The program will now be running on the tower and printf() statements in the code will be output to the ‘Console’ window.