Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Then, to access the box, ssh in


Code Block
themeConfluence
vagrant ssh


These 3 commands only need to be run the first time you start working with uwmidsun/box.

...

Code Block
languagebash
themeConfluence
make build_all

Project Template

The package template contains seven directories, a Makefile, a linter and a README. Use this for starting new projects only. Existing projects will have their own repositories which will share a copy of libraries, linker, and extra. 

Linting

As mentioned linting checks to ensure code meets our style guides. A custom version of cpplint.py is included in the package template it has been altered to support our styleguide. Calder Kitagawa is the maintainer so if you think there is a bug or style violation it is too pedantic/permissive reach out and ask. A Git hook will prevent you from pushing any code with errors so lint often you don't want to rewrite a whole file just because you messed up on style! The Git Hook in the hooks directory should be copied into .git/hooks directory so that you auto-lint when you submit code.

...

Running make lint executes cpplint on all files in src and inc. If you want to just lint specific files use python cpplint. Note the cpplint will accept wildcards in the file definitions.

Makefile

As mentioned, a Makefile tells the compiler what to build and where to find those items. This Makefile is no different, it automatically links and builds a file called main.elf and the STM Peripheral library (THIS LIBRAY FEATURES A HAL DO NOT USE IT WE ARE MAKING OUR OWN) which is located in the libraries directory. The libraries can be included without needing a relative path as can any header files you write and place in the inc directory. The linker directory contains the linker files to build the libraries. The extra folder contains configuration options for making an OpenOCD binary. Any program files you create should go in the src directory and any drivers should go into inc. The README will contain more detailed information and the Makefile does have options for selecting source files.

Usage

...

Code Block
languagebash
firstline1
$ make

...