Printf Statements Breaking Post Simulation
#1
Hi,
   I am unable to run C code with printf statements using synthesized netlist. I have attached a simulation image of the stdout peripheral bus and FSM of Lint 2 AXI module. I notice that the C code runs successfully when no printf statements are given. 

The C code run when I get this issue is

#include <stdio.h>
int main()
{
  printf("Testing !\n");

  return 0;
}


Any thoughts on this issue?


Attached Files Thumbnail(s)
   
Reply
#2
The default stdout used in the current runtime makes use of a virtual stdout interface that is only usable during simulation. The interface is probed by the testbench using hierarchical access and is most likely optimized away during synthesis. For actual hardware, you should use UART as your default stdout. You can do so by compiling your application with 'make all io=uart'. This will cause the runtime to print all stdout to the UART interface at a default baudrate of 115200 baud.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)