没有合适的资源?快使用搜索试试~ 我知道了~
首页飞思卡尔单片机高效C语言编程(中文)
飞思卡尔(freescale)半导体公司,就是原来的 Motorola公司半导体产品部。于2004年从Motorola分离出来,更名为freescale!freescale系列单片机采用哈佛结构和流 水线指令结构,在许多领域内都表现出低成本,高性能的的特点,它的体系结构为产品的开发节省了大量时间。此外freescale提供了多种集成模块和总线 接口,可以在不同的系统中更灵活的发挥作用,本教程手把手教你用c语言实现。
资源详情
资源评论
资源推荐

1
Freescale™ and the Freescale logo aretrademarks of Freescale Semiconductor, Inc. All other product
or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
TM
DHJK 03-Feb-05
高效C语言编程实验
TM
Freescale™ and the Freescale logo aretrademarks of Freescale Semiconductor, Inc. All other product
or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
内容
•Lab 1: Use of CodeWarrior(CodeWarrior的使用)
•Lab 2: Interrupts(中断)
•Lab 3: Data Segment(数据段的定义)
•Lab 4: Constant Segment(常量数据段)
•Lab 5: Variables(变量)
•Lab 6: Bit Fields(位操作)
•Lab 7: Arrays(数组)
•Lab 8: Pointers(指针)
•Lab 9: Arguments(函数内的自变量)
•Lab 10: Optimize 1(优化方法1)
•Lab 11: Optimize 2(优化方法2)
•Lab 12: Optimize 3(优化方法3)
•Lab 13: Optimize 4(优化方法4)
•Lab 14: Manual Optimization(手工优化)
•Lab 15: Processor Expert(处理器专家)

2
Freescale™ and the Freescale logo aretrademarks of Freescale Semiconductor, Inc. All other product
or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
TM
DHJK 03-Feb-05
Lab 1-CodeWarrior的使用
TM
Freescale™ and the Freescale logo aretrademarks of Freescale Semiconductor, Inc. All other product
or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
Lab1
•目的: 熟悉CodeWarrior开发环境,理解如何创建和调
试一个工程
•中文网页:
http://www.freescale.com.cn/CodeWarrior/CWX-
H08-SE_Overview.asp

3
TM
Freescale™ and the Freescale logo aretrademarks of Freescale Semiconductor, Inc. All other product
or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
Lab 1
Step 1 –创建工程
•开始菜单 -> 程序 -> Freescale
Codewarrior -> CW08 V5.0 ->
Codewarrior IDE
•弹出Startup窗口
•点击 “Create new project”
•“Load Example Project”中有100多个
C语言和汇编语言的样例工程,可以
用作参考,也可以作为新工程的模板
•“Load Previous Project”用以调用使
用过的工程
•“Getting Started Tutorial”提供了各种
指南,包括C语言、汇编语言、
Processor Expert等
•“Using Codewarrior”不作任何操作,
用户自行使用
TM
Freescale™ and the Freescale logo aretrademarks of Freescale Semiconductor, Inc. All other product
or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
Lab 1
Step 1 –创建工程
•选择编程语言-C
•设置工程存放的路径, 给工程命名,例如“CreateProject”
•点击Next按钮

4
TM
Freescale™ and the Freescale logo aretrademarks of Freescale Semiconductor, Inc. All other product
or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
Lab 1
Step 1 –创建工程
•选择目标器件–MC9S08QG8
•用默认连接方式–Full chip simulation(软件仿真)
§ P&E Multilink/Cyclone Pro–连接P&E BDM Multilink,注释框内有解释
•点击Next 继续
TM
Freescale™ and the Freescale logo aretrademarks of Freescale Semiconductor, Inc. All other product
or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
Lab 1
Step 1-创建工程
•这一步可以将已有的文件加入到新工程中去
•本实验忽略该步骤,直接点击Next

5
TM
Freescale™ and the Freescale logo aretrademarks of Freescale Semiconductor, Inc. All other product
or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
Lab 1
Step 1 –创建工程
•选择None-不使用模板,自
己手工编写程序。
•“Device Initialization”提供器
件初始化程序,包括中断向
量和中断服务子程序模板
•“Processor Expert”处理器
专家:通过友好的图形用户
界面,生成初始化程序,还
可生成外围器件的驱动程序
等。
TM
Freescale™ and the Freescale logo aretrademarks of Freescale Semiconductor, Inc. All other product
or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.
Lab 1
Step 1 –创建工程
•选择 ‘ANSI’标准启动代码
•选择 ‘small’模式
•不采用浮点运算格式None
•完成后点击Finish
•ANSI startup code -标准
启动代码
•Minimal startup code -精
简的启动代码,去掉了不
必要的代码
•Tiny mode-数据(包括堆
栈)放置在零页地址空间
内,数据指针定义为8bit
•Small mode-数据指针为
16bit,数据放置在非零页
空间
剩余56页未读,继续阅读











安全验证
文档复制为VIP权益,开通VIP直接复制

评论4