Skip to main content
louati-amir
Associate III
November 21, 2013
Question

Linking error in IAR_6.5

  • November 21, 2013
  • 6 replies
  • 2203 views
Posted on November 21, 2013 at 05:39

 

 

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    6 replies

    frankmeyer9
    Associate III
    November 21, 2013
    Posted on November 21, 2013 at 08:41

    Add the preprocessor macro ''USE_STDPERIPH_DRIVER'' to your project settings, this should solve the problem. Not sure how to do this in the IAR WB. In a Makefile-based project, one would append ''-DUSE_STDPERIPH_DRIVER'' to the CFLAGS.

    If you want to know why, look how this macro is used in stm32f4xx.h.

    louati-amir
    Associate III
    November 22, 2013
    Posted on November 22, 2013 at 02:37

    I'm new with IAR I don't know how to set the make file or even where finding it :\

    I was working with pic and programe them using pic c compiler and I had never have those problem of linking files.

    louati-amir
    Associate III
    November 22, 2013
    Posted on November 22, 2013 at 02:57

    I solved the problem by including libarary manually in the drivers of the lis302 and the codec . but I'm having a new type of error when I defining some new function :

    Error[Li006]: duplicate definitions for ''config_audio_codec''; in ''C:\Users\Amir\Documents\IAR Embedded Workbench\For discovery\STM32F4-Discovery_FW_V1.1.0\Project\Audio project\

    Audio project v1\Debug\Obj\Audio_config.o'', and ''C:\Users\Amir\Documents\IAR Embedded Workbench\For discovery\STM32F4-Discovery_FW_V1.1.0\Project\Audio project\Audio project v1\

    Debug\Obj\main.o''

    I didn't defined that function in another file

    Tesla DeLorean
    Guru
    November 22, 2013
    Posted on November 22, 2013 at 03:29

    Here the defines used for the STM32F429I-DISCO, I prepared the art so posting it all the same.

    0690X000006054XQAQ.pngI'm not sure it matters if you defined the function or not, it's in one of the project files, shares the same name space, and clashes with yours. So you'll either have to use a different name if it's a different function, or pick which of the instances or files you want to use.
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    ramyagr
    Visitor II
    August 4, 2016
    Posted on August 04, 2016 at 08:22

    hi i have given the paths as shown but still i'm getting this error ,  please help me to solve this

    Error[Pe020]: identifier ''GPIO_Pin_12'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 69 

    Error[Pe020]: identifier ''GPIO_Pin_13'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 69 

    Error[Pe020]: identifier ''GPIO_Pin_14'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 69 

    Error[Pe020]: identifier ''GPIO_Pin_15'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 70 

    Error[Pe020]: identifier ''RCC_AHB1Periph_GPIOD'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 71 

    Error[Pe020]: identifier ''GPIO_Pin_0'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 76 

    Error[Pe020]: identifier ''RCC_AHB1Periph_GPIOA'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 78 

    Error[Pe020]: identifier ''EXTI_Line0'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 80 

    Error[Pe020]: identifier ''EXTI_PortSourceGPIOA'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 82 

    Error[Pe020]: identifier ''EXTI_PinSource0'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 84 

    Error[Pe020]: identifier ''GPIO_InitTypeDef'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 118 

    Error[Pe020]: identifier ''GPIO_Mode_OUT'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 125 

    Error[Pe020]: identifier ''GPIO_OType_PP'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 126 

    Error[Pe020]: identifier ''GPIO_PuPd_UP'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 127 

    Error[Pe020]: identifier ''GPIO_Speed_50MHz'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 128 

    Error[Pe020]: identifier ''GPIO_InitTypeDef'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 190 

    Error[Pe020]: identifier ''EXTI_InitTypeDef'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 191 

    Error[Pe020]: identifier ''RCC_APB2Periph_SYSCFG'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 196 

    Error[Pe020]: identifier ''GPIO_Mode_IN'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 199 

    Error[Pe020]: identifier ''GPIO_PuPd_NOPULL'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 200 

    Error[Pe020]: identifier ''EXTI_Trigger_Rising'' is undefined D:\Ramya\STM32F4\STM32F4_Discovery Kit\STM32F4-Discovery-Firmware-master\STM32F4-Discovery-Firmware-master\Utilities\STM32F4-Discovery\stm32f4_discovery.c 212 

     

    AvaTar
    Senior III
    August 4, 2016
    Posted on August 04, 2016 at 11:29

    Have you added the define ''USE_STD_PERIPH_DRIVER'' to your project ?