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++

alt_sys_init

Altera_Forum
Honored Contributor II
1,539 Views

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.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
653 Views

When I se in the component.mk the device drivers I made is there but not in alt_sys_init: 

 

COMPONENTS_DEVICE_DRIVERS = /cygdrive/e/altera/quartus51/sopc_builder/components/altera_avalon_dma                            /cygdrive/e/altera/kits/nios2_51/components/altera_avalon_cfi_flash                            /cygdrive/e/altera/kits/nios2_51/components/altera_avalon_lan91c111                            /cygdrive/e/altera/kits/nios2_51/components/altera_avalon_epcs_flash_controller                            /cygdrive/e/altera/quartus51/sopc_builder/components/altera_avalon_timer                            /cygdrive/e/altera/quartus51/sopc_builder/components/altera_avalon_jtag_uart                            /cygdrive/e/altera/quartus51/sopc_builder/components/altera_avalon_pio                            /cygdrive/e/altera/kits/nios2_51/components/altera_avalon_performance_counter                            /cygdrive/e/altera/kits/nios2_51/components/altera_avalon_lcd_16207                            /cygdrive/e/altera/quartus51/sopc_builder/components/altera_avalon_sysid                            /cygdrive/e/altera/quartus51/sopc_builder/components/altera_avalon_uart                            /cygdrive/e/bjornar/workspace/altera/spectrometer/quartus/system/niosII_cycloneII_2c35/full_featured/pda                            /cygdrive/e/bjornar/workspace/altera/spectrometer/quartus/system/niosII_cycloneII_2c35/full_featured/servo
0 Kudos
Altera_Forum
Honored Contributor II
653 Views

 

--- 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
0 Kudos
Reply