vscode: Add devcontainer
Signed-off-by: Thomas Klaehn <thomas.klaehn@perinet.io>
This commit is contained in:
parent
f94eeb5ffe
commit
d509688167
38
.devcontainer/Dockerfile
Normal file
38
.devcontainer/Dockerfile
Normal file
@ -0,0 +1,38 @@
|
||||
FROM debian:stable-slim
|
||||
|
||||
LABEL maintainer="thomas.klaehn@perinet.io"
|
||||
|
||||
# Enable contrip section for "repo"
|
||||
# RUN sed -i -e 's/.main$/ main contrib/' /etc/apt/sources.list
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get -y install --no-install-recommends \
|
||||
binutils-arm-none-eabi \
|
||||
gcc-arm-none-eabi \
|
||||
gdb-multiarch \
|
||||
git \
|
||||
libstdc++-arm-none-eabi-dev \
|
||||
libstdc++-arm-none-eabi-newlib \
|
||||
make \
|
||||
openocd
|
||||
|
||||
# Set UTF8 locale settings
|
||||
# RUN apt-get install -yq locales && \
|
||||
# locale-gen en_US.UTF-8 && \
|
||||
# sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||
# dpkg-reconfigure --frontend=noninteractive locales && \
|
||||
# update-locale LANG=en_US.UTF-8
|
||||
|
||||
# ENV LANG en_US.UTF-8
|
||||
|
||||
# RUN useradd -ms /bin/bash builder
|
||||
# RUN echo "builder:builder" | chpasswd
|
||||
|
||||
# ADD init.sh /usr/local/bin/init.sh
|
||||
|
||||
# WORKDIR = /work
|
||||
|
||||
# ENTRYPOINT ["/usr/local/bin/init.sh"]
|
||||
RUN mkdir /workspaces
|
||||
VOLUME /workspaces
|
||||
WORKDIR /workspaces/
|
||||
CMD ["/bin/bash"]
|
48
.devcontainer/devcontainer.json
Normal file
48
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,48 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
|
||||
{
|
||||
"name": "arm-none-eabi-cpp",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"build": { "dockerfile": "Dockerfile" },
|
||||
|
||||
// Privileged container in order to access /dev
|
||||
"privileged": true,
|
||||
|
||||
// Mount USB devices (debug probes, UART interfaces, ...)
|
||||
"mounts": [
|
||||
"source=/dev/bus/usb/,target=/dev/bus/usb/,type=bind"
|
||||
],
|
||||
// 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": "sudo apt update && sudo apt install -y openocd && sudo apt install -y gdb-multiarch",
|
||||
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.cpptools-extension-pack",
|
||||
"marus25.cortex-debug",
|
||||
"zoma.vscode-auto-open-workspace"
|
||||
],
|
||||
// default settings, can be overwritten in .vscode/settings.conf
|
||||
"settings": {
|
||||
"terminal.integrated.defaultProfile.linux.shell": "/bin/bash",
|
||||
"autoOpenWorkspace.enableAutoOpenIfSingleWorkspace": true,
|
||||
"autoOpenWorkspace.enableAutoOpenAlwaysFirst": true,
|
||||
"files.exclude": {
|
||||
"**/.git": true,
|
||||
"**/.repo": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -12,7 +12,7 @@
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "arm-none-eabi-gdb",
|
||||
"miDebuggerPath": "gdb-multiarch",
|
||||
"debugServerPath": "openocd",
|
||||
"debugServerArgs": "-f ${workspaceRoot}/openocd.cfg",
|
||||
"serverLaunchTimeout": 20000,
|
||||
|
Loading…
x
Reference in New Issue
Block a user