Debugging an externally built executable file

Technical Note 190508

Arkitekturer:

All

Komponent:

debugger

Uppdaterad:

2019-05-23 16:22

Introduction

Debugging using an externally built executable file is useful in various situations.

Discussion

There are reasons for building an output file in one environment and debugging in a different environment.

This technical note gives some examples of where this approach is useful, and instructions on how to configure the debug-only project.

Some terms

  • An executable file is the output file, linked using the default file format.

  • The file extensions for ILINK and XLINK are .out and .d## respectively, where ## stands for two digits, which are different for different toolchains.
  • The term externally built stands for: Built in another environment/version from the IAR Embedded Workbench version being used for debugging.

Useful examples

  • Build on the command line and debug in the IDE (using the same version).
  • Build with an older version of the IAR Embedded Workbench and debug in a newer version. (This is very useful when a project is to be built using a specific version, still making it possible to take advantage of improvements in the newer debugger version.)
  • Build in Eclipse, and debug in the IAR Embedded Workbench. (Useful when the plug-in has no debug support.)

How to configure the debug-only project

Follow these steps:

  1. Open the IAR Embedded Workbench version that is to be used for debugging.
  2. Choose Project>Create New Project>Externally built executable.
  3. In the Save As dialog box, specify a project name and click Save to save the project.
  4. Read the instructions (in readme.txt) on how to configure the project.

The only project options that are meaningful to set for this kind of project are options in the General Options and Debugger categories.

Conclusion

Building in one environment and debugging in another environment is useful for several scenarios.

Read more in the C-SPY Debugging Guide chapter: Loading executable files built outside of the IDE.

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.