Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
720 Views

EPCS access fail

Hi there 

 

I'm having trouble accessing the EPCS from withing NIOS. When running the following code: 

 

void OpenEpcsFlash() 

 

 

fd_f = alt_flash_open_dev(EPCS_FLASH_CONTROLLER_NAME); 

alt_printf("EPCS pointer: %x\r\n",fd_f); 

 

fd_f always returns a NULL pointer.  

 

I've enabled small_device_drivers and the small_c_library, but I've included the ALT_USE_EPCS_FLASH# define. If I run the exact same code on the DE0_Nano_SOPC demo project, included in the Altera DE0 Nano board, the software works. Is it possibly a setup problem in my Qsys system? 

 

I'm using Quartus 13.1.0. 

 

Thanks in advance 

Jean
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
36 Views

I found the problem. The# define ALT_USE_EPCS_FLASH, is removed each time the BSP is regenerated. Thus it needs to be added after BSP generation. 

 

Hope this helps someone in the future 

 

Kind regards 

Jean
Altera_Forum
Honored Contributor I
36 Views

There are others cases where some user installed the EDS and tool chain in different folder location where causing the inclusion path is not updated correctly. :)

Reply