CodeWarrior 10.6使用说明

合集下载

CodeWarrior使用教程

CodeWarrior使用教程
图 2-1: 显示工程信息的工程窗口(图示为空的情况) 大多数组成你的程序的文件都是原始的文本文件。这些文件包含了你在 CodeWarrior 的编辑器中键入的源代码。在某些情况下,你还将使用一些预编 译的源码和头文件。在进行数学运算和 I/O 操作时,你还要使用到一些库文件, 比如 Metrowerks 标准库(Metrowerks Standard Library,MSL) 通常,你都是使用 C 或 C++ 来编写源代码,但通过给 CodewWarrior 的 集成开发环境加装相应的插件(plug-in),你也可以在 CodeWarrior 中使用其它 语言来进行编程。别忘了,CodeWarrior 可是一个可扩展的集成开发环境。通 过给它安装一些插件,你就可以扩展它的功能。比如说,加入有人开发了一种新 的叫做 Z++ 的编程语言,你就可以为 CodeWarrior 创建一个相应的插件使之 能够支持 Z++ 语言,而且你还可以拿这个插件卖好多钱,让所有使用 CodeWarrior 编程的人都使上 Z++ 语言。那该多好!:)
6
PDF 文件使用 "FinePrint pdfFactory Pro" 试用版本创建
第二课 显示和定制工程和目标文件
本课将讲述 CodeWarrior 操作文件的方式以及介绍它的工程(Project)窗口。 什么是工程文件
为了使用 CodeWarrior 来创建一个应用程序,你必须创建许多文件来构成一 个工程(Project)。该工程的设置和所有这些文件的指针都被存放在一个工程文件 中。这些设置包括编译和链接设置、源文件、库文件以及它们之间用于产生最终 程序的相互关系。你可以将这个工程文件看作该工程的大脑:它保存了所有文件 相互依存的关系并知道如何将它们组合成为一个可用的应用程序。工程窗口依次 显示了这些关于你的程序和该程序所包含的文件的信息,并允许你只需轻松点击 就可以修改这个工程。图 2-1 显示了工程窗口的外观。

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。

FreescaleCodeWarrior10.6集成开发环境(IDE)使用用户手册

FreescaleCodeWarrior10.6集成开发环境(IDE)使用用户手册

e.选择编程语言和浮点数支持以及控制 台(console)硬件支持:
f.选择是否使用处理器专家系统以及工 程外设driver的使用模式:
CodeWarrior 10.6 IDE使用手册
4
利用工程向导快速创建KEA工程
处理器专家系统工程介绍 工程及文件窗口
处理器专家为
每一个组件 (compontent) 生一个对应 的.h和.c文件, 包含该组件图
Freescale CodeWarrior 10.6 集成 开发环境(IDE)使用手册
本手册详细介绍了利用Freescale CodeWarrior 10.6 IDE 处 理器专家系统(Processor Expert)快速建立KEA工程和调试的 步骤,以及该IDE常用的编程及调试技巧,旨在帮助用户快速 熟悉和掌握CodeWarrior 10.6的使用,利用处理器专家系统快 速搭建应用工程进行产品原型验证。
CodeWarrior 10.6 IDE使用手册
2
利用工程向导快速创建KEA工程
c. 选择器件,这里KEA属于Kinetis E系列, d. 选择调试工具,这里必须选择TRK-KEA128板
故选择如下:
载的OpenSDA作为本工程的调试工具:
CodeWarrior 10.6 IDE使用手册
3
利用工程向导快速创建KEA工程
6
CPU组件介绍及配置
在CPU组件的属性设置中还包括常
规设置(common settings)
其中包含了默认看门狗、SWD调试口以及Flash Memory 的设置
在CPU组件的属性设置中还包括CPU
内核中断/复位设置(CPU
interrupt/reset)
其中包含了CPU内核系统级中断(ARM Cortex M0+实现的 异常):不可屏蔽中断NMI、硬件错误异常Hard fault(当 CPU执行非法指令、非对其地址访问时触发该异常,可以 用于捕获程序跑飞时的场景)、超级调用Supervisor Call和 可请求服务异常(用于RTOS系统任务切换),以及内部时 钟失锁(ICS Loss of lock)。所有这些中断的优先级都高于 外设中断。

Code Warrior 10.6 DSC培训教程

Code Warrior 10.6 DSC培训教程

Code Warrior 10.6 DSC培训教程Larry Yang 6/4, 2015 一.创建一个工程1. File -> New -> Bareboard Project,输入工程名“MC56F82748”,然后点“Next”。

然后选择芯片型号:MC56F82748,如下图所示,然后点“Next”。

接下来选择仿真器类型,常用的有MultiLink Universal, Open Source JTAG和Freescale USB TAP,可多选,然后点“Next”。

在Language and Build Tools Options页面选C,然后点“Next”,选择Processor Expert,该工具可以快速完成芯片的配置,省去了看参考手册的时间。

最后点“Finish”完成工程的创建。

2工程创建完成后,接下来就可以下载调试程序了。

(1)右击工程名,选择Debug As -> Debug Configurations,如下图所示。

然后选择MC56F82748_FLASH_SDM_FSL_USB TAP-> Debug,开始编译下载程序。

