codewarrior v10.x快速指南

合集下载

codewarrior使用指南

codewarrior使用指南

Hardware and software integration
•Hardware and software integration
Without simulation, developers risk of getting H/W and S/W problems mixed up (none has been qualified yet), Developers have difficulties to compare a working case (simulation) with a non-working case (hardware target), Easily switch between targets for comparison of results Data Visualization and I/O stimulation (simulation and targets) Flash programming support RTOS awareness (e.g. OSEK) Foreign target capability through API
Hardware specific code
•Hardware specific code generation
Developers have to understand the details of peripheral registers, bit fields, setup and access sequences Trend is for more and complex peripherals, with more registers, increasing the effort of writing accurate code for each peripheral of the derivative. But there is no added value from a project stand point, all applications need some from of code to perform the function

codewarrior快速使用手册

codewarrior快速使用手册

CodeWarrior™ Development Studiofor Microcontrollers V6.x Quick StartSYSTEM REQUIREMENTSHardware PC with 1 GHz Intel® Pentium® compatibleprocessor512 MB of RAM (1 GB recommended)CD-ROM driveDepending on host-target connection: ParallelPort, 9-pin Serial Port, or USB PortOperating System Microsoft® Windows® XP orMicrosoft Windows Vista® Operating Systems32-bit (Home Premium Edition and BusinessEdition)Disk Space 2 GB total400MB on Windows system diskThis Quick Start explains how to install the CodeWarrior Development Studio for Microcontrollers V6.x 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.1.Insert CodeWarrior Development Studio CD into CD-ROM drive —CW Auto Install beginsNOTE If Auto Install does not start, run launch.exe, which is located in the root directory of the CD.The CodeWarrior software may be part of a DVD included withyour kit. In this case, click Install CodeWarrior DevelopmentStudio for Microcontrollers, follow the on-screen instructions,and skip to step "Check for updates".2.Follow setup program's on-screen instructionsNOTE Special Edition: The Special Edition license is automatically installed with your product and you do not need to register it.This license allows you to develop projects with unlimitedassembly code, up to 32KB of C code for HC(S)08/RS08derivatives and up to 64KB of C code for ColdFire V1derivatives.NOTE Evaluation Edition: The Evaluation license is automatically installed with your product and you do not need to register it.This license allows you to develop projects as ProfessionalEdition within the 30-day evaluation period. After 30 days, thelicense works as Special Edition license (free permanent, butfeature limited) which supports unlimited assembly code, up to32KB of C code for HC(S)08/RS08 derivatives and up to 64KBof C code for ColdFire V1 derivatives.1.Create a projecta.Select Start > Programs > Freescale CodeWarrior >CW forMicrocontrollers V6.x > CodeWarrior IDE — IDE starts and displaysstartup dialog box.Startup Dialog Boxb.Select Create New Project — the Microcontrollers New Project Deviceand Connection dialog box appears.NOTE This section of the quick start demonstrates using the New Project Wizard. We use an MC68HC908GZ60target as anexample.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 /codewarrior/downloads.Device and Connection Dialog Boxd.Select Full Chip Simulation as your default connection.e.Click Next — the Project Parameters dialog box appears.Project Parameters Dialog Boxf.In Project name text box, the IDE supplies a default project name. Entera project name of your choice.NOTE The IDE automatically creates a folder with the same name in specified location. The IDE automatically adds .mcp extensionwhen it creates project.g.In Location text box enter location to store project, click Set to browse tofolder locationh.Select C as language to be supported by project.NOTE You can click Finish to accept defaults for remaining options.i.Click Next — the Add Additional Files dialog box appears.This dialog box lets you browse folders and add or remove files to or fromthe project.Add Additional Files Dialog Boxj.Click Next — the Processor Expert dialog box appears.This dialog box let you specify whether you want your project configuredto use Device Initialization or Processor Expert.Processor Expert Dialog Boxk.Select the None option button.l.Click Next — the C/C++ Options dialog box appears.This dialog box allows you to specify C/C++ Options.C/C++ Options Dialog Boxm.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 — the IDE creates your project according to your specifications; Project window appears, docked at left side of mainwindow.Project WindowNOTE To undock project window, double-click the double gray lines.To re-dock window, right click in title tab and select Docked.2.Select connectionFor this example, we specified Full Chip Simulation (FCS).a.To change MCU and connection, select Project >Change MCUConnection.b.Make sure Full Chip Simulation is selected in drop-down list.3.Edit source codea.Double click main.c in Sources folder — the Editor window opensdisplaying contents of file.main.c in Editor Windowb.Make changes to contents of main.c file, if desired.c.From the IDE main menu bar, select File > Save — the IDE saveschanges.4.Add files if appropriatea.In the project window, select a folder.b.From IDE main menu bar, select Project > Add Files.The Select files to add dialog box appears.c.Navigate to the directory that contains file you want to add.d.Select the filename of file you want to add to project.e.Click Open — the Project Messages window appear indicating accesspath has been added to target, if the path is new to the project.f.In the project window, filename of the added file appears under theselected folder.5.Build projecta.From IDE main menu bar, select Project > Make — the IDE builds(assembles, compiles, and links) project; Error & Warnings windowopens showing any error messages and warning messages1.Start debuggera.Click on project window title bar to ensures that window is active projectb.From main menu bar, select Project > Make.c.From main menu bar, select Project > Debug — the True-TimeSimulator & Real-Time Debugger window opens.True-Time Simulator & Real-Time Debugger WindowNOTE The Source and Assembly panes display the main.c program and code.2.Set breakpointa.Point at a C statement in Source window and right-click — the Sourcecontext menu appears.b.Select Set Breakpoint — a permanent breakpoint mark is set.3.Run applicationa.From the True-Time Simulator & Real-Time Debugger window, selectRun — the Run menu appears.b.Select Start/Continue or click on Start/Continue icon — theProgram executes till the first breakpoint; Command pane displaysprogram statusDebugger Simulator Command Pane4.Click the Start/Continu e icon — the simulator resumes programexecution.5.Click the Halt icon — the Simulator stops program execution.6.From the True-Time Simulator & Real-Time Debugger windowtoolbar, select File > Exit to exit the debugger.7.From IDE main Window toolbar, select File > Exit to exit theCodeWarrior IDE.Congratulations!You have successfully created, built, and run an HC08 application with the CodeWarrior for Microcontrollers V6.xsoftware!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. PROCESSOR EXPERT and EMBEDDED BEANS are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners.Copyright © 2009 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 UsCorporate Headquarters Freescale Semiconductor, Inc. 6501 William Cannon Drive West Austin, Texas 78735U.S.A.World Wide Web /codewarrior Technical Support /supportRevised: 24 September 2009。

CODE V 入门用户指南

CODE V 入门用户指南

