Code Style

In Nuclei N100 SDK, we use EditorConfig to maintain our development coding styles and astyle tool to format our source code.

  • Our editorconfig file is maintained in the root directory of Nuclei N100 SDK, called .editorconfig.

  • Our astyle option file is maintained in the root directory of Nuclei N100 SDK, called .astylerc.

For example, if you want to format your applicaton code(.c/.h) located in application/baremetal/demo_timer, you can run the following command:

# make sure astyle is present in PATH
which astyle
# format code
astyle --options=.astylerc --recursive application/baremetal/demo_timer/*.c,*.h

You can install editorconfig plugins for your editor, see https://editorconfig.org/#download.

We use doxygen to comment C/C++ source code.