Freescale PowerPoint Template

Download Report

Transcript Freescale PowerPoint Template

CodeWarrior 101
John McLellan
UVP Application Engineering
[email protected]
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Agenda
What is CodeWarrior?
CodeWarrior Features
University Resources and where to go for help.
Controller Continuum and What’s New in Release 6.0?
Lab 1: New Projects in 7 clicks
Lab 2: Create a Simple ColdFire V1 Processor ExpertTM Project
Lab 3: Create a Simple HCS08 Device Initialization Project
Lab 4: Inspector Overview
Conclusions
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
1
What is CodeWarrior??
CodeWarrior is a multi-host, multi-language, multi-target
graphical user interface (GUI) integrated development
environment (IDE), providing software solutions for
Freescale's microcontrollers, digital signal processors, and
digital signal controllers.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
2
Multiple Targets
CodeWarrior Development Studio for:
Microcontrollers: **Shown today
• Supports HC08, HCS08, RS08, and ColdFire V1 Microcontrollers
HCS12:
• Supports HC12 and HCS12 Microcontrollers
ColdFire:
• Supports ColdFire V2, V3, V4
Power Architecture:
• Supports MPC5xx and MPC55xx Microprocessors
And many more…
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
3
Demystifying CodeWarrior Licensing
Each CodeWarrior version must be licensed separately.
Licensing is done via software key; you do not need to re-install
CodeWarrior to upgrade your license.
Three types of licensing:
Special Edition:
•
•
Default; Freely available when you download from the web.
Restrictions vary per product: Code size, file number or time based.
Standard Edition: (Academic)
•
Most Common, with more capability than the average user will use
Professional Edition:
•
Advanced; Typically with tools to help a very specific market segment
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
4
High-Level Feature Overview
•Program
•
Manager
Capable of manipulating source, library, resource, and other
files stored in a project.
•Build
•
Tools
Compiles, linkers, assemblers to convert source code
into an executable file. Plug-in ability for third party tools.
•Editor
•
Create and modify source code
•Debug
•
Tools
Set breakpoints, watch variables change, move line by line
through program to resolve issues
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
5
CodeWarrior Resources
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Available resources at Freescale
CodeWarrior built-in Help menu.
CodeWarrior Online Training Courses:
freescale.com/training
University Curricula utilizing CodeWarrior:
freescale.com/universityprograms
Education -> CourseWare
Technical Support
freescale.com\support
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
7
CodeWarrior for Microcontrollers 6.0
Featuring the Flexis QE MCU
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Industry’s Only Controller Continuum
The Freescale Controller
Continuum is our roadmap for
8-bit and 32-bit compatibility
ColdFire
V4
ColdFire
V3
ColdFire
V2
ColdFire
V1
HCS08 core
(QG, QD family)
32-bit
FlexisTM
The Controller
Continuum
“Connection Point”
RS08 core
(KA family)
8-bit
The “connection point” of the Continuum features QE128 –
the industry’s first 8-bit and 32-bit compatible MCUs made
possible with CodeWarrior 6.0
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
9
S08 and ColdFire® V1 Compatible Roadmap
ColdFire®
ColdFire®
General Purpose
Ultra-low power
ColdFire®
S08
ColdFire®
LCD Controller
USB Enabled
Colors Indicate
Pin/Peripheral
Compatibility
ColdFire®
Industrial Application
Controller
S08
General Purpose
Ultra-low power
S08
LCD Controller
S08
S08
Industrial Application
Controller
USB Enabled
2007
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
2008
TM
10
What’s New in Release 6.0?
New Name:
CodeWarrior Development Studio for Microcontrollers v6.0
•
The product is an extension to the popular CodeWarrior
Development Studio for HC(S)08/RS08 v5.1
•
Single, integrated tool suite for RS08, HC(S)08, and ColdFire V1
microcontrollers
•
Optimized build tools for each architecture
•
Common debugger
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
11
What's New in Release 6.0?
All RS08, HC(S)08 and ColdFire V1 architectures are supported
•
MC68HC908 derivatives
•
MC9S08 derivatives
•
MC9RS08 derivatives
•
ColdFire V1 derivatives
•
FlexisTM Series
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
12
What's New in Release 6.0?
A new project can be started in as few as seven mouse clicks.
1
2
6
3
4
5
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
7
TM
13
What's New in Release 6.0?
A project can be re-targeted in as few as 4 mouse clicks.
1
3
2
4
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
14
What's New in Release 6.0?
In the background CodeWarrior reconfigures your project with…
Correct Build Tools
Correct Supporting Files






