cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX generated code for VSCode of STM32_WPAN STM32WBA54 get multiple definition error.

trungng
Associate

Detail: I use CubeMX to create a CMake project and edit it in VSCode. My target MCU is STM32WBA54KGUx. I configured the STM32_WPAN, then clicked generate code. In VSCode, when I clicked the "build" button (or run task "Cmake: clean rebuild"), the build command returned an error of multiple definition. It turned out, the gcc build command linked two same file named "stm32wbaxx_ResetHandler_GCC.s.obj". Further investigation revealed that the "stm32wbaxx_ResetHandler_GCC.s" file located in /Projects/Common/WPAN/Startup/ is built twice:

[build] [15/89] Building ASM object CMakeFiles/wba54_test.dir/Projects/Common/WPAN/Startup/stm32wbaxx_ResetHandler_GCC.s.obj

[build] [81/89] Building ASM object cmake/stm32cubemx/CMakeFiles/Startup.dir/__/__/Projects/Common/WPAN/Startup/stm32wbaxx_ResetHandler_GCC.s.obj

Temporary Fix: Go to /cmake/stm32cubemx/CMakeLists.txt and comment out the "Startup" in the "# Project static libraries" section (around line 178). But CubeMX will overwrite it anyway when re-generate code, so this is not a real fix.

CubeMX version: 6.15.0

STM32 firmware version: STM32Cube_FW_WBA_V1.7.0

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
STTwo-32
ST Employee

Hello @trungng and welcome to the ST Community.

This behavior has been escalated internally (under internal ticket number 216535).

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
STTwo-32
ST Employee

Hello @trungng and welcome to the ST Community.

This behavior has been escalated internally (under internal ticket number 216535).

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Announcement

We’re moving the ST Community to a new platform to give you a better and more reliable community experience.