Forum: System Workbench for STM32

Not allowing to add header files in Inc folder

Hello All,

I am learning a course on Udemy about programming STM32 micro-controller and course uses OpenSTM32 software as IDE. CubeMX software only used for generating the project template and driver files, after generating project from CubeMX, main.c, it.c, msp.c, main.h, it.h all will be deleted and everything will be coded by user (Not using any of the auto generated code).

This is the CubeMX generated file tree has header files in Inc folder.

Image

But I cant add any of my header files to the same folder. If I right click Inc folder, there is only option to add files. I think I can choose this option and name the file as main.h for example. But is there a better way ?

3

I can add Source files & header files (.c) to Src folder. When I right click Src folder there is an option to add these files

2

Even if I select File >> New >> Header file: I cannot set Inc as the location where file needs to be created, Error is specified folder is not a source folder.

4

I think the instructor is using an older version of CubeMX & OpenSTM32 Workbench.

I have checked “Generate under root” option in CubeMX.

Here the C++ Include paths,
5

Thanks