I'm trying to blink a LED on a Nucleo-L476 with CubeMX and ST's HAL. It worked perfectly on Windows (System Workbench). Now, I'm trying to do the same on Linux with CubeMX and Qt Createor (my favorite IDE) and OpenOCD. I am now able to compile and debug the target.
However, the program crashes during HAL initialization. More precisely, when it tries to access the
SystemCoreClock variable. The following code is called from
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
/*Configure the SysTick to have interrupt in 1ms time basis*/
HAL_SYSTICK_Config(SystemCoreClock/1000); // *** crash here ***
/*Configure the SysTick IRQ priority */
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority ,0);
/* Return function status */
SystemCoreClockby a constant, but the variable needs to be modified further down the line anyway.
SystemCoreClockis declared in system_stm32l4xx.h and defined in system_stm32l4xx.c. Both files are part of the project.
Any idea ?
Version : CubeMX v4.18.0 , STM32L4 package v1.6.0.