Forum Discussion
Altera_Forum
Honored Contributor
21 years agoThe reason you're not able to call the alt_epcs_* functions are that they are all declared static (with the exception of alt_epcs_flash_init). This is because they are private to the driver and should not be called directly from your application. You should instead use the HAL flash API.
The call to alt_epcs_flash_init() will be made for you before main() regardless of how you boot (assuming you do not provide your own implementation of alt_main()). The only reason this would not be the case is if you have selected "small footprint drivers". This option disables the EPCS driver completely. If you do want to use the EPCS driver while using "small footprint drivers" then you should define the preprocessor macro ALT_USE_EPCS_FLASH for your system library project. If that isn't the cause of the problem, then I'd recommend stepping through the alt_sys_init() function in the debugger. This may reveal while the driver is failing to initialise.