Article ID: 000086916 Content Type: Troubleshooting Last Reviewed: 08/11/2016

Why does my program run correctly in DS-5 but fails when it is loaded from flash?


  • Intel® Quartus® Prime Pro Edition
  • Intel® SoC FPGA Embedded Development Suite (SoC EDS) Pro Edition

    If your software does not run correctly from flash check the code has not been compiled with Semihosting support enabled for I/O routines such as printf. 

    Semihosting routes I/O commands such as printf to the debugger via specific libraries linked in at compile time. 

    The software examples within SoCEDS/examples/software are configured to use semihosting by default.  


    The Altera-SoCFPGA-HardwareLib-FPGA-CV-GNU within SoCEDS version 15.1 and later contains a #Define at the top of the Makefile to allow semihosting to be dissabaled or enabled.   If Semihosting is disabled this example adds in a driver to route printf output through the UART.

    You can also manully disable C library semihosting functions by using the code below in your C or assembler modules:

    #pragma import(__use_no_semihosting_swi)   //C module

    IMPORT __use_no_semihosting_swi //assembler module

    Related Products

    This article applies to 6 products

    Cyclone® V SX SoC FPGA
    Cyclone® V ST SoC FPGA
    Cyclone® V SE SoC FPGA
    Arria® V SX SoC FPGA
    Arria® V ST SoC FPGA
    Intel® Arria® 10 SX SoC FPGA



    All postings and use of the content on this site are subject to Terms of Use.