Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Foreword

You can refrain from downloading anything on the linked websites unless it is in the Installation section, we have set up a template package that already contains most of the libraries and it should be straightforward to get set up on the rest of the development environment. This guide is meant to help you understand the layout of the template and understand the toolchain required for developing embedded software for the solar car. It aims to be a comprehensive guide to get you to the point where you can start developing as soon as you feel comfortable with the C paradigms for embedded programming. 

Prework

Before we get started if you have not yet done so, please read up on Software 101 in particular the Coding Standards! These will be necessary to actually do any development on the car. It is also recommened that you spend some time working with the MSP430 launchpads which were part of the architecture from the previous vehicle MSXI and will provide a good basis for getting started. 

Architecture and Libraries

The architecture we will be using on MSXII is the stm32f0xx variant of the ARM Cortex M0 MCU. This architecture is supported by both the CMSIS ARM Core M0 Library and STM Peripherals Library. Specific documentation for these libraries can be found on the Software Resources page of confluence. 

Supported Development Toolchain

  • Compiler: GCC ARM
    • A compiler builds human readable source code into a machine readable target language, usually a machine executable or binary for a specific architecture. GCC ARM compilers C code into machine readable .elf, .hex or .bin files which can be flashed onto the MCU. GCC ARM is the standard open source compiler for ARM architecture. Compilers are powerful and often catch typos, errors, and warnings; they also optimize code for efficiency or size. The compiler flags set these behaviors of the compiler.
  • Build Tools: GNU Make and GNU Linker aka ld
    • Build tools usually instruct the compiler on where the source files it is building are located and which files to look at in order to build the target program. Often a Linker will be used with a Makefile to build a collection of C and header files into a standard library which can be included into your program. GNU Make and Linker are long standing open source standard build tools used by many developers, although many alternatives do exist.
  • Linter: cpplint 
    • A linter is a program that checks the style of source code for errors. Some linters also perform static analysis, ours does not, which look to catch programming errors before the code is executed. cpplint is Google's open source linter for C/C++ programs, note that our Coding Standards closely follow Google's and as a result this linter works well for us. It will often be more pedantic than we need but it is a good tool to use.
  • Flasher: st-link/GDB or OpenOCD
    • A flasher will transfer firmware (our compiled program) onto the MCU. Typically, this is done with a special cable or by a chip on the PCB and requires flashing software to transfer the contents of the sourcecode into the memory of the MCU. For our purposes we will be using st-link with GDB for debug which is the chip manufacturer supported method or OpenOCD the open source version.
  • IDEs: Eclipse or any text editor (Core members like: Vim, Sublime Text and Visual Studio Code)
    • Anyone just starting out and especially those using Windows are strongly encouraged to use the Eclipse IDE which is one of the few ways to get a working Toolchain. Note that we will not be supporting any issues you may encounter using other methods although, we will also support a Linux VM if you want to do that but you will need to figure out the install on your own. 
  • Source Control: GitHub
    • We use GitHub for our source and versioning control. In order to contribute to the codebase you will also need to start using GitHub. If you are new to GitHub you may want to check out these guides. We have tight controls on out git repos and require all commits to come from pull requests and that they are squashed prior to submitting.

Installation

General Instructions:

Step 1: If you don't already have one get a GitHub account this is our source control

Windows:

Step 1: Download and install Eclipse this will require at minimum a JRE or JDK version 1.7.0 or higher. I had issues with the x86 or 64 bit install so you may want to consider something just installing the x64 or 32 bit version first. Also note: when you get to the Eclipse installer you only need the C/C++ version of Eclipse.

Step 2: Follow this guide to install the correct build tools and the GCC ARM compiler and set them up in your environment 

Linux:


Max OSX:

None of the core members use a 



  • No labels