This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Linker issues

Hello All,

I am using Keil u vision4 for stm32f2 series.

I am building anSPI application using SPI libraries provided by STM. I am not able to recognise the problem. If i include those libraries in my file, i get these errors

Includes\stm32f2xx_spi.c(180): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(221): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(289): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(342): error: #20: identifier "RCC_CFGR_I2SSRC" is undefined
Includes\stm32f2xx_spi.c(348): error: #136: struct "<unnamed>" has no field "PLLI2SCFGR"
Includes\stm32f2xx_spi.c(348): error: #20: identifier "RCC_PLLI2SCFGR_PLLI2SN" is undefined
Includes\stm32f2xx_spi.c(352): error: #136: struct "<unnamed>" has no field "PLLI2SCFGR"
Includes\stm32f2xx_spi.c(352): error: #20: identifier "RCC_PLLI2SCFGR_PLLI2SR" is undefined
Includes\stm32f2xx_spi.c(356): error: #20: identifier "RCC_PLLCFGR_PLLM" is undefined
Includes\stm32f2xx_spi.c(472): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(496): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(523): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(543): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(569): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(593): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(624): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(675): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(691): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(780): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(802): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(821): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(845): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(882): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(993): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(1036): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(1076): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(1104): warning: #223-D: function "assert_param" declared implicitly
Includes\stm32f2xx_spi.c(1157): warning: #223-D: function "assert_param" declared implicitly

If i do not include the #include "stm32f2xx_spi.h"
#include "stm32f2xx_gpio.h"
#include "stm32f2xx_rcc.h" files, i get all the spi related stuffs as undefined.

Could any one pls suggest me how to include these library and make my code work??
Thanks

Parents Reply Children
  • Hi,

    Thanks. I was able to resolve the previous errors.But now i am getting new set of linker errors.
    Is there anything i have to add any LIB file for this to work.
    But i could not find any LIB file specificaly for stm32f2xxx series.

    Could you pls help me knowing whats the soultion

    Build target 'Target 1'
    linking...
    tst.axf: Error: L6218E: Undefined symbol GPIO_PinAFConfig (referred from spi.o).
    tst.axf: Error: L6218E: Undefined symbol RCC_AHB1PeriphClockCmd (referred from spi.o).
    Sensor unit.axf: Error: L6218E: Undefined symbol RCC_APB1PeriphClockCmd (referred from spi.o).
    tst.axf: Error: L6218E: Undefined symbol SPI_Cmd (referred from spi.o).
    tst.axf: Error: L6218E: Undefined symbol SPI_I2S_DeInit (referred from spi.o).
    tst.axf: Error: L6218E: Undefined symbol SPI_I2S_GetFlagStatus (referred from spi.o).
    Setst.axf: Error: L6218E: Undefined symbol SPI_I2S_GetITStatus (referred from spi.o).
    tst.axf: Error: L6218E: Undefined symbol SPI_I2S_ITConfig (referred from spi.o).
    tst.axf: Error: L6218E: Undefined symbol SPI_I2S_ReceiveData (referred from spi.o).
    tst.axf: Error: L6218E: Undefined symbol SPI_I2S_SendData (referred from spi.o).
    tst.axf: Error: L6218E: Undefined symbol SPI_Init (referred from spi.o).

  • Thanks Andrew!!

    I got it working

    I included the library files needed along with my files. And compiled.

    So now its working fine.

    Thanks

  • That's right: ST don't provide a ready-built library - so you have to include the source files in your project, and build them as part of your project.

    (or you could create your own library, if you wanted)

    "I included the library files needed along with my files. And compiled. So now its working fine."

    That's it - well done!

    "Thanks"

    You're welcome.