第一章概述CODE V是设计和分析光学系统的一种工具。

本章的内容主要是向你介绍CODE V,描述可以帮助您学习和使用它的内容,并且简要地描述其用户界面和程序的结构。

目录第一章概述 (1)1.1 何谓CODE V? (2)1.2 手册与用户 (3)1.3 假设和术语 (4)1.4 CODE V的界面 (5)1.5 CODE V的结构 (6)1.6 启动、退出程序和技术支持 (7)1.7 手册中的一些设置 (7)1.1 何谓CODE V?1.1.1 光学设计的得力工具CODE V是解决光学问题一种强大、灵活的软件工具。

虽然CODE V的发展始于30多年前,但是它紧跟光学和计算机的发展步伐,得到不断地改进。

由于CODE V采用了可定制的窗口用户界面,有着丰富的帮助功能和优越的技术支持,所以它是十分容易学习和使用的,本手册将展示的这些特点。

1.1.2 CODE V典型的使用任务CODE V可应用于许多种场合。

下面列举一些典型的使用任务:●对现有光学系统进行评估和调整,以便决定是否适用于新场合或能否降低生产成本。

在重新设计过程中,对使用塑料、非球面、衍射元件或者现在元件进行评估。

●基于具体的产生或应用场合的要求创建新的设计形式。

●对光学系统进行公关分析,以合适制造,绘制生产图纸,甚至导出CAD用的IGES格式文件。

有哪里应用场合?从广义上来说,有三种应用领域:⏹成像系统⏹光电或通讯系统⏹照明和其它系统从历史上来看,CODE V在约80%或更多的应用大概是在成像系统方面。

例如照相镜头、变焦物镜、光盘系统、医用仪器、望远镜、分光镜、复印设备、投影仪、扫描仪、微光刻系统和许多包括军用和民用的航天领域。

虽然用于这些场合已经延续了多年,但是随着技术的发展,例如照相机的数码化、DVD取代CD等等,出现新的工作内容。

在近些年,光子学领域得到快速增长。

同时,由于CODE V有极大的灵活性,照明和其他系统也成为其重要的应用部分。

codewarrior使用指南

codewarrior使用指南
CodeWarrior 快速入门
1、安装 CodeWarrior 软件 安装 CodeWarrior 所需要的电脑的硬件资源如下,目前一般的电脑都可以满足这个要求。
16 位单片机的编程环境:CodeWarrior V4.6,V4.7,V5.0,V5.1 CodeWarrior V5.1 的下载链接: /lgfiles/devsuites/HC12/CW_HC12_v5.1_SPECIAL.exe 软件安装很简单,和其它软件的安装过程是一样的,按照默认的设置直接点击“下一步” 即可完成安装。 2、创建新工程(单片机以以 MC9S12XS128 为例,调试工具以 BDM 为例) 1) 点 击电 脑 左下 角 的 开始 菜 单, 开 始 >所 有 程 序>Freescale CodeWarrior> CodeWarrior development studio for S12(X) V5.0> CodeWarriorIDE。IDE 开始运行,出现下图 1 所示的窗口。
图11
图12 接下来给核心板供电,核心板的供电电压是 5V。有的 BDM 有 5V 供电模式,这个时候 直接用 BDM 供电就可以。 2)在新建的工程中键入如下代码 #include <hidef.h> #include "derivative.h" #define LEDCPU PORTK_PK4 #define LEDCPU_dir DDRK_DDRK4 void delay(void) { unsigned int i; for(i=0;i<50000;i++); } void main(void) { LEDCPU_dir=1; EnableInterrupts;
图8

codewarrior快速使用手册

codewarrior快速使用手册

CodeWarrior™ Development Studiofor Microcontrollers V6.x Quick StartSYSTEM REQUIREMENTSHardware PC with 1 GHz Intel® Pentium® compatibleprocessor512 MB of RAM (1 GB recommended)CD-ROM driveDepending on host-target connection: ParallelPort, 9-pin Serial Port, or USB PortOperating System Microsoft® Windows® XP orMicrosoft Windows Vista® Operating Systems32-bit (Home Premium Edition and BusinessEdition)Disk Space 2 GB total400MB on Windows system diskThis Quick Start explains how to install the CodeWarrior Development Studio for Microcontrollers V6.x 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.1.Insert CodeWarrior Development Studio CD into CD-ROM drive —CW Auto Install beginsNOTE If Auto Install does not start, run launch.exe, which is located in the root directory of the CD.The CodeWarrior software may be part of a DVD included withyour kit. In this case, click Install CodeWarrior DevelopmentStudio for Microcontrollers, follow the on-screen instructions,and skip to step "Check for updates".2.Follow setup program's on-screen instructionsNOTE Special Edition: The Special Edition license is automatically installed with your product and you do not need to register it.This license allows you to develop projects with unlimitedassembly code, up to 32KB of C code for HC(S)08/RS08derivatives and up to 64KB of C code for ColdFire V1derivatives.NOTE Evaluation Edition: The Evaluation license is automatically installed with your product and you do not need to register it.This license allows you to develop projects as ProfessionalEdition within the 30-day evaluation period. After 30 days, thelicense works as Special Edition license (free permanent, butfeature limited) which supports unlimited assembly code, up to32KB of C code for HC(S)08/RS08 derivatives and up to 64KBof C code for ColdFire V1 derivatives.1.Create a projecta.Select Start > Programs > Freescale CodeWarrior >CW forMicrocontrollers V6.x > CodeWarrior IDE — IDE starts and displaysstartup dialog box.Startup Dialog Boxb.Select Create New Project — the Microcontrollers New Project Deviceand Connection dialog box appears.NOTE This section of the quick start demonstrates using the New Project Wizard. We use an MC68HC908GZ60target as anexample.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 /codewarrior/downloads.Device and Connection Dialog Boxd.Select Full Chip Simulation as your default connection.e.Click Next — the Project Parameters dialog box appears.Project Parameters Dialog Boxf.In Project name text box, the IDE supplies a default project name. Entera project name of your choice.NOTE The IDE automatically creates a folder with the same name in specified location. The IDE automatically adds .mcp extensionwhen it creates project.g.In Location text box enter location to store project, click Set to browse tofolder locationh.Select C as language to be supported by project.NOTE You can click Finish to accept defaults for remaining options.i.Click Next — the Add Additional Files dialog box appears.This dialog box lets you browse folders and add or remove files to or fromthe project.Add Additional Files Dialog Boxj.Click Next — the Processor Expert dialog box appears.This dialog box let you specify whether you want your project configuredto use Device Initialization or Processor Expert.Processor Expert Dialog Boxk.Select the None option button.l.Click Next — the C/C++ Options dialog box appears.This dialog box allows you to specify C/C++ Options.C/C++ Options Dialog Boxm.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 — the IDE creates your project according to your specifications; Project window appears, docked at left side of mainwindow.Project WindowNOTE To undock project window, double-click the double gray lines.To re-dock window, right click in title tab and select Docked.2.Select connectionFor this example, we specified Full Chip Simulation (FCS).a.To change MCU and connection, select Project >Change MCUConnection.b.Make sure Full Chip Simulation is selected in drop-down list.3.Edit source codea.Double click main.c in Sources folder — the Editor window opensdisplaying contents of file.main.c in Editor Windowb.Make changes to contents of main.c file, if desired.c.From the IDE main menu bar, select File > Save — the IDE saveschanges.4.Add files if appropriatea.In the project window, select a folder.b.From IDE main menu bar, select Project > Add Files.The Select files to add dialog box appears.c.Navigate to the directory that contains file you want to add.d.Select the filename of file you want to add to project.e.Click Open — the Project Messages window appear indicating accesspath has been added to target, if the path is new to the project.f.In the project window, filename of the added file appears under theselected folder.5.Build projecta.From IDE main menu bar, select Project > Make — the IDE builds(assembles, compiles, and links) project; Error & Warnings windowopens showing any error messages and warning messages1.Start debuggera.Click on project window title bar to ensures that window is active projectb.From main menu bar, select Project > Make.c.From main menu bar, select Project > Debug — the True-TimeSimulator & Real-Time Debugger window opens.True-Time Simulator & Real-Time Debugger WindowNOTE The Source and Assembly panes display the main.c program and code.2.Set breakpointa.Point at a C statement in Source window and right-click — the Sourcecontext menu appears.b.Select Set Breakpoint — a permanent breakpoint mark is set.3.Run applicationa.From the True-Time Simulator & Real-Time Debugger window, selectRun — the Run menu appears.b.Select Start/Continue or click on Start/Continue icon — theProgram executes till the first breakpoint; Command pane displaysprogram statusDebugger Simulator Command Pane4.Click the Start/Continu e icon — the simulator resumes programexecution.5.Click the Halt icon — the Simulator stops program execution.6.From the True-Time Simulator & Real-Time Debugger windowtoolbar, select File > Exit to exit the debugger.7.From IDE main Window toolbar, select File > Exit to exit theCodeWarrior IDE.Congratulations!You have successfully created, built, and run an HC08 application with the CodeWarrior for Microcontrollers V6.xsoftware!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. PROCESSOR EXPERT and EMBEDDED BEANS are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners.Copyright © 2009 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 UsCorporate Headquarters Freescale Semiconductor, Inc. 6501 William Cannon Drive West Austin, Texas 78735U.S.A.World Wide Web /codewarrior Technical Support /supportRevised: 24 September 2009。

