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.

wireless-tools for linux-devkit on AM335x Starter Kit

i am using a AM335x Starter Kit from Sirtex.

output of cpuinfo

Processor : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 718.02
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2

Hardware : am335xevm
Revision : 0000
Serial : 0000000000000000


i am using ti-sdk-am335x-evm-05.05.00.00 linux devkit and the arm-arago-linux-gnueabi-gcc compiler.

for my program to compile i am missing the wireless-tools from http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html in the cross compiler enviroment.

this is my compiler line:

arm-arago-linux-gnueabi-gcc -Wall -o "a.out" "main.c" -liw

how can i import the wireless-tools header for the compiler and build the libiw for the board ?

  • John,

    You can always use -I and -L compiler options to pull in additional headers and libraries.  You should also look at http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK_GCC_Toolchain which covers how to use the environment-setup script for cross compiling libraries.

    Chase

  • i tried what you said before posting. 

    i'm still stuck here:

    main.c includes <iwlib.h>

    iwlib.h is not part of linuxdevkit.

    i would use buildroot, but buildroot cannot provide a compiler for the processor.

    ./arm-arago-linux-gnueabi-gcc -I../wireless_tools.29/ -o AM335x /home/john/files/main.c

    /tmp/ccGDDKWw.o: In function `helpgetAPMacAddress':
    ekahauRTLS.c:(.text+0x2f4): undefined reference to `iw_sockets_open'
    /tmp/ccGDDKWw.o: In function `getTime':
    ekahauRTLS.c:(.text+0x8dc): undefined reference to `clock_gettime'
    /tmp/ccGDDKWw.o: In function `get_available_networks':
    ekahauRTLS.c:(.text+0x9e8): undefined reference to `iw_sockets_open'
    ekahauRTLS.c:(.text+0xb94): undefined reference to `iw_init_event_stream'
    ekahauRTLS.c:(.text+0xba8): undefined reference to `iw_get_range_info'
    ekahauRTLS.c:(.text+0xbc4): undefined reference to `iw_extract_event_stream'
    ekahauRTLS.c:(.text+0xd04): undefined reference to `iw_freq2float'
    ekahauRTLS.c:(.text+0xd3c): undefined reference to `iw_freq2float'
    collect2: ld returned 1 exit status

  • You error seems to be in the ld step.  You should probably provide a -L flag that points to the library as well.

  • thank you for your reply

    first i compiled wireless tools with:

    ./arm-arago-linux-gnueabi-gcc -c -fPIC ../wireless_tools.29/iwlib.c

    ./arm-arago-linux-gnueabi-gcc -shared -o iwlib.so iwlib.o

    the i moved them into the lib directory

    mv iwlib.o iwlib.so ../arm-arago-linux-gnueabi/lib/

    still gcc doesnt see the library:

    ./arm-arago-linux-gnueabi-gcc -I../wireless_tools.29/ -o test /home/john/files/main.c -liw

    /home/john/ti-sdk-am335x-evm-05.05.00.00/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3/../../../../arm-arago-linux-gnueabi/bin/ld: cannot find -liw
    collect2: ld returned 1 exit status 

  • John,

    Are you sure the arm-arago-linux-gnueabi/lib directory is in your LD_LIBRARY_PATH?  You could use the -L option to add this library path to be sure.

    Chase

  • Chase, 

    i tried adding the -L option pointing to the folder containing the .o and .so files. I got errors like cannot find declaration of __iw_struct__. Sorry for the inaccuracy im not in the office right now.

     I think i am missing a thing or two here. For convenience i always used buildroot to take care of the library part. But i cannot get buildroot to produce a compiler  the AM335x accepts. should be a cortex-a8 little endian right ? 

    i would purchase the codesourcery thing, if it would be sure to have library i am missing. I also suspect the linux-devkit provided is missing time.h.

    are there any toolchains ti recommends? i would try them also. 

      

  • TI provides the toolchain inside of the linux-devkit directory.  If you want additional libraries installed you need to build them and install them so your project can find them.  You can also build the wireless-tools package using OpenEmbedded and install the resulting -dev package into the linux-devkit directory as well.

    Aside from that there are always commercial vendors like CodeSourcery as you have mentioned.

    Chase