Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

EPCS access fail

Altera_Forum
Honored Contributor II
1,094 Views

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 II
410 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
0 Kudos
Altera_Forum
Honored Contributor II
410 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. :)

0 Kudos
Reply