This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

8148 DCAN

Hello All,

We have been working on TI 8148 EVM board.Following are the steps we have performed to setup DCAN

1) CAN initialization by setting BTR.

2) CAN message object configuration.

We are facing problem initializing Hardware RAM.The corresponding  PDF says we need to be in supervisor mode.How to switch into supervisory mode.

  • Hi Rahul,

    Refer to the below e2e thread:

    e2e.ti.com/.../255684

    BR
    Pavel
  • Hello Pavel,
    I have entered into supervisory mode and changed the registers accordingly.But after running

    $ ./cansend can0 -i 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88

    it shows cansend cammand not found.I tried to install iproute2 but it made my linux to crash.
  • Rahul,

    Are you using EZSDK 5.05.02.00 or else?

    BR
    Pavel
  • Hi Pavel,

    Yes we are using EZSDK 5.05.02.00

    Regards
    Rahul
  • hello Pavel,
    For ip cross compliation i need to make changes into make file but i m unable to find make filr in my already installed iproute 2 folder.I installed iproute2 3.2,and was trying to compile it but it is continously showing me following errors

    rahul@rahul-linux:~/TI/iproute2-3.2.0$ make
    make[1]: Entering directory `/home/rahul/TI/iproute2-3.2.0/lib'
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o ll_map.o ll_map.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o libnetlink.o libnetlink.c
    ar rcs libnetlink.a ll_map.o libnetlink.o
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o utils.o utils.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o rt_names.o rt_names.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o ll_types.o ll_types.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o ll_proto.o ll_proto.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o ll_addr.o ll_addr.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o inet_proto.o inet_proto.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o dnet_ntop.o dnet_ntop.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o dnet_pton.o dnet_pton.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o ipx_ntop.o ipx_ntop.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o ipx_pton.o ipx_pton.c
    ar rcs libutil.a utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o inet_proto.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o
    make[1]: Leaving directory `/home/rahul/TI/iproute2-3.2.0/lib'
    make[1]: Entering directory `/home/rahul/TI/iproute2-3.2.0/ip'
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ip.o ip.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ipaddress.o ipaddress.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ipaddrlabel.o ipaddrlabel.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o iproute.o iproute.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o iprule.o iprule.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ipnetns.o ipnetns.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o rtm_map.o rtm_map.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o iptunnel.o iptunnel.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ip6tunnel.o ip6tunnel.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o tunnel.o tunnel.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ipneigh.o ipneigh.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ipntable.o ipntable.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o iplink.o iplink.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ipmaddr.o ipmaddr.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ipmonitor.o ipmonitor.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ipmroute.o ipmroute.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ipprefix.o ipprefix.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o iptuntap.o iptuntap.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ipxfrm.o ipxfrm.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o xfrm_state.o xfrm_state.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o xfrm_policy.o xfrm_policy.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o xfrm_monitor.o xfrm_monitor.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o iplink_vlan.o iplink_vlan.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o link_veth.o link_veth.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o link_gre.o link_gre.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o iplink_can.o iplink_can.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o iplink_macvlan.o iplink_macvlan.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o iplink_macvtap.o iplink_macvtap.c
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DHAVE_SETNS -c -o ipl2tp.o ipl2tp.c
    ipl2tp.c:26:29: fatal error: netlink/netlink.h: No such file or directory
    compilation terminated.
    make[1]: *** [ipl2tp.o] Error 1
    make[1]: Leaving directory `/home/rahul/TI/iproute2-3.2.0/ip'
    make: *** [all] Error 2

    its strange as netlink.h file is present in the directory.

    Regards
    Rahul
  • Rahul,

    It seems to me that you are not using the arm-none-linux-gnueabi-gcc (CodeSourcery arm-2009q1 toolchain) to build the dcan package? If true, please have a try with this toolchain.

    BR
    Pavel
  • Hello Pavel,

    I am using arm-none-linux-gnueabi-gcc.
    I have succesfully intalled code sourcery arm-2009q1 toolchain

    Thanks & Regards
    Rahul
  • Rahul Sharma71 said:
    For ip cross compliation i need to make changes into make file but i m unable to find make filr in my already installed iproute 2 folder.

    Download iproute2-2.6.39.tar.gz from the below link, extract and the Makefile is there: iproute2-2.6.39/Makefile

    pkgs.fedoraproject.org/repo/pkgs/iproute/iproute2-2.6.39.tar.gz/8a3b6bc77c2ecf752284aa4a6fc630a6/iproute2-2.6.39.tar.gz

    BR
    Pavel

  • i downloaded iprote2-3.2.0 and made changes to makefile.Is this particular version have some compatibility issue.In which directory i m supposed to install iproute2.

    Thanks & Regards
    Rahul
  • Hi Rahul,

    As this version is not tested with DM814x device, I can not advice regarding your compatibility issues. Report problems (or enhancements) to the netdev@vger.kernel.org mailing list (as noted in the below links):

    lwn.net/.../

    www.linuxfromscratch.org/.../iproute2.html

    BR
    Pavel
  • Rahul Sharma71 said:
    rahul@rahul-linux:~/TI/iproute2-3.2.0$ make
    make[1]: Entering directory `/home/rahul/TI/iproute2-3.2.0/lib'
    cc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o ll_map.o ll_map.c

    First make sure you are using the CodeSourcery toolchain, on my side I have:

    arm-none-linux-gnueabi-gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC   -c -o ll_map.o ll_map.c

    Rahul Sharma71 said:
    ipl2tp.c:26:29: fatal error: netlink/netlink.h: No such file or directory
    compilation terminated.

    This is fixed with:

    sed -i -e '/netlink\//d' ip/ipl2tp.c

    But then you will get new error, caused by the fact that CodeSourcery toolchain use glibc version 2.8, while you will need gcc arm compiler with glibc >= 2.14

    Updating the CodeSourcery toolchain glibc from 2.8 to 2.14 is not an easy task, thus I would recommend you to switch to iproute2-2.6.39. With that version, I was able
    to create the ip executable with the default CodeSourcery toolchain.

    BR

    Pavel

     

  • Hello Pavel,

    You are right,about iproute2 version.I installed iproute2 2.6.39 in /usr/src/.My codesoucery toolchain and targetfs are in /home/rahul/TI/.

    I make iprote2 without any error but as you said while make of iproute2 i m unable to see

    arm-none-linux-gnueabi-gcc

    I also installed codesourcery tool chain without any error.Can you tell me possible reason,m i doing something wrong.

    Thanks in advance

    Regards
    Rahul
  • Do i need to keep everything in same directory such as codesourcery tool chain,targetfs,canutils,libsocketcan.
  • Hello Pavel,

    I solved that codesourcery issue.Now i can see it in my log as follows

    arm-none-linux-gnueabi-gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -fPIC -c -o ll_map.o ll_map.c

    It was related to PATH.

    But do i need to put all folders in same directory is still the doubt i have.

    Thanks
    Rahul
  • Rahul Sharma71 said:
    But do i need to put all folders in same directory is still the doubt i have.

    No you don't. You just need to set the environment variables (like TOOL_CHAIN_PATH, FILESYS_PATH, GNUEABI, CROSS_COMPILE_PREFIX, etc) correctly.

    BR
    Pavel

  • Also set as below:

    export GNUEABI=arm-none-linux-gnueabi (not arm-arago-linux-gnueabi)
  • Hello Pavel,

    thanks for prompt relies.

    I changed it to none instead of arago.

    i cross compiled libsocket can without error,but while i configure canutils i get following error

    checking for libsocketcan_nl... no
    configure: error: *** libsocketcan-nl version above 0.0.1 not found on your system

    I searched for this but i didnt find anything.

    I am sending you the environment variables i set and log that i get after running ./configure for your reference


    *****************************************Environment Variable***********************************************


    TOOL_CHAIN_PATH->>>>/home/rahul/TI/CodeSourcery/Sourcery_G++_Lite

    FILESYS_PATH ->>>>/home/rahul/TI/targetfs

    LIBSOCKETCAN_PATH->>/home/rahul/TI/libsocketcan-0.0.8

    PWD ->>>>/home/rahul/TI/libsocketcan-0.0.8

    INSTALL_PATH ->>>>PWD

    *****************************************************************************************************************

    *****************************************Log of ./configure for libsocketcan-0.0.8*******************************


    rahul@rahul-linux:~/TI/libsocketcan-0.0.8$ ./configure --host=arm-none-linux --prefix=$PREFIX --enable-debug
    configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... arm-none-linux-gnu
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for arm-none-linux-gcc... arm-none-linux-gnueabi-gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... yes
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether arm-none-linux-gnueabi-gcc accepts -g... yes
    checking for arm-none-linux-gnueabi-gcc option to accept ISO C89... none needed
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ld used by arm-none-linux-gnueabi-gcc... arm-none-linux-gnueabi-ld
    checking if the linker (arm-none-linux-gnueabi-ld) is GNU ld... yes
    checking for arm-none-linux-gnueabi-ld option to reload object files... -r
    checking for BSD-compatible nm... arm-none-linux-gnueabi-nm
    checking whether ln -s works... yes
    checking how to recognize dependent libraries... pass_all
    checking how to run the C preprocessor... arm-none-linux-gnueabi-gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking dlfcn.h usability... yes
    checking dlfcn.h presence... yes
    checking for dlfcn.h... yes
    checking whether we are using the GNU C++ compiler... yes
    checking whether arm-none-linux-gnueabi-c++ accepts -g... yes
    checking how to run the C++ preprocessor... arm-none-linux-gnueabi-c++ -E
    checking for arm-none-linux-g77... no
    checking for arm-none-linux-xlf... no
    checking for arm-none-linux-f77... no
    checking for arm-none-linux-frt... no
    checking for arm-none-linux-pgf77... no
    checking for arm-none-linux-cf77... no
    checking for arm-none-linux-fort77... no
    checking for arm-none-linux-fl32... no
    checking for arm-none-linux-af77... no
    checking for arm-none-linux-xlf90... no
    checking for arm-none-linux-f90... no
    checking for arm-none-linux-pgf90... no
    checking for arm-none-linux-pghpf... no
    checking for arm-none-linux-epcf90... no
    checking for arm-none-linux-gfortran... no
    checking for arm-none-linux-g95... no
    checking for arm-none-linux-xlf95... no
    checking for arm-none-linux-f95... no
    checking for arm-none-linux-fort... no
    checking for arm-none-linux-ifort... no
    checking for arm-none-linux-ifc... no
    checking for arm-none-linux-efc... no
    checking for arm-none-linux-pgf95... no
    checking for arm-none-linux-lf95... no
    checking for arm-none-linux-ftn... no
    checking for g77... no
    checking for xlf... no
    checking for f77... no
    checking for frt... no
    checking for pgf77... no
    checking for cf77... no
    checking for fort77... no
    checking for fl32... no
    checking for af77... no
    checking for xlf90... no
    checking for f90... no
    checking for pgf90... no
    checking for pghpf... no
    checking for epcf90... no
    checking for gfortran... no
    checking for g95... no
    checking for xlf95... no
    checking for f95... no
    checking for fort... no
    checking for ifort... no
    checking for ifc... no
    checking for efc... no
    checking for pgf95... no
    checking for lf95... no
    checking for ftn... no
    checking whether we are using the GNU Fortran 77 compiler... no
    checking whether accepts -g... no
    checking the maximum length of command line arguments... 1572864
    checking command to parse arm-none-linux-gnueabi-nm output from arm-none-linux-gnueabi-gcc object... ok
    checking for objdir... .libs
    checking for arm-none-linux-ar... arm-none-linux-gnueabi-ar
    checking for arm-none-linux-ranlib... arm-none-linux-gnueabi-ranlib
    checking for arm-none-linux-strip... no
    checking for strip... strip
    configure: WARNING: using cross tools not prefixed with host triplet
    checking if arm-none-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions... no
    checking for arm-none-linux-gnueabi-gcc option to produce PIC... -fPIC
    checking if arm-none-linux-gnueabi-gcc PIC flag -fPIC works... yes
    checking if arm-none-linux-gnueabi-gcc static flag -static works... yes
    checking if arm-none-linux-gnueabi-gcc supports -c -o file.o... yes
    checking whether the arm-none-linux-gnueabi-gcc linker (arm-none-linux-gnueabi-ld) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    configure: creating libtool
    appending configuration tag "CXX" to libtool
    checking for ld used by arm-none-linux-gnueabi-c++... arm-none-linux-gnueabi-ld
    checking if the linker (arm-none-linux-gnueabi-ld) is GNU ld... yes
    checking whether the arm-none-linux-gnueabi-c++ linker (arm-none-linux-gnueabi-ld) supports shared libraries... yes
    checking for arm-none-linux-gnueabi-c++ option to produce PIC... -fPIC
    checking if arm-none-linux-gnueabi-c++ PIC flag -fPIC works... yes
    checking if arm-none-linux-gnueabi-c++ static flag -static works... yes
    checking if arm-none-linux-gnueabi-c++ supports -c -o file.o... yes
    checking whether the arm-none-linux-gnueabi-c++ linker (arm-none-linux-gnueabi-ld) supports shared libraries... yes
    checking dynamic linker characteristics... GNU/Linux ld.so
    (cached) (cached) checking how to hardcode library paths into programs... immediate
    appending configuration tag "F77" to libtool
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for arm-none-linux-strip... strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking for style of include used by make... GNU
    checking dependency style of arm-none-linux-gnueabi-gcc... gcc3
    checking dependency style of arm-none-linux-gnueabi-c++... gcc3
    checking for dirent.h that defines DIR... yes
    checking for library containing opendir... none required
    checking for ANSI C header files... (cached) yes
    checking for sys/wait.h that is POSIX.1 compatible... yes
    checking arpa/inet.h usability... yes
    checking arpa/inet.h presence... yes
    checking for arpa/inet.h... yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking netdb.h usability... yes
    checking netdb.h presence... yes
    checking for netdb.h... yes
    checking netinet/in.h usability... yes
    checking netinet/in.h presence... yes
    checking for netinet/in.h... yes
    checking stddef.h usability... yes
    checking stddef.h presence... yes
    checking for stddef.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking sys/param.h usability... yes
    checking sys/param.h presence... yes
    checking for sys/param.h... yes
    checking sys/socket.h usability... yes
    checking sys/socket.h presence... yes
    checking for sys/socket.h... yes
    checking sys/time.h usability... yes
    checking sys/time.h presence... yes
    checking for sys/time.h... yes
    checking sys/un.h usability... yes
    checking sys/un.h presence... yes
    checking for sys/un.h... yes
    checking for unistd.h... (cached) yes
    checking utime.h usability... yes
    checking utime.h presence... yes
    checking for utime.h... yes
    checking net/if.h usability... yes
    checking net/if.h presence... yes
    checking for net/if.h... yes
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking for size_t... yes
    checking whether time.h and sys/time.h may both be included... yes
    checking for working memcmp... no
    checking return type of signal handlers... void
    checking whether lstat dereferences a symlink specified with a trailing slash... no
    checking whether stat accepts an empty string... yes
    checking for utime.h... (cached) yes
    checking whether utime accepts a null argument... guessing yes
    checking for gethostbyaddr... yes
    checking for gethostbyname... yes
    checking for gethostname... yes
    checking for gettimeofday... yes
    checking for memset... yes
    checking for mkdir... yes
    checking for socket... yes
    checking for utime... yes
    checking whether to enable debugging... yes
    configure: creating ./config.status
    config.status: creating GNUmakefile
    config.status: creating config/libsocketcan.pc
    config.status: creating config/GNUmakefile
    config.status: creating include/GNUmakefile
    config.status: creating src/GNUmakefile
    config.status: creating tests/GNUmakefile
    config.status: creating include/libsocketcan_config.h
    config.status: include/libsocketcan_config.h is unchanged
    config.status: executing depfiles commands





    ******************************************************************************************************************

    ****************************************************log of ./configure for canutils*********************************************


    rahul@rahul-linux:~/TI/canutils-4.0.0$ ./configure --host=arm-none-linux --prefix=$PREFIX --enable-debug
    configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... arm-none-linux-gnu
    checking for arm-none-linux-gcc... arm-none-linux-gnueabi-gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... yes
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether arm-none-linux-gnueabi-gcc accepts -g... yes
    checking for arm-none-linux-gnueabi-gcc option to accept ISO C89... none needed
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ld used by arm-none-linux-gnueabi-gcc... arm-none-linux-gnueabi-ld
    checking if the linker (arm-none-linux-gnueabi-ld) is GNU ld... yes
    checking for arm-none-linux-gnueabi-ld option to reload object files... -r
    checking for BSD-compatible nm... arm-none-linux-gnueabi-nm
    checking whether ln -s works... yes
    checking how to recognize dependent libraries... pass_all
    checking how to run the C preprocessor... arm-none-linux-gnueabi-gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking dlfcn.h usability... yes
    checking dlfcn.h presence... yes
    checking for dlfcn.h... yes
    checking whether we are using the GNU C++ compiler... yes
    checking whether arm-none-linux-gnueabi-c++ accepts -g... yes
    checking how to run the C++ preprocessor... arm-none-linux-gnueabi-c++ -E
    checking for arm-none-linux-g77... no
    checking for arm-none-linux-xlf... no
    checking for arm-none-linux-f77... no
    checking for arm-none-linux-frt... no
    checking for arm-none-linux-pgf77... no
    checking for arm-none-linux-cf77... no
    checking for arm-none-linux-fort77... no
    checking for arm-none-linux-fl32... no
    checking for arm-none-linux-af77... no
    checking for arm-none-linux-xlf90... no
    checking for arm-none-linux-f90... no
    checking for arm-none-linux-pgf90... no
    checking for arm-none-linux-pghpf... no
    checking for arm-none-linux-epcf90... no
    checking for arm-none-linux-gfortran... no
    checking for arm-none-linux-g95... no
    checking for arm-none-linux-xlf95... no
    checking for arm-none-linux-f95... no
    checking for arm-none-linux-fort... no
    checking for arm-none-linux-ifort... no
    checking for arm-none-linux-ifc... no
    checking for arm-none-linux-efc... no
    checking for arm-none-linux-pgf95... no
    checking for arm-none-linux-lf95... no
    checking for arm-none-linux-ftn... no
    checking for g77... no
    checking for xlf... no
    checking for f77... no
    checking for frt... no
    checking for pgf77... no
    checking for cf77... no
    checking for fort77... no
    checking for fl32... no
    checking for af77... no
    checking for xlf90... no
    checking for f90... no
    checking for pgf90... no
    checking for pghpf... no
    checking for epcf90... no
    checking for gfortran... no
    checking for g95... no
    checking for xlf95... no
    checking for f95... no
    checking for fort... no
    checking for ifort... no
    checking for ifc... no
    checking for efc... no
    checking for pgf95... no
    checking for lf95... no
    checking for ftn... no
    checking whether we are using the GNU Fortran 77 compiler... no
    checking whether accepts -g... no
    checking the maximum length of command line arguments... 1572864
    checking command to parse arm-none-linux-gnueabi-nm output from arm-none-linux-gnueabi-gcc object... ok
    checking for objdir... .libs
    checking for arm-none-linux-ar... arm-none-linux-gnueabi-ar
    checking for arm-none-linux-ranlib... arm-none-linux-gnueabi-ranlib
    checking for arm-none-linux-strip... no
    checking for strip... strip
    configure: WARNING: In the future, Autoconf will not detect cross-tools
    whose name does not start with the host triplet. If you think this
    configuration is useful to you, please write to autoconf@gnu.org.
    checking if arm-none-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions... no
    checking for arm-none-linux-gnueabi-gcc option to produce PIC... -fPIC
    checking if arm-none-linux-gnueabi-gcc PIC flag -fPIC works... yes
    checking if arm-none-linux-gnueabi-gcc static flag -static works... yes
    checking if arm-none-linux-gnueabi-gcc supports -c -o file.o... yes
    checking whether the arm-none-linux-gnueabi-gcc linker (arm-none-linux-gnueabi-ld) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    configure: creating libtool
    appending configuration tag "CXX" to libtool
    checking for ld used by arm-none-linux-gnueabi-c++... arm-none-linux-gnueabi-ld
    checking if the linker (arm-none-linux-gnueabi-ld) is GNU ld... yes
    checking whether the arm-none-linux-gnueabi-c++ linker (arm-none-linux-gnueabi-ld) supports shared libraries... yes
    checking for arm-none-linux-gnueabi-c++ option to produce PIC... -fPIC
    checking if arm-none-linux-gnueabi-c++ PIC flag -fPIC works... yes
    checking if arm-none-linux-gnueabi-c++ static flag -static works... yes
    checking if arm-none-linux-gnueabi-c++ supports -c -o file.o... yes
    checking whether the arm-none-linux-gnueabi-c++ linker (arm-none-linux-gnueabi-ld) supports shared libraries... yes
    checking dynamic linker characteristics... GNU/Linux ld.so
    (cached) (cached) checking how to hardcode library paths into programs... immediate
    appending configuration tag "F77" to libtool
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking for style of include used by make... GNU
    checking for arm-none-linux-strip... strip
    checking dependency style of arm-none-linux-gnueabi-gcc... gcc3
    checking dependency style of arm-none-linux-gnueabi-c++... gcc3
    checking for ANSI C header files... (cached) yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking sys/ioctl.h usability... yes
    checking sys/ioctl.h presence... yes
    checking for sys/ioctl.h... yes
    checking sys/socket.h usability... yes
    checking sys/socket.h presence... yes
    checking for sys/socket.h... yes
    checking for an ANSI C-conforming const... yes
    checking for size_t... yes
    checking for ssize_t... yes
    checking for uint32_t... yes
    checking whether arm-none-linux-gnueabi-gcc needs -traditional... no
    checking return type of signal handlers... void
    checking whether lstat dereferences a symlink specified with a trailing slash... no
    checking whether stat accepts an empty string... yes
    checking for socket... yes
    checking for strchr... yes
    checking for strtoul... yes
    checking for arm-none-linux-pkg-config... no
    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for libsocketcan_nl... no
    configure: error: *** libsocketcan-nl version above 0.0.1 not found on your system
    rahul@rahul-linux:~/TI/canutils-4.0.0$
  • Rahul,

    I am not sure I understand your request here. Till now you had issues to cross compile iproute2, but now you are making a sudden jump to other issue? Are you fine now with iproute2 and libsocketcan? And you have issues to cross compile canutils?

    BR
    Pavel
  • Hello Pavel,

    I cross compiled iproute2 and I can see ip.iprote2 in /sbin.....so I think ip is cross compiled properly.correct me if I m wrong.
    Next step that is cross compiling libsocketcan I followed steps and I found no error in doing so.
    While for next step I.e canutils I found error and I have mentioned it previously.
    Thanks
    Rahul
  • Rahul Sharma71 said:
    I cross compiled iproute2 and I can see ip.iprote2 in /sbin.....so I think ip is cross compiled properly.correct me if I m wrong.

    After "make" and "make install" commands you should see ip executable in $FILESYS_PATH/usr/sbin (on my side this is /home/users/pbotev/workdir/dcan/destdir/usr/sbin). Then you should rename ip to ip.iproute2 and move it to rootfs/sbin (on my side this is /home/users/pbotev/targetfs/sbin as I am using network rootfs).

    BR
    Pavel

  • Rahul Sharma71 said:
    PWD ->>>>/home/rahul/TI/libsocketcan-0.0.8

    INSTALL_PATH ->>>>PWD

    INSTALL_PATH should be /home/rahul/TI/libsocketcan-0.0.8/install

    LIBSOCKETCAN_PATH should be /home/rahul/TI/libsocketcan-0.0.8

    Example INSTALL_PATH is PWD/install (present working directory is LIBSOCKETCAN_PATH). Note, create "install" directory under LIBSOCKETCAN_PATH.

    Rahul Sharma71 said:
    rahul@rahul-linux:~/TI/libsocketcan-0.0.8$ ./configure --host=arm-none-linux --prefix=$PREFIX --enable-debug

    After the above step, you should do "make" and "make install"

    Rahul Sharma71 said:
    rahul@rahul-linux:~/TI/canutils-4.0.0$ ./configure

    Please provide more details how exactly you get this 4.0.0 version of the canutils?

    BR
    Pavel

  • Hello Pavel,

    I have upadted my canutils to 4.0.6.I have downloaded 4.0.0 from below link

    www.pengutronix.de/.../

    For your reference I have set environment variables as follows:-

    TOOL_CHAIN_PATH=/home/rahul/TI/CodeSourcery/Sourcery_G++_Lite
    INSTALL_PATH=/home/rahul/TI/libsocketcan-0.0.8/install
    LIBSOCKETCAN_PATH=/home/rahul/TI/libsocketcan-0.0.8
    FILESYS_PATH=/home/rahul/TI/targetfs/usr
    PKG_CONFIG_PATH=/home/rahul/TI/libsocketcan-0.0.8/config


    I have followed instructions from you and now i am getting following error after i run make command

    rahul@rahul-linux:~/TI/canutils-4.0.6$ make
    Making all in include
    make[1]: Entering directory `/home/rahul/TI/canutils-4.0.6/include'
    make all-am
    make[2]: Entering directory `/home/rahul/TI/canutils-4.0.6/include'
    make[2]: Leaving directory `/home/rahul/TI/canutils-4.0.6/include'
    make[1]: Leaving directory `/home/rahul/TI/canutils-4.0.6/include'
    Making all in config
    make[1]: Entering directory `/home/rahul/TI/canutils-4.0.6/config'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/rahul/TI/canutils-4.0.6/config'
    Making all in src
    make[1]: Entering directory `/home/rahul/TI/canutils-4.0.6/src'
    arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../include -I/home/rahul/TI/libsocketcan-0.0.8/install/include -I../include -I../include -DPF_CAN=29 -DAF_CAN=PF_CAN -Wall -g -Werror -g -O1 -MT canconfig.o -MD -MP -MF .deps/canconfig.Tpo -c -o canconfig.o canconfig.c
    canconfig.c:34:26: error: libsocketcan.h: No such file or directory
    canconfig.c:41: error: 'CAN_STATE_MAX' undeclared here (not in a function)
    canconfig.c: In function 'do_show_bitrate':
    canconfig.c:109: error: storage size of 'bt' isn't known
    cc1: warnings being treated as errors
    canconfig.c:111: error: implicit declaration of function 'can_get_bittiming'
    canconfig.c:109: error: unused variable 'bt'
    canconfig.c: In function 'do_set_bitrate':
    canconfig.c:123: error: '__u32' undeclared (first use in this function)
    canconfig.c:123: error: (Each undeclared identifier is reported only once
    canconfig.c:123: error: for each function it appears in.)
    canconfig.c:123: error: expected ';' before 'bitrate'
    canconfig.c:124: error: expected ';' before 'sample_point'
    canconfig.c:130: error: 'bitrate' undeclared (first use in this function)
    canconfig.c:130: error: expected ';' before 'strtoul'
    canconfig.c:133: error: 'sample_point' undeclared (first use in this function)
    canconfig.c:139: error: implicit declaration of function 'can_set_bitrate_samplepoint'
    canconfig.c:141: error: implicit declaration of function 'can_set_bitrate'
    canconfig.c: In function 'do_set_bittiming':
    canconfig.c:167: error: storage size of 'bt' isn't known
    canconfig.c:175: error: '__u32' undeclared (first use in this function)
    canconfig.c:175: error: expected ';' before 'strtoul'
    canconfig.c:181: error: expected ';' before 'strtoul'
    canconfig.c:187: error: expected ';' before 'strtoul'
    canconfig.c:194: error: expected ';' before 'strtoul'
    canconfig.c:201: error: expected ';' before 'strtoul'
    canconfig.c:214: error: implicit declaration of function 'can_set_bittiming'
    canconfig.c:167: error: unused variable 'bt'
    canconfig.c: In function 'do_show_bittiming':
    canconfig.c:222: error: storage size of 'bt' isn't known
    canconfig.c:222: error: unused variable 'bt'
    canconfig.c: In function 'do_show_bittiming_const':
    canconfig.c:253: error: storage size of 'btc' isn't known
    canconfig.c:255: error: implicit declaration of function 'can_get_bittiming_const'
    canconfig.c:253: error: unused variable 'btc'
    canconfig.c: In function 'do_show_state':
    canconfig.c:277: error: implicit declaration of function 'can_get_state'
    canconfig.c: In function 'do_show_clockfreq':
    canconfig.c:295: error: storage size of 'clock' isn't known
    canconfig.c:297: error: invalid application of 'sizeof' to incomplete type 'struct can_clock'
    canconfig.c:298: error: implicit declaration of function 'can_get_clock'
    canconfig.c:295: error: unused variable 'clock'
    canconfig.c: In function 'do_restart':
    canconfig.c:314: error: implicit declaration of function 'can_do_restart'
    canconfig.c: In function 'do_start':
    canconfig.c:329: error: implicit declaration of function 'can_do_start'
    canconfig.c: In function 'do_stop':
    canconfig.c:344: error: implicit declaration of function 'can_do_stop'
    canconfig.c: At top level:
    canconfig.c:357: error: expected ')' before 'cm_flags'
    canconfig.c: In function 'do_show_ctrlmode':
    canconfig.c:371: error: storage size of 'cm' isn't known
    canconfig.c:373: error: implicit declaration of function 'can_get_ctrlmode'
    canconfig.c:378: error: implicit declaration of function 'print_ctrlmode'
    canconfig.c:371: error: unused variable 'cm'
    canconfig.c: At top level:
    canconfig.c:384: error: expected declaration specifiers or '...' before '__u32'
    canconfig.c:384: error: 'struct can_ctrlmode' declared inside parameter list
    canconfig.c:384: error: its scope is only this definition or declaration, which is probably not what you want
    canconfig.c: In function 'set_ctrlmode':
    canconfig.c:387: error: dereferencing pointer to incomplete type
    canconfig.c:387: error: 'flags' undeclared (first use in this function)
    canconfig.c:394: error: dereferencing pointer to incomplete type
    canconfig.c: In function 'do_set_ctrlmode':
    canconfig.c:399: error: storage size of 'cm' isn't known
    canconfig.c:407: error: 'CAN_CTRLMODE_LOOPBACK' undeclared (first use in this function)
    canconfig.c:407: error: too many arguments to function 'set_ctrlmode'
    canconfig.c:411: error: 'CAN_CTRLMODE_LISTENONLY' undeclared (first use in this function)
    canconfig.c:411: error: too many arguments to function 'set_ctrlmode'
    canconfig.c:415: error: 'CAN_CTRLMODE_3_SAMPLES' undeclared (first use in this function)
    canconfig.c:415: error: too many arguments to function 'set_ctrlmode'
    canconfig.c:419: error: 'CAN_CTRLMODE_ONE_SHOT' undeclared (first use in this function)
    canconfig.c:419: error: too many arguments to function 'set_ctrlmode'
    canconfig.c:423: error: 'CAN_CTRLMODE_BERR_REPORTING' undeclared (first use in this function)
    canconfig.c:423: error: too many arguments to function 'set_ctrlmode'
    canconfig.c:429: error: implicit declaration of function 'can_set_ctrlmode'
    canconfig.c:399: error: unused variable 'cm'
    canconfig.c: In function 'do_show_restart_ms':
    canconfig.c:452: error: '__u32' undeclared (first use in this function)
    canconfig.c:452: error: expected ';' before 'restart_ms'
    canconfig.c:454: error: implicit declaration of function 'can_get_restart_ms'
    canconfig.c:454: error: 'restart_ms' undeclared (first use in this function)
    canconfig.c: In function 'do_set_restart_ms':
    canconfig.c:464: error: implicit declaration of function 'can_set_restart_ms'
    canconfig.c:465: error: '__u32' undeclared (first use in this function)
    canconfig.c:465: error: expected ')' before 'strtoul'
    canconfig.c: In function 'do_show_berr_counter':
    canconfig.c:489: error: storage size of 'bc' isn't known
    canconfig.c:490: error: storage size of 'cm' isn't known
    canconfig.c:497: error: 'CAN_CTRLMODE_BERR_REPORTING' undeclared (first use in this function)
    canconfig.c:498: error: invalid application of 'sizeof' to incomplete type 'struct can_berr_counter'
    canconfig.c:500: error: implicit declaration of function 'can_get_berr_counter'
    canconfig.c:490: error: unused variable 'cm'
    canconfig.c:489: error: unused variable 'bc'
    make[1]: *** [canconfig.o] Error 1
    make[1]: Leaving directory `/home/rahul/TI/canutils-4.0.6/src'
    make: *** [all-recursive] Error 1
    rahul@rahul-linux:~/TI/canutils-4.0.6$

    Regards
    Rahul
  • Rahul Sharma71 said:
    canconfig.c:34:26: error: libsocketcan.h: No such file or directory

    Adjust the below environments like that:

    export LIBSOCKETCAN_INSTALL_DIR=/home/rahul/TI/libsocketcan-0.0.8

    export LDFLAGS="-Wl,--rpath -Wl,$LIBSOCKETCAN_INSTALL_DIR/lib"

    export INCLUDES="-I$LIBSOCKETCAN_INSTALL_DIR/include"

    BR
    Pavel

  • Hello Pavel,

    I have done this but no change.
  • rahul@rahul-linux:~/TI/canutils-4.0.6$ export LIBSOCKETCAN_INSTALL_DIR=/home/rahul/TI/libsocketcan-0.0.8
    rahul@rahul-linux:~/TI/canutils-4.0.6$
    rahul@rahul-linux:~/TI/canutils-4.0.6$ export LDFLAGS="-Wl,--rpath -Wl,$LIBSOCKETCAN_INSTALL_DIR/lib"
    rahul@rahul-linux:~/TI/canutils-4.0.6$
    rahul@rahul-linux:~/TI/canutils-4.0.6$ export INCLUDES="-I$LIBSOCKETCAN_INSTALL_DIR/include"
    rahul@rahul-linux:~/TI/canutils-4.0.6$
    rahul@rahul-linux:~/TI/canutils-4.0.6$ ./configure --host=arm-none-linux --prefix=$PREFIX --enable-debug
    configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... arm-none-linux-gnu
    checking for arm-none-linux-gcc... arm-none-linux-gnueabi-gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... yes
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether arm-none-linux-gnueabi-gcc accepts -g... yes
    checking for arm-none-linux-gnueabi-gcc option to accept ISO C89... none needed
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by arm-none-linux-gnueabi-gcc... arm-none-linux-gnueabi-ld
    checking if the linker (arm-none-linux-gnueabi-ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... arm-none-linux-gnueabi-nm
    checking the name lister (arm-none-linux-gnueabi-nm) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking for arm-none-linux-gnueabi-ld option to reload object files... -r
    checking for arm-none-linux-objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for arm-none-linux-ar... arm-none-linux-gnueabi-ar
    checking for arm-none-linux-strip... no
    checking for strip... strip
    configure: WARNING: using cross tools not prefixed with host triplet
    checking for arm-none-linux-ranlib... arm-none-linux-gnueabi-ranlib
    checking command to parse arm-none-linux-gnueabi-nm output from arm-none-linux-gnueabi-gcc object... ok
    checking how to run the C preprocessor... arm-none-linux-gnueabi-gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if arm-none-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions... no
    checking for arm-none-linux-gnueabi-gcc option to produce PIC... -fPIC -DPIC
    checking if arm-none-linux-gnueabi-gcc PIC flag -fPIC -DPIC works... yes
    checking if arm-none-linux-gnueabi-gcc static flag -static works... yes
    checking if arm-none-linux-gnueabi-gcc supports -c -o file.o... yes
    checking if arm-none-linux-gnueabi-gcc supports -c -o file.o... (cached) yes
    checking whether the arm-none-linux-gnueabi-gcc linker (arm-none-linux-gnueabi-ld) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for arm-none-linux-strip... strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking for style of include used by make... GNU
    checking dependency style of arm-none-linux-gnueabi-gcc... gcc3
    checking for ANSI C header files... (cached) yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking sys/ioctl.h usability... yes
    checking sys/ioctl.h presence... yes
    checking for sys/ioctl.h... yes
    checking sys/socket.h usability... yes
    checking sys/socket.h presence... yes
    checking for sys/socket.h... yes
    checking for an ANSI C-conforming const... yes
    checking for size_t... yes
    checking for ssize_t... yes
    checking for uint32_t... yes
    checking whether arm-none-linux-gnueabi-gcc needs -traditional... no
    checking return type of signal handlers... void
    checking whether lstat correctly handles trailing slash... no
    checking whether stat accepts an empty string... yes
    checking for socket... yes
    checking for strchr... yes
    checking for strtoul... yes
    checking for arm-none-linux-pkg-config... no
    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for libsocketcan... yes
    checking whether to enable debugging... yes
    configure: creating ./config.status
    config.status: creating GNUmakefile
    config.status: creating config/canutils.pc
    config.status: creating config/GNUmakefile
    config.status: creating include/GNUmakefile
    config.status: creating src/GNUmakefile
    config.status: creating man/GNUmakefile
    config.status: creating include/can_config.h
    config.status: include/can_config.h is unchanged
    config.status: executing libtool commands
    config.status: executing depfiles commands
    rahul@rahul-linux:~/TI/canutils-4.0.6$ make
    Making all in include
    make[1]: Entering directory `/home/rahul/TI/canutils-4.0.6/include'
    make all-am
    make[2]: Entering directory `/home/rahul/TI/canutils-4.0.6/include'
    make[2]: Leaving directory `/home/rahul/TI/canutils-4.0.6/include'
    make[1]: Leaving directory `/home/rahul/TI/canutils-4.0.6/include'
    Making all in config
    make[1]: Entering directory `/home/rahul/TI/canutils-4.0.6/config'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/rahul/TI/canutils-4.0.6/config'
    Making all in src
    make[1]: Entering directory `/home/rahul/TI/canutils-4.0.6/src'
    arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../include -I/home/rahul/TI/libsocketcan-0.0.8/include -I../include -I../include -DPF_CAN=29 -DAF_CAN=PF_CAN -Wall -g -Werror -g -O1 -MT canconfig.o -MD -MP -MF .deps/canconfig.Tpo -c -o canconfig.o canconfig.c
    mv -f .deps/canconfig.Tpo .deps/canconfig.Po
    /bin/sh ../libtool --tag=CC --mode=link arm-none-linux-gnueabi-gcc -Wall -g -Werror -g -O1 -Wl,--rpath -Wl,/home/rahul/TI/libsocketcan-0.0.8/lib -o canconfig canconfig.o -L/home/rahul/TI/libsocketcan-0.0.8/install/lib -lsocketcan
    libtool: link: arm-none-linux-gnueabi-gcc -Wall -g -Werror -g -O1 -Wl,--rpath -Wl,/home/rahul/TI/libsocketcan-0.0.8/lib -o canconfig canconfig.o -L/home/rahul/TI/libsocketcan-0.0.8/install/lib -lsocketcan
    /home/rahul/TI/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lsocketcan
    collect2: ld returned 1 exit status
    make[1]: *** [canconfig] Error 1
    make[1]: Leaving directory `/home/rahul/TI/canutils-4.0.6/src'
    make: *** [all-recursive] Error 1
    rahul@rahul-linux:~/TI/canutils-4.0.6$
  • Rahul Sharma71 said:
    I have done this but no change.

    What do you mean by "no change"? I see the previous error message was "canconfig.c:34:26: error: libsocketcan.h: No such file or directory". Now this error seems to be fixed and the make process continue further to "cannot find -lsocketcan". Can you explain in details what you mean by "no change"?

    BR
    Pavel

  • actually at first i change only those variables you mentioned to me,and run make command.I get no change in error and sent you message.
    Then I export all variables again including changes you mentioned and I sent you log that I got.Thats why I sent you message again
  • Hello Pavel,

    I have cross compiled canutils utility without any error.Now when i run command

    ip link set can0 type can bitrate 50000 triple-sampling on

    i get cannot find can0 device.

    Also when i run ifconfig it it shows eth0 but it does not show can0.
    Do i need to connect my board when i run these commands??

    Regards
    Rahul

  • Hi Rahul,

    Rahul Sharma71 said:
    I have cross compiled canutils utility without any error.

    Can you provide more details how you fix the below error?

    "arm-none-linux-gnueabi/bin/ld: cannot find -lsocketcan"

    Rahul Sharma71 said:
    Now when i run command

    ip link set can0 type can bitrate 50000 triple-sampling on

    i get cannot find can0 device.

    Can you provide the full console log for analysis?

    BR
    Pavel

  • hello Pavel,

    We have configured DCAN on sys/bios.

    Thanks for your support.

    Regards
    Rahul