Adding custom C template to Eclipse-based IDEs

Writing your all codes in a fixed format makes your codes easy to read and follow.

Check the latest version of the template from here.

In your Eclipse- based IDE such as STM32CubeIDE, follow the instructions below:

Go to “Window -> Preferences -> C/C++ -> Code Style -> Code Templates -> Files -> C Header File” and click New. Write a name for the new template. In the Pattern section copy the contents of template.c file. Click apply. For the C Header File copy the template.h file in the Pattern section.

When you create a new file for a project, choose your own template.

Leave a Reply

Your email address will not be published.