Forum Discussion
Altera_Forum
Honored Contributor
20 years agoalt_sys_init
I have made my own sopc component. I have also written an device driver to that component. I have also included the rigth file to /HAL/inc, /HAL/src and src/ under the SOPC builder. I then create an ...
Altera_Forum
Honored Contributor
20 years ago --- Quote Start --- originally posted by doofus64@Mar 18 2006, 03:05 PM i have made my own sopc component. i have also written an device driver to that component. i have also included the rigth file to /hal/inc, /hal/src and src/ under the sopc builder. i then create an new prosject in nois2 ide. when i compile it, the compiler find the device driver files. but the *init and *instance is not included in alt_sys_init. how does i do that?.
i have tried to copy the /hal/inc, /hal/src and src/ to own folder under altera\quartus51\sopc_builder\components folder. but that doesent seems to help. i have also tried to copy the same files to the project directory in nios2 ide.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13568)
--- quote end ---
--- Quote End --- You should provide "init" and "instance" function for your own component. For example, init and instance function from altera_avalon_cf.h# define ALTERA_AVALON_CF_INSTANCE(name, dev) extern int alt_no_storage# define ALTERA_AVALON_CF_INIT(name, dev) alt_avalon_ide_cf_init( (void*)name##_CTL_BASE ) I recommend you to skim source codes in nios2\components about init and instance source code http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/dry.gif