程序下载完成后,在工具栏中点“绿色的三角形”开始运行。

调试程序,也可以点下面的图标。

二.打开一个现有的工程菜单File -> Import,在对话框中选择“Existing Projects into Workspace”,如下图所示。

然后选择工程所在的路径,如果需要将工程从其它路径拷贝到当前的worksapce,则选中” Copy projects into workspace”,点”Finish”即打开工程。

三.点亮LED灯1.通过Processor Expert添加IO初始化组件Components Library -> Categories -> CPU Internal Peripherals -> Port I/O,双击 BitIO,添加IO元件。

Codewarrior Processor Expert使用简介

Codewarrior Processor Expert使用简介
CodeWarrior 集成开发环境
使用简介 Freescale 傅志强
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
Slide 3
TM
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
Processor Expert™
1
点击 “创建工程”
Slide 12
TM
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
Processor Expert™
使用Processor Expert™(芯片专家系统) 使用 (芯片专家系统) 创建一个简单的项目

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。

CodeWarrior介绍(自己整理)

CodeWarrior介绍(自己整理)

写给CodeWarrior初学者1.运行CodeWarrior IDE,打开软件界面;2.点击“File”菜单下的“New”选项,然后在“Project”选项卡中选择“HC(S)12 New Project Wizard”,也就是新建工程向导,在右侧输入你要键入的工程名和你要放在哪个文件夹下面;3.点击“确定”后下面选择你采用的单片机型号,比如你选择“MC9S12D64”或者“MC9S12NE64”;(其中如果选择MC9S12NE64,则必须安装光盘上的NE64补丁插件)4.点击“下一步”后,选择你采用哪种编程语言,尽量不要选第三个“C++”,因为好像我试的有问题,如果你单纯的C,则选择第二个,如果你是C和汇编混合编程,则前两个都要选的;5.选择是否采用“处理器专家”,该项功能可以方便程序的寄存器设置,但我用过感觉比较糊涂,所以我一般选择“No”;6.下面就是选择是否采用“PC-lint”,选择“No”;7.选择是不是支持浮点数,如果你的工程采用浮点数则选择下面的两个中一个,否则选择“No”;8.选择采用哪种内存定位模式,一般选择第一个“Small”模式9.最后一步,选择前面两项,如果仅选择第一项,则仅可以软件调试,前两项都选择可以支持软件和硬件调试。

10.完成后,软件会自动创建一个工程,如下图所示,,其中左侧的sources 文件夹下面的main.c就是你的主程序文件,你可以在里面添加代码,同时在左侧按鼠标右键,会弹出菜单,里面有“Add Files”或“Create Group”等,可以根据你的需要往新创建的工程里添加你自己的头文件或者C文件。

11.你可以在main.c里面编辑你的代码,如果需要加入中断,则在左侧找到Prm文件夹下面打开“P&E_ICD_Linker.prm”,然后在右侧该文件里你可以加入你自己的中断函数和中断向量入口地址,记住:你在这个Prm里定义的自己的中断函数名,要和主函数里面的中断函数名对应起来;比如我在Prm文件里定义了串口接收中断:VECTOR ADDRESS 0XFFD6 SCI0Recive_ISR则在主函数(main.c)里面这样引用该中断函数:interrupt void SCI0Recive_ISR(void){里面是你自己的代码}12.现在一个简单的工程基本创建完成,点击下面的编译按钮进行或者调试按钮就进入调试环境13.如果您点击调试(绿色类似箭头按钮)的时候没反应,那可能是您设置的Debug 路径有问题,如果您采用我的方法,比如CW3.0仅安装了Compiler,然后安装了CW4的Debugger,这样的话就要设置一下Debug的路径。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

CodeWarrior 10.6 使用说明
EDITOR : JaceLin
FROM : GUET
下载地址:
/zh-Hans/webapp/sps/site/homepage.jsp?code=CW_HOME
下载完后,点出.exe文件就直接安装了。

----------------------------安装完--------------------------------- 第一步:成打列软件
第二步:选择工作空间(默认存放工程文件的地方)
第三步:打开软件完成界面
第4步:把不常用的窗口关闭,剩下的好下图
常用窗口有: codewarrior projects(用于管理工程文件), console (打印出编译信息)
留下这两个就可以了
第5步:新建工程方法1
方法2:
这几个是一步到位。

自己尝试就好。

第6步:选择工程类型,在这里我选择裸机工程
第七步:工程名字
第8步:选择芯片型号,
第9步:在这里我选择 mk60Dn512Z
第10步:选择下载器类型,我选择了j-link,之后finish就可以了。

第11步:新建完成后,系统已经帮你建立了初始化函数,main函数等,接下来就看你的发挥了。

12步:运行,点击运行秒可以下载程序到板子上面了
13步:如果你想调试,那就按照下图
点击这个虫子就可以了、、、、、
14:
其它:
1)软件注册就不说了。

2)修改文件inlcude (头文件) 在setting 里面,位置就不上图了。

3)本软件类似JAVA 编译器Eclipse,写过java的应该不会陌生。

4)功能太多,不一一讲解了。

byebye…。

相关文档
最新文档