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.
- About the Project
- Project Status
- Getting Started
- Configuration Options
- Documentation
- Need Help?
- Contributing
- Further Reading
- Authors
- License
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.
This skeleton is kept up to date with the latest changes in the embvm-core
project.
If you are unfamiliar with the Embedded VM project, please see the embvm-core
repository for more information and a Getting Started guide.
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
- This repository has been tested with:
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.
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
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
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.
Build configuration is covered in depth in the Configuration and Tuning guide in the embvm-core
project.
The bulk of the Embedded VM documentation is contained in the embvm-core
repository. This repository only contains documentation relevant to this specific module.
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
.
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.
If you are interested in contributing to this project, please read our contributing guidelines.
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.