How to configure SWO for EWARM V8

From SEGGER - Support Wiki
Jump to: navigation, search

IAR's EWARM is a J-Link compatible 3rd party IDE that supports most J-Link features out-of-the-box. With EWARM release version 8 some default project settings for SWO configuration with J-Link got changed and thus manual correction by the user is currently necessary. The following article will show a step by step guide how to set up SWO in an EWARM project and common troubleshooting tips to solve any issues a user might run into.

Setup Guide

  • Open up an EWARMv8 project and make sure the correct target device is selected (in case of the emPower board it is the NXP MK66FN2M0xxx18).
Select target device
  • Next change the project settings to use SWO instead of Semihosting (If SWO is greyed out, go to J-Link/J-Trace -> Interface and select SWD as interface).
Select SWO
  • Make sure J-Link/J-Trace is selected as debug hardware.
Select J-Link as debug hardware
  • Enter CPU clock speed value in the EWARM project settings and set SWO clock to "Auto". CPU clock speed represents the speed at the point where the target system has been fully initialized (PLLs are running and clock source has been switched to PLL etc.)
Set CPU clock
  • Now start the debug session and open the Terminal I/O window under View-> Terminal I/O, the printf output will now be displayed in that window.
Terminal Output

A basic EWARMv8 project for the emPower board with all settings applied can be found here:


  • The Terminal I/O windows is still not showing any information even after following the setup guide step by step.
    • Make sure the SWO pin is actually connected to your J-Link debug hardware, many J-Link OBs for example do not have SWO routed to them.
    • Check if the selected target device is correct.
    • Create a testloop in your application where repeatedly prinf is called and see if that message is displayed in the J-Link SWO Viewer, if this is the case then the EWARM project settings are still incorrect.
  • I want SWO to output PC and timestamps.
    • To do so you need a running debug session, now go to J-Link->SWO Trace, press the "On" button in the now open window, then go to J-Link->SWO Trace Window Settings... and select all advance SWO features you want to monitor in the SWO Trace window.
Select advanced SWO features
  • I am getting OVERFLOW packages, what should i do?
    • When outputting large amounts of SWO trace data the SWO clock must be increased as well so the target device is able to output all generated SWO data. In addition to this a capable debug probe is needed. A J-Link model overview can be found here: J-Link Model Overview. For the best SWO trace experience we recommend a J-Link ULTRA+ or higher.
  • I want to use SWO and JTAG simultaniously, how can i do that?
    • This is not possible as the TDO (JTAG) signal is sharing the same pin as SWO. To be able to use SWO a SWD debug connection is required.
  • I can't start a debug session
    • Is the target device powered properly? You can open the J-Link Commander to see what voltage is currently showing as VTREF in the console output. Is that value expected?
    • Try to use the J-Link flash loader to program the target device instead. To do that simply uncheck the following option in project settings.
Select J-Link flash loader

If there are still issues persisting feel free to contact our support: