SlideShare a Scribd company logo
1 of 22
Download to read offline
Keil uVision
Debugging ProgramsDebugging Programs
WEL Labs, IITB
2016
Development Tools (Revision)
• Coding – Editor => Entry of code into file(s)
• Translation – Assembler or Compiler
=> Generate machine code from source code
• Execution check – using Debugger to verify• Execution check – using Debugger to verify
operation of program ( on Simulator )
• Program – Programmer
=> Put machine code in the chip
Single Point Solution – IDE e.g. Keil
Keil uVision IDE …
• Project : A collection of files related to a
particular programming task.
• Build : The process in which only the files
modified since last build are
assembled/compiled for the chosenassembled/compiled for the chosen
microcontroller device.
• Rebuild : The process in which all files are
assembled/compiled irrespective of their
modification state.
• Debug : The process of finding errors
happening during program execution and
removing them.
Simulator and Debugger
• Simulation of microcontroller behavior while
executing the user program
• The Debug mode UI allows the user to perform
the following
1.Observe microprocessor Registers,1.Observe microprocessor Registers,
Memory, Ports and Peripherals
2.Place breakpoints to stop simulation as
specific instruction or on condition
3.Monitor code under execution
4.Modify data variables
5.Monitor timing of execution
Assuming you have already built
a program and obtained binary
code file for it, We can use the
simulator available with keil for
debugging programs
After a successful build of the
project, following are the resulting
files
1. Binary code is placed in
filename.obj for each source
file in a project.
2. All these obj files are linked
into a single binary named
using the project name
without any extension.without any extension.
3. If enabled by user
<<filename.hex>> file is
created for the project.
The user can now start the
Debug session to check
execution of the program.
A popup of Evaluation version is presented which shows the
limitation of the mode.
On clicking “OK” the popup closes and the user is presented
with the Debug Mode user interface (UI)
Disassembly window – shows the
Opcodes for the Program loaded in
the debugger.
User interface in Debug mode
User program window – shows the
Assembly or High Level Program
Register
window
Assembly or High Level Program
loaded in the debugger.
Command window
Memory window
window
User can execute instructions
in multiple modes :
1. Run (F5) – Continues executing the
program until the next active
breakpoint is reached or till the
program termination.
2. Step (F11)-- Executes a single-step
into a function; Executes the
current instruction line.current instruction line.
3. Step Over (F10) – Executes a single-
step over a function.
4. Run to Cursor Line (Ctrl+F10)
Allows user to place a cursor and
run the program till that line.
Details of Disassembly and Memory window
Address
Opcode
Instruction mnemonic in assembly language
Disassembly window
Opcode
Memory windowEnter address here
Data at address 0x0100
d: refers to data memory
Code and Data memory access
c: refers to code segment of the memory
During execution, user can right click on the required
memory location in the memory window to modify RAM
data. Functionality for selecting the number system in
which the memory contents are to be displayed is also
available .
Note: To initialize memory contents on hardware, user has
to add necessary instructions in the program code.
The Registers window
provides access to all the
registers including the flagregisters including the flag
register , DPTRs etc.
If some windows are not being displayed
then use the “View” menu to get them on
the window.the window.
To set a breakpoint,
user can click in the
marked area against
the corresponding
line of code
The breakpoint is
shown as a red dot
against the line.
The
breakpoint is
automatically
displayed at the
equivalent
line in the disassembly
window too.
Peripherals menu
Various Peripherals
can be
accessed through the
“Peripherals” menu.
Window
corresponding
to Timer 0
Logic analyzer
To start the logic analyzer click on the
highlighted icon or go to
View > Analysis Window > Logic Analyzer.
Logic Analyzer window
1. Click on Setup
2. The setup window appears.
3. Click on the “New/insert” icon.
4. Type in the pin you want to monitor
then click on Close.
5. After running a simulation, you can pause it and
look at the timing waveforms to debug your code.
then click on Close.
Questions ?
Thank you
WEL Labs, IITB
2016
For doubts/errors in this PPT contact :
Suryakant Toraskar e-mail: smtoraskar.iitbombay@gmail.com location : WEL5

More Related Content

What's hot

Fsm sequence detector
Fsm sequence detector Fsm sequence detector
Fsm sequence detector lpvasam
 
Verilog Lecture1
Verilog Lecture1Verilog Lecture1
Verilog Lecture1Béo Tú
 
Verilog & Vivado Quickstart
Verilog & Vivado QuickstartVerilog & Vivado Quickstart
Verilog & Vivado QuickstartStewart Dulaney
 
