# Download SWD debug using the IAR EWARM

To illustrate, here will be used as an example STM32F103C8T6.

**SWD interface to download the program in IAR EWARM**

1.Open the IAR EWARM, and create a new project, Tool chain ARM can choose, click OK.

![](https://1339817493-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtRMO1SOVoE1wKC5%2F-M2HWuqfjq-tAqyjGf2g%2F-M2HX8GnQU2d8EBzjhbr%2Fswd%208.png?generation=1584080169188256\&alt=media)

Select the menu bar Project-> Options ..., option box will pop up, as shown below

![](https://1339817493-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtRMO1SOVoE1wKC5%2F-M2HWuqfjq-tAqyjGf2g%2F-M2HX8GpjoOxqof6yZRU%2Fswd%209.png?generation=1584080168653107\&alt=media)

2.Select General Options -> Target page, then select the Processor variant column in the Device, and then click the right button, and in turn find STM32F103C8 processor.

![](https://1339817493-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtRMO1SOVoE1wKC5%2F-M2HWuqfjq-tAqyjGf2g%2F-M2HX8Grc8JuH5hqN_Ve%2Fswd%2010.png?generation=1584080167872757\&alt=media)

3.Then choose General Options -> Library Configuration page stdout / stderr section of Via SWO.

![](https://1339817493-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtRMO1SOVoE1wKC5%2F-M2HWuqfjq-tAqyjGf2g%2F-M2HX8GtYfgMS23O2sJG%2Fswd%2011.png?generation=1584080169541948\&alt=media)

4.Then select Debugger -> Setup -> Driver -> J-Link / J-Trace.

![](https://1339817493-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtRMO1SOVoE1wKC5%2F-M2HWuqfjq-tAqyjGf2g%2F-M2HX8Gv6JW4EJzKfWpF%2Fswd%2012.png?generation=1584080168857870\&alt=media)

5.Just find a way to drive, set as shown below, and click OK。

![](https://1339817493-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtRMO1SOVoE1wKC5%2F-M2HWuqfjq-tAqyjGf2g%2F-M2HX8GxyQjuUZ9Kr7QH%2Fswd%2013.png?generation=1584080172283028\&alt=media)

You can now click on the columnCompile button，Such error can clickRun button to download the firmware.
