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

单击此处“…”则会 弹出下页ppt所示的 周期设置窗口
CodeWarrior 10.6 IDE使用手册
14
设置定时器中断周期为10ms
在此输入期望的中断周期10ms 这里列出了当前选择的定时器能 够实现的定时周期及精度 设此处限定定时误差,若设置的中断周 期超出此误差,则处理器专家会报错
CodeWarrior 10.6 IDE使用手册
CodeWarrior 10.6 IDE使用手册
3
利用工程向导快速创建KEA工程
e.选择编程语言和浮点数支持以及控制 台(console)硬件支持: f.选择是否使用处理器专家系统以及工 程外设driver的使用模式:
CodeWarrior 10.6 IDE使用手册
4
利用工程向导快速创建KEA工程
其中包含了默认看门狗、SWD调试口以及Flash Memory 的设置
在CPU组件的属性设置中还包括CPU 内核中断/复位设置(CPU interrupt/reset)
其中包含了CPU内核系统级中断(ARM Cortex M0+实现的 异常):不可屏蔽中断NMI、硬件错误异常Hard fault(当 CPU执行非法指令、非对其地址访问时触发该异常,可以 用于捕获程序跑飞时的场景)、超级调用Supervisor Call和 可请求服务异常(用于RTOS系统任务切换),以及内部时 钟失锁(ICS Loss of lock)。所有这些中断的优先级都高于 外设中断。
CodeWarrior 10.6 IDE使用手册
18
添加和配置定时器中断组件
最后在中断回调函数中添加中断处理,这里为全局中断计数器加1; 注意:用户的中断处理代码必须加在处理器专家指定的位置
CodeWarrior 10.6 IDE使用手册
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。
Freescale CodeWarrior 集成开发环境 IDE 使用手册

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)。所有这些中断的优先级都高于 外设中断。
使能外部晶振 输入外部晶振频率
选择FLL工作模式为FEE
配置FLL倍频输 出,处理器专 家自动选择配 置系数
选择内核/总线/定时器时钟频率
CodeWarrior 10.6 IDE使用手册
除能外部晶振 选择FLL工作模式为FEI
注意:这里内核/总线/定时器时 钟频率不能配合为整数的原因 是,FLL是的是内部32.768KHz的 时钟源,其整数倍频不为整数
作者: 胡恩伟(飞思卡尔中国汽车电子现场应用工程师)
日期:2014年10月26日星期日 版本:1.0.0
CodeWarrior 10.6 IDE使用手册
1
1. 利用工程向导快速创建KEA工程
a. 点击菜单FileBareBoard Project(裸板工程)
b. 输入工程名称(默认将该工程创建
在当前工作空间(workspace),用户 也可以将其放到其他工作空间)
codewarrior介绍及安装流程

CodeWarrior 5.1软件安装流程本文档主要用来说明CodeWarrior软件安装流程。
2 软件介绍CodeWarrior Development Studio是一个全面的集成开发环境(IDE),提供了高度可视化和自动化的框架,可加快最复杂的嵌入式应用的开发速度。
CodeWarrior包括构建平台和应用所必需的所有主要工具 - IDE、编译器、调试器、编辑器、链接器、汇编程序等。
而且得益于各种处理器和平台(从Motorola 到TI到Intel)间的通用功能性,CodeWarrior IDE支持开发人员插入他们所喜爱的工具,使他们可以自由地以希望的方式工作。
另外,它是一个单一的开发环境,在所有所支持的工作站和个人电脑之间保持一致。
在每个所支持的平台上,性能及使用均是相同的,则无需担心主机至主机的不兼容。
其主要功能如下:1、项目管理器:为软件开发人员处理最高级别的文件管理;按照主要组别组织项目条目;追踪状态信息(例如文件修改日期);确定每个构建中特定文件的构建顺序及内容;协调插件程序以提供箱版本控制和RTOS支持这样的业务。
2、文本编辑器:支持源代码和其他文本文件的创建和处理。
与其他的IDE 功能完全集成。
3、搜索引擎:查找特定的文字串;以替代文字替换找到的文字;支持常规表达的使用;提供文件比较及差别功能。
4、源浏览器:保存用于程序的符号数据库;包括变量及功能的名称和值的符号的举例;使用符号数据库协助代码浏览;将每个符号与此符号相关代码的其他位置链接;处理目标导向和程序语言。
5、构建系统:使用编译器从源代码生成可重新定位的目标代码,并使用链接器从目标码生成最后的可执行图像。
CodeWarrior C/C++*编译器工具包括业内领先的C/C++*语言CodeWarrior编译器,包括标准模板库(STL)及各种其他工具。
6、源级别调试器:提供高性能窗口的源级别调试器,配备最新的高效率增强型图形性能,缩短板的bring-up和应用开发时间;使用符号数据库,提供源级别调试;支持符号格式,例如CodeView、Debug With Arbitrary Records Format (DWARF)和STABS。
CodeWarrior USB TAP说明书