UVM: Basic Sequences
UVM: Basic SequencesUVM: Basic Sequences
UVM: Basic SequencesArrow Devices
 
DCS PRESENTATION
DCS PRESENTATIONDCS PRESENTATION
DCS PRESENTATIONbvent2005
 
105926921 cmos-digital-integrated-circuits-solution-manual-1
105926921 cmos-digital-integrated-circuits-solution-manual-1105926921 cmos-digital-integrated-circuits-solution-manual-1
105926921 cmos-digital-integrated-circuits-solution-manual-1Savvas Dimopoulos
 
structural modeling, hazards
structural modeling, hazardsstructural modeling, hazards
structural modeling, hazardsdennis gookyi
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesE2MATRIX
 
VLSI lab manual Part A, VTU 7the sem KIT-tiptur
VLSI lab manual Part A, VTU 7the sem KIT-tipturVLSI lab manual Part A, VTU 7the sem KIT-tiptur
VLSI lab manual Part A, VTU 7the sem KIT-tipturPramod Kumar S
 
dc biasing of bjt
dc biasing of bjtdc biasing of bjt
dc biasing of bjtabhinavmj
 
EEP306: Line coding
EEP306: Line codingEEP306: Line coding
EEP306: Line codingUmang Gupta
 

What's hot (20)

VLSI Design Flow
VLSI Design FlowVLSI Design Flow
VLSI Design Flow
 
Fsm sequence detector
Fsm sequence detector Fsm sequence detector
Fsm sequence detector
 
Verilog Lecture1
Verilog Lecture1Verilog Lecture1
Verilog Lecture1
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
The IEEE 1149.1 Boundary-scan test standard
The IEEE 1149.1 Boundary-scan test standardThe IEEE 1149.1 Boundary-scan test standard
The IEEE 1149.1 Boundary-scan test standard
 
Ec ii lab manual
Ec ii lab manualEc ii lab manual
Ec ii lab manual
 
Verilog & Vivado Quickstart
Verilog & Vivado QuickstartVerilog & Vivado Quickstart
Verilog & Vivado Quickstart
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
UVM: Basic Sequences
UVM: Basic SequencesUVM: Basic Sequences
UVM: Basic Sequences
 
DCS PRESENTATION
DCS PRESENTATIONDCS PRESENTATION
DCS PRESENTATION
 
Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
 
105926921 cmos-digital-integrated-circuits-solution-manual-1
105926921 cmos-digital-integrated-circuits-solution-manual-1105926921 cmos-digital-integrated-circuits-solution-manual-1
105926921 cmos-digital-integrated-circuits-solution-manual-1
 
structural modeling, hazards
structural modeling, hazardsstructural modeling, hazards
structural modeling, hazards
 
VHDL CODES
VHDL CODES VHDL CODES
VHDL CODES
 
Pt 51 ver-1.3_user_manual
Pt 51 ver-1.3_user_manualPt 51 ver-1.3_user_manual
Pt 51 ver-1.3_user_manual
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with Examples
 
VLSI lab manual Part A, VTU 7the sem KIT-tiptur
VLSI lab manual Part A, VTU 7the sem KIT-tipturVLSI lab manual Part A, VTU 7the sem KIT-tiptur
VLSI lab manual Part A, VTU 7the sem KIT-tiptur
 
dc biasing of bjt
dc biasing of bjtdc biasing of bjt
dc biasing of bjt
 
EEP306: Line coding
EEP306: Line codingEEP306: Line coding
EEP306: Line coding
 

Similar to Debugging programs with Keil uVision

Embedded c lab and keil c manual
Embedded  c  lab  and keil c  manualEmbedded  c  lab  and keil c  manual
Embedded c lab and keil c manualHari K
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Pantech ProLabs India Pvt Ltd
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocksTech Bikram
 
CSO Laboratory Manual
CSO Laboratory ManualCSO Laboratory Manual
CSO Laboratory ManualDwight Sabio
 
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)Tech OneStop
 
Csharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul YaoCsharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul YaoMamgmo Magnda
 
InstallationGuide.pdf
InstallationGuide.pdfInstallationGuide.pdf
InstallationGuide.pdfsahirzakaria
 
Reverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentalsReverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentalsEran Goldstein
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxransayo
 
Programming in c_in_7_days
Programming in c_in_7_daysProgramming in c_in_7_days
Programming in c_in_7_daysAnkit Dubey
 
