Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Division and standard library support by NIOSII compiler

HI,

I have been trying to port an embedded sw to NIOSII. I have some division operations, array initializations, sprintf function calls in the code. I find that NIOS II compiler (processor core does not directly support division) is not providing built-in calls to division, memset/memcpy (as in array initialization, etc) or sprintf. Should the compiler not support these functionalities (mebe not sprintf..). Or am i missing some compiler or linker options..?

Pl send suggestions..

Thanks,

Sunil

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    These items you mention are all supported. Division is emulated if not enabled in core (I believe this to be true but we enabled division). mem and str functions are all definitely present in the NIOS II Libraries.

    Bill
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Nios II supports 32 bit (and less) integer division when enabled and single precision floating point division if you add the custom instruction floating point unit.

    The library functions you mentioned are all present.... in string.h, and stdio.h if I remember correctly.