2019-01-28 06:03 AM
Hi.
I have the latest STM32CubeMX with a STM32L433 project.
I have selected in CubeMX Advanced Settings to use "LL" drivers for TIM1 & TIM2, and the option to "Not Generated Function Call" for these timers.
As expected, In the auto generated main() there is no call to functions "MX_TIM1_Init()" and "MX_TIM2_Init()", but the functions are still automatically being defined in main.c. I can manually remove the init functions, but they are added back.
How can CubeMX be configured to not include these function definitions?
Thanks.
2019-02-04 02:28 PM
They'd be convenient if you wanted them, and they'd be dead-code and eliminated if you don't.
Check your linker map file. If they're not there, they're being eliminated already and you problem's solved. If not, enable dead-code elimination in your linker settings.
Regards
Alister