Visual studio ide componects dot net framwork
Visual studio ide componects dot net framworkVisual studio ide componects dot net framwork
Visual studio ide componects dot net framworkDipen Parmar
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeansHuu Bang Le Phan
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and TechniquesBala Subra
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging TechniquesBala Subra
 
PVS-Studio Now Supports Any Build System under Windows and Any Compiler. Easy...
PVS-Studio Now Supports Any Build System under Windows and Any Compiler. Easy...PVS-Studio Now Supports Any Build System under Windows and Any Compiler. Easy...
PVS-Studio Now Supports Any Build System under Windows and Any Compiler. Easy...Andrey Karpov
 
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01Aravindharamanan S
 

Similar to Debugging programs with Keil uVision (20)

Embedded c lab and keil c manual
Embedded  c  lab  and keil c  manualEmbedded  c  lab  and keil c  manual
Embedded c lab and keil c manual
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
 
CSO Laboratory Manual
CSO Laboratory ManualCSO Laboratory Manual
CSO Laboratory Manual
 
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
 
Csharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul YaoCsharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul Yao
 
ID E's features
ID E's featuresID E's features
ID E's features
 
Dsplab v1
Dsplab v1Dsplab v1
Dsplab v1
 
InstallationGuide.pdf
InstallationGuide.pdfInstallationGuide.pdf
InstallationGuide.pdf
 
Reverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentalsReverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentals
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docx
 
Programming in c_in_7_days
Programming in c_in_7_daysProgramming in c_in_7_days
Programming in c_in_7_days
 
Visual studio ide componects dot net framwork
Visual studio ide componects dot net framworkVisual studio ide componects dot net framwork
Visual studio ide componects dot net framwork
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeans
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
W1.pptx
W1.pptxW1.pptx
W1.pptx
 
PVS-Studio Now Supports Any Build System under Windows and Any Compiler. Easy...
PVS-Studio Now Supports Any Build System under Windows and Any Compiler. Easy...PVS-Studio Now Supports Any Build System under Windows and Any Compiler. Easy...
PVS-Studio Now Supports Any Build System under Windows and Any Compiler. Easy...
 
Picaxe manual5
Picaxe manual5Picaxe manual5
Picaxe manual5
 
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01
Softwaretestingtoolsfreeandopensourcefinal 150411221750-conversion-gate01
 

More from SaravananVijayakumar4 (17)

EE337 Microprocessors Lab Labsheet 5
EE337 Microprocessors Lab Labsheet 5EE337 Microprocessors Lab Labsheet 5
EE337 Microprocessors Lab Labsheet 5
 
EE337 Spring 2023 Lab1
EE337 Spring 2023 Lab1EE337 Spring 2023 Lab1
EE337 Spring 2023 Lab1
 
EE337 Microprocessor Lab, Course Outline, Spring 2023
EE337 Microprocessor Lab, Course Outline, Spring 2023EE337 Microprocessor Lab, Course Outline, Spring 2023
EE337 Microprocessor Lab, Course Outline, Spring 2023
 
EE337 Course introduction 2021
EE337 Course introduction 2021EE337 Course introduction 2021
EE337 Course introduction 2021
 
EE 337 Lab 1 for Section 1 (2nd year UG)
 EE 337 Lab 1 for Section 1 (2nd year UG) EE 337 Lab 1 for Section 1 (2nd year UG)
EE 337 Lab 1 for Section 1 (2nd year UG)
 
Intel Hex Format
Intel Hex FormatIntel Hex Format
Intel Hex Format
 
EE 337 Lab 1 for Section 2 (3rd year UG)
EE 337 Lab 1 for Section 2 (3rd year UG)EE 337 Lab 1 for Section 2 (3rd year UG)
EE 337 Lab 1 for Section 2 (3rd year UG)
 
EE337 Course introduction 2021
EE337 Course introduction 2021EE337 Course introduction 2021
EE337 Course introduction 2021
 
Hex file creation using Keil uVision
Hex file creation using Keil uVisionHex file creation using Keil uVision
Hex file creation using Keil uVision
 
Serial IO for 8051
Serial IO for 8051Serial IO for 8051
Serial IO for 8051
 
8051 Timers
8051 Timers8051 Timers
8051 Timers
 
8051 Interrupts
8051 Interrupts8051 Interrupts
8051 Interrupts
 
