diff --git a/.devcontainer/Readme.md b/.devcontainer/Readme.md index 00acbb57863e3..7a8975192bc4c 100644 --- a/.devcontainer/Readme.md +++ b/.devcontainer/Readme.md @@ -1,31 +1,46 @@ -Build CircuitPython in a Github-Devcontainer -============================================ +Build CircuitPython in a Github-Codespace +========================================= -To build CircuitPython within a Github-Devcontainer, you need to perform +To build CircuitPython within a Github codespace, you need to perform the following steps. - 1. checkout the code to a devcontainer - - - click on the green "<> Code"-button - - select the Codespaces-tab - - choose "+ new with options..." from the "..."-menu - - in the following screen select the branch and then - - select ".devcontainer/cortex-m/devcontainer.json" instead - of "Default Codespaces configuration" - - update region as necessary - - finally, click on the green "Create codespace" button - - 2. Your codespace is created. Cloning the images is quite fast, but - preparing it for CircuitPython-development takes about 10 minutes. - Note that this is a one-time task. + 1. checkout the code to a codespace + + - click on the green "<> Code"-button + - select the Codespaces-tab + - choose "+ new with options..." from the "..."-menu + - in the following screen select the branch and then + - select the port instead of "Default project configuration" + (unsupported: ports not using cortex-m or esp-idf)\ + ![](./codespace_options.png) + - update region as necessary + - finally, click on the green "Create codespace" button + + 2. Your codespace is created. Cloning the image and the repo is quite fast, + but preparing it for CircuitPython-development takes about 10 minutes. + But this is a one-time task: once created, your codespace exists + until you explicitly delete it or until it times out (default: 30 days).\ + (Technical note: due to a bug in codespace creation, the setup is + triggered from `$HOME/.bashrc` and runs in the background). 3. During creation, you can run the command - `tail -f /workspaces/.codespaces/.persistedshare/creation.log` - to see what is going on. + `tail -f /workspaces/install_build_env.log.active` + to see what is going on. Once finished the log file is available + as `/workspaces/install_build_env.log`. - 4. To actually build CircuitPython, run + 4. To actually build CircuitPython, open a new terminal and run e.g. cd ports/raspberrypi make -j $(nproc) BOARD=whatever TRANSLATION=xx_XX - This takes about 2m40s. + This takes about 2m40s. The new terminal is necessary since the + setup of the build environment also changes `$HOME/.bashrc` and + sets important environment variables in that file. + +As a normal user, you have 120 CPU-hours and 15GB per month free. Since +the smallest machine has two CPUs, you effectively have 60 hours active +time available. + +All scripts are in `circuitpython/.devcontainer` and can also be executed +manually which should usually not be necessary. With small changes, they +should also work on a Linux-PC or laptop. diff --git a/.devcontainer/cortex-m/devcontainer.json b/.devcontainer/atmel-samd/devcontainer.json similarity index 70% rename from .devcontainer/cortex-m/devcontainer.json rename to .devcontainer/atmel-samd/devcontainer.json index ee8aeb1ea0fd1..c646ab47384c5 100644 --- a/.devcontainer/cortex-m/devcontainer.json +++ b/.devcontainer/atmel-samd/devcontainer.json @@ -1,10 +1,11 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/universal { - "name": "CircuitPython Cortex-M Build-Environment (base: Default Linux Universal)", - "image": "mcr.microsoft.com/devcontainers/universal:2-linux", - "postCreateCommand": ".devcontainer/cortex-m/on-create.sh", - "remoteEnv": { "PATH": "/workspaces/gcc-arm-none-eabi/bin:${containerEnv:PATH}" } + "name": "atmel-samd", + "image": "mcr.microsoft.com/devcontainers/universal:2", + "postCreateCommand": ".devcontainer/post_create.sh", + "remoteEnv": { "CP_TOOLCHAIN": "cortex-m", + "CP_PORT": "atmel-samd" } // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, diff --git a/.devcontainer/codespace_options.png b/.devcontainer/codespace_options.png new file mode 100644 index 0000000000000..39502d9bd0800 Binary files /dev/null and b/.devcontainer/codespace_options.png differ diff --git a/.devcontainer/common_tools.sh b/.devcontainer/common_tools.sh new file mode 100755 index 0000000000000..14cf76c3fe22d --- /dev/null +++ b/.devcontainer/common_tools.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# common_tools.sh: install tools and requirements for CircuitPython +# +# This script installs tools common to all builds. +# +# Author: Bernhard Bablok +# +# ----------------------------------------------------------------------------- + +REPO_ROOT="/workspaces/circuitpython" + +echo -e "[common_tools.sh] starting install" +cd "$REPO_ROOT" + +# --- repositories and tools ------------------------------------------------ + +echo -e "[common_tools.sh] adding pybricks/ppa" +sudo add-apt-repository -y ppa:pybricks/ppa +echo -e "[common_tools.sh] installing uncrustify and mtools" +sudo apt-get -y install uncrustify mtools + +# dosfstools >= 4.2 needed, standard repo only has 4.1 +echo -e "[common_tools.sh] downloading and installing dosfstools" +wget https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz +tar -xzf dosfstools-4.2.tar.gz +(cd dosfstools-4.2/ + ./configure + make -j $(nproc) + sudo make install +) +rm -fr dosfstools-4.2 dosfstools-4.2.tar.gz + +# --- circuitpython setup -------------------------------------------------- + +# additional python requirements +echo -e "[common_tools.sh] pip-installing requirements" +pip install --upgrade -r requirements-dev.txt +pip install --upgrade -r requirements-doc.txt + +# add pre-commit +echo -e "[common_tools.sh] installing pre-commit" +pre-commit install diff --git a/.devcontainer/cortex-m-toolchain.sh b/.devcontainer/cortex-m-toolchain.sh new file mode 100755 index 0000000000000..de1ccde62742a --- /dev/null +++ b/.devcontainer/cortex-m-toolchain.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# cortex-m-toolchain.sh: install toolchain for CircuitPython +# +# Author: Bernhard Bablok +# +# ----------------------------------------------------------------------------- + +echo -e "[cortex-m-toolchain.sh] starting install" + +# --- tooling -------------------------------------------------------------- + +echo -e "[cortex-m-toolchain.sh] downloading and installing gcc-arm-non-eabi toolchain" +cd /workspaces + +wget -qO gcc-arm-none-eabi.tar.xz \ + https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz + +tar -xJf gcc-arm-none-eabi.tar.xz +ln -s arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi gcc-arm-none-eabi +rm -f gcc-arm-none-eabi.tar.xz + +echo -e "[cortex-m-toolchain.sh] update PATH in environment" +echo -e "\nexport PATH=/workspaces/gcc-arm-none-eabi/bin:$PATH" >> $HOME/.bashrc diff --git a/.devcontainer/cortex-m/on-create.sh b/.devcontainer/cortex-m/on-create.sh deleted file mode 100755 index 3db1ff3f38c44..0000000000000 --- a/.devcontainer/cortex-m/on-create.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# ----------------------------------------------------------------------------- -# on-create.sh: postCreateCommand-hook for devcontainer.json (Cortex-M build) -# -# Author: Bernhard Bablok -# -# ----------------------------------------------------------------------------- - -echo -e "[on-create.sh] downloading and installing gcc-arm-non-eabi toolchain" -cd /workspaces -wget -qO gcc-arm-none-eabi.tar.bz2 https://adafru.it/Pid -tar -xjf gcc-arm-none-eabi.tar.bz2 -ln -s gcc-arm-none-eabi-10-2020-q4-major gcc-arm-none-eabi -rm -f /workspaces/gcc-arm-none-eabi.tar.bz2 -export PATH=/workspaces/gcc-arm-none-eabi/bin:$PATH - -# add repository and install tools -echo -e "[on-create.sh] adding pybricks/ppa" -sudo add-apt-repository -y ppa:pybricks/ppa -echo -e "[on-create.sh] installing uncrustify and mtools" -sudo apt-get -y install uncrustify mtools - -# dosfstools >= 4.2 needed, standard repo only has 4.1 -echo -e "[on-create.sh] downloading and installing dosfstools" -wget https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz -tar -xzf dosfstools-4.2.tar.gz -cd dosfstools-4.2/ -./configure -make -j $(nproc) -sudo make install -cd /workspaces -rm -fr /workspaces/dosfstools-4.2 /workspaces/dosfstools-4.2.tar.gz - -# prepare source-code tree -cd /workspaces/circuitpython/ -echo -e "[on-create.sh] fetching submodules" -make fetch-all-submodules -echo -e "[on-create.sh] fetching tags" -git fetch --tags --recurse-submodules=no --shallow-since="2021-07-01" https://github.com/adafruit/circuitpython HEAD - -# additional python requirements -echo -e "[on-create.sh] pip-installing requirements" -pip install --upgrade -r requirements-dev.txt -pip install --upgrade -r requirements-doc.txt - -# add pre-commit -echo -e "[on-create.sh] installing pre-commit" -pre-commit install - -# create cross-compiler -echo -e "[on-create.sh] building mpy-cross" -make -j $(nproc) -C mpy-cross # time: about 36 sec - -# that's it! -echo -e "[on-create.sh] setup complete" - -#commands to actually build CP: -#cd ports/raspberrypi -#time make -j $(nproc) BOARD=pimoroni_tufty2040 TRANSLATION=de_DE diff --git a/.devcontainer/cxd56/devcontainer.json b/.devcontainer/cxd56/devcontainer.json new file mode 100644 index 0000000000000..250bc24b7276e --- /dev/null +++ b/.devcontainer/cxd56/devcontainer.json @@ -0,0 +1,24 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/universal +{ + "name": "cxd56", + "image": "mcr.microsoft.com/devcontainers/universal:2", + "postCreateCommand": ".devcontainer/post_create.sh", + "remoteEnv": { "CP_TOOLCHAIN": "cortex-m", + "CP_PORT": "cxd56" } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/esp-idf-toolchain.sh b/.devcontainer/esp-idf-toolchain.sh new file mode 100755 index 0000000000000..433d37f0ccdc7 --- /dev/null +++ b/.devcontainer/esp-idf-toolchain.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# esp-idf-toolchain.sh: install toolchain for CircuitPython +# +# Author: Bernhard Bablok +# +# ----------------------------------------------------------------------------- +REPO_ROOT="/workspaces/circuitpython" + +echo -e "[esp-idf-toolchain.sh] starting install" + +# --- tooling -------------------------------------------------------------- + +echo -e "[esp-idf-toolchain.sh] fetch packages" +sudo apt-get update +sudo apt-get -y install ninja-build cmake libusb-1.0-0 + +# --- esp-idf -------------------------------------------------------------- + +echo -e "[esp-idf-toolchain.sh] installing esp-idf" +cd "$REPO_ROOT/ports/espressif" +esp-idf/install.sh +source esp-idf/export.sh + +# --- re-install our packages in venv created by export.sh ----------------- + +echo -e "[esp-idf-toolchain.sh] updating python-packages" +cd "$REPO_ROOT" +pip3 install --upgrade -r requirements-dev.txt +pip3 install --upgrade -r requirements-doc.txt + +# --- and again install esp-idf (needs other versions) ---------------------- + +echo -e "[esp-idf-toolchain.sh] installing esp-idf (2nd iteration)" +cd "$REPO_ROOT/ports/espressif" +esp-idf/install.sh + +# --- update $HOME/.bashrc -------------------------------------------------- + +echo -e "[esp-idf-toolchain.sh] update environment in .bashrc" + +echo -e "\nsource $REPO_ROOT/ports/espressif/esp-idf/export.sh &> /dev/null\n" >> "$HOME"/.bashrc diff --git a/.devcontainer/espressif/devcontainer.json b/.devcontainer/espressif/devcontainer.json new file mode 100644 index 0000000000000..83dc698428634 --- /dev/null +++ b/.devcontainer/espressif/devcontainer.json @@ -0,0 +1,24 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/universal +{ + "name": "espressif", + "image": "mcr.microsoft.com/devcontainers/universal:2", + "postCreateCommand": ".devcontainer/post_create.sh", + "remoteEnv": { "CP_TOOLCHAIN": "esp-idf", + "CP_PORT": "espressif" } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/fetch-port-submodules.sh b/.devcontainer/fetch-port-submodules.sh new file mode 100755 index 0000000000000..573396dd23b02 --- /dev/null +++ b/.devcontainer/fetch-port-submodules.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# fetch-port-submodules.sh: fetch port specific submodules +# +# Author: Bernhard Bablok +# +# ----------------------------------------------------------------------------- + +REPO_ROOT="/workspaces/circuitpython" +cd "$REPO_ROOT" + +if [ -z "$CP_PORT" ]; then + echo -e "[fetch-port-submodules.sh] CP_PORT not set. Cannot fetch submodules!" + exit 3 +fi + +cd "ports/$CP_PORT" +echo -e "[fetch-port-submodules.sh] fetching necessary submodules" +make fetch-port-submodules diff --git a/.devcontainer/install_build_env.sh b/.devcontainer/install_build_env.sh new file mode 100755 index 0000000000000..6653b68c43a17 --- /dev/null +++ b/.devcontainer/install_build_env.sh @@ -0,0 +1,64 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# install_build_env.sh: install build-environment for CircuitPython +# +# Normally, this should run directly as postCreateCommand during container +# creation. Due to an unresolved bug on how Github-codespaces creates a clone, +# this script is started from $HOME/.bashrc instead. +# +# The script delegates parts to other scripts for reuse across toolchains. +# This has the added benefit that they can be called independently later again +# if necessary. +# +# The scripts expect the environment-variables CP_TOOLCHAIN and CP_PORT to be set +# to valid values. This is normally done from within +# .devcontainer//devcontainer.json +# +# Author: Bernhard Bablok +# +# ----------------------------------------------------------------------------- +REPO_ROOT="/workspaces/circuitpython" + +# --- install exit-handler for cleanup -------------------------------------- + +on_exit() { + rc=$? + if [ -f /workspaces/install_build_env.log.active ]; then + mv /workspaces/install_build_env.log.active /workspaces/install_build_env.log + fi + rm -rf /tmp/install_build_env + exit $rc +} + +# --- test prerequisites for installation ------------------------------------ + +while ! test -f /workspaces/post_create.finished; do + echo -e "[install_build_env.sh] waiting for /workspaces/post_create.finished ..." + sleep 1 +done + +if [ -f /workspaces/install_build_env.log ]; then + echo -e "[install_build_env.sh] installation already done" + exit 0 +elif ! mkdir /tmp/install_build_env 2>/dev/null; then + # mkdir is atomic, so we know we are already running + echo -e "[install_build_env.sh] install already running with PID $(cat /tmp/install_build_env/pid.txt)" + exit 0 +else + echo -e "$$" > /tmp/install_build_env/pid.txt + trap 'on_exit' EXIT +fi + +echo -e "[install_build_env.sh] starting install" + +# --- delegate install steps to other scripts ------------------------------- +( +"$REPO_ROOT/.devcontainer/fetch-port-submodules.sh" || exit 3 +"$REPO_ROOT/.devcontainer/common_tools.sh" || exit 3 +"$REPO_ROOT/.devcontainer/$CP_TOOLCHAIN-toolchain.sh" || exit 3 +"$REPO_ROOT/.devcontainer/make-mpy-cross.sh" || exit 3 +echo -e "Setup complete!\nStart a new terminal and build CircuitPython!\n" +) |& tee /workspaces/install_build_env.log.active + +echo -e "[install_build_env.sh] Setup complete!" +exit 0 diff --git a/.devcontainer/make-mpy-cross.sh b/.devcontainer/make-mpy-cross.sh new file mode 100755 index 0000000000000..bc24635465f59 --- /dev/null +++ b/.devcontainer/make-mpy-cross.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# make-mpy-cross.sh: fetch tags and prereqs, then build mpy-cross +# +# Author: Bernhard Bablok +# +# ----------------------------------------------------------------------------- + +REPO_ROOT="/workspaces/circuitpython" +cd "$REPO_ROOT" + +# fetch tags and tools for mpy-cross +echo -e "[make-mpy-cross.sh] fetching tags" +make fetch-tags +echo -e "[make-mpy-cross.sh] fetching prerequisites" +python3 tools/ci_fetch_deps.py mpy-cross + +# create cross-compiler +echo -e "[make-mpy-cross.sh] building mpy-cross" +if ! make -j $(nproc) -C mpy-cross; then # time: about 36 sec + echo -e "[make-mpy-cross.sh] make mpy-cross failed" + exit 3 +fi +exit 0 diff --git a/.devcontainer/mimxrt10xx/devcontainer.json b/.devcontainer/mimxrt10xx/devcontainer.json new file mode 100644 index 0000000000000..3b529770af04a --- /dev/null +++ b/.devcontainer/mimxrt10xx/devcontainer.json @@ -0,0 +1,24 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/universal +{ + "name": "mimxrt10xx", + "image": "mcr.microsoft.com/devcontainers/universal:2", + "postCreateCommand": ".devcontainer/post_create.sh", + "remoteEnv": { "CP_TOOLCHAIN": "cortex-m", + "CP_PORT": "mimxrt10xx" } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/post_create.sh b/.devcontainer/post_create.sh new file mode 100755 index 0000000000000..f7fea3e44fefd --- /dev/null +++ b/.devcontainer/post_create.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# post_create.sh: postCreateCommand-command writing to $HOME/.bashrc +# +# Author: Bernhard Bablok +# +# ----------------------------------------------------------------------------- + +echo -e "[post_create.sh] starting postCreateCommand $0\n" +echo -e "[post_create.sh] PWD=$PWD\n" + +cat >> $HOME/.bashrc << "EOF" + +if [ -f /workspaces/install_build_env.log ]; then + # setup already done + echo "CircuitPython build-environment ready for $CP_TOOLCHAIN/$CP_PORT" + echo "To start a build run:" + echo " cd ports/$CP_PORT" + echo " time make -j $(nproc) BOARD=your_board_name TRANSLATION=de_DE" +elif [ -f /workspaces/install_build_env.log.active ]; then + echo "Initial setup of build environment in progress, please wait." + echo "Use 'tail -f /workspaces/install_build_env.log.active' to monitor progress." + echo "After successful installation, start a new terminal to build CircuitPython." +else + echo "Starting initial setup of build environment, please wait" + nohup /workspaces/circuitpython/.devcontainer/install_build_env.sh >> $HOME/nohup.out & + echo "Use 'tail -f /workspaces/install_build_env.log.active' to monitor progress." + echo "After successful installation, start a new terminal to build CircuitPython." +fi + +EOF +touch /workspaces/post_create.finished + +# --- that's it! ------------------------------------------------------------ + +echo -e "[post_create.sh] setup complete\n" diff --git a/.devcontainer/raspberrypi/devcontainer.json b/.devcontainer/raspberrypi/devcontainer.json new file mode 100644 index 0000000000000..07f718f48733e --- /dev/null +++ b/.devcontainer/raspberrypi/devcontainer.json @@ -0,0 +1,24 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/universal +{ + "name": "raspberrypi", + "image": "mcr.microsoft.com/devcontainers/universal:2", + "postCreateCommand": ".devcontainer/post_create.sh", + "remoteEnv": { "CP_TOOLCHAIN": "cortex-m", + "CP_PORT": "raspberrypi" } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/silabs/devcontainer.json b/.devcontainer/silabs/devcontainer.json new file mode 100644 index 0000000000000..922cef8fe0ccd --- /dev/null +++ b/.devcontainer/silabs/devcontainer.json @@ -0,0 +1,24 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/universal +{ + "name": "silabs", + "image": "mcr.microsoft.com/devcontainers/universal:2", + "postCreateCommand": ".devcontainer/post_create.sh", + "remoteEnv": { "CP_TOOLCHAIN": "cortex-m", + "CP_PORT": "silabs" } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/stm/devcontainer.json b/.devcontainer/stm/devcontainer.json new file mode 100644 index 0000000000000..1d811ced1c329 --- /dev/null +++ b/.devcontainer/stm/devcontainer.json @@ -0,0 +1,24 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/universal +{ + "name": "stm", + "image": "mcr.microsoft.com/devcontainers/universal:2", + "postCreateCommand": ".devcontainer/post_create.sh", + "remoteEnv": { "CP_TOOLCHAIN": "cortex-m", + "CP_PORT": "stm" } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +}