I have the same issue opening flash device in the debugger. However I am able to generate a flash device reference designator. I am pretty sure the compiler requires this. When the function is called it must pass the flash device name that is in the system.h file. That is done only from the command line shell with the mk_target_board command detailed here...
http://www.altera.com.cn/literature/ug/ug_..._programmer.pdf (
http://www.altera.com.cn/literature/ug/ug_nios2_flash_programmer.pdf)
Does anyone know why I would get this error also, even with a correct fd name generated?