CodeWarrior Development Studio

for Microcontrollers Quick Start


This Quick Start explains how to install the CodeWarrior Development Studio for Microcontrollers V6.2 software, and how to use the IDE to create, build, and debug a project.

NOTE You must install the CodeWarrior software on the equipment on which you intend to use the software.

 Section A: Installer CodeWarrior


1. Insert CodeWarrior Development Studio CD into CD-ROM drive — CW Auto Install begins

NOTE If Auto Install does not start, run launch.exe, which is located in the root directory of the CD.

 NOTE The CodeWarrior software may be part of a DVD included with your kit. In this case, click Install CodeWarrior Development Studio for Microcontrollers, follow the on-screen instructions, and skip to step "Check for updates".

 
 


1. Insérer CodeWarrior Development Studio CD dans le lecteur de CD-ROM - CW Auto Install commence


NOTE: Si l'installation automatique ne démarre pas, exécutez Launch.exe, qui se trouve dans le répertoire racine du CD.


NOTE: Le logiciel CodeWarrior peut faire partie d'un DVD inclus avec votre kit. Dans ce cas, cliquez sur Installer CodeWarrior Development Studio pour microcontrôleurs, suivez les instructions à l'écran, et passez à l'étape "Vérifier les mises à jour".

2. Follow setup program's on-screen instructions

NOTE
The Evaluation Edition license is automatically installed with your product and you do not need to register it. This license allows you to develop projects as Professional Edition within the 30-day evaluation period. After 30 days, the license works as Special Edition license (free permanent, but feature limited) which supports unlimited assembly code, up to 32KB of C code for HC(S)08/RS08 derivatives and up to 64KB of C code for ColdFire V1 derivatives.

            NOTE For licensing and activation of your CodeWarrior Development Studio for Microcontrollers, refer to the CodeWarrior Development Suite Quick Start. Save the license file, license.dat, to the installation root folder. The default is C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.2

 

2. Suivez les instructions du programme d'installation à l'écran

NOTE: La license d'évaluation est automatiquement installée avec votre produit et vous n'avez pas besoin de l'enregistrer. Cette licence vous permet de développer des projets en tant que Professional Edition pendant les 30 jours de la période d'évaluation. Après 30 jours, la licence fonctionne comme licence Special Edition (gratuite de façon permanente, mais limitée), qui comprend code assembleur illimité, jusqu'à 32 Ko de code C pour les dérivés de HC (S) 08/RS08 et jusqu'à 64 Ko de code C pour ColdFire V1 et produits dérivés.

NOTE: Pour l'octroi de licence et de l'activation de votre CodeWarrior Development Studio pour microcontrôleurs, se reporter à la CodeWarrior Development Suite Quick Start. Enregistrez le fichier de licence, license.dat, dossier racine de l'installation. La valeur par défaut est C: \ Program Files \ Freescale \ CodeWarrior pour micro-V6.2



 Section B: Créer et construire un projet


1- Create a project

a. Select Start > Programs > Freescale CodeWarrior >CW Microcontrollers V6.2 > CodeWarrior IDE — IDE starts and displays startup dialog box

Startup Dialog Box

 

a. Sélectionner Start > Programs > Freescale CodeWarrior >CW Microcontrollers V6.2 > CodeWarrior IDE — IDE démarre et affiche la boite de dialogue de démarrage.

   

b. Select Create New Project — Microcontrollers New Project Device and Connection dialog box appears

NOTE This section of the quick start demonstrates using the New Project Wizard. We use an MC68HC908GZ60 target as an example.

c. Expand HC08 and GZ Family and select MC68HC908GZ60 derivative

NOTE If your MCU is missing from the list, download a service pack for that device at http://www.freescale.com/codewarrior/ downloads

d. Select Full Chip Simulation as your default connection

e. Click Next – Project Parameters dialog box appears

Device and Connection Dialog Box

 

    b. Sélectionnez Create New Project - la boite de dialogue Microcontrollers New Project Device and Connection apparaît

