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

STM32F10x_StdPeriph_Lib from stm.com

Hi

I'm trying to use the STM32F10x_StdPeriph_Lib that I have downloaded from stm.com, my problem is how do I tell uVision that it shall not use the default file located a C:\Keil\ARM\INC\ST\. Or to put it in another words, how do I remove the compiler string “-I "C:\Keil\ARM\INC" ”

now I gets thees kinds of errors: C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(23): error: #256: invalid redeclaration of type name "s32"

Best regards
SPA

Parents
  • I am using a recompiled STM32 library and I also had your problem.

    One workaround is the following:
    1. place your library into <path>/lib/STM32.lib,
    2. place all the .h files into <path>/inc,
    3. link the STM32.lib,
    4. add <path>/inc via menu in Options-C/C++/-Include Paths.

    That will solve your problem because the new include path will override the default one.

    Another way to solve it is by operating on the device database (menu: File-Device Database) and changing the include path in REGFILE.

    The default line is:
    REGFILE=stm32f10x_lib.h("ST\STM32F10x")

    If can change it into:
    REGFILE=stm32f10x_lib.h("ST\STM32F10x-v3.2.0")

    However, you must do it for every device you wnat to change and recreate a new project. Also ... the new include path can be only below C:\Keil\ARM\INC ...

    Hi, Marco.

Reply
  • I am using a recompiled STM32 library and I also had your problem.

    One workaround is the following:
    1. place your library into <path>/lib/STM32.lib,
    2. place all the .h files into <path>/inc,
    3. link the STM32.lib,
    4. add <path>/inc via menu in Options-C/C++/-Include Paths.

    That will solve your problem because the new include path will override the default one.

    Another way to solve it is by operating on the device database (menu: File-Device Database) and changing the include path in REGFILE.

    The default line is:
    REGFILE=stm32f10x_lib.h("ST\STM32F10x")

    If can change it into:
    REGFILE=stm32f10x_lib.h("ST\STM32F10x-v3.2.0")

    However, you must do it for every device you wnat to change and recreate a new project. Also ... the new include path can be only below C:\Keil\ARM\INC ...

    Hi, Marco.

Children