forked from ROMEO/obsw
experimental Dockerfile with VSCode devcontainer
This commit is contained in:
parent
139c6a0356
commit
f3706c1a72
51
.devcontainer/devcontainer.json
Normal file
51
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,51 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
|
||||
{
|
||||
"name": "Existing Dockerfile",
|
||||
"build": {
|
||||
// Sets the run context to one level up instead of the .devcontainer folder.
|
||||
"context": "..",
|
||||
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
|
||||
"dockerfile": "../Dockerfile"
|
||||
},
|
||||
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"rust-lang.rust-analyzer",
|
||||
"tamasfe.even-better-toml",
|
||||
"serayuzgur.crates",
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.cpptools-extension-pack",
|
||||
"twxs.cmake",
|
||||
"ms-vscode.cmake-tools",
|
||||
"rogalmic.bash-debug",
|
||||
"gruntfuggly.todo-tree",
|
||||
"ms-python.python",
|
||||
"eamodio.gitlens",
|
||||
"mhutchie.git-graph",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"formulahendry.code-runner",
|
||||
"GitHub.copilot",
|
||||
"GitHub.copilot-chat",
|
||||
"hoovercj.vscode-settings-cycler",
|
||||
"vadimcn.vscode-lldb"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
// 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": [],
|
||||
|
||||
// Uncomment the next line to run commands after the container is created.
|
||||
// "postCreateCommand": "cat /etc/os-release",
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "devcontainer"
|
||||
}
|
52
Dockerfile
Normal file
52
Dockerfile
Normal file
@ -0,0 +1,52 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
# Install required packages
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
gcc \
|
||||
g++ \
|
||||
git \
|
||||
curl \
|
||||
wget \
|
||||
make \
|
||||
openocd \
|
||||
gdb-multiarch \
|
||||
gcc-arm-none-eabi \
|
||||
fish \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Install Rust toolchain
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
|
||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
RUN rustup target add armv7-unknown-linux-gnueabihf
|
||||
RUN rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||
RUN rustup override set nightly
|
||||
|
||||
# # Clone FSBL code from the Xilinx repository
|
||||
# RUN git clone https://github.com/Xilinx/embeddedsw.git
|
||||
# # Build the FSBL
|
||||
# RUN cd embeddedsw/lib/sw_apps/zynq_fsbl/src/ && make BOARD=zed CFLAGS=-DFSBL_DEBUG_INFO
|
||||
|
||||
|
||||
# RUN cd mission_rust
|
||||
# RUN cargo update
|
||||
# RUN cargo build -Z build-std
|
||||
|
||||
# Set a working directory
|
||||
# WORKDIR /workspace/mission_rust
|
||||
# Assuming the Rust project is copied into the container
|
||||
WORKDIR /workspace/
|
||||
COPY . .
|
||||
|
||||
# Build commands can be added here if needed
|
||||
# For example, to build the FSBL project:
|
||||
# RUN cd embeddedsw/lib/sw_apps/zynq_fsbl/src/ && make BOARD=zed CFLAGS=-DFSBL_DEBUG_INFO
|
||||
|
||||
# RUN mkdir build_cli
|
||||
# RUN cd build_cli
|
||||
# RUN cmake -DCMAKE_TOOLCHAIN_FILE=../bsp_z7/cmake/arm-none-eabi.toolchain ..
|
||||
|
||||
# Set the entrypoint to a shell
|
||||
ENTRYPOINT ["/usr/bin/fish"]
|
1
fsfw
Submodule
1
fsfw
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 8b9a468893a49d100ad5a543656c3864e0be8203
|
Loading…
x
Reference in New Issue
Block a user