Skip to content

Latest commit

 

History

History
216 lines (165 loc) · 7.22 KB

INSTALL.md

File metadata and controls

216 lines (165 loc) · 7.22 KB

Installation Instructions for the Host Machine

This document serves as a short summary on how to setup the host machine for development of foxBMS 2.

For more detailed installation instructions (that include more automation and less user interaction during the installation) for the host machine see docs/getting-started/software-installation.rst.

NOTE 1:

Read the documentation carefully and follow every point exactly as described.
Otherwise, the configuration workload in later points of the setup or the development will be significantly higher.

NOTE 2:

These are the installation instructions for the host machine.
These are NOT the instructions for installing (i.e., flashing) the created binary on the target.
Flashing the binary requires a hardware debugger/flashing tool.

Installation steps

  1. Install git.

  2. Clone the repository into a path, that does NOT contain whitespace

    git clone https://github.com/foxBMS/foxbms-2
  3. Install Code Composer Studio (CCS) version 12.0.0 (chose Windows single file (offline) installer for Code Composer Studio IDE (all features, devices)).
    When running the installer:

    1. Do NOT change the default installation directory chosen by the installer (e.g., C:\ti\ccs1200 for CCS 12.0.0) and let the installer proceed with the installation.
    2. Select the Hercules™ Safety MCUs option during the installation.
  4. Install HALCoGen version 04.07.01.
    When running the installer:

    1. Do NOT change the default installation directory chosen by the installer (e.g., C:\ti\Hercules\HALCoGen\v04.07.01 for HALCoGen 04.07.01) and let the installer proceed with the installation.
  5. Install Python.
    If you have already installed Python from https://www.python.org this step can be skipped.

    NOTE 3:

    The minimum required Python version is 3.10.

  6. Open a terminal and run py --version, this should print something like Python 3.12.4 or similar to the terminal:

    py --version
    Python 3.12.4
  7. Create a virtual environment 2025-01-pale-fox by running in cmd.exe or PowerShell.

    • cmd.exe:

      py -m venv %USERPROFILE%\foxbms-envs\2025-01-pale-fox
    • PowerShell:

      py -m venv $env:USERPROFILE\foxbms-envs\2025-01-pale-fox
  8. Activate the virtual environment by running in cmd.exe or ``PowerShell`.

    • cmd.exe:

      %USERPROFILE%\foxbms-envs\2025-01-pale-fox\Scripts\activate.bat
    • PowerShell:

      &"$env:USERPROFILE\foxbms-envs\2025-01-pale-fox\Scripts\activate.ps1"
  9. Install the required packages by running:

    cd path\to\foxbms-2 # cd into the root of the repository
    python -m pip install -r requirements.txt --no-deps
  10. Install Ruby

    1. Download the installer version for Ruby 3.1.3-x64 without Devkit.

    2. Use C:\Ruby\Ruby3.1.3-x64 as installation directory

    3. Do NOT add Ruby to PATH.

    4. Install the required packages, i.e., Gems by running:

      cd path\to\foxbms-2 # cd into the root of the repository
      cd tools\vendor\ceedling
      C:\Ruby\Ruby3.1.3-x64\bin\bundle install # install the Ruby Gems
  11. Install GCC

    NOTE: Installing MinGW64 requires 7-Zip to be installed. 7-Zip can be download from https://7-zip.org.

    1. Download MinGW-W64 version x86_64-posix-seh from sourceforge.net (use exactly this 7z-archive).
    2. Extract the archive.
    3. Copy the extracted mingw64 directory to C:\mingw64\x86_64-8.1.0-release-posix-seh-rt_v6-rev0.
    4. Verify that gcc.exe is available at C:\MinGW64\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\mingw64\bin\gcc.exe.
  12. Install Doxygen

    1. Download Doxygen version 1.11.0 from GitHub (use this zip-archive).
    2. Extract the archive.
    3. Copy the extracted archive to C:\Users\<username>\doxygen\1.11.0.
    4. Verify that doxygen.exe is available at C:\Users\<username>\doxygen\1.11.0\doxygen.exe.
  13. Install Graphviz

    1. Download GraphViz version 11.0.0 from https://graphviz.org/download (use this zip-archive).
    2. Extract the archive.
    3. Copy the extracted archive to C:\Users\<username>\graphviz\11.0.0.
    4. Verify that dot.exe is available at C:\Users\<username>\graphviz\11.0.0\bin\dot.exe.
  14. Check that all required software is installed by running in cmd.exe or PowerShell.

    • cmd.exe:

      fox.bat install --check
    • PowerShell:

      .\fox.ps1 install --check
  15. (Optional): Install VS Code.

    1. Download VS Code from the project website at Visual Studio Code.
    2. Install code: |foxbms| recommends installing |code| with the User Installer, which does not require elevated rights.
    3. Optional: Let the installer add code to the PATH variable.

All required software is now installed.

Environment Updates

Sometimes it might be required to update the build environment. It that is the case, it is then mentioned in the CHANGELOG.md.

To update the build environment the following steps must be done:

NOTE: The placeholder <name-of-the-new-env> must be replaced with the actual name of the new build environment, which is then documented in the CHANGELOG.md.

  1. Create a virtual environment <name-of-the-new-env> by running in cmd.exe or PowerShell.

    • cmd.exe:

      py -m venv %USERPROFILE%\foxbms-envs\<name-of-the-new-env>
    • PowerShell:

      py -m venv $env:USERPROFILE\foxbms-envs\<name-of-the-new-env>
  2. Activate the virtual environment by running in cmd.exe or ``PowerShell`.

    • cmd.exe:

      %USERPROFILE%\foxbms-envs\<name-of-the-new-env>\Scripts\activate.bat
    • PowerShell:

      &"$env:USERPROFILE\foxbms-envs\<name-of-the-new-env>\Scripts\activate.ps1"
  3. Install the required packages by running:

    cd path\to\foxbms-2 # cd into the root of the repository
    python -m pip install -r requirements.txt --no-deps