Thursday, May 24th 2018, 4:00pm UTC+2

You are not logged in.

  • Login
  • Register



Date of registration: Jul 19th 2017

Posts: 51


Monday, December 25th 2017, 3:03pm

[SOLVED] Comment block template available when creating new C C++ source files?

Hi, I'm Matthew. I use

- 64-bit SES 3.30 on 64-bit Windows 10

- J-Link Plus or onboard J-Link (Nordic's dev kits have a J-Link on the board itself)

- J-Link 6.16h

- Nordic's PCA10040 v1.1.1 board (this board uses nRF52832-QFAA MCU)

My teammates have adopted Doxygen recently. So I was looking for some convenient features from SES to insert Doxygen related comments.

When I create a new C/C++ source/header file with SES, just like the above picture, a blank screen shows up.

C/C++ Source code

/**@file newFile.c */

The @file must be used to declare the file name.

Something like the above comment has to be inserted in the file. However, I had a hard time to add these comments manually all the time. As a result, I create new files using Sublime Text 3 and the DoxyDoxygen plugin .

1. Can I configure a comment template that has various information (BSD/MIT/etc license format, file created date, author, @file filename.c, and more)?
I wish that template to be written whenever I create a new C/C++ header/source file via SES.
If I create a text file, I don't want the above template to be inserted.
Hope to see a filename extension configuration (ex. template is inserted when creating a cpp/hpp/etc file, not txt/log file).

2. Is there a way to add a keyboard shortcut to create or update a Doxygen comment block?

Or is it available to use 3rd party plugins with SES?
The above feature really looks nice to me and it would be cool if it is added into SES :thumbsup: .

-Regards, Matthew

This post has been edited 2 times, last edit by "MatthewKyeo" (Dec 25th 2017, 3:08pm)

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 379


Tuesday, January 2nd 2018, 10:14am

Hi Matthew,

Embedded Studio currently only supports some generic templates that can be entered through the menu (Edit -> Templates) or through code completion suggestions.
Custom templates are already on our list for improvements. This would enable you to create whole comment blocks with one shortcut. Dynamic input of function name and parameters into the comment is not supported.
We will also add file templates for new files to the wishlist.

There are no 3rd party plugins for ES, but you can call external tools on your files, e.g. to open them in an external editor or to run code analysis tools.
That can also be used to open any external tool to convert and insert doxygen comment blocks.

Best regards



Date of registration: Jul 19th 2017

Posts: 51


Thursday, January 4th 2018, 2:52am

Hi, Johannes. At least my wishes are on the wishlist, that will do!

Due to your team's effort, I will be more absorbed in ES's experience more and more.

Thanks for your reply and happy new year!