Giter VIP home page Giter VIP logo

stm32-rob01's Introduction

README RobotRemCtrlFW 
===============================================================================
26.10.2011, [email protected]

Introduction
-------------------------------------------------------------------------------

This project provieds a firmware for STM32 based robots. For more detail see

	http://gpio.kaltpost.de/?page_id=527

Requirements
-------------------------------------------------------------------------------

To successfully execute all the targets from this make file project, beside a C cross compiler environment for ARM Cortex-M3, the following packages must be present on your host system:
 
* astyle (optional)
* cppcheck (optional)
* doxygen (optional)


Directory Layout
-------------------------------------------------------------------------------

The directory and file layout of the project is as follows:

ProjectDir
  bin/                executables created from "src/"
  deploy/             deployables are placed here
  doc/                documentation regarding this project
    gen/              source code documentation generated from "src/include"
  lib/                libraries ctreated from "src/", used to unit test "src/"
  src/                C sources for the project
    include/          header files for the project sources in "src/"
  test-bin/           executable unit tests created from "test-src"
  test-src/           C test sources
    include/          header files for the project test sources in "test-src/"
  CHANGELOG           change log describing project changes for each release             
  README              short introduction and description of this project
  doxygen.conf        configuration file for doxygen
  Makefile            top level make file
  common.mk           make file include commonly used, project independent
  project.mk          make file include commonly used, project dependent  


Default Targets of Top Level Make File
-------------------------------------------------------------------------------

The top level makefile in the project directory is the master make file. It defines a set of default targets, and delegates most of its task to the sub-makefile in "src" and "test-src".

The default make targets are:

target        compile and link the executable, place it under "bin/"
 
target-test   compile and link the test executable, place it under "test-bin/"

gen-docs      perform "target" first, then generate source code documentation 
              from "src/include/" under "doc/gen/"
              
check         execute "cppcheck" on all "*.cpp" files unter "src/", print 
              results to stdout
              
style         enforce basic code styles on cpp/h files in "src/" and 
              "src/include/", on modifications, the original file is
              backed up with extension ".orig"
              
all           perform task "target"

world         perform tasks "target", "target-test", "gen-docs"
 
clean         cleanup all objects, executables and backup files   

deploy-src    perform task "clean", then tar the contetens of the current
              directory into <target_name>_sources.tar.bz2 (but exclude
              ".svn"), and place it into "deploy/" - useful to archive 
              sources ...
              
The most common targets will be explained in more detail in the next
paragraphs.


target: Compile the Binary
-------------------------------------------------------------------------------

To compile the example sources located under "src" type:

  make

This will produce the binary "hello_world" under "bin". If executed it will 
just print a friendly hello. 


target-test: Compile the Test-Binary
-------------------------------------------------------------------------------

To compile the test binary sources located under "test-src" type:

  make target-test

This will produce the binary under "test-bin".  

check: Perform Static Code Checking
-------------------------------------------------------------------------------

For basic static code checking, cppcheck is used. To execute a static code check, you may call:

  make check

This will performe the checks on all files located under "src". Static code checks are not performed on the test code located under "test-src" by default. To check the test sources too, uncommented the corresponding line in the top-level makefile.


gen-docs: Generation of Code Documentation
-------------------------------------------------------------------------------

For generating the source code documentation out of the annotations done in the code, we use doxygen. The generation of the HTML based documentation from the sources under "src" is done through:

  make gen-docs

The result will be placed in "doc/gen". 

Note: For "test-src" no documentation is generated.  


style: Apply Code Formating Styles
-------------------------------------------------------------------------------

It is possible to enforce basic code formating styles through astyle by executing the "style" target:

  make style
  
This calls astyle with parameter "--style=stroustrup", resulting in something like this:

  int Foo(bool isBar) 
  {
     if (isBar) {
          bar();
          return 1;
     } else
          return 0;
  }

stm32-rob01's People

Contributors

wendlers avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.