Forum Discussion
Altera_Forum
Honored Contributor
18 years agoHelp:Cann't read or write EPCS in Nios II,why?
my system includes Flash,EPCS,etc,and has a EPCS controller.i want to read and write the EPCS in the nios.i tried to open the device using "alt_flash_open_dev()",but it's alway wrong--"can not open t...
Altera_Forum
Honored Contributor
18 years agoHi,
include these files also, #include "altera_avalon_epcs_flash_controller.h" #include "sys/alt_flash.h"// used for EPCS #include "sys/alt_flash_dev.h"// used for EPCS# include "sys/alt_sys_init.h" you need to open the device using the name of the EPCS device, with the value stored in the system.h file, like below // open flash device pEPCS = alt_flash_open_dev(EPCS_CONTROLLER_NAME); this is what is located in the generated system.h header, #define epcs_controller_name"/dev/epcs_controller"