Hello.
In main.c I try to use some functions from stm32f4xx_hal_tim.c library file, but have the following errors:
...
./src/main.o: In function main':
/home/hoverjet/Dropbox/Work/Robotics/Tod/Software/ARM/workspace/tim_2/Debug/../src/main.c:135: undefined reference toHAL_TIM_Base_Init'
/home/hoverjet/Dropbox/Work/Robotics/Tod/Software/ARM/workspace/tim_2/Debug/../src/main.c:143: undefined reference to `HAL_TIM_Base_Start_IT'
collect2: error: ld returned 1 exit status
make: *** [tim_2.elf] Error 1
Includes in main.cpp:
The ARM Eclipse Plugin (the latest version from Sourceforge)
Eclipse 4.3 SR2 Kepler
openjdk-7-jre
Ubuntu 14.04
gcc-arm-none-eabi-4.8-2014q2
Open On-Chip Debugger 0.8.0
Template: "C Project / STM32F4XX C/C++ Project" - Content (Empty)
When you created the project you asked to exclude unused source files. This means that only a small number of library functions were compiled.
Go to the system/src/stm32f4-hal, identify the timer source file and disable the Resource Configuration -> Exclude from Build.
It works. Thank you!
you're welcome!