Created for and primarily used by Triton Robotics, a UCSD competitive robotics team.
- [Embedded-Dev: Containerized](#Embedded-Dev: Containerized)
- Fully modularized: Can be installed onto any system with the appropriate prerequisites
- Includes all dependencies required for development using the mbed framework
- Automated, one line installation, powered by Docker
- Ease of accessibility, powered by a custom Makefile
- Docker
-
Install Docker using above link
-
Ensure Docker is enabled to run on startup and added to the
dockergroup. Restart your computer after running these commands:sudo systemctl enable docker.service sudo systemctl enable containerd.service sudo usermod -aG docker $USER
-
- Make, which can be installed using
sudo apt install build-essentialon most Debian based systems. - Basic knowledge of container based applications, which you can read about here.
- Clone this repo.
git clone https://github.com/Triton-Robotics/embedded-dev.gitcdinto the newly created folder. Runmake.
cd inside the embedded-dev folder (Where the Makefile and Dockerfile files are located). The Makefile provides a set of commands available for ease of accessibility.
make: Enters the container, allowing you to run mbed commands.- If mbed has not been downloaded, installation is automatically started
- Automatically creates container if a container has not yet been created
- Creates a new bash terminal which is running inside the container.
make clean: Stops currently running container.make status: Indicates whether the container is running or not.
Additional commands can be seen by running make help.
- All source code and mbed projects should be stored inside the
projectsfolder.- This folder is synced across your host system and the container.
- This allows you to edit your code using your host OS and preferred IDE, and prevents code from being deleted when the container stops running.
- See this tutorial for more information on workspace management.
Since container based systems do not remember installations after the container stops running, it is necessary to add additional installations to the Dockerfile itself.
-
Additional packages can be added to the Dockerfile by adding the package to the user specific packages section.
# user specific packages RUN apt-get update && apt-get install -y --no-install-recommends \ # package-name-here \ && rm -rf /var/lib/apt/lists/*
-
After updating the Dockerfile, run
make dockerfileto install added packages and regenerate the container image. -
Restart the container by running
make clean, thenmake.
Issues can be reported using the corresponding GitHub tab, or by contacting the developer using Discord at Waycey#9999
Known issues:
- Serial output may not be printed when using the
--stermargument for compiles. The cause for this issue has not yet been found, but can be solved by restarting this container usingmake clean, then re-makethe container.
Tested on: Ubuntu 18.04, Ubuntu 21.04, Fedora 35, and Arch Linux