Further testing revealed that opening the flash device fails.
I use following code and it compiles with no errors.
alt_flash_fd* fd;
int rval = 0xDEADBEEF;
fd = alt_flash_open_dev(EPCS_CONTROLLER_NAME);
if(fd) {
rval = alt_read_flash(fd, address, data, length);
alt_flash_close_dev(fd);
}
return rval;
PS. I can't select a reference designator for EPCS controller. I don't see why that would be a problem because I can generate sdk. I have only one cyclone2 and one EPCS16 on my board so why should anyone care what designator was used when board was designed.