Skip to content

Motate Layering and Directory Structure

Rob Giseburt edited this page Oct 13, 2015 · 3 revisions

Motate is designed from the ground up to be compatible with multiple architectures, and to make any project written on it able to compile to any of the supported architectures. This way, "porting your project to a new architecture" is really just a matter of adding Motate support for that architecture.

Motate Layering

In order to facilitate architecture independence, as well as maintaining DRYness (Don't Repeat Yourself), we have separated the system into the following layers (listed from bottom to top, hardest to easiest to add), which are then stacked:

  1. Architecture (ARM, AVR, etc.) - This is the broadest and category, and covers the toolchain, most of the default compiler options, etc. For example, the gcc compiler is different for the ARM (arm-none-eabi-gcc) than it is from the avr (avr-gcc) and must be obtained (or built) from different sources and stored separately, with different default options. (Note: There's no technical or cultural limit to gcc-based compilers, but they are currently used exclusively, mainly due to high availability for free.)

  2. Platform (Atmel SAM, Atmel XMega, etc) - This is often a "family" of processors from the same vendor, and they share common startup files, linker scripts, vendor libraries (such as a CMSIS directory), etc. The processor is of a specific architecture, so choosing a platform implicitly chooses an architecture.

  3. Processor (Atmel SAM3X8C, Atmel SAM3X8C, etc.) - This is the selection of a specific processor within a family. This decides which facilities of a processor are available. You can often find a usable datasheet for devices of this layer. A processor is in one platform, which is in one architecture.

  4. Board (Arduino Due, FRDM-KL05z, TinyG V8, etc) - This is the first part where your project will likely need to make changes. This is where we specify a processor and map the processor's facilities (pins, timers, etc) to specific logical names and numbers, which will be then used in your project.

  5. Project (Synthetos G2 Core, etc) - This is your project! Your project can use one or more boards (which selects and configures the processor on it, which implies the platform and architecture). When you compile your project, you choose the BOARD to compile against, which makes all the selections mentioned above.

Each of the above layers is also represented in the directory layout of Motate, and can be used in the structure of your project to make decisions and adjustments at each of the layers.

Directory structure

todo

Clone this wiki locally