Datasheet
Copyright © 2013 ARM Ltd. All rights reserved
CAN: Controller Area Network Lab using ST STM32 Cortex-M processors. www.keil.com
19
Code Coverage: (Available with the Keil Simulator or ULINKpro and ETM Trace)
1. Click on the RUN icon. After a second or so stop the program with the STOP icon.
2. Examine the Disassembly and CanDemo.c windows. Scroll and notice different color blocks in the left margin:
3. This is Code Coverage provided by the Keil Simulator and also the ETM trace. This indicates if an instruction has
been executed or not.
Colour blocks indicate which assembly instructions were executed:
1. Green: this assembly instruction was executed.
2. Gray: this assembly instruction was not executed.
3. Orange: a Branch is has not been taken.
4. Cyan: a Branch has always been taken.
5. Light Gray: there is no assembly instruction at this
point.
6. RED: Breakpoint is set here. Is actually a circle.
7. Points to the next instruction to be executed.
Why was the branch BCC always taken resulting in 0x0800_1048
never being executed ? Or why the branch BGE at 0x800_105C was
never taken ? You should devise tests to execute these instructions so you can test them. Good programming practice
requires that these unexecuted instructions be identified and tested.
4. Select View/Analysis Windows and select Code Coverage. Click on the Update button if necessary.
5. This window will show how many instructions were executed or not.
Performance Analyzer: (Available with the Keil Simulator or ULINKpro and ETM Trace)
16. Start the program if necessary.
17. Open View/Analysis Windows/Performance Analyzer. Expand on some of the module names.
18. Note the information provided as shown below: Click on the RESET button and see the values refresh.
19. Performance Analysis is also provided with ETM trace and a ULINKpro.
Execution Profiler:
(Available with the Keil Simulator or ULINKpro and ETM Trace)
1. Select Debug/Execution Profiling and select Show Times you can see
information in times executed or time here:
Note: You might have to stop and start the program or click in the margin.
2. Hover the mouse over a value and it will display both Time and Calls.
3. Stop the program and leave Debug mode.