You are here

Serial Console Debug (SWV on PSoC3 and PSoC5LP) | Cypress Semiconductor

Serial Console Debug (SWV on PSoC3 and PSoC5LP)

Summary: 4 Replies, Latest post by John DeHelian on 05 Aug 2016 04:52 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
kly's picture
Cypress Employee
13 posts

I've been doing some work on a serial console debugger for PSoC, and I figured it was time to get it out there. This is a PC application that prints serial data being received from the Miniprog3 to a text console. Accompanying the app are firmware example projects for PSoC3 and PSoC5LP that map the printf() function to output via the SWV. This provides a very fast serial debug output that doesn't consume any resources on the PSoCs. Plus, many of your 10-pin debug connectors may already have the proper pin connected! The firmware is organized though the use of a "SWV" component - just add the component to your project, call the _Start() function, and start sprinkling printf() in your firmware.

Here's a link to the app setup exe:

Here's the git repo for the application (C# Express 2010):

And here's the git repo for the Creator projects:

There are still some things I want to do to this, including:

1. Allow the console app to connect to COM (and virtual COM) ports.

2. Give the component the option to use a UART instead of SWV if desired. This would also provide compatibility to PSoC4, which does not have SWV.

Feel free to provide feedback, or better yet, fork the git repo and send me your own enhancements!



kly's picture
Cypress Employee
13 posts

 Here's a zip of the component.


Michael J's picture
22 posts

Many thanks for your effort...


     hope it becomes a standard 'built-in' component within the PSoC Creator package.


Regards Michael.

user_460349's picture
1362 posts

 Sounds interesting. Shall try it some time later. hope this can speed up the development time

John DeHelian's picture
3 posts

Thanks for the effort and for sharing. I have an issue wherein the variables are printed out incorrectly. And sometimes I am missing characters. Have you seen that? Is there anything I should do to help?


main: ucrrntEnable  202, TempEnble = X@
main: ucCurrentEnable = 202, TempEnble = c1
main: ucCurre?-Enable = 202, TempEnable = c?
main: ucCurrentnable = 202, Tempnable  X@
main: ucCurrentEnable  202, TempEnable = c1
main: ucCurrentEnable = 20, Tepnable = c1

should be 02 and 02. Not sure what's going on.

Log in to post new comments.