Skip to main content
Renesas Electronics Europe - Knowledgebase

How do I use Printf() with the debug console in the Synergy Software Package?

Latest Updated:10/04/2016


How do I use the Printf function to write to the Virtual Debug Console with the Synergy Software Package?


You can use the printf function in your SSP projects is you follow these simple steps, illustrated using the Threaded Blinky project.

1) Make sure you include these lines of code at the beginning of Threaded Blinky:

#include "blinky_thread.h"
#include "stdio.h" //Used for printf outputs

extern void initialise_monitor_handles(void);  //Used for printf outputs

/* Blinky example application

void blinky_thread_entry(void)
    initialise_monitor_handles(); //Used for printf outputs
    int countt;


2) You also need to initialize the countt variable here:

/* Get LED information for this board */


countt = 0;

3) Put in the code to increment the counter, the printf function call and the edit to the sleep delay as shown below:

countt = countt + 1;

/* Delay */

printf(" Hello from Synergy %d\r\n", countt);

tx_thread_sleep (1);

4) You should also check that the linker script (a default selection in SSP projects, but you might need to set it if you are doing anything non-standard) is set to -spec=rdimon.specs as seen below.

5) You can now build and begin a debug session.  

5) Now select the Renesas Debug Virtual Console using the select box at the far right of the console window (the one with the yellow plus sign), as seen below, then restart the debug session.

6) The Printf output from Threaded Blinky will show up in the Virtual console window as illustrated in the screen capture given below (you may need to select the display console from the second to last selction box on the far right side of the console window, the one with the computer monitor icon) . Now try this procedure in one of your projects!

  • Was this article helpful?