- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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. JLink Copied
16 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The kernel patch for 2.6.16.1 is located here:
http://via.dynalias.org/svn/uclinux/patche..._core/tags/1.0/ (http://via.dynalias.org/svn/uclinux/patches/i2c_core/tags/1.0/) This is only a simple modification of the Mictronix driver, so that it compiles with a single core. Credit goes to Microtronix for the core.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TO_BE_DONE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is due to kernel version changed to 2.6.17 in uClinux-dist-20060803.
I will check it tommorow.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The include file is missing.
Updated in the nios2 patch ver 10.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hippo,
Did all that, and still get the followingmake: Entering directory `/home/uclinux/uClinux-dist/linux-2.6.x'
CHK include/nios2_system.h
perl -I/home/uclinux/uClinux-dist/linux-2.6.x/arch/nios2nommu/scripts /home/uclinux/uClinux-dist/linux-2.6.x/arch/nios2nommu/scripts/gen_nios2_system.h.pl cpu ddr_sdram ext_flash < /windows/downloaded/std_2C35.ptf > include/nios2_system.h.tmp; if && cmp -s include/nios2_system.h include/nios2_system.h.tmp; then rm -f include/nios2_system.h.tmp; else echo ' UPD include/nios2_system.h'; mv -f include/nios2_system.h.tmp include/nios2_system.h; fi
CHK include/linux/version.h
SPLIT include/linux/autoconf.h -> include/config/*
CHK include/linux/compile.h
CC drivers/i2c/i2c-core.o
CC drivers/i2c/i2c-dev.o
CC drivers/i2c/algos/i2c-algo-bit.o
CC drivers/i2c/algos/i2c-algo-oc.o
drivers/i2c/algos/i2c-algo-oc.c:51: error: syntax error before string constant
drivers/i2c/algos/i2c-algo-oc.c:51: warning: type defaults to `int' in declaration of `MODULE_PARM'
drivers/i2c/algos/i2c-algo-oc.c:51: warning: function declaration isn't a prototype
drivers/i2c/algos/i2c-algo-oc.c:51: warning: data definition has no type or storage class
drivers/i2c/algos/i2c-algo-oc.c:374: error: unknown field `name' specified in initializer
drivers/i2c/algos/i2c-algo-oc.c:374: warning: initialization from incompatible pointer type
drivers/i2c/algos/i2c-algo-oc.c:375: error: unknown field `id' specified in initializer
drivers/i2c/algos/i2c-algo-oc.c:375: error: `I2C_ALGO_OC' undeclared here (not in a function)
drivers/i2c/algos/i2c-algo-oc.c:375: error: initializer element is not constant
drivers/i2c/algos/i2c-algo-oc.c:375: error: (near initialization for `oc_algo.smbus_xfer')
drivers/i2c/algos/i2c-algo-oc.c: In function `i2c_oc_add_bus':
drivers/i2c/algos/i2c-algo-oc.c:391: error: structure has no member named `id'
drivers/i2c/algos/i2c-algo-oc.c:385: warning: unused variable `oc_adap'
make: *** Error 1
make: *** Error 2
make: *** Error 2
make: *** Error 2
make: Leaving directory `/home/uclinux/uClinux-dist/linux-2.6.x'
make: *** Error 1
uclinux@colinux:~/uClinux-dist$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hippo,
In the customise kernel settings --> device driver --> i2c When I added i2c algorithms --> Opencores i2c interface i2c hardware bus support --> opencores i2c adapter It gives error when generating the zImage Pls help.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
update again, nios2 patch ver 11.
fixup i2c for DE2.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hippo,
Tried that, still have problems: CC drivers/i2c/algos/i2c-algo-oc.o
drivers/i2c/algos/i2c-algo-oc.c:484: error: redefinition of 'i2c_debug'
drivers/i2c/algos/i2c-algo-oc.c:66: error: previous definition of 'i2c_debug' was here
drivers/i2c/algos/i2c-algo-oc.c:500: error: redefinition of 'i2c_start'
drivers/i2c/algos/i2c-algo-oc.c:82: error: previous definition of 'i2c_start' was here
drivers/i2c/algos/i2c-algo-oc.c:506: error: redefinition of 'i2c_repstart'
drivers/i2c/algos/i2c-algo-oc.c:88: error: previous definition of 'i2c_repstart' was here
drivers/i2c/algos/i2c-algo-oc.c:512: error: redefinition of 'i2c_stop'
drivers/i2c/algos/i2c-algo-oc.c:94: error: previous definition of 'i2c_stop' was here
drivers/i2c/algos/i2c-algo-oc.c:518: error: redefinition of 'wait_for_bb'
drivers/i2c/algos/i2c-algo-oc.c:100: error: previous definition of 'wait_for_bb' was here
drivers/i2c/algos/i2c-algo-oc.c:542: error: redefinition of 'try_address'
drivers/i2c/algos/i2c-algo-oc.c:124: error: previous definition of 'try_address' was here
drivers/i2c/algos/i2c-algo-oc.c:564: error: redefinition of 'oc_sendbytes'
drivers/i2c/algos/i2c-algo-oc.c:146: error: previous definition of 'oc_sendbytes' was here
drivers/i2c/algos/i2c-algo-oc.c:602: error: redefinition of 'oc_readbytes'
drivers/i2c/algos/i2c-algo-oc.c:184: error: previous definition of 'oc_readbytes' was here
drivers/i2c/algos/i2c-algo-oc.c:641: error: redefinition of 'oc_doAddress'
drivers/i2c/algos/i2c-algo-oc.c:223: error: previous definition of 'oc_doAddress' was here
drivers/i2c/algos/i2c-algo-oc.c:711: error: redefinition of 'oc_xfer'
drivers/i2c/algos/i2c-algo-oc.c:293: error: previous definition of 'oc_xfer' was here
drivers/i2c/algos/i2c-algo-oc.c:785: error: redefinition of 'oc_func'
drivers/i2c/algos/i2c-algo-oc.c:367: error: previous definition of 'oc_func' was here
drivers/i2c/algos/i2c-algo-oc.c:792: error: redefinition of 'oc_algo'
drivers/i2c/algos/i2c-algo-oc.c:374: error: previous definition of 'oc_algo' was here
drivers/i2c/algos/i2c-algo-oc.c:793: error: unknown field `name' specified in initializer
drivers/i2c/algos/i2c-algo-oc.c:793: warning: initialization from incompatible pointer type
drivers/i2c/algos/i2c-algo-oc.c:794: error: unknown field `id' specified in initializer
drivers/i2c/algos/i2c-algo-oc.c:794: error: `I2C_ALGO_OC' undeclared here (not in a function)
drivers/i2c/algos/i2c-algo-oc.c:794: error: initializer element is not constant
drivers/i2c/algos/i2c-algo-oc.c:794: error: (near initialization for `oc_algo.smbus_xfer')
drivers/i2c/algos/i2c-algo-oc.c:803: error: redefinition of 'i2c_oc_add_bus'
drivers/i2c/algos/i2c-algo-oc.c:383: error: previous definition of 'i2c_oc_add_bus' was here
drivers/i2c/algos/i2c-algo-oc.c: In function `i2c_oc_add_bus':
drivers/i2c/algos/i2c-algo-oc.c:810: error: structure has no member named `id'
drivers/i2c/algos/i2c-algo-oc.c:804: warning: unused variable `oc_adap'
drivers/i2c/algos/i2c-algo-oc.c: At top level:
drivers/i2c/algos/i2c-algo-oc.c:822: error: redefinition of 'i2c_oc_del_bus'
drivers/i2c/algos/i2c-algo-oc.c:399: error: previous definition of 'i2c_oc_del_bus' was here
drivers/i2c/algos/i2c-algo-oc.c:827: error: redefinition of 'i2c_algo_oc_init'
drivers/i2c/algos/i2c-algo-oc.c:404: error: previous definition of 'i2c_algo_oc_init' was here
drivers/i2c/algos/i2c-algo-oc.c:834: error: redefinition of 'i2c_algo_oc_exit'
drivers/i2c/algos/i2c-algo-oc.c:411: error: previous definition of 'i2c_algo_oc_exit' was here
drivers/i2c/algos/i2c-algo-oc.c:838: error: redefinition of '__kstrtab_i2c_oc_add_bus'
drivers/i2c/algos/i2c-algo-oc.c:415: error: previous definition of '__kstrtab_i2c_oc_add_bus' was here
drivers/i2c/algos/i2c-algo-oc.c:838: error: redefinition of '__ksymtab_i2c_oc_add_bus'
drivers/i2c/algos/i2c-algo-oc.c:415: error: previous definition of '__ksymtab_i2c_oc_add_bus' was here
drivers/i2c/algos/i2c-algo-oc.c:839: error: redefinition of '__kstrtab_i2c_oc_del_bus'
drivers/i2c/algos/i2c-algo-oc.c:416: error: previous definition of '__kstrtab_i2c_oc_del_bus' was here
drivers/i2c/algos/i2c-algo-oc.c:839: error: redefinition of '__ksymtab_i2c_oc_del_bus'
drivers/i2c/algos/i2c-algo-oc.c:416: error: previous definition of '__ksymtab_i2c_oc_del_bus' was here
drivers/i2c/algos/i2c-algo-oc.c:841: error: redefinition of '__initcall_i2c_algo_oc_init'
drivers/i2c/algos/i2c-algo-oc.c:418: error: previous definition of '__initcall_i2c_algo_oc_init' was here
drivers/i2c/algos/i2c-algo-oc.c:842: error: redefinition of '__exitcall_i2c_algo_oc_exit'
drivers/i2c/algos/i2c-algo-oc.c:419: error: previous definition of '__exitcall_i2c_algo_oc_exit' was here
make: *** Error 1
make: *** Error 2
make: *** Error 2
make: *** Error 2
make: Leaving directory `/home/uclinux/uClinux-dist/linux-2.6.x'
make: *** Error 1
uclinux@colinux:~/uClinux-dist$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think your source is OVER patched. ?
Did you remove old patchby reverser patch ? Check "update the patches" in the UclinuxDist wiki page. Now you should remove old uCLinux-dist dir, and reinstall.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hippo, i am trying it NOW ... standby.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should create a new topic for a new question.
If the thread got too long, it is difficult to read by others.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page