Article ID: 000085115 Content Type: Troubleshooting Last Reviewed: 09/11/2012

Why can't I use siprintf() with Nios II when using the small newlib library?

Environment

  • Quartus® II Subscription Edition
  • Nios® II Processor
  • BUILT IN - ARTICLE INTRO SECOND COMPONENT
    Description

    In the Nios® II Software Build Tools, there is an option to use the small newlib c library. However, when this option is selected in the Board Support Package (BSP), it is no longer possible to use the siprintf() function, which is incorrectly stripped from the library.

    The siprintf() function is a stripped-down version of sprintf() without the support for floating point operators. However, as the small newlib library removes support for floating point operatins on all of the printf() derivitives, effectively siprintf and sprintf are the same. Replacing siprintf with sprintf in your code will work around the issue.

    This issue is planned to be fixed in a later version of the Nios II Software Build Tools.

    Related Products

    This article applies to 1 products

    Intel® Programmable Devices