Kinetis K系列Flexmemory模拟EEPROM_exmaple

Kinetis K系列Flexmemory模拟EEPROM_exmaple

飞思卡尔Flexmemory例程指南例程功能飞思卡尔Kinetis 100MHz Silicon1.x 产品flexmem_demo例程实现使用FlexRAM以及FlexNVM相互结合模拟出EEPROM的功能,其中划分FlexRAM的部分区域作为EEPROM的实际存储区域,划分FlexNVM的部分区域作为EEPROM的备份区。

模拟出EEPROM存储器后,采用PIT定时15秒写读EEPROM区域,并通过波特率为115200bps的串口打印方式记录。

运行平台✓TWR-K40X256✓TWR-SER (可选)✓TWR-ELEV(可选)✓CodeWarrior V10.x/IAR ARM IDEFLASH内存模块简介飞思卡尔FLASH内存模块包括以下几个内存区域:∙编程flash-非易失性flash内存,用于存储编程代码与数据∙FlexNVM-非易失性flash内存,用于存储编程代码,数据以及EEPROM的备份数据∙FlexRAM内存-可字节写RAM内存,用于传统RAM功能或者EEPROM的存储K40芯片的内存大小及地址情况如下:TWR-K40X256使用的芯片是K40X256VMD100和K40DX256ZVMD10的内存大小一样,即Pflash为256KB,FlexNVM为256KB,FlexRAM为4KB。

要采用FlexRAM以及FlexNVM实现EEPROM,首先需要划分FlexRAM以及FlexNVM的相关区域,FTFL模块有专门的EEPROM的分区指令如下:其中,FCCOB4的值有两部分组成,即FCCOB4[EEESPLIT]和FCCOB4[EEESIZE]。

这两部的组合值决定了EEPROM两块内存(Subsystem A, Subsystem B)的比例以及大小,具体查看用户手册的表28-70. Valid EEPROM Data Set Size Codes.这部分内存来自FlexRAM。

【最新资料】CodeWarriorforARMDeveloperSuite的使用方法

【最新资料】CodeWarriorforARMDeveloperSuite的使用方法

CodeWarrior for ARM Developer Suite v1.2安装及使用简称ADS 1.2 .它支持ARM10之前的所有ARM 系列微控制器,支持软件调试及JTAG硬件仿真,支持汇编,c和c++源程序, 下载1、安装:按照提示安装即可。

安装完成后,提示出现 "ARM License Wizard" 对话框,选择 "Install License",然后在 "License File To Be Installed" 中使用 "Browse",选择 CRACK 目录下的 license.dat 文件即可。

2、调试。

它具有单步,断点,全速等调试功能。

可以观察变量、寄存器、内存等。

2.1、建立工程,启动CodeWarrior for ARM Developer Suite v1.2。

图一点击 File --〉New图二如上图:大家会问。

怎么和我的不一样啊!对了!我的模板是后添加上去的。

我们要用到的工程模板需要添加。

添加方法:下载模板/tools/开发板/EasyARM2100.asp 。

解压,放在安装软件目录下。

如ADS1.2安装在C盘下。

就把工程模板文件(5个)拷贝到C:\ProgramFile\ARM\ADSV1.2\Stationery 下即可。

点击 File --〉 New弹出建立工程对话框,选择ARM Executable Image for IPC22XX。

在Location下选择存放工程的目录。

这个你爱放哪就放哪,就是不能放在有中文的路径下。

一定要记得。

2.2、建立文件。

点击 File --〉 New,弹出建立工程时的对话框(还是图二那个窗口),如果你想直接添加到哪个文件夹下,你就点一下那个文件夹,然后在点击点击 File --〉 New,图三图二File选项卡,同样在右边写入你的文件名。

文件名一定是.S或者.C文件。

CodeWarrior操作步骤

CodeWarrior操作步骤

CodeWarrior操作步骤建立Workspace1.打开CodeWarrior2.在目录下建立Workspace(注意工程不要建在桌面,在此为示范请勿效仿)3.建立新项目4.输入项目名称→Next5.选择您使用的芯片型号→Next6.选择编译器类型7.选择编译语言8.选择是否使用PE工具和视图工具9.代码优化选择10.配置完成,点击Finish工程各项配置1. 时钟配置。

