From 375342a87f9fa7fc554debd55da279842aba1622 Mon Sep 17 00:00:00 2001 From: Blake Freer <59676067+BlakeFreer@users.noreply.github.com> Date: Tue, 1 Oct 2024 21:43:51 -0400 Subject: [PATCH] Add CANgen requirements to dev setup (#200) --- docs/docs/firmware/dev-setup.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/docs/firmware/dev-setup.md b/docs/docs/firmware/dev-setup.md index 62d244aed..635eebd9f 100644 --- a/docs/docs/firmware/dev-setup.md +++ b/docs/docs/firmware/dev-setup.md @@ -141,6 +141,32 @@ Navigate to a directory where you would like to hold the `racecar` repo (I used git clone --recurse-submodules https://github.com/macformula/racecar.git +## Install CANgen dependencies + +Create a Python virtual environment for CANgen. Navigate into `racecar/firmware` and run. + +=== "Windows" + + ```text + python -m venv .env + .env\Scripts\activate + ``` + +=== "Linux / Mac" + + ```bash + python3 -m venv .env + source .env/bin/activate + ``` + +The second command "activates" the virtual environment. You will see `(.env)` beside your terminal prompt when it is activated, and it must be activated before building any project. + +Finally, with the environment activated, install the CANgen requirements. + +```bash +pip install -r ../scripts/cangen/requirements.txt +``` + You can now start developing in `racecar`! However, I recommend you configure your IDE with `clangd`, so continue to the next section. ## IDE Integration