NOTE Cette section du démarrage rapide utilise l'Assistant Nouveau projet. Nous utilisons un MC68HC908GZ60 à titre d'exemple.

    c. Développez la famille HC08 et GZ et sélectionnez les dérivés MC68HC908GZ60

NOTE Si votre MCU est absent de la liste, téléchargez un service pack pour ce périphérique à http://www.freescale.com/codewarrior/ downloads

    d. Choisissez Full Chip Simulation comme votre connexion par défaut

    e. Cliquez sur Next – la boîte de dialogue des paramètres du projet apparaît

Project Parameters Dialog Box

f. In Project name text box, the IDE supplies a default project name. Enter a project name of your choice.

NOTE The IDE automatically creates a folder with the same name in specified location. The IDE automatically adds .mcp extension when it creates project.

g. In Location text box enter location to store project, click Set to browse to folder location

h. Select C as language to be supported by project

NOTE You can select Finish to accept defaults for remaining options

   i. Click Next — Add Additional Files dialog box appears

This dialog box allows you to browse folders and add or remove files to or from the project.

 

f. En zone de texte Project name, l'IDE fournit un nom de projet par défaut. Entrez un nom de projet de votre choix.
NOTE: L'IDE crée automatiquement un dossier avec le même nom dans un emplacement spécifique.
L'IDE ajoute automatiquement des extensions .mcp quand il crée un projet.

g. En zone de texte Location entrez le lieu d'enregistrement du projet, cliquez sur Set pour naviguer dans le dossier emplacement

h. Sélectionnez C comme langage du projet

NOTE: Vous pouvez sélectionner Finish pour accepter les valeurs par défaut pour les options restantes

i. Cliquez sur Suivant - ajouter des fichiers supplémentaires boîte de dialogue apparaît Cette boîte de dialogue vous permet de parcourir les dossiers et ajouter ou supprimer des fichiers vers ou à partir du projet.

 Add Additional Files Dialog Box



j. Click Next — Processor Expert dialog box appears

This dialog box allows you to specify whether you want your project configured to use Device Initialization or Processor Expert

Processor Expert Dialog Box

     k. Select None

      l. Click Next — C/C++ Options dialog box appears This dialog box allows you to specify C/C++

 

     j. Cliquez sur Next la boîte de dialogue Processor Expert apparait
     Cette boîte de dialogue vous permet de spécifier si vous désirez l'initialisation du matériel ou de l'expert de processeur

     

 

 

 

 

 

 

k. Select None

      l. Cliquez Next — la boîte de dialogue C/C++ Options apparait.
Cette boîte de dialogue
vous permet de spécifier C/C++


C/C++ Options Dialog Box

m. Select ANSI startup code as code, the New Project Wizard will place in your project as startup code

n. Select Small as memory model to use

o. Select None for floating point format to support

p. Click Finish — IDE creates your project according to your specifications; Project window appears, docked at left side of main window
To undock project window, double-click the double gray lines. To re-dock window, right click in title tab and select Docked.

 

     m. Sélectionnez ANSI startup code comme code, l' Assistant de nouveau projet le place dans votre projet comme code de démarrage
     n. Sélectionnez Small comme modèle de mémoire à utiliser
     o. Sélectionnez None pour le format en virgule flottante supporté
     p. Cliquez sur Finish - l'IDE crée votre projet selon votre cahier des charges; la fenêtre du projet apparaît, placée à gauche de la fenêtre principale
NOTE Pour détacher la fenêtre de projet, double-cliquez sur la double ligne grise. Pour replacer la fenêtre, cliquez avec le bouton droit dans le titre et sélectionnez l'onglet Docked.


2. Select connection



For this example, we specified Full Chip Simulation (FCS).

a. Make sure Full Chip Simulation is selected in drop down list

b. To change MCU and connection, click MCU Change Wizard

    Pour cet exemple, nous avons spécifié Full Chip Simulation (FCS)

