2025-01-20 02:49 PM
here's a link to the GitHub issue containing the build output: https://github.com/giff25/MotorTest/issues
I double checked to make sure the HAL_TIM module was enabled, and followed the chain to the .h file itself and still haven't noticed any reason why the linker wouldn't see the TIM functions
Im using a nucleo board and the toolchain is as follows:
built the project using CubeMX (including configuring the timer and pwm channels)
Using VSCode with STM32 VS Code extension
any help would be appreciated
2025-01-20 04:18 PM
The linker does not see TIM functions likely because the stm32xxx_hal_tim.c or tim_ex.c file is not included in the project. Ensure that these files are included in build.
2025-01-20 04:26 PM
Linkers don't really care about header files per se. They are looking for implementations. Can you show the specific negative output or error message?
2025-01-20 04:36 PM
Include files aren't code.
You need to ADD stm32xxx_hal_tim.c or tim_ex.c to the project, so the compiler can generate the objects for the linker to link against.
2025-01-20 04:53 PM - edited 2025-01-20 04:56 PM
Actually I've been so tired and mad about these missing HAL .c files that made this little dirty trick (attached example for STM32H7) . Build with only this one .c file in sources and remove all other references to the HAL .c files in the project. If some ...hal_.c file is missing, just add it to the list. Hoping no C language purists see us here.
2025-01-20 05:13 PM
I don't use CubeMX but for CubeIDE there is a place to configure that you want the HAL files. Usually they are enabled but its worth a check.