Debugging an externally built executable file
Technical Note 190508
5/23/2019 4:22 PM
Debugging using an externally built executable file is useful in various situations.
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.
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.
- 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:
- Open the IAR Embedded Workbench version that is to be used for debugging.
- Choose Project>Create New Project>Externally built executable.
- In the Save As dialog box, specify a project name and click Save to save the project.
- 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.
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 the IDE.
All product names are trademarks or registered trademarks of their respective owners.