cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] STM32G030 CubeMX generated code won't compile - RTOS include not found

AThom.2
Associate II

I have just created a new project with the latest version of CubeMX for an STM32G030F6Px and am using the code generator to provide basic bring-up code. However the generated project does not compile.

I am using System Workbench (version 1.17.0.201812190825; all updates applied), with the SW4STM32 option set in the Project Manager. However I receive the message:

../Drivers/CMSIS/RTOS2/Template/cmsis_os.h:157:10: fatal error: cmsis_os2.h: No such file or directory

I have not enabled FREERTOS in the project settings, so I'm not sure why this is being compiled. Any ideas?!

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

I'd recommend switching to STM32CubeIDE which, despite being newer, seems a bit better supported IMO.

You could grab the file yourself and move it. Seems like the path to it is slightly different than what your error message suggests.

https://github.com/STMicroelectronics/STM32CubeG0/tree/master/Drivers/CMSIS/RTOS2/Include

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

View solution in original post

3 REPLIES 3
TDK
Guru

I'd recommend switching to STM32CubeIDE which, despite being newer, seems a bit better supported IMO.

You could grab the file yourself and move it. Seems like the path to it is slightly different than what your error message suggests.

https://github.com/STMicroelectronics/STM32CubeG0/tree/master/Drivers/CMSIS/RTOS2/Include

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

Many thanks for the response - I've tried with STM32CubeIDE but with exactly the same error unfortunately.

I've tried copying the missing file, but this just leads to a chain of similar missing files (at least 8!). I've found each one and copying it to the place it was looking for it and the latest error is now:

Drivers/CMSIS/Core/Template/ARMv8-M/main_s.o:C:/Users/Angus/Dropbox/STM32 Projects/PowerFlower/Debug/../Drivers/CMSIS/Core/Template/ARMv8-M/main_s.c:40: first defined here

There is another main() defined here (with a description of 'Secure main()') but I've no idea why!

AThom.2
Associate II

TDK - thanks again for your answer. I realised I was running an old version of STM32CubeIDE (1.0) - I've updated to 1.3 and all works fine now.

Thanks again!