The CodeWarrior™ USB TAP host target interface is a feature-packed, no nonsense run-control tool that allows developers to save precious development time during target bring-up and debug providing visibility into and control of Freescale™ on-chip debug (OCD) features. The USB TAP integrates seamlessly with the CodeWarrior integrated development environment, giving the developer a powerful tool for complex debug tasks. The USB TAP features broad Freescale processor support, complete run-control functionality and flash programming for fast downloads and convenient production testing.Highlights>High-speed USB 2.0 download>Device is self-powered requiring no external power supply>Run-control visibility and control>Flash memory programming>Low voltage target support>Fully integrated with CodeWarrior tools and supports all CodeWarrior run-control debug featuresDetailed Features>Gain optimal performance:•Split-second single-step execution •Fast code download to target,depending on processor and targetdesign•Control and debug your softwarerunning in-target, with minimal intrusioninto target operation >Use software or hardware breakpoints>Crash-proof control of the targetprocessor>Obtain and modify register contents>Display and modify memory>Control instruction execution>Run/stop/step/reset>Available with a variety of connectors tosupport a wide array of Freescaleprocessor families>The combination of USB TAP andCodeWarrior Development Studioprovides:•Powerful C/C++ C/C++ sourcecorrespondence•Debug in ROM, RAM, and flash memoryBenefitsVisibility— In conjunction with theCodeWarrior debugger, the USB TAPmakes it possible for a developer to viewregisters and the current state of targetmemory. Program execution can be halted atpredefined states, and data for a particularprogram state can be examined.Control— The state of the target systemcan be conveniently controlled bydownloading code, manually modifyingprocessor registers and memory, single-stepping through the code, or settingbreakpoints.Transparency— When using the USB TAPit is virtually indistinguishable from non-debug target execution.Companion ProductsFor network or Ethernet debug capability,the CodeWarrior Ethernet TAP run-controlproduct allows you to tap into the fullpotential of your chosen Freescalemicroprocessor and associated peripheralsproviding you with an Ethernet-connected,crash-proof development environment toconduct processor system test, debug andintegration.Part NumbersUSBTAP DPI (PQI) CWH-UTP-PPCD-HEUSBTAP JTAG (PQ II/III) CWH-UTP-PPCC-HEUSBTAP JTAG (ColdFire) CWH-UTP-CF-HEUSBTAP ONCE (DSC) CWH-UTP-ONCE-HEFREESCALE 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. 2006.ALL RIGHTS RESERVED.950-00126REV BLearn More: For more information about Freescale products, please visit /codewarriorMouser ElectronicsAuthorized DistributorClick to View Pricing, Inventory, Delivery & Lifecycle Information:F reescale Semiconductor:CWH-UTP-PPCC-HE。
codewarrior介绍及安装流程【精选】

