Forum Discussion

Manprocoder's avatar
Manprocoder
Icon for New Contributor rankNew Contributor
2 years ago

PRINTF FUNCTION ERROR

#include <stdio.h>
#include "system.h"
#include "io.h"
int main(){
//result variable
int ready = 0, crc_seq=0;
//declare pointer
int *base = (int*) CRC_0_BASE;
//Generator Poly 0xd5
int genPoly = 213 & 0xff;
//0x0a55, 0x0a56, 0x0a57, 0x0a58, 0x0a59
int data[5] = {2645, 2646, 2647, 2648, 2649};
//write genPoly down to design
*(base) = genPoly;
for(int i=0; i < 5; i++){
ready = *(base+3)&0x1;
printf("\nHello Nios II!");
if(ready ==1){
*(base+1) = data[i]&0xffff; //0x0a55
crc_seq = *(base+2);
printf("\ncrc_seq = %d", crc_seq);
//decimalToBinary(crc_seq);
}else{
printf("\ncrc calculator is busy");
}
}
return 0;
}
My issue: i do not see any contents of printf function in this code. Please help me. Thanks.

6 Replies

  • aikeu's avatar
    aikeu
    Icon for Regular Contributor rankRegular Contributor

    Hi Manprocoder,


    I do not understand what your desciption? Is it compilation error or you are not able to see any printf logs?


    Thanks.

    Regards,

    Aik Eu


    • Manprocoder's avatar
      Manprocoder
      Icon for New Contributor rankNew Contributor

      Hi expert,
      I have fixed my issue successfully. (I forgot to set jtag_uart for std::out in BSF Editor)
      Thanks for your concern.

  • Hi @Manprocoder,


    Good day, just following up on the previous clarification.

    By any chances did you managed to look into it?

    Hope to hear from you soon.


    Best Wishes

    BB


    • Manprocoder's avatar
      Manprocoder
      Icon for New Contributor rankNew Contributor

      Hi expert,

      I really appreciate your concern and I have solved my issue successfully. (Specifically, I forgot setting jtag_uart at std::out option in BSP Editor).
      Thanks for your valuable time.

  • Hi @Manprocoder,

    Greetings, as we do not receive any further clarification/updates on the matter, hence would assume challenge are overcome. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. For new queries, please feel free to open a new thread and we will be right with you. Pleasure having you here.

    Best Wishes
    BB