Skip to content

Commit

Permalink
Add devcontainer configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
shishir-dey committed Nov 30, 2024
1 parent 14278c7 commit 8e9b31e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Development container for STM32",
"build": {
"dockerfile": "Dockerfile"
},
"workspaceFolder": "/workspace",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cmake-tools",
"ms-vscode.cpptools"
]
}
},
"mounts": [
"source=${localWorkspaceFolder},target=/workspace,type=bind"
],
"postCreateCommand": "echo 'Dev environment ready!'"
}
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Use a lightweight base image
FROM ubuntu:20.04

# Set environment variables for non-interactive installation
ENV DEBIAN_FRONTEND=noninteractive

# Update and install required packages
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
software-properties-common \
wget \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Download and install arm-none-eabi-gcc
RUN wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu-rm/12.2.rel1/gcc-arm-none-eabi-12.2.rel1-x86_64-linux.tar.bz2 \
| tar -xj -C /opt/ \
&& ln -s /opt/gcc-arm-none-eabi-12.2.rel1/bin/* /usr/local/bin/

# Verify installation
RUN arm-none-eabi-gcc --version

# Set the working directory inside the container
WORKDIR /workspace

# Default command for the container
CMD ["bash"]

0 comments on commit 8e9b31e

Please sign in to comment.