How to use uart for printf and other console output calls in bare metal program? #1025
Unanswered
artakarakelyan
asked this question in
Q&A
Replies: 1 comment
-
The FPGA bootrom contains a small driver for our UART. You can find it here: https://github.com/openhwgroup/cva6/blob/master/corev_apu/fpga/src/bootrom/src/uart.c. To my knowledge, Newlib does not contain a driver and you have to add your own. Note that this is only necessary for FPGA emulation. In simulation, we use RISC-V fesvr to forward printf to the host. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How a bare-metal program can be built to use the uart?
Is there a console IO implementation which initializes and uses the uart?
I see dhrystone in benchmarks and it uses printf to output results.
How that output can be read while running the benchmark on fpga emulated core?
If my understanding is correct the gcc newlib version links the code to newlib which has C api for puts printf .. etc. And the above mentioned functions use _write call which can be implemented in particular for uart operation.
So basically the question is: is there a newlib which supports cva6 UART for console IO ?
Beta Was this translation helpful? Give feedback.
All reactions