2020-11-20 02:50 AM
Hello,
I work with STM32G070RBT. I upgrade FW to STM32Cube_FW_G0_V1.4.0.
These definitions have disappeared from the file stm32g070xx.h:
#define RCC_CFGR_SWS_HSI (0UL) /*!< HSI used as system clock */
#define RCC_CFGR_SWS_HSE (0x00000008UL) /*!< HSE used as system clock */
#define RCC_CFGR_SWS_PLL (0x00000010UL) /*!< PLL used as system clock */
#define RCC_CFGR_SWS_LSI (0x00000018UL) /*!< LSI used as system clock */
#define RCC_CFGR_SWS_LSE (0x00000020UL) /*!< LSE used as system clock */
My project cannot bild at this time.
Peter
2020-11-20 07:16 AM
Hello @Peko ,
Could you please provide more details on your case: Have you an Error message?
Are you using STM32CubeMx to generate your project ? If it is the case, please share your ioc file.
Imen
2020-11-20 12:15 PM
2020-11-25 03:01 AM
Hi @Peko ,
Thank you for bringing this to our attention.
I have passed your feedback along to our CubeMX team for fix.
Imen
2020-11-27 06:08 AM
Thank you, I used the same solution.
The naming convention of the defines seems to be less descriptive in the new version 1.4.0, compared to 1.3.0
David
2020-12-04 03:03 AM
Hello,
Deleting the system_stm32g0xx.c file and regenerating code will generate the correct file. This seems to be a quick solution for now.
Steven
2020-12-21 06:01 AM
Yeah Steven, this worked! No more compilation errors. Hope will not find other issues in version 1.4
2020-12-25 12:58 AM
After migrating I also now get a load of this warnings besides the error above:
<command-line>:0:0: warning: "HSE_STARTUP_TIMEOUT" redefined
<command-line>:0:0: warning: "HSE_STARTUP_TIMEOUT" redefined
<command-line>:0:0: note: this is the location of the previous definition
<command-line>:0:0: note: this is the location of the previous definition
<command-line>:0:0: warning: "HSE_STARTUP_TIMEOUT" redefined
<command-line>:0:0: note: this is the location of the previous definition
<command-line>:0:0: warning: "HSE_STARTUP_TIMEOUT" redefined
<command-line>:0:0: note: this is the location of the previous definition
<command-line>:0:0: warning: "HSE_STARTUP_TIMEOUT" redefined
<command-line>:0:0: note: this is the location of the previous definition
<command-line>:0:0: warning: "HSE_STARTUP_TIMEOUT" redefined
<command-line>:0:0: note: this is the location of the previous definition
<command-line>:0:0: warning: "HSE_STARTUP_TIMEOUT" redefined
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../Core/Src/stm32g0xx_it.c" -mcpu=cortex-m0plus -std=gnu11 -g3 -DSTM32G071xx '-DHSE_VALUE=16000000' '-DLSI_VALUE=32000' '-DHSI_VALUE=16000000' '-DHSE_STARTUP_TIMEOUT=5' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DHSE_STARTUP_TIMEOUT=5000' '-DDATA_CACHE_ENABLE=1' '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNAL_CLOCK_VALUE=48000' -DUSE_FULL_LL_DRIVER '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32G0xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32G0xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/stm32g0xx_it.d" -MT"Core/Src/stm32g0xx_it.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/stm32g0xx_it.o"
<command-line>:0:0: warning: "HSE_STARTUP_TIMEOUT" redefined
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../Core/Src/syscalls.c" -mcpu=cortex-m0plus -std=gnu11 -g3 -DSTM32G071xx '-DHSE_VALUE=16000000' '-DLSI_VALUE=32000' '-DHSI_VALUE=16000000' '-DHSE_STARTUP_TIMEOUT=5' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DHSE_STARTUP_TIMEOUT=5000' '-DDATA_CACHE_ENABLE=1' '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNAL_CLOCK_VALUE=48000' -DUSE_FULL_LL_DRIVER '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32G0xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32G0xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/syscalls.d" -MT"Core/Src/syscalls.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/syscalls.o"
arm-none-eabi-gcc "../Core/Src/sysmem.c" -mcpu=cortex-m0plus -std=gnu11 -g3 -DSTM32G071xx '-DHSE_VALUE=16000000' '-DLSI_VALUE=32000' '-DHSI_VALUE=16000000' '-DHSE_STARTUP_TIMEOUT=5' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DHSE_STARTUP_TIMEOUT=5000' '-DDATA_CACHE_ENABLE=1' '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNAL_CLOCK_VALUE=48000' -DUSE_FULL_LL_DRIVER '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32G0xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32G0xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/sysmem.d" -MT"Core/Src/sysmem.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/sysmem.o"
<command-line>:0:0: warning: "HSE_STARTUP_TIMEOUT" redefined
<command-line>:0:0: note: this is the location of the previous definition
<command-line>:0:0: warning: "HSE_STARTUP_TIMEOUT" redefined
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../Core/Src/system_stm32g0xx.c" -mcpu=cortex-m0plus -std=gnu11 -g3 -DSTM32G071xx '-DHSE_VALUE=16000000' '-DLSI_VALUE=32000' '-DHSI_VALUE=16000000' '-DHSE_STARTUP_TIMEOUT=5' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DHSE_STARTUP_TIMEOUT=5000' '-DDATA_CACHE_ENABLE=1' '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNAL_CLOCK_VALUE=48000' -DUSE_FULL_LL_DRIVER '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32G0xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32G0xx/Include -I../Drivers/CMSIS/Include -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"
<command-line>:0:0: warning: "HSE_STARTUP_TIMEOUT" redefined
<command-line>:0:0: note: this is the location of the previous definition>
2021-01-22 03:40 AM
Just to add to follow up. This work around did not worked completely, the code compiles, but it does not work on the target.
Had to roll back to the previous FW version to continue development.
2021-01-23 06:19 AM
What problems did you encounter? So I can keep an eye out for them