Giter Club home page Giter Club logo

ceedling-microchip-example's Introduction

Ceedling Microchip Example

Sample project on how to use Ceedling for a multi-target project targeting different Microchip controllers.

This is quite an advanced project in terms of tooling setup. It aims to illustrate the setup needed to run tests on host, simulator and hardware along with support for targeting different devices with differenet toolchain.

This project uses the mdb Ceedling plugin to ease the task of running tests on both simulator and hardware.

Make sure you have a working installation of Ceedling, MPLAB X and the XC compilers.

Contents

Get Started

Get Sources

Clone this repo somewhere on your PC. e.g:

cd somewhere/in/your/pc
git clone https://github.com/deltalejo/ceedling-microchip-example.git
cd ceedling-microchip-example

Setup Environment

Inside project's root, create a env.yml file and set its contents accordingly. e.g.:

---
:environment:
  # MPLAB X path (for packs on MPLABX installation dir)
  - :mplabx_path: /opt/microchip/mplabx/v6.15
  # Device Packs path (for packs on user installation dir)
  - :dfp_path: ~/.mchp_packs
  # Compilers paths
  - :xc8_path: /opt/microchip/xc8/v2.45
  - :xc16_path: /opt/microchip/xc16/v2.10
  - :xc32_path: /opt/microchip/xc32/v4.35
  - :xcdsc_path: /opt/microchip/xc-dsc/v3.00
...

Project organization

The project is set up to support multiple target devices each requiring potentially a different toolchain and allows for running tests on host, simulator and hardware.

Platforms

Each platform has a corresponding configuration file inside platforms dir containing only settings specific to the platform, for example, build root dir.

The following are the supported platforms:

Toolchains

Targets

Running tests

Host

As easy as:

ceedling test:all

or specifying the target device:

ceedling target:PIC18F26K22 test:all

Simulator

Give platform:simulator as an argument when calling Ceedling. e.g.:

ceedling platform:simulator test:all

or specifying the target device:

ceedling platform:simulator target:PIC18F26K22 test:all

Hardware

Give platform:target as an argument when calling Ceedling along with serial port parameters. e.g.:

ceedling platform:target mdb:serialport[/dev/ttyUSB0] test:all

or specifying the target device:

ceedling platform:target target:PIC18F26K22 mdb:serialport[/dev/ttyUSB0] test:all

ceedling-microchip-example's People

Contributors

deltalejo avatar

Watchers

 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.