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.
TM
建立项目((((1)-)-)-)-确定芯片和开发模式
建立项目
确定芯片和开发模式
建立项目建立项目
确定芯片和开发模式
确定芯片和开发模式
• 运行CodeWarrior,点击“创建
工程”
• 选择芯片型号
最新的CW6.x中,除了支持几乎所有
的HC08和全部HCS08单片机型号外,
增加了对飞思卡尔最低端的8位单片机
(RS08系列)和低端32位处理器
(Coldfire V1系列)的支持
• 缺省的和目标板的连接方式
芯片全功能模拟仿真 - Full Chip
Simulator
BDM调试 - P&E Multilink/Cyclone Pro
SofTec硬件调试工具 - SofTec HCS08
芯片串口监控调试 - HCS08 Serial
Monitor
Slide 1
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.
建立项目((((2)-)-)-)-选择编程语言
建立项目
选择编程语言
建立项目建立项目
选择编程语言
选择编程语言
选择编程语言
• 选择编程语言
通常用C语言编程
也可以选择纯汇编,或C和
汇编混合编程
C++编程只有在专业版的
CW下支持
输入项目名称
确定项目路径
Slide 2
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.
建立项目((((3)-)-)-)-添加文件和初始化工具
建立项目
添加文件和初始化工具
建立项目建立项目
添加文件和初始化工具
添加文件和初始化工具
• 添加现成的文件代码模块
如果没有,则简单跳过此步
• 添加芯片初始化工具
Device Initialization为简单的芯片初始化配置
工具,可实现片内各功能模块的可视化配
置;
Processor Expert为高级的芯片初始化配置工
具,除了可视化配置片内功能模块,还提供
相关的软件驱动代码;
自己编写代码就选择 “None”
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.
建立项目((((5)-)-)-)-确定编译模式
建立项目
确定编译模式
建立项目建立项目
确定编译模式
确定编译模式
• 启动代码
最小化:堆栈指针初始化
ANSI标准:堆栈指针初始化、全局和静
态变量自动清零或赋初值
• 内存模式
微小:程序不超过64KB,RAM变量不
超过内存地址最前面的256字节
小型:程序空间一样不超过64KB,但
RAM不限于第0页,可以覆盖整个64K
地址空间
• 浮点数支持
无
浮点和双精度都是IEEE32
浮点IEEE32,双精度IEEE64
Slide 4
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.
建立项目((((6)-)-)-)-项目建立完成
建立项目
项目建立完成
建立项目建立项目
项目建立完成
项目建立完成
• 到此,一个开发项目已经完整建
立,可以在CW平台下编辑、编译
和调试程序代码
Slide 5
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.
芯片初始化工具
芯片初始化工具
芯片初始化工具
芯片初始化工具
• 器件初始化工具
器件初始化工具
器件初始化工具
器件初始化工具
对RS08系列可生成汇编
代码
对HC08和HCS08系列可
生成C或者汇编代码
对ColdFire V1系列生成C
语言代码
可选择其他代码或创建文
本文件
Slide 6
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.
芯片初始化工具
芯片初始化工具
芯片初始化工具
芯片初始化工具
• 点击CPU模
块,在弹出
的检查员窗
口中可以进
行系统时钟
系统时钟、
系统时钟系统时钟
系统保护选
系统保护选
系统保护选
系统保护选
项项项项和低功耗低功耗低功耗低功耗
模式模式模式模式的设置
Slide 7
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.