cancel
Showing results for 
Search instead for 
Did you mean: 

no definition error SPI

spetcavich
Associate II
Posted on March 19, 2012 at 21:31

When I compile my code it says everything is ok. But when I try to download and debug i get the error no definition for SPI_I2S_SendData, SPI_Init, and SPI_Cmd. I've included the ''stm32lxx_spi.h'' file and still am having problems

5 REPLIES 5
Posted on March 19, 2012 at 21:53

You'll need to pull the library code itself into the project, ie stm32lxx_spi.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
spetcavich
Associate II
Posted on March 19, 2012 at 22:06

I  pulled the stm32l1xx_spi.c file into the user folder where my main.c is and when I compile it gives me 47 errors due to the stm32l1xx_spi.c file. I'm sorry I'm fairly new to all of this but it seems like using a .c library file shouldn't give me any errors at all?

Posted on March 19, 2012 at 23:24

No, but it's a sign you don't have the paths to the libraries, includes, or the project set up in a manner consistent with the other examples in the firmware library.

Normally one would ADD library files into the project tree from within the library tree, as uposed to copying the actual files into your own source directory.

There might also be a stm32L1xx_conf.h that pulls in the required include files.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
spetcavich
Associate II
Posted on March 20, 2012 at 04:03

I have included the stm32l1_conf.h and it didn't fix the problem. I'm not sure I'm fully understanding how I should deal with this stm32l1_spi.c file

spetcavich
Associate II
Posted on March 20, 2012 at 18:33

Also it claims for example Error[Li005]: no definition for ''SPI_I2S_SendData'' but if I go to the main.c file and right click show definition it takes me to the correct definition.