Activating SPI

Hello everyone,
I’m trying to activate SPI communication on the wixel to have it talk with a Raspberry Pi. In my code I’m using the headers

#include <wixel.h>
#include <usb.h>
#include <usb_com.h>
#include <stdio.h>
#include <spi0_master.h>[/code]

My main statement is simply
[code]void main()
{
    systemInit();
    usbInit();

   spi0MasterInit();

    while(1) //while loop constantly executing
    {
    	frequentTasks();
    	updateLeds();

    }
}

For now I’m just trying to initialize SPI with MOSI and MISO shorted so I’d be able to at least know its working. However, when I compile my code i get an error [quote]?ASlink-Warning-Undefined Global ‘_spi0MasterInit’ referenced by module ‘example_blink_led’[/quote]
What does this even mean? I tried looking through the spi0master header but everything seems to be fine. When i add more spi0 lines to my code, they each get a new [quote]?ASlink-Warning-Undefined Global ‘_spi0MasterInit’ referenced by module ‘example_blink_led’[/quote] error.

Am I just missing or overlooking something?

Thank You.

Hello.

It looks like the linker cannot find the spi_master.lib library when it tries to compile the app. As the SDK documentation mentions, if your app doesn’t use the default set of libraries defined in libraries/libs.mk, you will have to specify which libraries your app uses by creating a file called options.mk in your app directory. You can read more about this under the “Creating Your Own App” section in the SDK.

- Jeremy

Alright, got the compiling to work, now to creatively use SPI…

Much obliged Jeremy.