用户根据自己需求选择内外时钟及时钟大小2. 功能模块配置。

用户根据自己需求选择功能模块。

eg.IO 配置3.4. 各个功能模块配置好后,进行程序编写5. 主函数在ProcessorExperience.c 中6. 事件和中断等处理函数编写在Events.c 中Main 函数中的for 或while 循环从此出开始写,不然在更新PE 配置是程序被擦除触摸按键编写1.先将触摸按键库的5个文件添加进工程项目Sources中2.将触摸库添加到工程项目中。

右键点击Properties,进行一下设置。

3.更改触摸库TSI_config.c文件设置第一步:根据项目需要增加和减少使用到的TSI 通道。

在TSI_config.c文件中,TSI_TOUCH _DELTA[MAX_TSI_NUM]数组定义了每个按键出发的阈值,分别对应TSI 物理通道的0-15,当某个按键触摸前后的差值大于该Delta 值时,就会触发对应的通道事件。

如果不需要使用某个通道时,可以直接把对应的Delta 值配置为0,那么在代码中该通道就不会被Initial, calibrate 和scan,如果重新启用,只需Delta 值配置为非0 即可。

第二步:配置按键号与物理通道之间的映射关系。

如下二维数组中,左侧TSI_x是实际的TSI 物理通道,右侧KEY_1,2…N 对应着按键号0~N-1,这个按键号和TSI_main函数的返回值touched_key相对应,0xFF 表示未启用。

CodeWarrior使用教程

CodeWarrior使用教程

CodeWarrior 使 用 教 程一、认识 CodeWarriorCodeWarrior 能做些什么?当你知道自己能写更好的程序时,你一定不会再使用别人开发的应用程序。

但是常常会发生这种情况,就是当你写了无数行代码后,却找不到使得整个程序出错的那一行代码,导致根本没法编译和链接整个程序。

这可能更令人灰心丧气。

本文将告诉你如何使用 CodeWarrior 这一工具解决上述问题。

从现在开始,我们将集中精力学习如何在 CodeWarrior 中使用 C/C++ 进行编程。

为了学习本课程,你必须已经能够比较熟练地使用上述两种语言之一。

CodeWarrior 也可以支持 Java 开发,但那是另一门课程的内容。

本课程仅限于在 Windows 平台上使用 CodeWarrior 进行的开发。

一旦你精通了 CodeWarrior 编程后,你可以试试在其它平台上使用 CodeWarrior。

本文中讨论过的大部分内容都可以应用到开发 Mac 应用程序中。

CodeWarrior 能够自动地检查代码中的明显错误,它通过一个集成的调试器和编辑器来扫描你的代码,以找到并减少明显的错误,然后编译并链接程序以便计算机能够理解并执行你的程序。

你所使用过的每个应用程序都经过了使用象 CodeWorrior 这样的开发工具进行编码、编译、编辑、链接和调试的过程。

现在你在我们的指导下,自己也可以去做这些工作了。

你可以使用 CodeWarrior 来编写你能够想象得到的任何一种类型的程序。

如果你是一个初学者,你可以选择编写一个应用程序(比如一个可执行程序),比如象微软公司的文本编辑器 WordPad 这样的应用程序。

应用程序可能是最容易编写的程序了,而那些庞大的商业软件,比如象 Adobe Photoshop,Microsoft Word 以及 CodeWarrior 软件都是极其复杂的。

其它类型的程序指的是控制面板(control panels),动态链接库(dynamic linked libraries,DLLs) 和插件(plug-ins)。

CodeWarrior V10.1 使用方法快速入门

CodeWarrior V10.1 使用方法快速入门

CodeWarrior V10.1 使用方法快速入门CodeWarrior V10.1 Quick Start Guide1.启动CodeWarrior。

如果是首次启动该软件,需要设定一个工作空间。

选定工作空间后,如果是第一次运行CodeWarrior,则首先进入“欢迎”界面,点击该界面左上角“×”按钮,关闭该界面后即进入“C/C++项目”编程界面。

2.新建工程:在工具栏中选择 “文件->新建->BareBoard Project”,如图1所示。

图11)设定文件名在缺省状态下,该新建工程将保存在当前工作空间的文件夹下。

完成后点击“下一步”,如图2所示。

图22)选择芯片类型。

此处以MK10N512VMD100为例。

选择好芯片类型后,点击“下一步”,如图3所示。

图33)选择调试器类型(可多选)如果成功安装了新的USBBDM并且patch成功,此处会出现USBDM选项,如图4所示。

如果要在该工程中添加一些已有文件、或者希望生成一个默认的main.c文件,则完成后点击“下一步”。

如无上述需求,则直接点击“完成”。

此时将生成一个包含Startup Code、但不含main.c 的新工程。

图44)选择导入的默认文件以及是否生成main.c,完成后点击“下一步”。

CodeWarrior的默认编程语言是C,也支持C++和汇编,如果使用C语言编程,此处也可直接单击“完成”,具体操作如图5所示。

图55)选择编程语言,完成后点击“下一步”,如图6所示。

图66)选择是否需要调用一些快速开发工具(如Processor Expert、Device Initialization),完成后点击“完成”,如图7所示。

图7至此,CodeWarrior将为您生成一个包含Startup.c和main.c的新工程。

在编程界面(C/C++项目)下的工程窗口下,您可以浏览该工程含有的全部文件。

如果您无法找到上述窗口,可在CodeWarrior界面左下角的视图管理器中寻找。

CodeWarrior 10.2简明手册(V1.1)

CodeWarrior 10.2简明手册(V1.1)

CodeWarrior 10.2简明手册CodeWarrior 10.2简明手册 (1)1 下载安装CW v10.2 (1)2 安装BDM驱动 (2)3 导入现有工程 (3)4 编译、下载源码工程 (4)5. 带有操作系统程序的编译、下载 (6)5.1 带有操作系统模板程序的打开 (6)5.2 带有操作系统模板程序的编译 (7)5.3 带有操作系统模板程序的下载 (7)6 CodeWarrior 10.2常用操作 (8)7 常见问题说明 (9)基于Eclipse的CodeWarrior Development Studio for Microcontroller v10.2(简称CW10.2)作为一个完整的集成开发环境,提供了高度可视化操作及自动创建复杂嵌入式系统应用的功能,为使用Freescale嵌入式产品开发提供了便利。

官方推荐使用CW v10.2进行Freecale Kinetis嵌入式产品的开发。

本文将对使用CW v10.2开发K60项目的操作进行简要说明。

本文安装的cw10.2 版本是特别版的,支持128KB的代码大小。

