Measuring the time consumption of a piece of code

Technical Note 26891

Arkitekturer:

ARM

Komponent:

debugger

Uppdaterad:

2015-11-06 10:38

Introduction

It may normally be difficult to measure actual time consumption of a piece of code in a real target system. This normally requires full trace functionality. However, for Cortex-M processors, good measurements can be achieved by SWD/SWO/SWV.

Requirements

  • The IAR Embedded Workbench for ARM version you are using must be able to debug SWO output (requires version 5.30 or later).
  • Your debug probe must must be able to use the SWO protocol (for example I-Jet).

Solution

The link How to measure time with SWO.pdf is a .pdf file with a step-by-step description of how to do this.

Note

In later versions of IAR Embedded Workbench for ARM, more support for this has been added, and this topic is covered in Help > C-SPY Debugging Guide, chapter "Getting started using event logging".

 

All product names are trademarks or registered trademarks of their respective owners.

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av iar.com rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.