Giter Club home page Giter Club logo

embedded-resources's Introduction

Embedded Artistry Public Resources

Contains templates, documents, and source code examples referenced on https://embeddedartistry.com.

Table of Contents

  1. Requirements
    1. git-lfs
    2. meson
  2. Structure
  3. Building
  4. Tests

Requirements

This repository uses submodules. You can clone the repository recursively to automatically setup submodules:

$ git clone https://github.com/embeddedartistry/embedded-resources.git --recursive

You can also initialize submodules after cloning:

$ git submodule update --init --recursive

git-lfs

This repository requires git-lfs. If you do not have this installed, please visit https://git-lfs.github.com

If you cloned this repository before installing git-lfs, please run git lfs pull. Otherwise clone will automatically perform a git lfs pull.

meson

This repository builds with meson, which requires Python 3 and Ninja.

On Ubuntu these can be easily installed with the following command:

$ sudo apt-get install python3 python3-pip ninja-build

For OSX, you can use brew:

$ brew install python3 ninja

The best way to get Meson is through pip:

$ pip3 install meson

Structure

  • build/
    • Common build scripts and definitions
  • docs
    • Open-source project templates and reference documentation
  • examples/
    • c/
      • C examples for the Embedded Artistry website
    • cpp/
      • C++ examples for the Embedded Artistry website
    • libc/
      • Example libc implementations
    • libcpp/
      • Example libcpp implementations
  • interview/
    • Example interview question implementations
  • manufacturing/
    • Documents & templates that are useful for the manufacturing side of the embedded world.

Building

You can run make from the top level to build all examples. Output will be placed in a folder called buildresults/ at the top level.

You can also use the proper meson syntax:

$ meson buildresults
$ cd buildresults
$ ninja

Targets can be built individually by using the ninja interface in the buildresults/ directory.

$ cd buildresults
$ ninja interview/bad_c

To clean the builds, run make clean from the project root or ninja clean in the buildresults/ directory.

Binaries will be stored under the buildresults/ folder at the same hierarchical level as in the source tree.For example, the bad_c interview demo application will be in buildresults/interview/.

Tests

This repository now includes tests. Tests can be run with make test, which will build the project, run the tests, and give you the summary report from Meson's test runner. In this scenario, test results are stored in XML files found at buildresults/test

To see human readable output, build the project as you normally would (make or make test), and then issue this command:

$ ninja -C buildresults/ embedded-resources-tests
ninja: Entering directory `buildresults/'
[0/1] Running external command embedde...es-tests (wrapped by meson to set env)
[==========] Running 1 test(s).
[ RUN      ] test_case
[       OK ] test_case
[==========] 1 test(s) run.
[  PASSED  ] 1 test(s).

Further Reading

embedded-resources's People

Contributors

ankur19030 avatar auvi avatar ilpdev avatar mpoullet avatar phillipjohnston avatar r-owen 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.