Giter Site home page Giter Site logo

yumium / codal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lancaster-university/codal

0.0 0.0 0.0 1.36 MB

The build system for Component Oriented Device Abstraction Layer (CODAL) devices.

Home Page: https://lancaster-university.github.io/codal/

License: MIT License

CMake 29.19% JavaScript 2.74% Python 67.72% C 0.20% C++ 0.16%

codal's Introduction

Codal Build Status

The main repository for the Component Oriented Device Abstraction Layer (CODAL).

This repository is an empty shell that provides the tooling needed to produce a bin/hex/uf2 file for a CODAL device.

Installation

Automatic installation.

This software has its grounding on the founding principles of Yotta, the simplest install path would be to install their tools via their handy installer.

Docker

A docker image is available that contains toolchains used to build codal targets. A wrapper Dockerfile is available that can be used to build your project with ease.

Then follow the build steps listed below.

Manual installation

  1. Install git, ensure it is available on your platforms path.
  2. Install the arm-none-eabi-* command line utilities for ARM based devices and/or avr-gcc, avr-binutils, avr-libc for AVR based devices, ensure they are available on your platforms path.
  3. Install CMake(Cross platform make), this is the entirety of the build system. 5. If on Windows, install ninja.
  4. Install Python 2.7 (if you are unfamiliar with CMake), python scripts are used to simplify the build process.
  5. Clone this repository

Building

  • Generate or create a codal.json file

    • python build.py ls lists all available targets
    • python build.py <target-name> generates a codal.json file for a given target
  • In the root of this repository type python build.py the -c option cleans before building.

    • If you are not using python:
      • Windows:
        1. In the root of the repository make a build folder.
        2. cd build
        3. cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo
        4. ninja
      • Mac:
        1. In the root of the repository make a build folder.
        2. cd build
        3. cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo
        4. make
  • The hex file will be placed at the location specified by codal.json, by default this is the root.

Configuration

Below is an example of how to configure codal to build the codal-circuit-playground target, example applications will automatically be loaded into the "source" folder:

{
    "target":{
        "name":"codal-circuit-playground",
        "url":"https://github.com/lancaster-university/codal-circuit-playground",
        "branch":"master",
        "type":"git"
    }
}

For more targets, read the targets section below.

Advanced

If you would like to override or define any additional configuration options (#define's) that are used by the supporting libraries, the codal build system allows the addition of a config field in codal.json:

{
    "target":{
        "name":"codal-circuit-playground",
        "url":"https://github.com/lancaster-university/codal-circuit-playground",
        "branch":"master",
        "type":"git"
    },
    "config":{
        "NUMBER_ONE":1
    },
    "application":"source",
    "output_folder":"."
}

The above example will be translate "NUMBER_ONE":1 into: #define NUMBER_ONE 1 and force include it during compilation. You can also specify alternate application or output folders.

Targets

To obtain a full list of targets type:

python build.py ls

To generate the codal.json for a target listed by the ls command, please run:

python build.py <target-name>

Please note you may need to remove the libraries folder if your previous build relied on similar dependencies.

Arduino Uno

This target specifies the arduino uno which is driven by an atmega328p.

codal.json specification

"target":{
    "name":"codal-arduino-uno",
    "url":"https://github.com/lancaster-university/codal-arduino-uno",
    "branch":"master",
    "type":"git"
}

This target depends on:

BrainPad

This target specifies the BrainPad which is driven by a STM32F.

codal.json specification

"target":{
    "name":"codal-brainpad",
    "url":"https://github.com/lancaster-university/codal-brainpad",
    "branch":"master",
    "type":"git"
}

This target depends on:

  • codal-core provides the core CODAL abstractions
  • codal-mbedos implements required CODAL basic components (Timer, Serial, Pin, I2C, ...) using Mbed

Circuit Playground

This target specifies the circuit playground which is driven by a SAMD21.

codal.json specification

"target":{
    "name":"codal-circuit-playground",
    "url":"https://github.com/lancaster-university/codal-circuit-playground",
    "branch":"master",
    "type":"git"
}

This target depends on:

  • codal-core provides the core CODAL abstractions
  • codal-mbed implements required CODAL basic components (Timer, Serial, Pin, I2C, ...) using Mbed
  • codal-samd21 implements SAMD21-specific components (such as USB)
  • mbed-classic is a fork of mbed, used by codal-mbed

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.