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.

Howto Build spidev_test.c

Yes, this is a stupid question, it should be obvious, but it isn't to me.

Goto directory:   ./linux-03.20.00.13/Documentation/spi

There's a make file, but the #defines don't relate to anything I can find in the root .config file.

I'm using code sourcery's ./arm-none-linux-gnueabi-gcc

Is there a simple gcc build command I can pass in.  I started working on my own but the include paths started getting out of control.

Wade

 

  • Answer: try using the right compiler.

    ../CodeSourcery/Sourcery_G++_Lite_Linux/bin/arm-none-linux-gnueabi-gcc -o spidev_test spidev_test.c

  • Wade Patrick said:
    ../CodeSourcery/Sourcery_G++_Lite_Linux/bin/arm-none-linux-gnueabi-gcc -o spidev_test spidev_test.c

    old... that invocation didn't work for me.  Here's what did (DVSDK 4.02, code sourcery installed to default)

    from the directory where spidev_test lives (<sdk-root>/psp/linux-xxxx/Documentation/spi)

    ~/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc -o spidev_test spidev_test.c -I../../include -I../../arch/arm/include