Build Error with STM32CubeMX generated code

Sysprogs forums Forums VisualGDB Build Error with STM32CubeMX generated code

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #10245
    meldano
    Participant

    Hi,

    got following error message:

    Fehler MSB3073 Der Befehl “”C:\Program Files (x86)\Sysprogs\VisualGDB\\VisualGDB.exe” /build “C:\Users\daniel\Desktop\STM32F0Discovery\STM32F0\STM32F0.vcxproj” “/solution:C:\Users\daniel\Desktop\STM32F0Discovery\STM32F0\STM32F0.sln” “/config:Debug” “/platform:Win32″” wurde mit dem Code 1 beendet. STM32F0 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 41

     

    Any Idea???

     

    Many thanks

     

    #10253
    support
    Keymaster

    Hi,

    Yes, please check the Output window (View->Output). It should contain the detailed build log listing all errors printed by the compiler, linker and other tools. If you are not sure, please post the log contents here and we will help.

    #10255
    meldano
    Participant

    Hi,

     

    here is the output

     

    1> VisualGDB: Run “cmd.exe /c “C:\SysGCC\arm-eabi\bin\make.exe” CONFIG=Debug” in directory “C:\Users\daniel\Desktop\STM32F0Discovery\STM32F0” on local computer
    1>C:\Users\daniel\Desktop\STM32F0Discovery\STM32F0\Makefile(429): warning : overriding recipe for target `Debug/system_stm32f0xx.o’
    1>C:\Users\daniel\Desktop\STM32F0Discovery\STM32F0\Makefile(185): warning : ignoring old recipe for target `Debug/system_stm32f0xx.o’
    1> make: *** No rule to make target ../../../STM32F0Discovery/STM32F0/Src/system_stm32f0xx.c', needed byDebug/system_stm32f0xx.o’. Stop.
    1> ————————————————————-
    1> Command exited with code 2
    1> Executable: cmd.exe
    1> Arguments: /c “C:\SysGCC\arm-eabi\bin\make.exe” CONFIG=Debug
    1> Directory: C:\Users\daniel\Desktop\STM32F0Discovery\STM32F0
    1>VisualGDB : error : Command-line action failed
    1>EXEC : error : Build has failed. See the Output window for more details.
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3073: Der Befehl “”C:\Program Files (x86)\Sysprogs\VisualGDB\\VisualGDB.exe” /build “C:\Users\daniel\Desktop\STM32F0Discovery\STM32F0\STM32F0.vcxproj” “/solution:C:\Users\daniel\Desktop\STM32F0Discovery\STM32F0\STM32F0.sln” “/config:Debug” “/platform:Win32″” wurde mit dem Code 1 beendet.
    ========== Erstellen: 0 erfolgreich, 1 fehlerhaft, 0 aktuell, 0 übersprungen ==========

    • This reply was modified 7 years, 9 months ago by meldano.
    #10261
    support
    Keymaster

    Hi,

    Looks like you have first imported the system_stm32f0xx.c file to the project and then deleted it. Please either remove the non-existing file from Solution Explorer, or restore it on the disk.

    #10264
    meldano
    Participant

    Will try it – thanks.

    But I follow to 100% your tutorial…

     

     

    #10284
    meldano
    Participant

    Double checked it. The file exist.

    Is it possible to check my VS2015 Solution?

    https://1drv.ms/u/s!AspuupI-wTK0h1ZPlDPqyDqNyxBF

     

     

    #10291
    Stollerk
    Participant

    Hi!

    I have the same error every time I try to build a project from STMCubeMX.

    Here is my Output from my STM32L100 Discovery Project (but as I said it happens with every project imported from STMCubeMX):

    1>—— Build started: Project: Disc2, Configuration: Debug Win32 ——
    1> VisualGDB: Run “cmd.exe /c “C:\SysGCC\arm-eabi\bin\make.exe” CONFIG=Debug -j4″ in directory “C:\VISUAL\Disc2” on local computer
    1>C:\VISUAL\Disc2\Makefile(441): warning : overriding recipe for target `Debug/system_stm32l1xx.o’
    1>C:\VISUAL\Disc2\Makefile(185): warning : ignoring old recipe for target `Debug/system_stm32l1xx.o’
    1> C:\SysGCC\arm-eabi/bin/arm-eabi-g++.exe -o Debug/Disc2.elf -Wl,-gc-sections –specs=nano.specs -TC:\Users\krisz\AppData\Local\VisualGDB\EmbeddedBSPs\arm-eabi\com.sysprogs.arm.stm32/STM32L1xxxx/LinkerScripts/STM32L100RC_flash.lds -mcpu=cortex-m3 -mthumb -LC:\Users\krisz\AppData\Local\VisualGDB\EmbeddedBSPs\arm-eabi\com.sysprogs.arm.stm32\STM32L1xxxx\CMSIS_HAL\Include -Wl,–start-group Debug/system_stm32l1xx.o Debug/startup_stm32l100xc.o Debug/stm32l1xx_hal.o Debug/stm32l1xx_hal_adc.o Debug/stm32l1xx_hal_adc_ex.o Debug/stm32l1xx_hal_comp.o Debug/stm32l1xx_hal_cortex.o Debug/stm32l1xx_hal_crc.o Debug/stm32l1xx_hal_cryp.o Debug/stm32l1xx_hal_cryp_ex.o Debug/stm32l1xx_hal_dac.o Debug/stm32l1xx_hal_dac_ex.o Debug/stm32l1xx_hal_dma.o Debug/stm32l1xx_hal_flash.o Debug/stm32l1xx_hal_flash_ex.o Debug/stm32l1xx_hal_flash_ramfunc.o Debug/stm32l1xx_hal_gpio.o Debug/stm32l1xx_hal_i2c.o Debug/stm32l1xx_hal_i2s.o Debug/stm32l1xx_hal_irda.o Debug/stm32l1xx_hal_iwdg.o Debug/stm32l1xx_hal_lcd.o Debug/stm32l1xx_hal_nor.o Debug/stm32l1xx_hal_opamp.o Debug/stm32l1xx_hal_opamp_ex.o Debug/stm32l1xx_hal_pcd.o Debug/stm32l1xx_hal_pcd_ex.o Debug/stm32l1xx_hal_pwr.o Debug/stm32l1xx_hal_pwr_ex.o Debug/stm32l1xx_hal_rcc.o Debug/stm32l1xx_hal_rcc_ex.o Debug/stm32l1xx_hal_rtc.o Debug/stm32l1xx_hal_rtc_ex.o Debug/stm32l1xx_hal_sd.o Debug/stm32l1xx_hal_smartcard.o Debug/stm32l1xx_hal_spi.o Debug/stm32l1xx_hal_spi_ex.o Debug/stm32l1xx_hal_sram.o Debug/stm32l1xx_hal_tim.o Debug/stm32l1xx_hal_tim_ex.o Debug/stm32l1xx_hal_uart.o Debug/stm32l1xx_hal_usart.o Debug/stm32l1xx_hal_wwdg.o Debug/stm32l1xx_ll_adc.o Debug/stm32l1xx_ll_comp.o Debug/stm32l1xx_ll_crc.o Debug/stm32l1xx_ll_dac.o Debug/stm32l1xx_ll_dma.o Debug/stm32l1xx_ll_exti.o Debug/stm32l1xx_ll_fsmc.o Debug/stm32l1xx_ll_gpio.o Debug/stm32l1xx_ll_i2c.o Debug/stm32l1xx_ll_opamp.o Debug/stm32l1xx_ll_pwr.o Debug/stm32l1xx_ll_rcc.o Debug/stm32l1xx_ll_rtc.o Debug/stm32l1xx_ll_sdmmc.o Debug/stm32l1xx_ll_spi.o Debug/stm32l1xx_ll_tim.o Debug/stm32l1xx_ll_usart.o Debug/stm32l1xx_ll_utils.o Debug/main.o Debug/stm32l1xx_hal_msp.o Debug/stm32l1xx_it.o Debug/system_stm32l1xx.o -Wl,–end-group
    1> Debug/system_stm32l1xx.o:(.data+0x0): multiple definition of `SystemCoreClock’
    1> Debug/system_stm32l1xx.o:(.data+0x0): first defined here
    1> Debug/system_stm32l1xx.o:(.rodata+0x0): multiple definition of `PLLMulTable’
    1> Debug/system_stm32l1xx.o:(.rodata+0x0): first defined here
    1> Debug/system_stm32l1xx.o:(.rodata+0xc): multiple definition of `AHBPrescTable’
    1> Debug/system_stm32l1xx.o:(.rodata+0xc): first defined here
    1> Debug/system_stm32l1xx.o:(.rodata+0x1c): multiple definition of `APBPrescTable’
    1> Debug/system_stm32l1xx.o:(.rodata+0x1c): first defined here
    1> Debug/system_stm32l1xx.o: In function `SystemInit’:
    1> system_stm32l1xx.c:(.text.SystemInit+0x0): multiple definition of `SystemInit’
    1> Debug/system_stm32l1xx.o:system_stm32l1xx.c:(.text.SystemInit+0x0): first defined here
    1> Debug/system_stm32l1xx.o: In function `SystemCoreClockUpdate’:
    1> system_stm32l1xx.c:(.text.SystemCoreClockUpdate+0x0): multiple definition of `SystemCoreClockUpdate’
    1> Debug/system_stm32l1xx.o:system_stm32l1xx.c:(.text.SystemCoreClockUpdate+0x0): first defined here
    1>collect2.exe : error : ld returned 1 exit status
    1> make: *** [Debug/Disc2.elf] Error 1
    1> ————————————————————-
    1> Command exited with code 2
    1> Executable: cmd.exe
    1> Arguments: /c “C:\SysGCC\arm-eabi\bin\make.exe” CONFIG=Debug -j4
    1> Directory: C:\VISUAL\Disc2
    1>VisualGDB : error : Command-line action failed
    1>EXEC : error : Build has failed. See the Output window for more details.
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3073: The command “”C:\Sysprogs\VisualGDB\\VisualGDB.exe” /build “C:\VISUAL\Disc2\Disc2.vcxproj” “/solution:C:\VISUAL\Disc2\Disc2.sln” “/config:Debug” “/platform:Win32″” exited with code 1.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    I have also checked your VS2015 Solution with same resutls:

    1>—— Build started: Project: STM32F0, Configuration: Debug Win32 ——
    1> Updating C:\VISUAL\STM32Discovery\STM32F0\Makefile
    1> VisualGDB: Updated source file list in C:\VISUAL\STM32Discovery\STM32F0\Makefile. Enable verbose mode for more details.
    1> VisualGDB: Run “cmd.exe /c “C:\SysGCC\arm-eabi\bin\make.exe” CONFIG=Debug” in directory “C:\VISUAL\STM32Discovery\STM32F0” on local computer
    1>C:\VISUAL\STM32Discovery\STM32F0\Makefile(429): warning : overriding recipe for target `Debug/system_stm32f0xx.o’
    1>C:\VISUAL\STM32Discovery\STM32F0\Makefile(185): warning : ignoring old recipe for target `Debug/system_stm32f0xx.o’
    1> make: *** No rule to make target ../../../AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F0xxxx/CMSIS_HAL/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c', needed byDebug/system_stm32f0xx.o’. Stop.
    1> ————————————————————-
    1> Command exited with code 2
    1> Executable: cmd.exe
    1> Arguments: /c “C:\SysGCC\arm-eabi\bin\make.exe” CONFIG=Debug
    1> Directory: C:\VISUAL\STM32Discovery\STM32F0
    1>VisualGDB : error : Command-line action failed
    1>EXEC : error : Build has failed. See the Output window for more details.
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3073: The command “”C:\Sysprogs\VisualGDB\\VisualGDB.exe” /build “C:\VISUAL\STM32Discovery\STM32F0\STM32F0.vcxproj” “/solution:C:\VISUAL\STM32Discovery\STM32F0\STM32F0.sln” “/config:Debug” “/platform:Win32″” exited with code 1.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    I have tried this with VS2015 and VS2015 Pro RC. Both of them are fresh installations so I think it is that something is not properly installed. (Please consider this too.)

    • This reply was modified 7 years, 9 months ago by Stollerk.
    #10294
    support
    Keymaster

    Hi,

    We have rechecked the sample project and it had 2 references to the system_stm32f0xx.c file: one from the BSP and another one from the STM32CubeMX project.

    Please remove the reference to the one from the BSP via VisualGDB Project Properties -> Embedded Frameworks -> Default System file, then rebuild the project (Build->Rebuild All). This should get the build to work.

    #10297
    meldano
    Participant

    @support: Thanks!

    Please make a note to your tutorial.

     

    daniel

     

     

    #10298
    Stollerk
    Participant

    Hi!

    Thanks it solved the problem .

    I have went further and now tried to import a project using FreeRTOS for STM32L152CBTx-A from STMCubeMX, and now I have a different error:

    1>C:\VISUAL\STM32L152CBTxA\Middlewares\Third_Party\FreeRTOS\Source\portable\IAR\ARM_CM3\portmacro.h(147,25): error : intrinsics.h: No such file or directory
    1> #include <intrinsics.h>
    1> ^
    1> compilation terminated.
    1> make: *** [Debug/list.o] Error 1
    1> ————————————————————-
    1> Command exited with code 2
    1> Executable: cmd.exe
    1> Arguments: /c “C:\SysGCC\arm-eabi\bin\make.exe” CONFIG=Debug -j4
    1> Directory: C:\VISUAL\STM32L152CBTxA
    1>VisualGDB : error : Command-line action failed
    1>EXEC : error : Build has failed. See the Output window for more details.
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3073: The command “”C:\Sysprogs\VisualGDB\\VisualGDB.exe” /build “C:\VISUAL\STM32L152CBTxA\STM32L152CBTxA.vcxproj” “/solution:C:\VISUAL\STM32L152CBTxA\STM32L152CBTxA.sln” “/config:Debug” “/platform:Win32″” exited with code 1.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Here is the link for mySTMCubeMX file:

    https://1drv.ms/u/s!AsDt__ew6eSNh7EM1pt1irGtbn6Y6Q

    For me it looks like the missing intrinsics.h belongs to the complier.

    Thanks.

     

    • This reply was modified 7 years, 9 months ago by Stollerk.
    #10302
    support
    Keymaster

    Hi,

    Looks like your project includes files meant for the IAR compiler (IAR\ARM_CM3\portmacro.h). Please double-check the list of imported files and the preprocessor macros and ensure that only files meant for GCC are included.

    If you are using Clang IntelliSense, you can quickly check why a certain file was included by opening it in Visual Studio and checking the bar on top of the source file. It will show the source file that includes the header and the entire inclusion stack.

    #10329
    Stollerk
    Participant

    Thank you, it’s working now.

    #10331
    Taisen
    Participant

    Could you write a new tutorial on import the cubeMx? I had same error…

    #10339
    support
    Keymaster

    Hi,

    We do have a tutorial on that already: https://visualgdb.com/tutorials/arm/stm32/cube/

    #11641
    Mixaz29
    Participant

    Hi
    In my project i use VS Community 2017 and Visualgdb 5.2R9.
    After import project from STMCube v4.21.0 during compilation i received an error MSB3073.
    Output window:
    1>—— Сборка начата: проект: test1, Конфигурация: Debug Win32 ——
    1>VisualGDB: Run “cmd.exe /c “C:\SysGCC\arm-eabi\bin\make.exe” CONFIG=Debug” in directory “C:\vp\test1\test1” on local computer
    1>C:\vp\test1\test1\Makefile(473): warning : overriding recipe for target `Debug/system_stm32f3xx.o’
    1>C:\vp\test1\test1\Makefile(185): warning : ignoring old recipe for target `Debug/system_stm32f3xx.o’
    1>make: *** No rule to make target Debug/Program', needed byDebug/test1.elf’. Stop.

     
    1>————————————————————-
    1>Command exited with code 2
    1>Executable: cmd.exe
    1>Arguments: /c “C:\SysGCC\arm-eabi\bin\make.exe” CONFIG=Debug
    1>Directory: C:\vp\test1\test1
    1>VisualGDB : error : Command-line action failed

     

    can you help?

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.