用户若需要更大的代码空间和更多的功能的话,则需要向飞思卡尔申请license,这些license都是要收费的。

1 下载安装CW v10.2飞思卡尔半导体为注册用户在其官方网站的网址链接处下载后,双击可执行安装文件,如图1所示,根据提示即可完成安装。

由于有的CW10.2版本安装完成后默认是中文版的,有的默认是英文版的。

集成开发环境的原版是英文版的,所以英文版的运行速度比中文版的快很多。

这里建议用英文版的CW10.2,不建议用户使用中文版集成开发环境,所以本章介绍的使用说明都是基于英文版的。

想将飞思卡尔的CW10.2集成开发环境变成英文版,首先需要关闭当前的CW10.2,然后右击CW10.2桌面图标选择“属性”,在“目标”栏下“…”后面加上“–nl en”再单击“应用”后便改成英文版;加上“–nl zh”可以改2 安装BDM驱动CW_v10.2中已包含了BDM写入器(Open Source BDM,OSBDM)的驱动文件,将BDM接到PC机器时,Windows会提示发现新硬件:提示连接到“Windows Update”更新,选择“否,暂时不”,点击“下一步”。

CodeWarrior使用说明

CodeWarrior使用说明
5.5.3).插件设置(Plug-In Settings): 供插件开发商调试他们的插件;
htt第p:/一/bb章s.el认ecf识oomd电eW子技a术rr论io坛r 电子发烧上友海天马
5.5.4).隐藏文件夹(Shielded Folders): 在这里指定的文件夹在工程设计期间,或 执行查找和比较操作期间,将要被忽略掉.如果在你的工程级有一个巨大的“数据”文 件目录,而你又不想让这些文件降低CodeWarrior 的操作速度时,这个设置就很管用 了;
5.3.2).视窗化(Windowing): 设定调试器如何管理它的窗口(比如隐藏所有打开 的编辑器窗口);
htt第p:/一/bb章s.el认ecf识oomd电eW子技a源自rr论io坛r 电子发烧上友海天马
5.3.3).全局设置(Global Settings): 几个用于定制调试器在全局层次如何工作 的设置。比如当一个包含了程序调试信息的文件被打开时,是否启动这个程序;
的使用的设置。正如你所见到的,CodeWarrior 有许多设置项和选项。设置完后点 击“Save”按钮保存你所作的修改,点击“Close”按钮将忽略你所作的所有修改。在进 入下一节课之前,多练习几次。最后请确认“默认的文本文件格式(Default Text File Format)”(在编辑器设置面板中)保持为 DOS 设置。
htt第p:/一/bb章s.el认ecf识oomd电eW子技a术rr论io坛r 电子发烧上友海天马
1). CodeWarrior 能做些什么? A).使用 C/C++ 进行编程 B).也支持 Java 开发 本课程仅限于应用C/C++ 语言在 Windows 平台上使用 CodeWarrior 进行的开发. 2). CodeWarrior 优点是什么? CodeWarrior 能够自动地检查代码中的明显错误,它通过一个集成的调试器和编辑器来扫描

Codewarrior使用指南

Codewarrior使用指南

Codewarrior 使用指南飞思卡尔 HC08/HCS12 系列微控制器开发环境 - Codewarrior 使用指南(草稿)tyf01@ 2005 年 10 月仅供学习参考,请勿用于商业目的1Codewarrior 使用指南第一章 Codewarrior IDE 概述在软件开发过程中,通常需要经过以下几个步骤: • 新建:创建新项目,源文件 • 编辑:按照一定的规则编辑源代码,注释 • 编译:将源代码编译成机器码,同时还会检查语法错误和进行编译优化 • 链接:将编译后的独立的模块链接成一个二进制可执行文件 • 调试:对软件进行测试并发现错误 在软件开发中,每个过程都会用到不同的工具。

如果每个工具都单独存在,这样就 会给开发人员带来很多不便。

所以很多公司为开发人员提供了集成开发环境。

开发 人员可以在同一个工具或平台上完成以上全部的工作。

Codewarrior 是 Metrowerks 公司开发的软件集成开发环境(以后简称 IDE)。

飞思 卡尔所有系列的微控制器都可以在 codewarrior IDE 下进行软件开发。

Codewarrior IDE 特点Codewarrior IDE 为软件开发提供了一系列的工具,其中包括: 项目管理器:为软件开发人员管理上层的文件;将项目进行分组管理,比如文件或 目标系统;跟踪状态信息,比如修改日期;决定编译顺序或每次编译应包括哪些文 件;与插件一起提供版本控制功能 编辑器:利用颜色来区分不同的关键字;允许用户利用颜色机制自定义关键字;自 动检查括号范围;利用菜单在不同的文件或函数中导航 搜索器:搜索一个特定的字符串;用特定的字符串代替查找到的字符串;允许使用 常规表达式;提供文件比较功能; 源代码浏览器:标志符(变量名称,函数名称)数据库;利用数据库来对代码快速 定位;对所有的标志符连接到用到它的代码中; 编译系统:编译器将源代码编译成机器码;链接器将目标文件链接成可执行文件 调试器:利用标志符数据库进行源代码级调试;支持各种标志符数据库,比如: codeview, DWARF, SYM 等Codewarrior IDE 优点•交叉平台开发2Codewarrior 使用指南 开发人员可以在不同的操作系统下使用 codewarrior IDE 来开发自己的软 件。

CodeWarriorV.软件使用指南

CodeWarriorV.软件使用指南

Code Warrior 软件使用指南一、软件安装指南二、关于BDM驱动三、创建一个新的工程四、编写与运行你的程序2011年10月16日陈万忠Code Warrior 软件使用指南一、软件安装指南1. 打开文件安装文件夹2. 找到安装文件3. 双击此文件,出现安装界面:4. 点击“NEXT”按钮,出现安装路径信息。

如果修改系统默认路径,点击“change”按钮,然后修改安装路径,否则点击“NEXT”按钮。

5. 在安装过程中,根据提示信息,完成每一步的安装。

6. 安装完毕后,在所有程序中找到Code Warrior 执行文件,点击执行即可进入Code Warrior 集成环境。

7. 也可以拖到桌面上。

此时桌面出现如下图标:二、关于BDM驱动请将“BDM使用说明和驱动”文件夹下的文件:和以及三个文件,复制到:C:\Program Files\Freescale\\Prog\gdi目录下(或者你安装时修改过的Code Warrior 所在目录\Prog\gdi子目录下),在调试时选择Open Source BDM 调试接口即可。

三、创建一个新的工程创建一个新的工程,要按照下面向导选项的8个步骤来选择完成。

双击桌面快捷图标,进入 Code Warrior集成开发环境窗口。

第一步:创建一个新的工程。