CodeWarrior 5.1软件安装流程信入党组形式组织一次“坚持根讨论不,开展党邀请党话,做合格党员”党规、学在全市号),结育,基础实党的”专题教优,进一持问题导为协调面小1目的本文档主要用来说明CodeWarrior软件安装流程。
2 软件介绍CodeWarrior Development Studio是一个全面的集成开发环境(IDE),提供了高度可视化和自动化的框架,可加快最复杂的嵌入式应用的开发速度。
CodeWarrior包括构建平台和应用所必需的所有主要工具- IDE、编译器、调试器、编辑器、链接器、汇编程序等。
而且得益于各种处理器和平台(从Motorola到TI到Intel)间的通用功能性,CodeWarrior IDE支持开发人员插入他们所喜爱的工具,使他们可以自由地以希望的方式工作。
另外,它是一个单一的开发环境,在所有所支持的工作站和个人电脑之间保持一致。
在每个所支持的平台上,性能及使用均是相同的,则无需担心主机至主机的不兼容。
其主要功能如下:1、项目管理器:为软件开发人员处理最高级别的文件管理;按照主要组别组织项目条目;追踪状态信息(例如文件修改日期);确定每个构建中特定文件的构建顺序及内容;协调插件程序以提供箱版本控制和RTOS支持这样的业务。
2、文本编辑器:支持源代码和其他文本文件的创建和处理。
与其他的IDE 功能完全集成。
3、搜索引擎:查找特定的文字串;以替代文字替换找到的文字;支持常规表达的使用;提供文件比较及差别功能。
4、源浏览器:保存用于程序的符号数据库;包括变量及功能的名称和值的符号的举例;使用符号数据库协助代码浏览;将每个符号与此符号相关代码的其他位置链接;处理目标导向和程序语言。
5、构建系统:使用编译器从源代码生成可重新定位的目标代码,并使用链接器从目标码生成最后的可执行图像。
CodeWarrior C/C++*编译器工具包括业内领先的C/C++*语言CodeWarrior编译器,包括标准模板库(STL)及各种其他工具。
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 使用指南飞思卡尔 HC08/HCS12 系列微控制器开发环境 - Codewarrior 使用指南(草稿)tyf01@/doc/ab18307025.html, 2005 年 10 月仅供学习参考,请勿用于商业目的1Codewarrior 使用指南第一章 Codewarrior IDE 概述在软件开发过程中,通常需要经过以下几个步骤:? 新建:创建新项目,源文件? 编辑:按照一定的规则编辑源代码,注释? 编译:将源代码编译成机器码,同时还会检查语法错误和进行编译优化? 链接:将编译后的独立的模块链接成一个二进制可执行文件? 调试:对软件进行测试并发现错误在软件开发中,每个过程都会用到不同的工具。
如果每个工具都单独存在,这样就会给开发人员带来很多不便。
所以很多公司为开发人员提供了集成开发环境。
开发人员可以在同一个工具或平台上完成以上全部的工作。
Codewarrior 是 Metrowerks 公司开发的软件集成开发环境(以后简称IDE)。
飞思卡尔所有系列的微控制器都可以在 codewarrior IDE 下进行软件开发。
Codewarrior IDE 特点Codewarrior IDE 为软件开发提供了一系列的工具,其中包括:项目管理器:为软件开发人员管理上层的文件;将项目进行分组管理,比如文件或目标系统;跟踪状态信息,比如修改日期;决定编译顺序或每次编译应包括哪些文件;与插件一起提供版本控制功能编辑器:利用颜色来区分不同的关键字;允许用户利用颜色机制自定义关键字;自动检查括号范围;利用菜单在不同的文件或函数中导航搜索器:搜索一个特定的字符串;用特定的字符串代替查找到的字符串;允许使用常规表达式;提供文件比较功能;源代码浏览器:标志符(变量名称,函数名称)数据库;利用数据库来对代码快速定位;对所有的标志符连接到用到它的代码中;编译系统:编译器将源代码编译成机器码;链接器将目标文件链接成可执行文件调试器:利用标志符数据库进行源代码级调试;支持各种标志符数据库,比如:codeview, DWARF, SYM 等Codewarrior IDE 优点交叉平台开发2Codewarrior 使用指南开发人员可以在不同的操作系统下使用codewarrior IDE 来开发自己的软件。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
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)。所有这些中断的优先级都高于 外设中断。
处理器专家依据此配置生成过程的链接 文件
在CPU组件的事件(Eventss)设置中 包含了该组件属性配置所产生的中断处 理回调函数的名字:这里仅复位和NMI使能。
CodeWarrior 10.6 IDE使用手册
8
处理器专家件库(Component Library)介绍
CPU外部设备:控制台IO和FreeMaster组件 CPU内部外设:
CodeWarrior 10.6 IDE使用手册
7
CPU组件介绍及配置
在CPU组件的方法(Methods)设置 中包含了该组件属性配置所产生的API
函数:这里可以配置是否生产使能/除能外设中断以及
系统复位函数
在CPU组件的编译选型(Build options) 设置可进行memory资源的分配:特别是 堆栈的设置以及为处理中断向量的处理,
使能外部晶振 输入外部晶振频率
选择FLL工作模式为FEE
配置FLL倍频输 出,处理器专 家自动选择配 置系数
选择内核/总线/定时器时钟频率
CodeWarrior 10.6 IDE使用手册
除能外部晶振 选择FLL工作模式为FEI
注意:这里内核/总线/定时器时 钟频率不能配合为整数的原因 是,FLL是的是内部32.768KHz的 时钟源,其整数倍频不为整数
通信:同步/异步串行通信 中断:外部中断 测量:捕捉(timer 输入捕捉)和模拟比较器(AMCP) 存储器:Flash初始化及驱动 外设初始化:各MCU内部外设的初始化组件
如果某个组件
的Component Level为High,
则该组件为高
级组件,处理
器专家会为其
生成除底层初
始化之外应用
CodeWarrior 10.6 IDE使用手册
11
bit I/O组件配置
1 下拉根据硬件设计选择I/O口管脚
4
最后添加的4个bit I/O组件将 出现在Component目下:
2 设置组件名称(LED1)、I/O方 向为输出,初始化输出为0
3
选择要生成的API函数,使能 toggle函数NegVal
形化配置对应 的驱动程序
用户可编程代码放在Source文件夹下,其中: Event.c和Event.h:存在中断相关的callback函数; Main.c:为main()函数实体;
调试器相关设置
处理器专家视窗
链接文件 启动代码
CodeWarrior 10.6 IDE使用手册
5
CPU组件介绍及配置
使用外部晶振作为时钟源进行clock配置 使用内部振荡器作为时钟源进行clock配置
层的API函数
CodeWarrior 10.6 IDE使用手册
9
处理器专家组件库(Component Library)介绍
CPU内部外设:
I/O输入输出口:单bit I/O和多bit I/O以及并行I/O 定时器:timer资源的各种应用,如定时事件 (EventCntr16/32/8)、自由计数器(FreeCntr/16/32/8)、 脉宽调整输出(PWM)、软件日历功能(TimeDate)、定时 器中断(TimeInt)、定时器输出(TimeOut)以及看门狗
逻辑设备驱动:各种片上资源/外设的逻辑层driver 操作系统:支持KEA MCU的MQXLite 软件模拟:包含以下外部文件字符的输入接口,触摸
感应输入库TSS_Library等
CodeWarrior 10.6 IDE使用手册
10
添加单bit I/O组件
用户可通过在组件库中选中要添加的组件,右键选中“Add to Project”快速添加该组件到用户工程,如下图所示:
作者: 胡恩伟(飞思卡尔中国汽车电子现场应用工程师)
日期:2014年10月26日星期日 版本:1.0.0
CodeWarrior 10.6 IDE使用手册
1
1. 利用工程向导快速创建KEA工程
a. 点击菜单FileBareBoard Project(裸板工程)
b. 输入工程名称(默认将该工程创建
在当前工作空间(workspace),用户 也可以将其放到其他工作空间)