2016-10-12 10:24 AM
Hello,
When using USART, is stm32f4xx_usart.h the only file I would need to include?I currently have this:#include ''stm32f4xx.h''#include ''stm32f4_discovery.h''#include ''stm32f4xx_usart.h''#include <string.h>But, I am still getting the following:Error[Li005]: no definition for ''USART_SendData'' [referenced from C:\work\Projects\STM\SandBox\STSW\08182016\STM32F4-Discovery_FW_V1.1.0\Project\Peripheral_Examples\TIM_PWM_Output\ EWARM\TIM_PWM_Output\Obj\main.o] Error[Li005]: no definition for ''USART_ReceiveData'' [referenced from C:\work\Projects\STM\SandBox\STSW\08182016\STM32F4-Discovery_FW_V1.1.0\Project\Peripheral_Examples\TIM_PWM_Output\ EWARM\TIM_PWM_Output\Obj\main.o] Error[Li005]: no definition for ''USART_Init'' [referenced from C:\work\Projects\STM\SandBox\STSW\08182016\STM32F4-Discovery_FW_V1.1.0\Project\Peripheral_Examples\TIM_PWM_Output\EWARM\ TIM_PWM_Output\Obj\main.o] Error while running Linker Any hints will be greatly appreciated. Thanks, Sel2016-10-12 10:37 AM
Any hints will be greatly appreciated.
Include files don't pull in code, they define interfaces. Add stm32f4xx_usart.c to your project so the body of the functions you are calling can be bound by the linker.2016-10-12 01:13 PM
Thank you.