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