damogranlabs / VS-Code-STM32-IDE

Use VS Code as STM32 IDE with CubeMX
MIT License
247 stars 52 forks source link

Problem with FreeRTOS #32

Closed NN708 closed 4 years ago

NN708 commented 4 years ago

I'm trying to compile a project with FreeRTOS enabled, but the compilation failed when cmsis_os.h and FreeRTOS.h can't be found. These files are generated by STM32CubeMX and are stored in Middlewares/Third_Party/FreeRTOS/Source. It seems that VS-Code-STM32-IDE didn't look into the folder.

Here's the hierarchy: 1

schperplata commented 4 years ago

Did you check makefile - is folder path Middlewares/Third_Party/FreeRTOS/Source listed in

# C includes
C_INCLUDES =

and source files added in

# C sources
C_SOURCES =

...? If not, try to delete Makefile, and re-generage project again with CubeMX. If these paths are added, check if they are listed in c_cpp_properties.json and buildData.json, and report back. Consider sharing an example code/project.

NN708 commented 4 years ago

I deleted and then regenerated Makefile and it worked. Thank you!