Assembler
Compiler
Linker
Libraries
Updated derivatives.h
Startup Code
C header files
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
15
What's New in Release 6.0?
Example Projects for RS08, HC08, HCS08, and ColdFire V1…
•
Assembly Examples
•
Device Initialization Assembly Examples
•
Device Initialization C Examples
•
Processor Expert C Examples
•
Evaluation Board Examples
… can be used as templates for new projects.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
16
What's New in Release 6.0?
HCS08 to ColdFire V1 Porting Guide
•
Describes differences between the HCS08
and ColdFire V1 architectures
•
Describes impact these differences have on
software design
•
Describes the use of CodeWarrior tools to
port an existing HCS08 application
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
17
What's New in Release 6.0?
ColdFire V1 compiler flags code that needs to be manually inspected
and/or ported
•
Assembly code (assembly files or in-line code)
•
Interrupt service routines
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
18
What's New in Release 6.0?
Inspector provides immediate access to detailed project information
•
Loaded software components
•
Watchpoints
•
Breakpoints
•
Stack
•
Symbol Table
•
Events
•
Real Time Kernel
•
Exceptions
•
I/O Registers
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
19
What's New in Release 6.0?
Device Initialization Tool
•
Generates assembly code for RS08
derivatives
•
Generates C or assembly code for
HC08 and HCS08 derivatives
•
Generates C code for ColdFire V1
derivatives
•
Choice of adding code to
project or creating a text file
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
20
What's New in Release 6.0?
Processor Expert
•
What's it?


•
Hardware Abstraction Layer (HAL)
–
Low-level drivers with a known application
programming interface (API)
–
Eases migration between Freescale devices
Built-in knowledgebase immediately flags
resource conflicts and incorrect settings
What’s new?

ColdFire V1 Support

Improved timing interface

New Bean Selector Assistant
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
21
What's New in Release 6.0?
On-line “Bean Store”
•
All HC(S)08 advanced Beans will be available on-line












ASyncroMaster
ASyncroSlave
ExternalFile
InternalI2C
KBI
StringList
Term
TimeDate
BDLC
DDC1
FreescaleAnalogComp
FreescaleAnalogModule













FreescaleBEM
FreescaleCAN
FreescaleCMT
FreescalePWM
FreescaleUHFTransmitter
IntFLASH
Internal
LCD
OSD
PWMMC
RTC
SyncProc
USB
USBHUB
•
Beans can be purchase individually
•
Purchased Beans can be used with Special Edition or Standard Edition
•
Price: $125 each
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
22
Special Edition
Special Edition Features:
 New Project Wizard
 MCU Change Wizard
 Unlimited assembler (absolute, relocatable,
mixed and in-line) for HC(S)08, RS08,
ColdFire V1 microcontrollers
 Highly optimized ANSI C compilers and C
source level debugger
• HC(S)08 – 32K
• ColdFire V1 – 64K
 Emulator-like complex debug capability for
HCS08 and ColdFire V1 microcontrollers
 Fast Flash programming:
• HC08: Via MON08
• HCS08, RS08, ColdFire V1: Via BDM
 Full-chip Simulator for HC(S)08/RS08
 UNIS Device Initialization tool to generate
HC(S)08, RS08, ColdFire V1 CPU and
peripheral initialization code
 UNIS Processor Expert™ with components
for HC(S)08 and ColdFire V1 CPUs and
most on-chip peripherals
 Unlimited files in a project
Licensing Procedure:
 Key is permanent, free of charge and
automatically installed with the software
Support:
 1 year support included
C-Compiler Upgrade:
 One upgrade package, which includes
• HC(S)08 – 64K
• ColdFire V1 – 128K
Availability:
• On WEB today!!
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
23
Standard and Professional Editions
Standard Edition
Professional Edition
All Features of Special Edition Plus:
All the Features of the Standard Edition Plus:
 Unlimited C Compilers and Debugger for
HC(S)08 and ColdFire V1 microcontrollers
 Unlimited Data Visualization
 Access to Unis’ software and external
peripheral beans
 C++/EC++/ųC++ compiler/debugger for
HC(S)08 and ColdFire V1 microcontrollers
 Code coverage
 Profile analysis
 Encryption support
 Bean Wizard to build a software library that
can re-target to any HC(S)08, HC(S)12,
ColdFire V1 or DSC device
 Advanced Processor Expert beans
 OSEK kernel awareness
 Session record and replay
 PC-lint plug-in