Introduction to Microcontrollers
Introduction to MicrocontrollersIntroduction to Microcontrollers
Introduction to Microcontrollers
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
89c5131datasheet
89c5131datasheet89c5131datasheet
89c5131datasheet
 
Pt-51 User Manual
Pt-51 User ManualPt-51 User Manual
Pt-51 User Manual
 
EE337 Course introduction 2018
EE337 Course introduction 2018EE337 Course introduction 2018
EE337 Course introduction 2018
 

Recently uploaded

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 

Recently uploaded (20)

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 

Debugging programs with Keil uVision

  • 1. Keil uVision Debugging ProgramsDebugging Programs WEL Labs, IITB 2016
  • 2. Development Tools (Revision) • Coding – Editor => Entry of code into file(s) • Translation – Assembler or Compiler => Generate machine code from source code • Execution check – using Debugger to verify• Execution check – using Debugger to verify operation of program ( on Simulator ) • Program – Programmer => Put machine code in the chip Single Point Solution – IDE e.g. Keil
  • 3. Keil uVision IDE … • Project : A collection of files related to a particular programming task. • Build : The process in which only the files modified since last build are assembled/compiled for the chosenassembled/compiled for the chosen microcontroller device. • Rebuild : The process in which all files are assembled/compiled irrespective of their modification state. • Debug : The process of finding errors happening during program execution and removing them.
  • 4. Simulator and Debugger • Simulation of microcontroller behavior while executing the user program • The Debug mode UI allows the user to perform the following 1.Observe microprocessor Registers,1.Observe microprocessor Registers, Memory, Ports and Peripherals 2.Place breakpoints to stop simulation as specific instruction or on condition 3.Monitor code under execution 4.Modify data variables 5.Monitor timing of execution
  • 5. Assuming you have already built a program and obtained binary code file for it, We can use the simulator available with keil for debugging programs
  • 6. After a successful build of the project, following are the resulting files 1. Binary code is placed in filename.obj for each source file in a project. 2. All these obj files are linked into a single binary named using the project name without any extension.without any extension. 3. If enabled by user <<filename.hex>> file is created for the project. The user can now start the Debug session to check execution of the program.
  • 7. A popup of Evaluation version is presented which shows the limitation of the mode. On clicking “OK” the popup closes and the user is presented with the Debug Mode user interface (UI)
  • 8. Disassembly window – shows the Opcodes for the Program loaded in the debugger. User interface in Debug mode User program window – shows the Assembly or High Level Program Register window Assembly or High Level Program loaded in the debugger. Command window Memory window window
  • 9. User can execute instructions in multiple modes : 1. Run (F5) – Continues executing the program until the next active breakpoint is reached or till the program termination. 2. Step (F11)-- Executes a single-step into a function; Executes the current instruction line.current instruction line. 3. Step Over (F10) – Executes a single- step over a function. 4. Run to Cursor Line (Ctrl+F10) Allows user to place a cursor and run the program till that line.
  • 10. Details of Disassembly and Memory window Address Opcode Instruction mnemonic in assembly language Disassembly window Opcode Memory windowEnter address here Data at address 0x0100
  • 11. d: refers to data memory Code and Data memory access c: refers to code segment of the memory
  • 12. During execution, user can right click on the required memory location in the memory window to modify RAM data. Functionality for selecting the number system in which the memory contents are to be displayed is also available . Note: To initialize memory contents on hardware, user has to add necessary instructions in the program code.
  • 13. The Registers window provides access to all the registers including the flagregisters including the flag register , DPTRs etc.
  • 14. If some windows are not being displayed then use the “View” menu to get them on the window.the window.
  • 15. To set a breakpoint, user can click in the marked area against the corresponding line of code
  • 16. The breakpoint is shown as a red dot against the line. The breakpoint is automatically displayed at the equivalent line in the disassembly window too.
  • 17. Peripherals menu Various Peripherals can be accessed through the “Peripherals” menu. Window corresponding to Timer 0
  • 18. Logic analyzer To start the logic analyzer click on the highlighted icon or go to View > Analysis Window > Logic Analyzer.
  • 19. Logic Analyzer window 1. Click on Setup 2. The setup window appears.
  • 20. 3. Click on the “New/insert” icon. 4. Type in the pin you want to monitor then click on Close. 5. After running a simulation, you can pause it and look at the timing waveforms to debug your code. then click on Close.
  • 22. Thank you WEL Labs, IITB 2016 For doubts/errors in this PPT contact : Suryakant Toraskar e-mail: smtoraskar.iitbombay@gmail.com location : WEL5