a. Sélectionnez Full Chip Simulation dans la liste déroulante

b. Pour changer le MCU et la connexion, cliquez MCU Change Wizard


3. Edit source code


a. Double click main.c in Sources folder – Editor window opens displaying contents of file

main.c in Editor Window

 b. Make changes to contents of main.c file, if desired

c. If you make changes to file, from IDE main menu bar, select File > Save IDE saves changes

 

     a. Double cliquez main.c dans le dossier source – La fenêtre de l'éditeur s'ouvre en affichant le contenu ddu fichier

     b. Faites les modifications si vous le désirez dans main.c

     c. Si vous faites des modifications, sélectionnez File > Save dans le menu de l'IDE pour que l'IDE sauvegarde les modifications

4. Add files if appropriate

a. In project window, highlight a folder

b. From IDE main menu bar, select Project

c. Select Add Files — dialog box appears

d. Navigate to directory that contains file you want to add

e. Select filename of file you want to add to project

f. Click Open button — Project messages appear indicating access

path has been added to target, if path is new to project

g. In project window, filename of added file appears under selected folder

     a. Dans la fenêtre de projet sélectionnez un dossier
   b. A partir de la barre de menu de l'IDE sélectionnez Project
   c.
Sélectionnez Add Files, la boite de dialogue apparait
   d. Naviguez vers le répertoire qui contient le fichier que vous voulez ajouter
   e. Sélectionnez le fichier que vous voulez ajouter au projet
   f. Cliquez sur le bouton Open — des messages apparaissent qui vous indiquent que le chemin d'accès a été ajouté si le chemin est nouveau pour le projet  
   g. Dans la fenêtre de projet le nom de fichier des fichiers ajoutés apparait sous le dossier sélectionné

5. Build project

Section C: Déboguer votre application


1. Start debugger

    a. Click on project window title bar to ensures that window is active project

b. From main menu bar, select Project > Make

c. From main menu bar, select Project > Debug — True-Time Simulator & Real-Time Debugger window opens

 

True-Time Simulator & Real-Time Debugger Window



 

    a. Cliquez sur la barre de titre pour être sûr que cette fenêtre est celle du projet actif

    b. A partir du menu principal sélectionnez
Project > Make

    c. A partir du menu principal sélectionnez Project > Debug la fenêtre de simulateur en temps réel et de déboguage en temps réel s'ouvre

2. Set breakpoint

3. Run application

a. From the True-Time Simulator & Real-Time Debugger window, select Run — Run menu appears

b. Select Start/Continue or click on Start/Continue icon                

— Program executes till the first breakpoint; Command pane displays program status

Debugger Simulator Command Pane

 

a. A partir de la fenêtre True-Time Simulator & Real-Time Debugger sélectionnez Run le menu Run apparaît

b. Sélectionnez Start/Continue ou cliquez sur l'icône Start/Continue le programme s'exécute jusqu'au premier point d'arrêt; le panneau de commande affiche l'état du programme

 

4. Click Start/Continue icon execution


   5. Click Halt icon — Simulator stops program execution

   6. From Debugger Simulator Window toolbar, select File > Exit to exit Debugger

   7. From IDE main Window toolbar, select File > Exit to exit CodeWarrior IDE



Congratulations!

You have successfully created, built, and run an HC08
application with the CodeWarrior for Microcontrollers V6.2
software!


Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. CodeWarrior is a trademark or registered trademark of Freescale Semiconductor, Inc. in the United States and/or other countries. All other product or service names are the property of their respective owners.

Copyright © 2006–2008 by Freescale Semiconductor, Inc. All rights reserved.

Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document.

Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters that may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals”, must be validated for each customer application by customer's technical experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part.

How to Contact Us

Corporate

Headquarters

Freescale Semiconductor, Inc.

7700 West Parmer Lane

Austin, TX 78729

U.S.A.

World Wide Web

http://www.freescale.com/codewarrior

 

Technical Support

http://www.freescale.com/support