So, my goal is to print (on the standard output) a number using a Nios II system on a FPGA Cyclone II Altera.
MY STEPS:
1) I created the following Nios II system with the Qsys tool (Quartus II):
(NIOS II CPU - JTAG - ONCHIP MEMORY RAM - SYS ID)
2) I wrote the following C code:
#include <stdio.h>
int main(){
char a[13]="Hello world!";
printf("%s\n", a);
}
3) I downloaded the system on the FPGA and I compiled and loaded my code using Altera Monitor Program, I ran the code and it works, my code prints "Hello world" on the Monitor Program terminal.
4) So, I tried to print a number and it fails :(
NOTES: I tried to change %i with %d %u
Why it doesn't work?