cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0 HAL upgrade 1.3.0 to 1.4.0

Legacy member
Not applicable

Hello,

I updated the HAL libraries for STM32G072RB from 1.3.0 to 1.4.0 (using the CubeIDE and opening the .ioc file and confirming the Migration).

However, I can't compile the project any more. Is there something I can do?

make -j8 all 
arm-none-eabi-gcc "../Core/Src/system_stm32g0xx.c" -mcpu=cortex-m0plus -std=gnu11 -g3 -DSTM32G071xx -DUSE_HAL_DRIVER -DDEBUG -c -I/home/david/c/stm32/common -I../Drivers/CMSIS/Include -I../Core/Inc -I../Drivers/STM32G0xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32G0xx/Include -I../Drivers/STM32G0xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/system_stm32g0xx.d" -MT"Core/Src/system_stm32g0xx.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/system_stm32g0xx.o"
../Core/Src/system_stm32g0xx.c: In function 'SystemCoreClockUpdate':
../Core/Src/system_stm32g0xx.c:231:10: error: 'RCC_CFGR_SWS_HSE' undeclared (first use in this function); did you mean 'RCC_CFGR_SWS_Msk'?
     case RCC_CFGR_SWS_HSE:  /* HSE used as system clock */
          ^~~~~~~~~~~~~~~~
          RCC_CFGR_SWS_Msk
../Core/Src/system_stm32g0xx.c:231:10: note: each undeclared identifier is reported only once for each function it appears in
../Core/Src/system_stm32g0xx.c:235:10: error: 'RCC_CFGR_SWS_LSI' undeclared (first use in this function); did you mean 'RCC_CFGR_SWS_HSE'?
     case RCC_CFGR_SWS_LSI:  /* LSI used as system clock */
          ^~~~~~~~~~~~~~~~
          RCC_CFGR_SWS_HSE
../Core/Src/system_stm32g0xx.c:239:10: error: 'RCC_CFGR_SWS_LSE' undeclared (first use in this function); did you mean 'RCC_CFGR_SWS_LSI'?
     case RCC_CFGR_SWS_LSE:  /* LSE used as system clock */
          ^~~~~~~~~~~~~~~~
          RCC_CFGR_SWS_LSI
../Core/Src/system_stm32g0xx.c:243:10: error: 'RCC_CFGR_SWS_PLL' undeclared (first use in this function); did you mean 'RCC_CFGR_SWS_Pos'?
     case RCC_CFGR_SWS_PLL:  /* PLL used as system clock */
          ^~~~~~~~~~~~~~~~
          RCC_CFGR_SWS_Pos
../Core/Src/system_stm32g0xx.c:264:10: error: 'RCC_CFGR_SWS_HSI' undeclared (first use in this function); did you mean 'RCC_CFGR_SWS_LSI'?
     case RCC_CFGR_SWS_HSI:  /* HSI used as system clock */
          ^~~~~~~~~~~~~~~~
          RCC_CFGR_SWS_LSI
make: *** [Core/Src/subdir.mk:33: Core/Src/system_stm32g0xx.o] Error 1
"make -j8 all" terminated with exit code 2. Build might be incomplete.
 
13:33:42 Build Failed. 6 errors, 0 warnings. (took 695ms)

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @DKo.15udela​ ,

I have already passed this issue along to our CubeMX team for fix (See this discussion).

Thank you for your contribution

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

8 REPLIES 8
Imen.D
ST Employee

Hello @DKo.15udela​ ,

I have already passed this issue along to our CubeMX team for fix (See this discussion).

Thank you for your contribution

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Legacy member
Not applicable

Thank you, Imen, this is exactly the same issue. I am sorry for creating a duplicate thread.

You are welcome :smiling_face_with_smiling_eyes:

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
SFili.1
Associate II

Same issue here. STM32CubeIDE 1.5.1and STM32Cube FW_G0 V1.4.0 on MCU STM32G071G8Ux

Still no solution?

MHenz
Associate II

Hello,

I am also experiencing this same issue.

When will this be corrected?

NLöwe.1
Associate

Just updated the HAL without expecting it to crash my prokject. Is there a solution? How can I revert to the previous version?

ECOM-Klaus
Associate II

Same problem here with STM32G030. Please fix this asap. Thanks

ECOM-Klaus
Associate II