Forum Discussion
Altera_Forum
Honored Contributor
12 years agoI am afraid your link is a copy of http://ecos.sourceware.org/docs-3.0/ref/io-how-to-write-a-driver.html and there seems to be an error in DEVIO_TABLE calling: seeing devtab.h, it should be DEVIO_TABLE(l, write, read, select, get_config, set_config), they omitted select. I wrote
DEVIO_TABLE( p8p_handlers, p8p_write, p8p_read, p8p_select, p8p_get_config, p8p_set_config, p8p_close ); DEVTAB_ENTRY( p8p_label, p8p_name, 0, //does not depend upon a lower level interface &p8p_handlers, p8p_init, p8p_lookup, p8p_priv ); and cdl_package CYGPKG_DEVS_FLASH_P8P { display "P8P FLASHlike memory support" parent CYGPKG_IO_FLASH description "FLASHlike memory device support for P8P" implements CYGHWR_IO_FLASH_DEVICE hardware compile p8p.c } in .cdl. It is built alright but cyg_flash_devtab does not seem to be filled in.