Technical Support:

One year support included
Licensing:
 Registration on the Web for a permanent
license key
Technical Support:
 One year support included
Licensing:
 Registration on the Web for a permanent
license key
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
24
Lab 1: New Projects in 7 Clicks
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
New Projects in 7 Clicks
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
26
New Projects in 7 Clicks
1
Click Create
New Project
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
27
New Projects in 7 Clicks
Expand the
Core by
clicking the
“+”
Expand the
Family by
clicking the
“+”
Select the
desired
device
2
3
4
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
5
Click Next
TM
28
New Projects in 7 Clicks
6
Enter the
Project
name
7
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click Finish
TM
29
New Projects in 7 Clicks
• Simple Project Details

Template or framework for
first-time users

Project compiles and runs

Run in FCS* or on Target MCU

Header files** included in the
project

Code comments help users
get started
*FCS—Full Chip Simulator (HC08, S08, and RS08), ISS (CF V1)
**Header files—Define all the memory and registers on the target MCU
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
30
New Projects in 7 Clicks
Code File:
Assembly or C code file.
Program Manager:
This window displays and
manages all files for embedded
program development.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
31
Lab 2: Create a Simple ColdFire V1
Processor ExpertTM Project
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Lab 2: Processor Expert™
1
Click on “Create
New Project”
Note:
If you don’t see the Startup screen, go
to the File menu and select “Startup
Dialog…”
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
33
Lab 2: Processor Expert™
1
Select the
MC9S08QE128
2
Select the P&E
Multilink/CyclonePro
3
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click Next
TM
34
Lab 2: Processor Expert™
1
Enter “Project_PE”
as the Project Name
2
Set the Location
to the Desktop
3
Click Next
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
35
Lab 2: Processor Expert™
1
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click
Next
TM
36
Lab 2: Processor Expert™
1
Select Processor
Expert
2
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click Finish
TM
37
Lab 2: Processor Expert™
1
Deselect the 80-pin
package and select
64-Pin packages
2
Click OK
Click OK
3
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
38
What's a Bean?
Embedded Beans encapsulate the initialization and functionality of
embedded systems’ basic elements, such as CPU core, CPU on-chip
peripherals, FPGAs, stand-alone peripherals, virtual devices and pure
software algorithms.
They provide a hardware abstraction layer (HAL), which eases
migration between devices.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
39
Lab 2: Processor Expert™
Target CPU Window:
This window displays selected target
CPU with its peripherals and pins
(possible data directions of single
pins are indicated by blue arrows on
the CPU package when a bean uses
these pins). Several display modes
are supported. It is possible to switch
the display mode by pushing buttons
in the left side menu of the window.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
40
Lab 2: Processor Expert™
Bean Inspector Window:
Bean inspector is one of the
Inspector window variants. It allows
setup of Properties, Methods, and
Events for a bean. Use command
Help | Help on Bean from Bean
Inspector menu to see
documentation for currently
opened bean.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
41
Lab 2: Processor Expert™
Bean Selector Window:
Bean Selector shows
supported embedded
beans including CPU
beans and bean templates.
It lets the user select a
desired bean or template
and add it to the project.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
42
Lab 2: Processor Expert™
Select the On-Chip
Prph Tab in the Bean
Selector Window
Expand the I/O port:
PTE folder. Right click
on the BitIO bean, and
select Add Bean to the
Current Project …
1
2
3
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click Yes when the
Confirm window appears
TM
43
Lab 2: Processor Expert™
1
Expand the Timer: TPM1
folder in the Bean
Selector windows
2
Right click on the
TimerInt bean and
select Add Bean to the
Current Project …
3
Click Yes when the
Confirm window appears
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
44
Lab 2: Processor Expert™
1
Click on the Processor
Expert tab
2
Right Click and Rename the
Bit1 bean to PTE7LED
3
Right Click and Rename the
TI1 bean to LEDTimer
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
45
Lab 2: Processor Expert™
1
Specify the
Open the PTE7LED:BitIO
bean by doubling clicking on
the bean
2
PTE7_TPM3CLK pin
Select the Output as a direction
3
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
46
Lab 2: Processor Expert™
1
Click the Methods tab
2
Using the round arrow
button, disable all methods
except the NegVal
Methods are user callable functions or sub-routines. The user can select
which methods will or will not be generated. Code will be generated for
select methods during the code generation process.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
47
Lab 2: Processor Expert™
1
In the Project panel, use the popup menu (invoked with the right
mouse button click) of the
LedTimer bean select a Bean
Inspector command
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
48
Lab 2: Processor Expert™
1
Select the timer channel
TPM10 in the Timer property
2
Click on the … button on
the line with the red
exclamation
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
49
Lab 2: Processor Expert™
1
Write 500 in
Init. value: box
and select ms
in Units box
2
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click OK
TM
50
Lab 2: Processor Expert™
1
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Make to the project to
generate, compile and
link the project code
TM
51
Lab 2: Processor Expert™
1
Double click on the
LEDTimer_OnInterrupt
event to edit the interrupt
routine
Events are used for processing
actions related to the bean’s function
(errors, interrupts, buffer overflow,
etc.) by user-written code. Events are
usually invoked from the internal
interrupt service routines generated by
Processor Expert.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
52
Lab 2: Processor Expert™
1
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Make to the project to
generate, compile and
link the project code
TM
54
Lab 2: Processor Expert™
1
Click on the Debug to begin
the debugging session
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
55
Lab 2: Processor Expert™
Confirm the Flash
programming dialog by
clicking OK
1
Confirm that the
DEMO9QE128 appears
in the Port box
2
Click the Connect
button
3
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
56
Lab 2: Processor Expert™
1
Click the Green Arrow to
begin running the project
DONE …
The LED7 will start blinking in
the 0.5s intervals
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
57
Lab 2: Processor Expert™
1
Click the Green Arrow to
begin running the project
DONE …
The LED7 will start blinking in
the 0.5s intervals
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
58
Lab 2: Processor Expert™
Here is a summary of the project you created:
1.
Created a C project for the DEMOQE128
2.
Configured the PTE7 to output a value to LED7 using Processor Expert
3.
Configured the internal timer to generate an interrupt every 0.5 second using
Processor Expert
4.
Created an interrupt service that turns on and off the LED every 0.5 second using
Processor Expert
5.
Program and run the project using the CodeWarrior® debugger
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
59
Lab 3: Create a Simple HCS08
Device Initialization Project
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Lab 3: Device Initialization
1
Click on Create
New Project
Note:
If you don’t see the Startup screen, go
to the File menu and select Startup
Dialog…
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
61
Lab 3: Device Initialization
1
Select the
MC9S08QE128
2
Select the P&E
Multilink/CyclonePro
3
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click Next
TM
62
Lab 3: Device Initialization
1
Enter “Project_Dev_Init”
as the Project Name
2
Set the Location to the
Desktop
3 Click Next
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
63
Lab 3: Device Initialization
1
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click Next
TM
64
Lab 3: Device Initialization
1
Select Device
Initialization
2
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click Finish
TM
65
Lab 3: Device Initialization
Click Select CPU
Package button
1
Select
MC9S08QE128CLH
2
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
66
Lab 3: Device Initialization
1
Double click on the PTC
peripheral field to
configure the port C
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
67
Lab 3: Device Initialization
1
Change the Port control
property in the Settings
group to the Individual
pins value
2
Enabled Pin0 by clicking
on the “loop” arrow
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
68
Lab 3: Device Initialization
1
Enable the Pin 0 and select its
direction to be the Output
2
Click the OK
button to confirm
the setup
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
69
Lab 3: Device Initialization
1
Double click on the
TPM1 peripheral
field to configure the
timer
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
70
Lab 3: Device Initialization
1
Change the Clock
source select to
Bus rate clock
2
Change the
Prescaler to 32
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
71
Lab 3: Device Initialization
1
Enable the
Overflow
Interrupt in the
Interrupts group
2
Write LEDTimer
as the ISR name
3
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click the OK button
to confirm the setup
TM
72
Lab 3: Device Initialization
1
Click on the
Generate Code
button
Note: Code will be
generated for modules
highlighted in blue
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
73
Lab 3: Device Initialization
1
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click on the
“Generate Code”
button
TM
74
Lab 3: Device Initialization
1
Click “OK” button
If you selected the Device Initialization in the New Project
Wizard, the device initialization setup is automatically
handled for you.
When you open Device Initialization in an Open Project,
please follow the steps outlined in dialogue box. The steps
are also outlined in the following slides.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
75
Lab 3: Device Initialization
1
Open MCUint.c by double
clicking on the file in the
project manager
Please note: If you added the generated
code to the project, the files will appear in the
Generated Code folder.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
76
Lab 3: Device Initialization
1
Type or paste the
following lines into a
generated body of the
LEDtimer ISR in the
MCUinit.c:
PTCD_PTCD0 = ~PTCD_PTCD0;
TPM1SC_TOF = 0;
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
77
Lab 3: Device Initialization
1
Click on the Make icon to
compile and link the project
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
78
Lab 3: Device Initialization
1
Click on Debug to begin
the debugging session
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
79
Lab 3: Device Initialization
Confirm the Flash
programming dialog by
clicking OK
1
Confirm that the
DEMO9QE128 appears
in the Port box
2
Click the Connect
button
3
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
80
Lab 3: Device Initialization
1
Click the green arrow to
begin running the project
DONE …
The LED0 will start blinking in
the 0.5s intervals
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
81
Lab 3: Device Initialization
Here is a summary of the project you created:
1.
Created a C project for the DEMOQE128
2.
Configured the PTC0 to output a value to LED1 using Device Initialization
3.
Configured the internal timer to generate an interrupt every 0.5 second using
Device Initialization
4.
Created an interrupt service that turns on and off the LED every 0.5 second
5.
Program and run the project using the CodeWarrior debugger
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
82
Lab 4: Inspector Overview
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Lab 4: Inspector Overview
Inspector (Inspect Component) provides immediate access to detailed
project information
•
Loaded software components
•
Watchpoints
•
Breakpoints
•
Stack
•
Symbol Table
•
Events
•
Real Time Kernel
•
Exceptions
•
I/O Registers
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
84
Lab 4: Inspector Overview
Click on Component
and on Open
1
Information in the following labs are based on Project_Device_Init
project (MC9S08QE128) created in lab 5.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
85
Lab 4: Inspector Overview
1
Click on the Inspect
2
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Click OK
TM
86
Lab 4: Inspector Overview
1
Expand the MODULE
PTC IO register
2
Write down the
memory address
location = 0x4
The memory location will be used in the next lab…
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
87
Lab 4: Inspector Overview
Here is a summary of what you accomplished in this lab:
1.
Opened the Inspector Component in the debugger
2.
Used Inspector to find the address of PTC0
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
88
Lab 5: Hot Sync and Memory Refreshing
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Lab 5: Hot Sync and Memory Refreshing
Hotsync
•
First implemented in Fast Track
CodeWarrior Development Studio for
HC(S)08 v5.0
•
Available in PEMICRO Connection
Manager
•
Allows connection to the target
without resetting the chip
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
90
Lab 5: Hot Sync and Memory Refreshing
Close the current debugger session and turn off the DEMOQE128
board. Turn on the board and start a debugger session. Please note
that LED1 should be blinking.
1
Click on Debug to begin
the debugging session
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
91
Lab 5: Hot Sync and Memory Refreshing
1
Confirm that the
DEMO9QE128 appears
in the Port box
2
Click the Hotsync
button
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
92
Lab 5: Hot Sync and Memory Refreshing
2
Please notice…
The program is still running
and LED0 is still Flashing.
1
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
Right Click on
memory location
0x04 =
PTC_PTCD – Port
C Data Register
location
Scroll up to memory
location 00 in the
Memory Window
TM
93
Lab 5: Hot Sync and Memory Refreshing
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
1
Scroll to Mode and
select Periodical
2
Enter 5 in the Rate
Text Box
3
Click OK
TM
94
Lab 5: Hot Sync and Memory Refreshing
Please notice that the value changes from 3E to 3F. 3E
represents the LED ON and 3F represents the LED OFF.
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
95
Lab 5: Hot Sync and Memory Refreshing
Here is a summary of what you did in this lab:
1.
Initiated a debug session and used “Hot Sync” in PEMICRO Connection
Manager to connect to the DEMOQE128 board.
2.
Set memory refresh to a PERIODIC rate of 5*100 ms (0.5 second)
3.
Observed memory location 0x04 update as the LED turned on and off
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
96
Summary of Benefits
TM
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
CodeWarrior Development Studio
What Possibilities Does It Open for You?
• Create projects based on your needs—simple projects (an absolute assembly project
from the good old days) to complex multi-developer projects
• Focus on the value-added portion of your application (initialization code and drivers
are configured and automatically generated for your application)
• Bring projects in on time and on budget
• Hit the market window and make more money
• Beat the competition to market with the latest features
(port your application to a larger and/or newer derivative with a few clicks )
• Increase customer satisfaction with improved product quality and product reliability
Freescale Semiconductor Confidential and Proprietary Information. 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. 2006.
TM
98
TM