This is a template workspace for developing Zephyr RTOS application in a VS Code development container.
Make sure the prerequisites are satisfied, as described in the Dev Containers tutorial. In particular, that Docker is up and running and the Dev Containers extension is installed.
git clone https://github.com/cooked/vscode-zephyr-devcontainer.git
After cloning the repo adjust the devcontainer parameters according to your needs (for example, to mount folders that are outside of the project location, otherwise only the workspace content is available in the container).
// eg. mount "foo" folder from your home folder, to the containerized workspace
"mounts": [
"source={env:HOME}/foo,target=${containerWorkspaceFolder}/foo,type=bind,consistency=cached",
],
Finally, launch the container from inside VSCode with CTRL+SHIFT+P then Dev Containers: Reopen in container.
Few basic tasks can be accessed with CTRL+SHIFT+B (to test everything is working try to run Zephyr sample build > blinky).
To keep the containers small, only the required toolchain for a specific target/manufacturer is installed.
Currently, only stm32 is available as a package out of the box.
Additionally, the only tested host is Linux.
The devel branch contains a modified devcontainer.json to build from the local Dockerfile, useful for development (i.e. the "image" key is replaced by the following snippet where fine tuning the build args is possible).
"dockerFile": "Dockerfile",
"context": "../",
"build": {
"args": {
"TARGET" : "stm32",
"TOOLCHAIN" : "arm-zephyr-eabi",
"ZSDK_VERSION" : "0.16.8",
"WEST_MANIFEST" : ".manifests/west-stm32.yml"
}
}