Page 1 of 1

How to disable HardwareTimers

Posted: Sun Aug 22, 2021 4:48 pm
by JimEli
I am trying to use HAL TIM2 features on an STM32F405 board with STM Core 2.0.0.

But I keep getting multiple definitions for TIM2_IRQHandler and the HAL_TIM_PeriodElapsedCallback. I try to disable it via build_opt.h file with "-DHAL_TIM_MODULE_ONLY", but they are still included in the core. I know my build options are recognized because if I include "-DHAL_TIM_MODULE_DISABLED" the modules are completely removed.

What am I doing wrong?

Re: How to disable HardwareTimers

Posted: Sun Aug 22, 2021 5:03 pm
by JimEli
Disregard. I believe it is associated with needing to restart the IDE so the system forces a complete rebuild.

So, now my question is, how can you force the rebuild without restarting the IDE?

Re: How to disable HardwareTimers

Posted: Mon Aug 23, 2021 9:00 am
by fpiSTM
JimEli wrote: Sun Aug 22, 2021 5:03 pm
So, now my question is, how can you force the rebuild without restarting the IDE?
Changing one options in the menu seems force the rebuild, even if you change it and restore it back. Anyway, in case of any doubt I advise to restart the IDE.