Hi guys, So I used an example of the HAL library to configure an input capture with a timer on a stm32f373vct6 microcontroller. Now I want to include this example in my project, but when I do so and try to build the compiler says : Error: L6218E: Undefined symbol HAL_TIM_IC_Init (referred from)
I properly included the stm32f3xx_hal.h library and the stm32f3xx_hal_conf.h but still it does not work. From previous thread(community.st.com/.../error-l6218e-undefined-symbol-haladcinit-referred-from-maino) I saw that you need to define some params. I went into the stm32f3xx_hal_conf.h library, and removed the ifdef condition for the stm32f3xx_hal_tim.h library but still it does not work.
Thank you for the help !
That is a linker error. You are most likely missing a .c file. Try adding stm32f3xx_hal_tim.c to your project. You are likely going to need more stm32f3xx_hal*.c files so be prepared to add those too.
Hello Amine,
I suggest using the STM32Cubemx tool to generate your code.
You can launch it from with in the Keil uVision IDE:
www.keil.com/.../cubemx_proj.html
It should make sure that you aren't missing any helper functions or header files.
Here is a demo that is a little dated of using cubemx and keil
www.youtube.com/watch
Here is a more in depth video on using Cubemx
Hi Ron , Firstly thank you for you help. The point in my project was to not use the STM cube generator. I solved my problem! Thank you!
Hello Robert. Thank you for your answer.
This was definetly a linker problem. My program was looking for some functions that were defined in some c files and these files were not included properly in my project.
I will leave this here for anyone who would face the same issue : This linker error means you're program did not find some functions. So find the file with the missing function, add it to your project(make sur this file properly finds the libraries it needs).
This file will also probably call some functions that are not defined anywhere in your project. You will need to find the source file, add it to your project and make sur this file properly finds the libraries it need.... After adding a couple of source files and libraries you will be able to use the STM32 HAL(in my case HAL_Timer) in your project without any issues.
Hope this helps.
tags : STM32 HAL,HAL_Timer,HAL_ADC, Error: L6218E: Undefined symbol HAL_