cancel
Showing results for 
Search instead for 
Did you mean: 

Hi everyone, I am having a problem with STM32CubeIDE, funnilly enough it was working jolly good a week ago and today as I wanted to debug my code Ive gotten 9 error messages. I am pasting those messages underneath. Thanks in advance. Aleksander

AGłow.1
Associate II
make -j4 all 
arm-none-eabi-gcc "../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c" -mcpu=cortex-m0 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F072xB -c -I../Core/Inc -I../Drivers/STM32F0xx_HAL_Driver/Inc -I../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F0xx/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.d" -MT"Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.o"
arm-none-eabi-gcc "../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.c" -mcpu=cortex-m0 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F072xB -c -I../Core/Inc -I../Drivers/STM32F0xx_HAL_Driver/Inc -I../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F0xx/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.d" -MT"Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.o"
arm-none-eabi-gcc "../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.c" -mcpu=cortex-m0 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F072xB -c -I../Core/Inc -I../Drivers/STM32F0xx_HAL_Driver/Inc -I../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F0xx/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.d" -MT"Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.o"
arm-none-eabi-gcc "../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_can.c" -mcpu=cortex-m0 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F072xB -c -I../Core/Inc -I../Drivers/STM32F0xx_HAL_Driver/Inc -I../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F0xx/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_can.d" -MT"Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_can.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_can.o"
In file included from ../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h:149,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h:30,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h:29,
                 from ../Core/Inc/stm32f0xx_hal_conf.h:192,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h:30,
                 from ../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c:36:
../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.h:116:10: fatal error: core_cm0.h: No such file or directory
  116 | #include "core_cm0.h"            /* Cortex-M0 processor and core peripherals */
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from ../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h:149,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h:30,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h:29,
                 from ../Core/Inc/stm32f0xx_hal_conf.h:192,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h:30,
                 from ../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.c:34:
../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.h:116:10: fatal error: core_cm0.h: No such file or directory
  116 | #include "core_cm0.h"            /* Cortex-M0 processor and core peripherals */
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [Drivers/STM32F0xx_HAL_Driver/Src/subdir.mk:76: Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Drivers/STM32F0xx_HAL_Driver/Src/subdir.mk:76: Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.o] Error 1
In file included from ../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h:149,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h:30,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h:29,
                 from ../Core/Inc/stm32f0xx_hal_conf.h:192,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h:30,
                 from ../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_can.c:213:
../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.h:116:10: fatal error: core_cm0.h: No such file or directory
  116 | #include "core_cm0.h"            /* Cortex-M0 processor and core peripherals */
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from ../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h:149,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h:30,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h:29,
                 from ../Core/Inc/stm32f0xx_hal_conf.h:192,
                 from ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h:30,
                 from ../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.c:303:
../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.h:116:10: fatal error: core_cm0.h: No such file or directory
  116 | #include "core_cm0.h"            /* Cortex-M0 processor and core peripherals */
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [Drivers/STM32F0xx_HAL_Driver/Src/subdir.mk:76: Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_can.o] Error 1
make: *** [Drivers/STM32F0xx_HAL_Driver/Src/subdir.mk:76: Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.o] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.

6 REPLIES 6
TDK
Guru

> ../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.h:116:10: fatal error: core_cm0.h: No such file or directory

It says it can't find core_cm0.h. Does it exist in your project? It should be at Drivers/CMSIS/Include/core_cm0.h. If not, regenerate the code or copy it from another project. Other files may also be missing.

If it does exist, ensure the include directories are set up to find it.

If you feel a post has answered your question, please click "Accept as Solution".

Ive observed that Cube does not generate the "normal files" by that i mean all core and header files like adc.c/adc.h as it used to do.

Also reinstalling cube does not help :face_with_tears_of_joy:

That didn't answer my question.

If you want separate files for each peripheral, you need to select that option in CubeMX, but that's a different problem than what you asked in the post.

Project Manager -> Code Generator -> Generated files -> Generate peripheral initialization as a pair of...

If you feel a post has answered your question, please click "Accept as Solution".
T J
Lead

is your project in the project folder of the Repository that you are using ?

Find the file that's missing, I use Ultrasearch for that.

add the missing folder to the include folders, then recompile.

Which IDE is it ?

It is in the same folder. I added the missing file but the IDE does not seem to care.

STM32CubeIDE 1.7.0