第二步:选择CPU类型,选择HCS12X目录下的HCS12X Family。

第三步:选择CPU芯片型号和BDM工具TBDML。

第四步:选择编程语言,我们选择C语言编程。

第五步:添加文件到工程,一般直接按“下一步”。

第六步:快速开发应用程序选择,选None。

第七步:选择中的用户自定义模式。

第八步:选择不使用PC-Lint(TM)链接工具软件,点击“完成”按钮,Code Warrior集成开发环境就会自动生成整个工程的文件系统。

四、编写与运行你的程序在Code Warrior集成开发环境中,利用其自动生成的函数模板,就可以编写和调试你的应用程序了。

codewarrior快速入门

codewarrior快速入门

codewarrior快速入门CodeWarrior 开发环境快速入门-适用HC(S)08/RS08 单片机CodeWarrior 对计算机系统要求:硬件: 400MHZ Pentium II 以上处理器, 128MB 内存, CD-ROM, USB 接口操作系统:Microsoft Windows 98SE/2000/XP 占用磁盘空间:完全安装需要635M 第一步:安装 CodeWarrior 软件 1.安装 CodeWarrior 软件 1)运行 CD 中的 CW08_V5_1.EXE 文件 2)按照提示完成安装 2.安装升级包软件 1)运行 HC08V5_1_OSBDM_SP.EXE 文件,使 CodeWarrior 软件支持 HCS08 Open Source BDM 调试工具 2)运行 rs08ka_sp.exe 文件,使 CodeWarrior 软件支持 RS08 Open Source BDM 调试工具注:1)以上两个软件会自动安装到 CW08_V5_1.EXE 软件的安装目录下。

2)该免费软件在使用上有一定限制。

当使用汇编语言开发应用程序时,对源代码数量是没有限制的;当使用 C 语言开发应用程序时,对源代码有 16K 的限制,同时对同一工程下的文件数目限制在 32 个之内。

3.如果计算机使用 Windows 98 SE,在完成安装后重启计算机。

第二步:创建一个工程 1.运行 CodeWarrior IDE 1) 开始>程序>Freescale CodeWarrior>HC08 V5.1 2) 选择 CodeWarrior IDE,IDE 开始运行,出现 Startup 窗口 Create New Project:创建一个新工程Load Example Project:加载一个示例工程Load Previous Project:加载以前打开过的工程 Run Getting started Tutorial:运行CodeWarrior 软件帮助文档Start Using CodeWarrior:返回CodeWarrior 主窗口Startup 窗口2.创建一个新工程1)选择Create New Project-出现HC(S)08 New Project 窗口 Select the derivative you would like to use 对话框中选择所使用的单片机型号Choose your default connection 对话框选择工程所使用的开发工具,选择每一种开发工具,在下面的显示栏中显示其相关信息。

CodeWarrior V10 快速入门

CodeWarrior V10 快速入门

CodeWarrior V10.1 使用方法快速入门CodeWarrior V10.1 Quick Start Guide1.启动CodeWarrior。

如果是首次启动该软件,需要设定一个工作空间。

选定工作空间后,如果是第一次运行CodeWarrior,则首先进入“欢迎”界面,点击该界面左上角“×”按钮,关闭该界面后即进入“C/C++项目”编程界面。

2.新建工程:在工具栏中选择 “文件->新建->BareBoard Project”,如图1所示。

图11)设定文件名在缺省状态下,该新建工程将保存在当前工作空间的文件夹下。

完成后点击“下一步”,如图2所示。

图22)选择芯片类型。

此处以MK10N512VMD100为例。

选择好芯片类型后,点击“下一步”,如图3所示。

图33)选择调试器类型(可多选)如果成功安装了新的USBBDM并且patch成功,此处会出现USBDM选项,如图4所示。

如果要在该工程中添加一些已有文件、或者希望生成一个默认的main.c文件,则完成后点击“下一步”。

如无上述需求,则直接点击“完成”。

此时将生成一个包含Startup Code、但不含main.c 的新工程。

图44)选择导入的默认文件以及是否生成main.c,完成后点击“下一步”。

CodeWarrior的默认编程语言是C,也支持C++和汇编,如果使用C语言编程,此处也可直接单击“完成”,具体操作如图5所示。

图55)选择编程语言,完成后点击“下一步”,如图6所示。

图66)选择是否需要调用一些快速开发工具(如Processor Expert、Device Initialization),完成后点击“完成”,如图7所示。

图7至此,CodeWarrior将为您生成一个包含Startup.c和main.c的新工程。

在编程界面(C/C++项目)下的工程窗口下,您可以浏览该工程含有的全部文件。

如果您无法找到上述窗口,可在CodeWarrior界面左下角的视图管理器中寻找。

Codewarrior处理器专家使用指南

Codewarrior处理器专家使用指南

11
Double click on the BitIO bean in the Bean Selector in order to add the second bean
12
Click on the "Properties" TAB in the Bean Inspector window in order to set the bean
50
Change the properties accordingly (change the view and map to the correct I/O port and bit)
51
Copy (Cut & Paste) the LED instrument and update the properties of the new LED instrumant accordingly
53
When toggling the port G as previously, both LED will show the state graphically Add an additional “Command” instrument to stimulate port G
54
Change the properties accordingly. The Command field specifies to run the command file “toggleG.cmd”.
20
Enter name of the Bean in the Bean Inspector window - Button
21
Select pin for the Button in the Bean Inspector window - PTG0_KBD0

Codewarrior中PC-lint使用指南

Codewarrior中PC-lint使用指南

二 级 文 件 文件编号: Q/ECT SJ004 Codewarrior 中PC ‐lint 使用指南页次:第 1 页 共 6 页版次: 1/0常州易控汽车电子有限公司Codewarrior 中PC-lint 使用指南文件编号 ECT/YF-SJ-004 生效日期 2012-02-29 版 次 1/0 管理状态制定 审核批准方成Codewarrior中PC‐lint使用指南 第ii页常州易控汽车电子有限公司 产品研发部Codewarrior中PC-lint使用指南编 号 ECT/YF‐SJ‐004(A)适用产品型号批准: 日期:编 制 校 对 审 核 标 审 审 定 产品研发部 方成工程技术部 生产制造部 质量管理部 经营管理部 市场部 顾客代表更改单号 签 字 日 期文 件 分 发 单 位单 位 数 量 单 位 数 量 单 位 数 量 产品研发部 经营管理部 质量管理部工程技术部 市场部 生产制造部存 档分发人姓名:第iii页 Codewarrior中PC‐lint使用指南文档说明本文档更新历史版本 制定者 日期 更新内容 1/0 方成 2012年02月29日Codewarrior中PC‐lint使用指南 第4页1. Target Settings选项:修改Linker配置成“PCLint Linker”。

