Forum Discussion
Altera_Forum
Honored Contributor
20 years agoOpencores I2C Core and uClinux Driver
I have added an Altera Avalon SOPC Builder I2C Master component based on the Opencores I2C Host.
http://via.dynalias.org/svn/fpga/cores/i2c_master/trunk/ (http://via.dynalias.org/svn/fpga/cores/i2c_master/trunk/) Either download using the web, or use SVN to check out the project.. I simply created a wrapper for this and the necessary files to drop this component onto the Avalon bus, so I don't take any credit for this core. This will just make it easier for new people not wishing to go through this hassle. Also, I am working on getting the uClinux driver up and running. There is an Opencores driver already included in 2.6.16.1, so I will just be modifying/testing that and posting the results here. J16 Replies
- Altera_Forum
Honored Contributor
Hippo,
OK. I can confirm, I have compiled the uclinux image w/o problem (w/ oc i2c master). Now, I need some things to test it. Can you point me to some apps and code for testing this ? I assume I have to create a device /dev/i2c-0 in romfs_list ? I will wire the hardware to some devices I have. Many thanks. - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by albertyong88@Nov 3 2006, 06:30 AM hippo,ok. i can confirm, i have compiled the uclinux image w/o problem (w/ oc i2c master).
now, i need some things to test it.
can you point me to some apps and code for testing this ?
i assume i have to create a device /dev/i2c-0 in romfs_list ?
i will wire the hardware to some devices i have. many thanks.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19115)
--- quote end ---
--- Quote End --- Look in, linux-2.6.x/Documentation/i2c .
- Altera_Forum
Honored Contributor
Hippo,
I tried to include lm_sensors (which includes i2ctools) in menuconfig, but it got error. Please helpmake: Entering directory `/home/uclinux/uClinux-dist/lib/sysfsutils' rm -rf build mkdir build (cd build; sh ../configure --host=nios2-linux-uclibc --build=i686-pc-linux-gnu --target=nios2-linux-uclibc ) checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for nios2-linux-uclibc-strip... nios2-linux-uclibc-strip checking build system type... i686-pc-linux-gnu checking host system type... Invalid configuration `nios2-linux-uclibc': machine `nios2-linux' not recognized configure: error: /bin/sh ../config.sub nios2-linux-uclibc failed make: *** Error 1 make: Leaving directory `/home/uclinux/uClinux-dist/lib/sysfsutils' make: *** Error 2 make: Leaving directory `/home/uclinux/uClinux-dist/lib' make: *** Error 2 make: Leaving directory `/home/uclinux/uClinux-dist/lib' make: *** Error 1 uclinux@colinux:~/uClinux-dist$ - Altera_Forum
Honored Contributor
You should create a new topic for a new question.
If the thread got too long, it is difficult to read by others. - Altera_Forum
Honored Contributor
hey
i tried to download the link from i2c master in the first post, but link does not match... could u pls update the link ? - Altera_Forum
Honored Contributor
You may use software pio driver instead of hardware, see i2c-gpio in the wiki, and ver 32 of uClinux-dist patches.
http://nioswiki.jot.com/wikihome/operatingsystems/video (http://nioswiki.jot.com/wikihome/operatingsystems/video)