GCC RX231 Printf problem
GCC RX231 Printf problem
Hello,
I have problems using printf on the RX debug console using the GCC Renesas compiler.
When I get to printf the debugger gets lost doing _vprintf_r () and resets some ideas?
Can anyone use printf on the command console with the Renesas GCC RX?
Thank you,
Simone
I use e2 studio 7.4.0 with GCC 4.8.4.201803
/ ************************************************* **********************
*
* FILE: DebugPrintf.c
* DATES: 2019-07-28
* DESCRIPTION: Main Program
*
* NOTE: THIS IS A TYPICAL EXAMPLE.
*
************************************************** ********************* /
#include “r_smc_entry.h”
#include <stdint.h>
#include <stdio.h>
void main (void);
void main (void)
{
printf ( “Hello”);
}
Hello,
Thank you for reaching out to us!
Unfortunately, the usage of printf for debugging using the RX Simulator Debugging is not possible. Instead, we suggest using the GDB Simulator Debugging. You will also have to add the -msim option to the Linker User Defined Options (Right-click on your project → C/C++ Build → Settings → Tool Settings → Linker → Other).
If the debugging simulator change is not viable for you, you can always use the “Dynamic printf” feature, which can replace the printf function. It can be set the same way one sets breakpoints in source code, by right-clicking the left channel (left to the line number) and then choosing “Add Dynamic Printf…”. This feature enables the Debug Console (not the Virtual Console) string output, variable and expressions without writing printf calls in source codes.
Please let us know if that helps you!
–
Best regards,
The GNU Tools Team