Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21384 Discussions

Using EPCS flash for general non-volatile data

Altera_Forum
Honored Contributor II
1,026 Views

Despite following a number of previous threads relating to EPCS flash, I still cannot use the device for general non-volatile storage. 

I can use NIOS Flash Programmer and the code runs OK. I'm using a minimal version of NIOS and had to even remove stdin/out/err before it would run from flash. I understand that a minimal implementation has no file system and EPCS has to be explicitly enabled. 

I have added ALT_USE_EPCS_FLASH to the 'symbols' tab of the 'properties: C/C++ General: Paths and Symbols' page for NIOS IDE project folder. 

I have a# included "altera_avalon_epcs_flash_controller.h", "sys/alt_flash.h" and "sys/alt_flash_dev.h" in the C code which is very basic, e.g. 

alt_flash_fd* epcs; 

epcs = alt_flash_open_dev("/dev/epcs_flash_controller_0"); 

but it always returns zero. 

I have found the solution on yet another thread - putting ALT_USE_EPCS_FLASH in alt_sys_init.c - now it works fine! 

0 Kudos
0 Replies
Reply