3. Software Installation
This document describes how to setup the host machine for development of foxBMS 2.
Note
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
Some programs are installed into a specific foxBMS 2 prefix. This is mostly then done, when the installers do not support side-by-side or versioned installations by themself.
Warning
All commands shall be run in PowerShell 7 or later.
All commands shall be run in the root of the repository.
Warning
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.
Getting started with foxBMS 2 requires getting the sources and installing all required software dependencies. These are the required steps:
Install Git
Get the foxBMS 2 sources
Install TI Code Composer Studio (required for compiling)
Install TI HALCoGen (required for code generation)
Install Python (required for tools)
Install virtual Python environment (required for tools)
Install Ruby (required for unit testing)
Install Ruby gems (required for unit testing)
Install mingw-w64 (required for unit testing)
Install Doxygen (required for building the documentation)
Install Graphviz (required for building the documentation)
Install drawio-desktop (required for building the documentation)
Install VS Code (required developing)
Check the installation
Note
No software installation here should change the PATH
environment
variable.
When an installer asks during the setup to add something to PATH
, always
remove that option, whether it is explicitly mentioned in
that step or not.
The only exception to that rule MAY be Git and VS Code
.
The installation steps are described below in detail.
3.1. Install Git
Download the latest version of Git at https://git-scm.com/ and run the installer.
Optional: Let the installer add Git to the
PATH
variable.
3.2. Get the foxBMS 2 Sources
The sources are available from a Git repository at https://github.com/foxBMS/ in https://github.com/foxBMS/foxbms-2. The following example shows how to clone the foxBMS 2 sources from GitHub.
In the case that you have been supplied with a “library-project” by a partner, please use this archive equivalent to the cloned foxBMS 2 repository” in the later steps of this manual.
Note
git
requires a correct proxy setup.
This means that the environment variables http_proxy
and https_proxy
must be set accordingly to your network configuration.
Warning
Do not clone/download foxBMS 2 into a directory structure that includes whitespace.
Good |
Bad |
|
|
|
|
Clone the repository by running
git clone https://github.com/foxBMS/foxbms-2
3.3. Install TI Code Composer Studio
Download Code Composer Studio (CCS)
version 12.8.1
and run the installer (chose the
single file (offline) installer for Code Composer Studio IDE (all features, devices)
depending on your host platform).
When running the installer:
Do NOT change the default installation directory chosen by the installer and let the installer proceed with the installation into the installation directory (e.g.,
C:\ti\ccs1281
for CCS12.8.1
).Select the
Hercules™ Safety MCUs
option during the installation.
When running the installer:
Do NOT change the default installation directory chosen by the installer and let the installer proceed with the installation into the installation directory (e.g.,
/opt/ti/ccs1281
for CCS12.8.1
).Select the
Hercules™ Safety MCUs
option during the installation.
Installing TI Code Composer Studio may take a while.
3.4. Install TI HALCoGen
Download TI HALCoGen version 04.07.01
from
https://www.ti.com/tool/HALCOGEN
and run the installer.
When running the installer:
Do not change the default installation directory chosen by the
installer and let the installer proceed with the installation into the
installation directory (i.e., C:\ti\...
for TI HALCoGen 04.07.01
that means into C:\ti\Hercules\HALCoGen\v04.07.01
).
Installing TI HALCoGen may take a while.
TI HALCoGen is not available on Linux.
3.5. Install Python
Install Python 3.12. If you have already installed Python 3.12 from https://www.python.org this step can be skipped.
Note
The required Python version is exactly 3.12.x.
Open a terminal and run
py -3.12 --version
, this should print something likePython 3.12.8
or similar:py -3.12 --version Python 3.12.8
Install
Python 3.12
. If you have already installed Python 3.12 this step can be skipped.Note
The required Python version is exactly 3.12.x.
Open a terminal and run
py --version
, this should print something likePython 3.12.8
or similar:python3.12 --version Python 3.12.8
3.6. Install virtual Python environment
Create a virtual environment 2025-03-pale-fox by running:
py -3.12 -m venv C:\foxbms\envs\2025-03-pale-fox
py -3.12 -m venv /C/foxbms/envs/2025-03-pale-fox
python3.12 -m venv /opt/foxbms/envs/2025-03-pale-fox
Activate the virtual environment by running:
C:\foxbms\envs\2025-03-pale-fox\Scripts\activate.ps1
source /C/foxbms/envs/2025-03-pale-fox/Scripts/activate
source /opt/foxbms/envs/2025-03-pale-fox/bin/activate
Install the required packages by running:
Note
pip
requires a correct proxy setup.python -m pip install -r requirements.txt
The virtual environment includes the pre-commit framework (https://pre-commit.com/).
The pre-commit framework installs its dependencies defined in
.pre-commit-config.yaml
by itself when it is run and dependencies are
missing.
3.7. Install Ruby
Note
Installing MinGW64 requires 7-Zip to be installed. 7-Zip can be download from https://7-zip.org.
Download the zip-archive Ruby 3.4.2-1 (x64).
Extract the archive to
C:\foxbms\Ruby\Ruby34-x64
.
Use your distributions package manager to install Ruby.
3.8. Install Ruby gems
Install the required Ruby packages, i.e., Ruby gems by running:
C:\foxbms\Ruby\Ruby34-x64\bin\gem.cmd install --install-dir C:\foxbms\Ceedling\1.0.1 ceedling
/C/foxbms/Ruby/Ruby34-x64/bin/gem.cmd install --install-dir /C/foxbms/Ceedling/1.0.1 ceedling
# adapt the path to the gem binary accordingly to the Ruby
# installation from the previous step
gem install --install-dir /opt/foxbms/Ceedling/1.0.1 ceedling
3.9. Install mingw-w64
Note
Installing mingw-w64 requires 7-Zip to be installed. 7-Zip can be download from https://7-zip.org.
Download mingw-w64 version x86_64-posix-seh from sourceforge.net (use this 7z-archive).
Extract the archive.
Copy the extracted
mingw-w64
directory toC:\foxbms\mingw-w64\x86_64-8.1.0-release-posix-seh-rt_v6-rev0
.Verify that
gcc.exe
is available atC:\foxbms\mingw-w64\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\bin\gcc.exe
.
GCC is already available.
3.10. Install Doxygen
Download Doxygen version 1.13.2 from GitHub. (use this zip-archive).
Extract the archive.
Copy the extracted archive to
C:\foxbms\Doxygen\1.13.2
.Verify that
doxygen.exe
is available atC:\foxbms\Doxygen\1.13.2\doxygen.exe
.
Use your distributions package manager to install Doxygen.
3.11. Install Graphviz
Download Graphviz version 12.2.1 from https://graphviz.org/download. (use this zip-archive).
Extract the archive.
Copy the extracted archive to
C:\foxbms\Graphviz\12.2.1
.Verify that
dot.exe
is available atC:\foxbms\Graphviz\12.2.1\bin\dot.exe
.
Use your distributions package manager to install Graphviz.
3.12. Install drawio-desktop
Download drawio-desktop version 26.0.9 from https://github.com/jgraph/drawio-desktop/releases (use this installer).
Run the installer and use the default installation directory.
Verify that
draw.io.exe
is available atC:\Program Files\draw.io\draw.io.exe
.
Use your distributions package manager to install drawio-desktop.
3.13. Install VS Code
foxBMS 2 supports development using Visual Studio Code.
Download VS Code from the project website at Visual Studio Code.
Run the installer.
Optional: Let the installer add VS Code to the
PATH
variable.
3.14. Installation Check
Check that all required software is installed by running:
.\fox.ps1 install --check
./fox.sh install --check
./fox.sh install --check
After following these steps, the check shall succeed and all required software has been successfully installed.
3.15. Environment Updates
Sometimes it might be required to update the build environment. It that is the case, it is then mentioned in the Changelog.
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.
Create a virtual environment <name-of-the-new-env> by running:
py -3.12 -m venv C:\foxbms\envs\<name-of-the-new-env>
py -3.12 -m venv /C/foxbms/envs/<name-of-the-new-env>
python3.12 -m venv /opt/foxbms/envs/<name-of-the-new-env>
Activate the virtual environment by running:
C:\foxbms\envs\<name-of-the-new-env>\Scripts\activate.ps1
source /C/foxbms/envs/<name-of-the-new-env>/Scripts/activate
source /opt/foxbms/envs/<name-of-the-new-env>/bin/activate
Install the required packages by running:
Note
pip
requires a correct proxy setup.python -m pip install -r requirements.txt
3.16. Debugger toolchain setup
For the development of an embedded system both a way of downloading the software into the target and debugging the running software in the target is necessary. Since the setup is highly dependent on the selected toolchain, this manual does not give any details on the installation of such a debugger toolchain. The manuals of the tool vendors are exhaustive on the topic of installation and setup.
More details on the selection and usage of debugger toolchains can be found in Debugging the Application.