diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..0442382 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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" +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a569273 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/fsfw b/fsfw new file mode 160000 index 0000000..8b9a468 --- /dev/null +++ b/fsfw @@ -0,0 +1 @@ +Subproject commit 8b9a468893a49d100ad5a543656c3864e0be8203