Using IAR Embedded Workbench PART1
Using IAR Embedded Workbench PART1
PART1
CONTENTS
Creating Project
Debugging code
Simulation
Creating library
Using library
Embedded Development Using IAR EW8051
2
File Structure
3
Steps for creating a project
4
Making First Project
• Source code is to display fibonacci series
• Location of source file
Installation directory > 8051 > tutor
5
Creating a workspace
6
Create a new project
7
Select project template
8
Save project file
9
Adding source files
10
Adding source files
11
Tutor.c and utilities.c added to project
12
Project options 1/3
13
Project options 2/3
14
Project options 2/3:
Set path for header file
15
Compiling files
16
Successful compilation
17
Linking project (make)
18
Linking successful
19
File dependencies
20
Generation of list and map files 1/3
21
Generation of list and map files 2/3
Enable o/p list file option
22
Generation of list and map files 3/3
Map file enable
23
Generation of list and map files 4
Rebuild the project
24
List and Map File
25
Debugging the project
26
Debugger: C-Spy Debugger
27
Debug Window
Debug
Toolbar
Source Code
Disassembly
view
Message
Window
28
Debug Window
29
Debugging Steps
• Steps
– Step into [F11] step into a function
– Step over [F10] do not step into a function
– Step out [Shift + F10 ] step out from function
– Next Statement directly go to next statement
• Go [F5]: To run the program from current position
• Auto Stepping: do stepping automatically with defined time
30
Debugging: watching register
31
Debugging: Register Window
32
Debugging: watching memory
33
Debugger: Memory Window
34
Debugging: watching variables
35
Debugger: auto watch window
36
Various watch windows
Watch
Variables of current scope and global are visible.
Variables have to be defined by user.
Live Watch
Display only global variables , LIVE
Auto
Show all variables at current line or near to the current line.
Local
It only shows local variable.
37
Debugging: Call Stack & Stack
38
Debugging: Terminal I/O
-Input
39
Debugging: Terminal I/O
40
http://www.embeddedcraft.org