Forum Discussion
Altera_Forum
Honored Contributor
16 years agoundefined reference to `alt_epcs_flash_write(alt_flash_dev*, int, void const*, int)'
Hello: I am having issues linking my code with the calls to the EPCS functions. Here is the error I get at link time: Linking project.elf... obj/source/monitor.o(.text+0x1588): In fun...
Altera_Forum
Honored Contributor
16 years agoHave you included sys/alt_flash.h and sys/alt_flash_dev.h?? I have also implemented the driver over the NIOS2 IDE, but I have also to implement the two above to get it working. Code looks like this:
...# include "sys/alt_flash.h"# include "sys/alt_flash_dev.h" ... alt_flash_fd* any_epcs; char data_array_name[16]; int ret_code = 0; ... my_epcs = alt_flash_open_dev(EPCS_FLASH_CONTROLLER_0_NAME); ret_code = alt_read_flash(any_epcs, 0, data_array_name, 16); ... good luck!