Debugging using printf on PRoC eval 012011 board and MiniProg3

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DhDa_2432241
Level 5
Level 5
5 likes given First like received First like given

Hello, 

   

Has anyone tried to redirect printf through SWD using EVAL 012011 board and MiniProg3 connected using a 10-pin connector? What debugging options do I have using this setup?

   

Thanks

   

Dheeraj

0 Likes
8 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

You should be able to debug it using the SWD interface.

0 Likes

Sorry completely new to SWD. How do I get started? Some examples would help.

   

Thanks

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received
        You need to set that in the,system functions.   
0 Likes
Anonymous
Not applicable

Set the SWD pins to Debug in the System file within the project file tree (Under Design Wide Resources),

   

then connect your device to the debugger (miniprog3), set the debugger settings under Tools->Options->Program/Debug,

   

and click the "bug" icon to start debugging your project/device.

0 Likes

Thank you for this. I did the following.

   

1. In Debug -> Select Debug Target, I clicked on my PRoC BLE and selected Port Acquire and then connect. 

   

2. In Design Wide Resources -> System -> Programming\Debugging -> Debug Select -> SWD(serial wire debug).

   

3. Added printf() statements in my code, build, flashed and pressed the bug icon. 

   

4. In debug perspective, I pressed resume execution. 

   

But how do I view the output from the printf's? Is the printf() automatically redirected to SWD or should I set that up?

0 Likes
Anonymous
Not applicable

The debugger lets you view running code. If you are looking for more of a "logging" function, try this post here:

   

http://www.cypress.com/forum/psoc-creator-software/debug-output-ide-output-tab-or-ide-logging

0 Likes

I am using the MiniProg3 connected via SWD interface to a EZ-BLE 012011 board for flashing and debugging. The link you posted doesn't have a resolution. From their conversation, it seems that there is no window in the PSoC creator to view the output. I am not interested in using an external USB-UART adapter either. I am not using a Pioneer Kit which will give me a COM port to see the output.

   

I am looking to view the output via SWD. For STMicro controllers, when connected through Segger interface, there is a serial wire viewer software for viewing the printf() statements. I am looking for something similar.

Also MiniProg3 doesn't show up as a COM port so I can't use Putty client for viewing the output. 

0 Likes
DhDa_2432241
Level 5
Level 5
5 likes given First like received First like given

I found this link which enables traces to get printf() working. (I haven't tested it)

   

http://www.cypress.com/knowledge-base-article/using-embedded-trace-macrocell-etm-kba90952

But this requires to export PSoC creator projects to Keil or IAR. I don't have a license for those softwares. Is it possible to do this in PSoC creator?

0 Likes