Forum Discussion
Altera_Forum
Honored Contributor
21 years agoi2c bus not work i think ?
I have add the I2C opencores component in SOPC builder, add the logic in quartus and assigned the pins. copiled the kernell en filesystem. i have started the i2cset I get this on my consol...
Altera_Forum
Honored Contributor
21 years agoI was forgot to enable the option:
I2C hardware Bus support ---> Opencores I2C Adapter when i build the kernell now ik get some error's the same in the topic " I2C Build errors, Where to define na_i2c_* variables " 6.x/drivers/i2c/busses/i2c-oc.c:165: error: (near initialization for `oc_hw_0.irq')
/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/i2c/busses/i2c-oc.c:170: error: `na_i2c_1' undeclared here (not in a function)
/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/i2c/busses/i2c-oc.c:170: error: initializer element is not constant
/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/i2c/busses/i2c-oc.c:170: error: (near initialization for `oc_hw_1.base')
/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/i2c/busses/i2c-oc.c:171: error: `na_i2c_1_irq' undeclared here (not in a function)
/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/i2c/busses/i2c-oc.c:171: error: initializer element is not constant
/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/i2c/busses/i2c-oc.c:171: error: (near initialization for `oc_hw_1.irq')
make: *** Error 1
make: *** Error 2
make: *** Error 2
make: *** Error 2
make: *** Error 2
make: Leaving directory `/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x' your anser on that topic is <div class='quotetop'>QUOTE </div> --- Quote Start --- They are defined in SOPC builder, and exported to Linux through a dynamic generated header file called nios2_system.h[/b] --- Quote End --- That file is in the worspace directory of the kernell\build\inlcude Must i adjust the file ? What must i add or change? Could you help me whith this ?