Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

PRINTF FUNCTION ERROR

Manprocoder
Beginner
118 Views
#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.
Labels (1)
0 Kudos
2 Replies
aikeu
Employee
65 Views

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


0 Kudos
BoonBengT_Intel
Moderator
25 Views

Hi @Manprocoder,


Good day, just following up on the previous clarification.

By any chances did you managed to look into it? Do let us know the error that you are seeing.

And just to add, there are settings in the BSP required to use the HAL API.


More information can be found in the link below:

- https://www.intel.com/content/www/us/en/docs/programmable/683525/21-3/hardware-abstraction-layer.html


Hope to hear from you soon.


Best Wishes

BB


0 Kudos
Reply