2. PCLint Main Settings选项选择PC‐Lint安装的目录第5页 Codewarrior中PC‐lint使用指南3. PCLint Options选项加入“au‐misra2.lnt”,确保该文件au‐misra2.lnt在安装目录下(该文件可以在PC‐lint官方网站上下载)。

Codewarrior中PC‐lint使用指南 第6页4. 编译文件选中要检查的文件,右键菜单,选择“Compile”,即可检查该文件是否满足MISRA 规范。

务必注意在使用PC‐lint检查前,使用Codewarrior编译器能够编译通过该文件。

FreescaleCodeWarrior集成开发环境IDE使用手册

FreescaleCodeWarrior集成开发环境IDE使用手册

汇编语言代码窗 口:可查看当前 执行C代码函数对 应的汇编代码
26
查看变量和断点
CodeWarrior会将当前执行函数中的所有局部自动添加到变量查看 窗口,其中的变量随程序的执行而不断改变和更新
在断点查看窗口能够查看到当前工程所有的断点 注意:KEA MCU仅支持2个硬件断点,如果设置多于2个断点,则无效
Freescale CodeWarrior 10.6 集成 开发环境(IDE)使用手册
本手册详细介绍了利用Freescale CodeWarrior 10.6 IDE 处 理器专家系统(Processor Expert)快速建立KEA工程和调试的 步骤,以及该IDE常用的编程及调试技巧,旨在帮助用户快速 熟悉和掌握CodeWarrior 10.6的使用,利用处理器专家系统快 速搭建应用工程进行产品原型验证。
15
查看定时器设置源及分配设置
点击此处可查看定时器设置
CodeWarrior 10.6 IDE使用手册
16
添加和配置定时器中断组件
在事件(Events)栏,可修改中断处 理回调函数名称,其默认如下图所示:
设置完成后可以看到定时器组件已 出现在Component文件夹下,点击右 上角的生成代码图标生成代码:
作者: 胡恩伟(飞思卡尔中国汽车电子现场应用工程师)
日期:2014年10月26日星期日 版本:1.0.0
CodeWarrior 10.6 IDE使用手册
1
1. 利用工程向导快速创建KEA工程
a. 点击菜单FileBareBoard Project(裸板工程)
b. 输入工程名称(默认将该工程创建
在当前工作空间(workspace),用户 也可以将其放到其他工作空间)
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Quick Startfor Microcontrollers V10.1CodeWarrior Development Studiofor Microcontrollers V10.x Quick StartSYSTEM REQUIREMENTSHardware Windows® OS: PC with 1 GHz Intel® Pentium®compatible processorLinux® OS: 1.8 GHz Intel Pentium class processor(or better)2GB of RAMCD-ROM driveDepending on host-target connection: ParallelPort, 9-pin Serial Port, or USB PortOperating System Microsoft® Windows XP 32-bit and 64-bit(Professional Edition),Microsoft Windows Vista® 32-bit and 64-bit (HomePremium Edition and Business Edition), orMicrosoft Windows 7 32-bit and 64-bit (HomePremium Edition and Professional Edition)Red Hat Enterprise Edition 5.2Disk Space 2 GB total400MB on Windows system diskThis Quick Start explains how to install the CodeWarrior Development Studio for Microcontrollers V10.x software on Windows and Linux operating systems, and how to use the CodeWarrior IDE to create, build, and debug a project.NOTE This section describes how to download and installCodeWarrior for Microcontrollers V10.x from the Web or installit from the CD. The Web version has a time-bombed license.NOTE Special Edition: The Special Edition license is automatically installed with your product and you do not need to register it.This license allows you to develop projects with unlimitedassembly code, up to 32KB of C code for HC(S)08/RS08derivatives, up to 64KB of C code for ColdFire V1 derivativesand up to 128 KB of C code for ColdFire V2-V4 derivatives. NOTE Evaluation Edition: The Evaluation Edition license isautomatically installed with your product and you do not needto register it. This license allows you to develop projects asProfessional Edition within the 30-day evaluation period. After30 days, the license works as Special Edition license (freepermanent, but feature limited) which supports unlimitedassembly code, up to 32KB of C code for HC(S)08/RS08derivatives, up to 64KB of C code for ColdFire V1 derivativesand up to 128 KB of C code for ColdFire V2-V4 derivatives. NOTE CodeWarrior Eclipse usage on a Microsoft® Windows Vista® or Microsoft Windows 7 system:Administrator rights are required to install CodeWarriorsoftware on Microsoft Windows Vista and Microsoft Windows 7systems, since the installer copies files into the System andProgram Files folders.The default CodeWarrior installation folder is C:\ProgramFiles\Freescale CodeWarrior\CW MCU v10.1. Toprotect against malware, Windows Vista and Windows 7 do notallow normal processes to change files in the Program Filesfolder; therefore, you must have administrator rights to installand run CodeWarrior software from this location. If you will berunning CodeWarrior software with a non-administratve useraccount, then you need to install CodeWarrior software inanother folder (e.g., C:\Freescale CodeWarrior\CW MCUv10.1).Your project workspace needs to be setup in any folder thatyou can fully access.1.Download CodeWarrior software from the Weba.Go to /cwmcu10 — the CodeWarrior forMicrocontrollers v10.x Product Summary page appears.b.Click the Downloads tab — the page displays separate downloads forthe Windows and Linux operatings systems.c.Click Download next to the required Microcontrollers V10.x download.You will be directed to the Freescale log-in page if you are not logged inalready.d.Enter your user name and password and click Log in.NOTE If you are not a registered user, click Register Now and follow the on-screen instructions.e. A dialog box appears asking you to save the installer file. The extensionof the installer file is .exe for Windows and .tar for Linux.f.Specify the location where you want to save the installer file.2.Install CodeWarrior software downloaded from WebWindows OSa.When the download finishes on the Windows host computer, navigate tothe CodeWarrior installer EXE file you have downloaded, double-click theEXE file — the install wizard appears.b.Follow the wizard instructions to install the CodeWarrior software.When software installation is finished, wizard displays the installationcomplete page.c.Check the Display Start Here page checkbox and click Finish to close thewizard.d.The start here page appears in your default browser. The page gives youinformation about the different documents, such as getting started, userguides, application notes, and cheat sheets available in the product. NOTE CodeWarrior Eclipse usage on a Linux system:The CodeWarrior installer must be run from a root account.CodeWarrior service packs are installed with the EclipseUpdater. The updater must also be run from a root account. Tostart the Eclipse Updater select 'Window > Install newsoftware' in the menu.Eclipse needs read/write access to the installation folder. Makesure the eclipse installation folder has the appropriatepermissions for all users.Make sure your project workspace has read and writepermissions.If the CodeWarrior software does not restart automatically aftera successful CodeWarrior update operation, run ‘./cwide -clean' to launch the CodeWarrior software.Linux OSa.When download finishes on the Linux host computer, navigate to thefolder containing the CodeWarrior installer TAR file you havedownloaded.b.Right-click the TAR file and select Extract Here. The system extracts thecontents of the TAR file. A new folder appears next to the TAR file in thefile browser window; usually, the new folder's name is disk1.c.Open a new terminal window — the shell session starts.d.In the terminal window, log in as root or super user.e.Issue command: xhost +.f.Change working directory to the disk1 directory.g.Issue command: ./setuplinux — the install wizard starts; the welcomepage appears.h.Follow wizard instructions to install the CodeWarrior software.i.When software installation is finished, wizard displays the installationsummary page.NOTE Using P&E hardware via the USB port within the CodeWarrior software requires the Jungo USB drivers. During theCodewarrior software installation on a Linux operating system,it attempts to install the drivers automatically. However, if thedriver installation fails and a warning message is displayed,then please refer to the Readme.pdf found within[CodewarriorInstallDir]\Drivers\pemicro tomanually install the P&E drivers.j.Click Finish.3.Install CodeWarrior Software from CDa.Insert CodeWarrior Development Studio CD into CD-ROM drive — CWAuto Install begins.NOTE If Auto Install does not start, navigate to the CodeWarrior installer EXE file, double-click the EXE file — the install wizardappears.b.Follow the wizard instructions to install the CodeWarrior software.4.Restart your computer — operating system reboots which ensuresthat CodeWarrior IDE finds newly installed drivers.NOTE Before starting the CodeWarrior IDE in Linux, make sure that LD_LIBRARY_PATH is set to empty.1.Start CodeWarrior IDEa.For Windows, select Start > Programs > Freescale CodeWarrior > CWfor MCU v10.1 > CodeWarrior — the Workspace Launcher dialog boxappears.For Linux, open a new terminal window and change the working directory as shown below:CWInstallDir/eclipse/where, CWInstallDir is the directory in which you installed theCodeWarrior software.Issue command: ./cwide — the Workspace Launcher dialog boxappears.Workspace Launcher Dialog BoxNOTE If you want to store your projects in the default location, click OK and proceed to step 2, otherwise follow the steps givenbelow.b.Click Browse — the Select Workspace Directory dialog box appears.Select Workspace Directory Dialog Boxc.Select required folder or click Make New Folder to create a new folder forstoring your projects.d.Click OK — the Select Workspace Directory dialog box closes. NOTE Check the Use this as the default and do not ask again checkbox in the Workspace Launcher dialog box to set thechosen path as the default location for storing all your projects.e.Click OK — the CodeWarrior IDE launches and the Welcome pageappears.NOTE The Welcome page appears only if the CodeWarrior IDE or the selected Workspace is opened first time. Otherwise, theWorkbench window appears. Switch directly to step 2a if theWorkbench window appears.Welcome Pagef.In the Welcome Page, click Go to Workbench — the Workbenchwindow appears.Workbench Window2.Create new projecta.From the IDE menu bar, select File > New > Bareboard Project — theNew Bareboard Project wizard starts; the Create an MCU bareboardProject page appears.b.Enter Project_1 in the New Project Name field.Create an MCU bareboard Project PageNOTE The Location field shows the default project location. If you wish to change this location, clear the Use default locationcheckbox. Click Browse and use the subsequent dialog box tospecify a new location. Click OK. The Create an MCUbareboard Project page now shows new location.c.Click Next — the Devices page appears.d.Expand the tree control and select HCS08 > HCS08G Family >MC9S08GB32.Devices Pagee.Clcik Next — the Connections page appears.Connections Pagef.Select the desired connection.NOTE In the Connections page, you can select multiple connections at once.g.Click Next — the Add Files page appears.Add Files Pageh.Click Next — the Languages page appears.NOTE The page displayed may vary depending on the derivative or board selected. For example, if you select ColdFire V2 >MCF5221X > MCF52210 and click Next, the ColdFire BuildOptions page appears.i.Select the C language.Languages Pagej.Click Next — the C/C++ Options page appears.NOTE If you check only the Relocatable Assembly or Absolute Assembly checkbox and click Next, the Rapid ApplicationDevelopment page appears instead of the C/C++ Optionspage.C/C++ Options Pagek.Click Next — the Rapid Application Development page appears.Rapid Application Development Pagel.Select None from the Rapid Application Development options.m.Click Finish — the IDE creates the project.n.Select Project > Build Project from the IDE menu bar— the IDE builds the project. Expand the project directory in the CodeWarrior Projectsview to view the list of files and folders in the project.CodeWarrior Projects ViewNOTE To set Linker, Complier, and Assembler options for a project, select the project in the CodeWarrior Projects view and selectProject > Properties from the IDE menu bar. In theProperties dialog box that appears, select C/C++ Build >Settings. You can make the required settings in the ToolSettings tab page.1.Debug programa.From the IDE menu bar, select Run > Debug Configurations — theDebug Configurations dialog box appears.b.Expand the CodeWarrior Download tree control in the left pane andselect Project_1 - MC9S08GB32 - PnE Full Chip Simulator.Debug Configurations Dialog Boxc.Click the Debugger tab — the Debugger page opens in the right pane.Debug Configurations Dialog Box — Debugger Paged.Make the appropriate changes in the Debug tab.e.Click Apply to save the changes in the settings, if any.f.Click Debug — the debugger downloads program to simulator and theDebug Perspective appears. The execution halts at the first statement ofmain()and program counter icon on the marker bar points to the next statement to be executed.Debug Perspective2.Set and run to breakpointa.Double-click on the marker bar next to a statement — the breakpointindicator (blue dot) appears next to the statement.b.From the Debug view, click Resume — the debugger executes allstatements up to but not including the breakpoint statement.3.Control programa.From the Debug view, click Step Over — the debugger executesbreakpoint statement and halts at next statement.b.From the Debug view, click Resume — the simulator resumesprogram execution.c.From the Debug view, click Terminate — the debug session ends.4.Select File > Exit from the IDE menu bar to exit the CodeWarrior IDE.Congratulations!You have created, built, and debugged an Microcontrollers project using CodeWarrior for Microcontrollers V10.xsoftware!Freescale, the Freescale logo, CodeWarrior and ColdFire are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. Flexis and Processor Expert are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners.© 2010–2011 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 UsCorporate Headquarters Freescale Semiconductor, Inc. 6501 William Cannon Drive West Austin, Texas 78735U.S.A.World Wide Web /codewarrior Technical Support /supportRevised:2 February 2011Freescale, the Freescale logo and CodeWarrior are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. All other product or service names are the property of their respective owners.© 2010, 2011 Freescale Semiconductor, Inc.。

相关文档
最新文档