Skip to main content
Nov 27, 2020 12:36 PM UTC
Solved

STM32G0 HAL upgrade 1.3.0 to 1.4.0

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)

This topic has been closed for replies.
Imen.DBest answer
ST Technical Moderator
Nov 27, 2020 1:23 PM UTC

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks

8 replies

Imen.DBest answer
ST Technical Moderator
Nov 27, 2020 1:23 PM UTC

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Nov 27, 2020 1:41 PM UTC

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

ST Technical Moderator
Nov 27, 2020 1:45 PM UTC

You are welcome :smiling_face_with_smiling_eyes:

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
SFili.1
Visitor II
Dec 21, 2020 1:46 PM UTC

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

Still no solution?

MHenz
Associate III
Jan 6, 2021 3:00 PM UTC

Hello,

I am also experiencing this same issue.

When will this be corrected?

NLöwe.1
Visitor II
Apr 2, 2021 10:19 AM UTC

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
Visitor II
Apr 18, 2021 10:28 AM UTC

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

ECOM-Klaus
Visitor II
Apr 18, 2021 1:45 PM UTC