cancel
Showing results for 
Search instead for 
Did you mean: 

Hi! I have installed STM32CubeIDE and I created new project on Nucleo F411RE board but I can't compile this project. I will add that this is a blank project (I didn't write any line of code).

PŁucz.1
Associate II

I tried uninstalling the program and reinstalling it but it didn't work. Can somebody help me? I have this output in my console:

19:05:11 **** Incremental Build of configuration Debug for project Test ****

make -j4 all 

arm-none-eabi-gcc "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F411xE -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.d" -MT"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o"

arm-none-eabi-gcc "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F411xE -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.d" -MT"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o"

arm-none-eabi-gcc "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F411xE -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.d" -MT"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o"

arm-none-eabi-gcc "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F411xE -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.d" -MT"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o"

cc1: Invalid option `-imultilib'

cc1: Invalid option `-isysroot'

cc1: Invalid option `-MMD'

cc1: Invalid option `-MF'

cc1: Invalid option `-MP'

cc1: Invalid option `-MT'

cc1: warning: unrecognised gcc debugging option: D

cc1: Invalid option `fpu=fpv4-sp-d16'

cc1: Invalid option `float-abi=hard'

cc1: Invalid option `thumb'

cc1: Invalid option `libarch=armv7e-m+fp'

cc1: Invalid option `-auxbase-strip'

cc1: Invalid option `-std=gnu11'

cc1: Invalid option `-fdata-sections'

cc1: Invalid option `-fstack-usage'

ccDrivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o: No such file or directory

1: bad value (armv7e-m+fp) for -march= switch

cc1: bad value (cortex-m4) for -mcpu= switch

cc1: cc1: Invalid option `-imultilib'

cc1: Invalid option `-isysroot'

cc1: Invalid option `-MMD'

cc1: Invalid option `-MF'

cc1: Invalid option `-MP'

cc1: Invalid option `-MT'

cc1: warning: unrecognised gcc debugging option: D

cc1: Invalid option `fpu=fpv4-sp-d16'

cc1: Invalid option `float-abi=hard'

cc1: Invalid option `thumb'

cc1: Invalid option `libarch=armv7e-m+fp'

cc1: Invalid option `-auxbase-strip'

cc1: Invalid option `-std=gnu11'

cc1: Invalid option `-fdata-sections'

cc1: Invalid option `-fstack-usage'

ccDrivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o: No such file or directory

1: bad value (armv7e-m+fp) for -march= switch

cc1: bad value (cortex-m4) for -mcpu= switch

cc1: cc1: Invalid option `-imultilib'

cc1: Invalid option `-isysroot'

cc1: Invalid option `-MMD'

cc1: Invalid option `-MF'

cc1: Invalid option `-MP'

cc1: Invalid option `-MT'

cc1: warning: unrecognised gcc debugging option: D

cc1: Invalid option `fpu=fpv4-sp-d16'

cc1: Invalid option `float-abi=hard'

cc1: Invalid option `thumb'

cc1: Invalid option `libarch=armv7e-m+fp'

cc1: Invalid option `-auxbase-strip'

cc1: Invalid option `-std=gnu11'

cc1: Invalid option `-fdata-sections'

cc1: Invalid option `-fstack-usage'

ccmake: *** [Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk:64: Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o] Error 1

make: *** Waiting for unfinished jobs....

Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o: No such file or directory

1: bad value (armv7e-m+fp) for -march= switch

cc1: bad value (cortex-m4) for -mcpu= switch

cc1: cc1: Invalid option `-imultilib'

cc1: Invalid option `-isysroot'

cc1: Invalid option `-MMD'

cc1: Invalid option `-MF'

cc1: Invalid option `-MP'

cc1: Invalid option `-MT'

cc1: warning: unrecognised gcc debugging option: D

cc1: Invalid option `fpu=fpv4-sp-d16'

cc1: Invalid option `float-abi=hard'

cc1: Invalid option `thumb'

cc1: Invalid option `libarch=armv7e-m+fp'

cc1: Invalid option `-auxbase-strip'

cc1: Invalid option `-std=gnu11'

cc1: Invalid option `-fdata-sections'

cc1: Invalid option `-fstack-usage'

ccDrivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o: No such file or directory

1: bad value (armv7e-m+fp) for -march= switch

cc1: bad value (cortex-m4) for -mcpu= switch

cc1: make: *** [Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk:64: Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o] Error 1

make: *** [Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk:64: Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o] Error 1

make: *** [Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk:64: Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o] Error 1

"make -j4 all" terminated with exit code 2. Build might be incomplete.

19:05:12 Build Failed. 5 errors, 0 warnings. (took 690ms)

9 REPLIES 9
Karl Yamashita
Lead II

Upload your project

Semer CHERNI
ST Employee

Hello @Patryk �?uczak​ 

First let me thank you for posting.

To be able to reproduce this behavior for my side, I will need that you provide me with the steps you made in order to create the project.

Also, when you said, "I tried uninstalling the program and reinstalling it but it didn't work". What program you are referring to?

Semer.

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.

Thank you for your answer.

Firstly, when it comes to uninstalling the program, I meant the Stm32CubeIDE.

Seondly, the steps I made in order to create the project are:

  1. New STM32 Project
  2. In the board selector I chose NUCLEO-F411RE
  3. I named the project and I didn't change anything and I clicked "Next"
  4. I didn't change anything and I clicked "Finish"
  5. In the Code Generator in Project Manager I marked "Generate peripheral initialization as a pair of '.c/.h' files per peripheral"
  6. I tried to build this project after generating the code but I had errors that I showed in the post.

In the attachment I've added file with this project.

I did in a reply to @Semer CHERNI

I've imported your project and clicked the build button. It finished building with no errors.

Not sure if it's important but did you install CubeIDE in the default location or did you change the location?

In the first attempt I installed it in the chosen location but after reinstalling I left the default location. I also tried to change my environmental variable called GGC_EXEC_PREFIX to the location where I have arm compiler but it didn't worked.

Pavel A.
Evangelist III

Try to add a pre-build step, there print output of 'echo $PATH` and 'which cc1'.

Do you have a supported Linux or MacOS version?

I have a Windows version and I'm using Windows 10.

Ok, then "echo %PATH%" and "where cc1"