Skip to content
Rob Giseburt edited this page Jul 15, 2014 · 25 revisions

Motate Logo

What is Motate?

Motate is a bare-metal framework for multiple processor architectures. Motate is designed to be both easy-to-use (and thus easy to maintain) while at the same time being as high-performance as possible asross all supported architectures.

Quick start guide

You need a *nix-style development environment, such as linux with the minimal packages to get GNU make or OS X with XCode Command-line Tools installed. (MinGW may work as well, but isn't currently tested or supported. Any help with testing and cleaning this part up would be greatly appreciated.)

For ARM development, the gcc-arm-embedded tools are available for OS X, Linux, and Windows. For OS X and Linux, these tools will be automatically downloaded and installed in a git-ignored directory in the Motate repo if they aren't found in the path. For windows, you will have to download and install them ahead of time.

  1. Clone the Motate git repo or download the zip.

  2. Create a new folder in the MotateProject/demos/ directory with the name of your project, such as: AwesomeProject.

  3. In your AwesomeProject folder, create a file called AwesomeProject.cpp -- the key being the .cpp ending -- with the following contents:

```c++
#include "MotatePins.h"
#include "MotateTimers.h"
#include "MotateUART.h"

// Create an output pin on kLED1_PinNumber
Motate::OutputPin<kLED1_PinNumber> led1_pin;

// This creates an 8N1, 115200-baud serial connection
Motate::BufferedUART<> serialPort {115200};

void setup() {
  // Initialize the pin to 1, or high.
  led1_pin = 1;
}

void loop() {
  // Flip the output from high ->low, or low -> high
  led1_pin.toggle();

  // Tell the world (or who ever is listening on the serial connection) about it:
  serialPort.write("Awesome Project -- it toggles an LED then writes over the UART about it!\n");

  // Pause for 1/4 second -- 1 second == 1000
  delay(250);
}
```
Clone this wiki locally