For everything onboarding, this is the place to be. We work hard to ensure you can contribute to NER firmware on any platform, but note that many of us who developed these docs are on Linux, and are less familiar with issues that may pop up on other platforms. With that being said, if anything below does not make sense or doesn’t seem to be working as expected, please reach out to one of us on slack in #s_
embbeddedembedded-software
channel!
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Environment Setup
PLEASE READ IF USING Windows
We use WSL on Windows. All commands henceforth are either from WSL (labelled WSL) or the Windows “terminal” app (labelled Windows)
.To get ready for this guide, run with Windows Terminal app:
Code Block |
---|
wsl --update |
1. Install Python
We use various packages and tools from these ecosystems, and so its essential to have both installed on your machine. Obviously, you can skip this step if you already have these installed.
Info |
---|
if these are not properly installed, the setup script mentioned below will fail miserably unless I ever make it more robust :) |
Mac
Install python with whatever package manager you like, if not already installed
...
Code Block |
---|
brew install python |
Linux and WSL
Install python with whatever package manager you like, if not already installed
...
Code Block |
---|
sudo apt update sudo apt install python3 python3-pip python3-venv |
2. Install
...
Same deal with package managers as above, but generally:
Mac
Code Block |
---|
brew install git |
...
and
...
Code Block |
---|
sudo apt update && sudo apt upgrade -y
sudo apt install git |
...
setup Docker (all platforms)
Follow the guidelines found here to install Docker (Linux) or Docker Desktop (Macos and Windows) Setting Up Docker
Windows users: Turn on WSL integration in Docker Desktop settings. Do this by going to Settings → Resources → WSL Integration → Turn on “Ubuntu”
...
3. Setup Scripts
Info |
---|
It is strongly recommended to maintain a directory structure like the following |
...
Info |
---|
Windows users: For better build performance, clone this to a folder within the Ubuntu disk. Do this by entering the ~ folder with |
Open the Embedded-Base repo, and run
...
Note |
---|
You always need the venv active when trying to interact with our build system |
Developing on our Team
a. Overview
Even if a lot of this is made easier for developers, it is still a good idea to become pretty familiar with what’s going on behind the scenes. As mentioned above, our embedded toolkit combines a python virtual environment with a docker container running Ubuntu to combine the ease and freedom of a local, pip-managed environment with the consistency and reliably of a single-platform backend. As long as docker, python. git and rust have been properly installed, everything below is set up automatically with the setup script!
...
Mainly, our Cmake build system and Renode Emulator work in docker. Whenever executing commands related to this, the command is passed into the container and run in there, streaming the output back to the user’s console. Most other tools, such as those to flash and debug, monitor serial output, and using git happen locally on the user’s machine inside of their venv.
b. Commands
See /wiki/spaces/NER/pages/611516420 for a full overview of the NER build system
c. (Windows only) WSL passthrough
Basically, WSL doesnt get the USB devices such as our circuit boards, by default. A program usbipd
fixes that. But, it cannot be run from WSL and therefore not automated.
...
Code Block |
---|
usbipd attach --wsl --busid <BUS_ID> |
Learning Resources
a. Git
View file | ||
---|---|---|
|
...