Skip to content

A template repository that can be used as a quick-start embvm projects.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE.md
MIT
MIT-LICENSE.md
Notifications You must be signed in to change notification settings

embvm/embvm-project-skeleton

Repository files navigation

Embedded Virtual Machine Project Skeleton

This repository provides a project skeleton for new Embedded VM projects.

The source code for this project is released under the MIT license. Note that the embvm-core project itself is dual-licensed as GPLv3 with a commercial licensing option. Please note that using this module as-is will pull in the embvm-core project for compiling the end application, requiring you to abide by the GPLv3 or commercial licensing terms.

Table of Contents

  1. About the Project
  2. Project Status
  3. Getting Started
    1. Requirements
      1. git-lfs
      2. Meson Build System
    2. Getting the Source
    3. Building
    4. Testing
  4. Configuration Options
  5. Documentation
  6. Need Help?
  7. Contributing
  8. Further Reading
  9. Authors
  10. License

About the Project

This repository contains a skeleton project with templates that are designed to be used with the Embedded VM project.

You can start a new project of your own by forking this repository, clicking the "Use this template" button on the GitHub page, or by cloning this repository and pushing the files to your own repository as a new upstream server.

Back to top

Project Status

This skeleton is kept up to date with the latest changes in the embvm-core project.

Back to top

Getting Started

If you are unfamiliar with the Embedded VM project, please see the embvm-core repository for more information and a Getting Started guide.

Requirements

This project uses Embedded Artistry's standard Meson build system, and dependencies are described in detail on our website.

At a minimum you will need:

  • git-lfs, which is used to store binary files in this repository
  • Meson is the build system
  • Some kind of compiler for your target system.
    • This repository has been tested with:
      • gcc-7, gcc-8, gcc-9
      • arm-none-eabi-gcc
      • Apple clang
      • Mainline clang

git-lfs

This project stores some files using git-lfs.

To install git-lfs on Linux:

sudo apt install git-lfs

To install git-lfs on OS X:

brew install git-lfs

Additional installation instructions can be found on the git-lfs website.

Meson Build System

The Meson build system depends on python3 and ninja-build.

To install on Linux:

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

To install on OSX:

brew install python3 ninja

Meson can be installed through pip3:

pip3 install meson

If you want to install Meson globally on Linux, use:

sudo -H pip3 install meson

Back to top

Getting the Source

This project uses git-lfs, so please install it before cloning. If you cloned prior to installing git-lfs, simply run git lfs pull after installation.

This project is hosted on GitHub. You can clone the project directly using this command:

git clone --recursive https://github.com/embvm/embvm-core

If you don't clone recursively, be sure to run the following command in the repository or your build will fail:

git submodule update --init --recursive

Back to top

Building

If Make is installed, the project can be built by issuing the following command:

make

This will build all targets for your current architecture.

You can clean builds using:

make clean

You can eliminate the generated buildresults folder using:

make distclean

You can also use meson directly for compiling.

Create a build output folder:

meson buildresults

And build all targets by running

ninja -C buildresults

Cross-compilation is handled using meson cross files. Example files are included in the build/cross folder. You can write your own cross files for your specific processor by defining the toolchain, compilation flags, and linker flags. These settings will be used to compile the project.

Cross-compilation must be configured using the meson command when creating the build output folder. For files stored within build/cross, we provide a Makefile CROSS to simplify the process. This variable will automatically supply the proper Meson argument, build/cross/ prefix, and .txt filename extension.

You can use a single file, or you can layer multiple files by separating the names with a colon.

make CROSS=arm:cortex-m4_hardfloat

You can also do this manually with the Meson interface. Note, however, that you will need to include a special --cross-file=build/cross/embvm.txt cross file to ensure that the required Embedded VM settings are applied.

meson buildresults --cross-file build/cross/arm.txt --cross-file build/cross/cortex-m4_hardfloat.txt --cross-file=build/cross/embvm.txt

Following that, you can run make (at the project root) or ninja -C buildresults to build the project.

Note: Tests will not be cross-compiled. They will only be built for the native platform.

Full instructions for working with the build system, including topics like using alternate toolchains and running supporting tooling, are documented in Embedded Artistry's Standardized Meson Build System on our website.

Back to top

Configuration Options

Build configuration is covered in depth in the Configuration and Tuning guide in the embvm-core project.

Back to top

Documentation

The bulk of the Embedded VM documentation is contained in the embvm-core repository. This repository only contains documentation relevant to this specific module.

Building the Documentation

Full documentation can be built locally by running the following command:

make docs

Documentation can be found in buildresults/docs, and the root page is index.html.

Back to top

Need help?

If you need further assistance or have any questions, please file a GitHub issue or send us an email using the Embedded Artistry Contact Form.

You can also reach out on Twitter: mbeddedartistry.

Contributing

If you are interested in contributing to this project, please read our contributing guidelines.

Authors

License

Copyright © 2020 Embedded Artistry LLC

The source code for this project is released under the MIT license. Note that the embvm-core project itself is dual-licensed as GPLv3 with a commercial licensing option. Please note that using this module as-is will pull in the embvm-core project for compiling the end application, requiring you to abide by the GPLv3 or commercial licensing terms.

See the LICENSE.md file for further licensing details.

Back to top

About

A template repository that can be used as a quick-start embvm projects.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE.md
MIT
MIT-LICENSE.md

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published