debugging and features

Upload: krish

Post on 07-Jul-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 DEBUGGING and Features

    1/16

    Debugging

  • 8/18/2019 DEBUGGING and Features

    2/16

    Why debug

    • Verify actual performance of softwarein detail

    • Remove issues in software

    • Software is never 100% correct

    • ..etc

  • 8/18/2019 DEBUGGING and Features

    3/16

    Debugging

    • ethods – Verify manually

     – !se debugger software"s• #$&'SWD

  • 8/18/2019 DEBUGGING and Features

    4/16

     #$&

    • An Industry Standard — IEEE Std1149.1-1990(JTAG) – (n 1)*+, an ad hoc group composed of

    key electronic manufacturers -oined toform the #oint $est ction &roup #$&/.

     – b-ective to establish a solution to the

    problems of board test and to promote asolution as an industry standard.

     – Solution 2oundary scan through $3

  • 8/18/2019 DEBUGGING and Features

    5/16

    2oundary scanning

  • 8/18/2019 DEBUGGING and Features

    6/16

  • 8/18/2019 DEBUGGING and Features

    7/16

    2oundary scanning

  • 8/18/2019 DEBUGGING and Features

    8/16

     #$& (nterface Signals

    • Interface Signals

    •  $he #$& interface, collectively 4nown as a $est ccess 3ort, or $3,uses the following signals to support the operation of boundary scan.

    • T!  $est 6loc4/ 7 this signal synchroni8es the internal state machineoperations.

    • T"S $est ode Select/ 7 this signal is sampled at the rising edge of $69 to determine the ne:t state.

    • T#I $est Data (n/ 7 this signal represents the data shifted into thedevice"s test or programming logic. (t is sampled at the rising edge of $69 when the internal state machine is in the correct state.

    T#$ $est Data ut/ 7 this signal represents the data shifted out ofthe device"s test or programming logic and is valid on the fallingedge of $69 when the internal state machine is in the correct state.

    • T%ST $est Reset/ 7 this is an optional pin which, when available, canreset the $3 controller"s state machine

  • 8/18/2019 DEBUGGING and Features

    9/16

    Serial Wire Debug SWD/

    • Serial Wire Debug SWD/ provides a debug port for severely pin limitedpac4ages, often the case for small pac4age microcontrollers but alsocomple: S(6s where limiting pin;count is critical and can be thecontrolling factor in device costs.

    • SWD replaces the +;pin #$& port with a cloc4 < single bi;directional datapin, providing all the normal #$& debug and test functionality plus real;time access to system memory without halting the processor or re=uiringany target resident code. – nly > pins re=uired ; vital for very low connectivity devices or pac4ages

     – 3rovides debug and test communication to #$& $3 controllers

     – ?nables the debugger to become another 2 bus master for access to systemmemory and peripheral or debug registers

     –

    @igh performance data rates ; A bytes'sec B +0 @8 – Cow power ; no e:tra power or ground pins re=uired

     – Small silicon area ; >.+4 additional gates

     – Cow tools costs, 100 build costs ; may be built in to evaluation boards

     – Reliable ; built in error detection

     – Safe ; protection from glitches on pins when tools not connected

  • 8/18/2019 DEBUGGING and Features

    10/16

    SWD

  • 8/18/2019 DEBUGGING and Features

    11/16

    SW#

    •  $he 4nown #$& Debug 3ort #$&;D3/ issupported furthermore. 2oth debug ports, the SWDand the alternative #$& debug port can becombined to the Serial Wire #$& Debug 3ort SW#;

    D3/, the 6oreSight standard port.• When using SWD, the $D signal can provide trace

    event messages via the Serial Wire utput SW/. $his behaviour can be used by the Serial Wire ViewerSWV/ to output system events via a single pin – (nstrumentation trace ($ printf;li4e Debugging/

     – Watchpoint $race DW$, (nstruction 3ointer $race

     – ?vent $race (nterrupts/

  • 8/18/2019 DEBUGGING and Features

    12/16

     #$& 6onnectors

  • 8/18/2019 DEBUGGING and Features

    13/16

    Signal descriptions

  • 8/18/2019 DEBUGGING and Features

    14/16

    SWD (nterface

  • 8/18/2019 DEBUGGING and Features

    15/16

    9?(C Debug features

    • EVision provides the following debugging windows and dialogs

    • 2rea4points deFne stop conditions for program e:ecution.

    • 6all Stac4 and Cocals Window view ob-ects that are currently in the call tree.

    • 6ode 6overage e:amine statistics about code e:ecution, including branchtesting.

    6ommand Window enter and view e:ecuted commands.• Disassembly Window test programs at the level of assembly instructions.

    • ?vent Viewer e:amine the history of tas4;switching events.

    • ?:ecution 3roFler e:amine time and call statistics on instruction level.

    • (nstruction $race Window view the instruction history for devices not basedon a 6orte:; processor.

    • Cogic naly8er investigate value changes of peripherals, registers, andvariables on a time graph.

    • emory ap evaluate memory areas and their access rights.

    • emory Window analy8e and modify memory content.

    http://www.keil.com/support/man/docs/uv4/uv4_db_dbg_breakpnts.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_callstack.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_codecoverage.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_outputwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_disasmwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_event_viewer.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_execprofiler.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_instructiontrace.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_logicanalyzer.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_memmap.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_memwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_memwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_memmap.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_logicanalyzer.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_instructiontrace.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_execprofiler.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_event_viewer.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_disasmwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_outputwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_codecoverage.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_callstack.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_breakpnts.htm

  • 8/18/2019 DEBUGGING and Features

    16/16

    9?(C Debug features

    • 3erformance naly8er evaluate time and call statistics on module or functionlevel.

    • Registers Window view and modify register content.

    • Serial Window is a communication interface between the application and the36.

    • Status 2ar view debugging status information.

    • Symbols Window Fnd debug symbol information used in program.

    • System Viewer Fnd peripheral register information and change property valuesat runtime.

    • System and $hread Viewer shows system and thread information for an R$Sapplication.

    •  $oolbo: use and deFne conFgurable buttons for e:ecuting debugging

    commands interactively.•  $race Data Window analy8e the instruction history for 6orte:; processor;

    based devices.

    •  $race Gavigation scroll through captured trace data records.

    • Watch Window display and modify program variable values at runtime.

    http://www.keil.com/support/man/docs/uv4/uv4_db_dbg_perfanalyzer.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_cpuregs.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_serialwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_ui_statusbar.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_symwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_systemviewer.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_systhread_viewer.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_toolbox.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_tracedata.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_trace_navi.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_watchwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_watchwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_trace_navi.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_tracedata.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_toolbox.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_systhread_viewer.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_systemviewer.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_symwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_ui_statusbar.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_serialwin.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_cpuregs.htmhttp://www.keil.com/support/man/docs/uv4/uv4_db_dbg_perfanalyzer.htm