2025-01-30 11:09 AM
I'm working on a stm32wle5c8 Lora project. I have my own overrides of HAL_InitTick, HAL_GetTick, HAL_Delay and HAL_IncTick because I want to use SysTick as a high-resolution timer. With this new project, a file Core/Src/sys_app.c is being generated that overwrites HAL_GetTick and HAL_Delay. What's worse.. The generated ones don't even do anything. HAL_GetTick does nothing unless the static variable SYS_TimerInitialisedFlag is set. There is nothing in the code that actually sets it, so HAL_GetTick will always return 0. HAL_Delay calls a function in another newly generated file Core/Src/timer_if.c which looks like this:
void TIMER_IF_DelayMs(uint32_t delay)
{
/* USER CODE BEGIN TIMER_IF_DelayMs */
/* USER CODE END TIMER_IF_DelayMs */
}
In essence, these files are overwriting functions that did something with functions that actually do nothing!
So, it would be nice if neither of these files are generated, but I cannot find the magic incantation of checkboxes and dropdowns to stop it from happening. Any help is much appreciated!