├── .devcontainer └── devcontainer.json ├── .gitignore └── README.md /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/alpine 3 | { 4 | "name": "Zephyr", 5 | "image": "ghcr.io/zephyrproject-rtos/zephyr-build:latest" 6 | 7 | // Features to add to the dev container. More info: https://containers.dev/features. 8 | // "features": {}, 9 | 10 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 11 | // "forwardPorts": [], 12 | 13 | // Use 'postCreateCommand' to run commands after the container is created. 14 | // "postCreateCommand": "uname -a", 15 | 16 | // Configure tool-specific properties. 17 | // "customizations": {}, 18 | 19 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 20 | // "remoteUser": "root" 21 | } 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Object files 5 | *.o 6 | *.ko 7 | *.obj 8 | *.elf 9 | 10 | # Linker output 11 | *.ilk 12 | *.map 13 | *.exp 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | 25 | # Shared objects (inc. Windows DLLs) 26 | *.dll 27 | *.so 28 | *.so.* 29 | *.dylib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.i*86 36 | *.x86_64 37 | *.hex 38 | 39 | # Debug files 40 | *.dSYM/ 41 | *.su 42 | *.idb 43 | *.pdb 44 | 45 | # Kernel Module Compile Results 46 | *.mod* 47 | *.cmd 48 | .tmp_versions/ 49 | modules.order 50 | Module.symvers 51 | Mkfile.old 52 | dkms.conf 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # zephyr-vscode-workspace 2 | A VS Code Workspace for developing Zephyr Projects. 3 | 4 | It opens a Docker container from the official [Zephyr Docker images](https://github.com/zephyrproject-rtos/docker-image) which has everything you need to get started developing a Zephyr project. 5 | 6 | Use this template to quickly set up a dev enviroment on any machine with Docker and VSCode :) 7 | 8 | https://user-images.githubusercontent.com/2559382/233291862-37514c50-0c57-4d46-82f3-a3f49b57402a.mp4 9 | 10 | ## How to use 11 | 12 | You should already have Docker and VSCode with the remote containers plugin installed on your system. 13 | 14 | * [docker](https://docs.docker.com/engine/install/) 15 | * [vscode](https://code.visualstudio.com/) 16 | * [vscode remote containers plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) 17 | 18 | ### Get the template 19 | 20 | Click on "use this template" in the top right corner of this repo on the Github site. 21 | 22 | ### Create your repository 23 | 24 | On the next dialog, name the repository you would like to start and decide if you want all of the branches, or just the main. 25 | 26 | Github will then create a new repository with the contents of this one in your account. It grabs the latest changes as "initial commit". 27 | 28 | ### Clone your repo 29 | 30 | Now you can clone your repo as normal 31 | 32 | ### Open it in vscode 33 | 34 | Now that you've cloned your repo onto your computer, you can open it in VSCode (File->Open Folder). 35 | 36 | When you open it for the first time, you should see a little popup that asks you if you would like to open it in a container. Say yes! 37 | 38 | If you don't see the pop-up, click on the little green square in the bottom left corner, which should bring up the container dialog 39 | 40 | In the dialog, select "Remote Containers: Reopen in container" 41 | 42 | VSCode will build the dockerfile inside of `.devcontainer` for you. If you open a terminal inside VSCode (Terminal->New Terminal), you should see that your username has been changed to `user`, and the bottom left green corner should say "Dev Container" 43 | 44 | ### Author 45 | 46 | [Keenan Johnson](https://www.keenanjohnson.com/) is an electrical and software engineer with experience building IoT fleets of all shapes and sizes. 47 | 48 | [Reach out](https://www.keenanjohnson.com/consulting) if you need help or are interested in hiring me as a consultant for your project. 49 | --------------------------------------------------------------------------------