3. Software Installation
Warning
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.
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 the software dependencies:
Install Texas Instruments (TI)’s Code Composer Studio (required for compiling)
Install Texas Instruments (TI)’s HALCoGen (required for code generation)
Install Python and an virtual environment (furnishes the Python environment used by foxBMS 2)
Install Ruby and the Ceedling package (required for unit testing)
Install GCC (required for unit testing)
Install VS Code (required for developing)
Check the installation
(Optional) Install VS Code
These steps are described below in detail.
3.1. Install Git
Download the latest version of Git and run the installer.
3.2. Getting the 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
The username in this installation manual is vulpes
and needs to be
replaced with the actual username.
Warning
If your user name contains whitespace (e.g., vulpes vulpes
, you MUST
clone the repository to another path, that does not contain whitespace,
e.g., C:\foxbms-2
).
git clone https://github.com/foxBMS/foxbms-2
cd foxbms-2
git clone https://github.com/foxBMS/foxbms-2
cd foxbms-2
git clone https://github.com/foxBMS/foxbms-2
cd foxbms-2
git clone https://github.com/foxBMS/foxbms-2
cd foxbms-2
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.
Bad |
|
Bad |
|
Good |
|
Good |
|
3.3. Software Prerequisites
General Hint
No software installation here should alter 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
.
3.3.1. Install Code Composer Studio
Download Code Composer Studio (CCS) version 12.0.0
and run the
installer (chose Windows single file installer for CCS IDE
).
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\ccs1031
for CCS 10.3.1
).
Select the Hercules™ Safety MCUs
option during the installation.
Installing Code Composer Studio may take a while.
3.3.1.1. Install HALCoGen
Download HALCoGen version 04.07.01
and run 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 HALCoGen 04.07.01
that means into
C:\ti\Hercules\HALCoGen\v04.07.01
).
Installing HALCoGen may take a while.
3.3.2. Install Python and Configuration
3.3.2.1. Install Python
Install Python. If you have already installed Python from https://www.python.org this step can be skipped.
Note
The minimum required Python version is 3.10.
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
py --version Python 3.12.4
py --version Python 3.12.4
python3 Python 3.12.8
3.3.2.2. Virtual Environment Creation
Create a virtual environment 2025-01-pale-fox by running:
py -m venv $env:USERPROFILE\foxbms-envs\2025-01-pale-fox
py -m venv %USERPROFILE%\foxbms-envs\2025-01-pale-fox
py -m venv $USERPROFILE/foxbms-envs/2025-01-pale-fox
python3 -m venv $HOME/foxbms-envs/2025-01-pale-fox
Activate the virtual environment by running:
&"$env:USERPROFILE\foxbms-envs\2025-01-pale-fox\Scripts\activate.ps1"
%USERPROFILE%\foxbms-envs\2025-01-pale-fox\Scripts\activate.bat
source $USERPROFILE/foxbms-envs/2025-01-pale-fox/Scripts/activate
source $HOME/foxbms-envs/2025-01-pale-fox/bin/activate
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
@REM cd into the root of the repository cd path\to\foxbms-2 python -m pip install -r requirements.txt --no-deps
cd path/to/foxbms-2 # cd into the root of the repository python -m pip install -r requirements.txt --no-deps
cd path/to/foxbms-2 # cd into the root of the repository python -m pip install -r requirements.txt --no-deps
3.3.3. Install Ruby and Add Required Gems
Download the installer version for Ruby 3.1.3-x64 without Devkit.
Use
C:\Ruby\Ruby3.1.3-x64
as installation directoryDo NOT add Ruby to
PATH
.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.bat install # install the Ruby Gems
@REM cd into the root of the repository cd path\to\foxbms-2 cd tools\vendor\ceedling @REM install the Ruby Gems C:\Ruby\Ruby3.1.3-x64\bin\bundle.bat install
cd path/to/foxbms-2 # cd into the root of the repository cd tools/vendor/ceedling /c/Ruby/Ruby3.1.3-x64/bin/bundle.bat install
cd path/to/foxbms-2 # cd into the root of the repository cd tools/vendor/ceedling bundle install # install the Ruby Gems
3.3.4. Install GCC
Note
Installing MinGW64 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 exactly this 7z-archive).
Extract the archive.
Copy the extracted mingw64 directory to
C:\mingw64\x86_64-8.1.0-release-posix-seh-rt_v6-rev0
.Verify that GCC is available at
C:\MinGW64\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\mingw64\bin\gcc.exe
.
3.3.5. Install Doxygen
Download Doxygen version 1.11.0 from GitHub. (use this zip-archive).
Extract the archive.
Copy the extracted archive to
C:\Users\<username>\doxygen\1.11.0
.Verify that
doxygen.exe
is available atC:\Users\<username>\doxygen\1.11.0\doxygen.exe
.
3.3.6. Install Graphviz
Download GraphViz version 11.0.0 from https://graphviz.org/download. (use this zip-archive).
Extract the archive.
Copy the extracted archive to
C:\Users\<username>\graphviz\11.0.0
.Verify that
dot.exe
is available atC:\Users\<username>\graphviz\11.0.0\bin\dot.exe
.
3.3.7. Check Installation
Check that all required software is installed by running in cmd.exe
or
PowerShell
.
cd path\to\foxbms-2 # cd into the root of the repository .\fox.ps1 install --check@REM cd into the root of the repository cd path\to\foxbms-2 fox.bat install --checkcd path/to/foxbms-2 # cd into the root of the repository ./fox.sh install --checkcd path/to/foxbms-2 # cd into the root of the repository ./fox.sh install --check
3.3.8. (Optional) Install VS Code
foxBMS 2 supports developing with Visual Studio Code (hereinafter code
).
Download
code
from the project website at Visual Studio Code.Install code: foxBMS 2 recommends installing
code
with theUser Installer
, which does not require elevated rights.Optional: Let the installer add code to the
PATH
variable.
3.3.9. 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 -m venv $env:USERPROFILE\foxbms-envs\<name-of-the-new-env>
py -m venv %USERPROFILE%\foxbms-envs\<name-of-the-new-env>
py -m venv $USERPROFILE/foxbms-envs/<name-of-the-new-env>
python3 -m venv $HOME/foxbms-envs/<name-of-the-new-env>
Activate the virtual environment by running:
&"$env:USERPROFILE\foxbms-envs\<name-of-the-new-env>\Scripts\activate.ps1"
%USERPROFILE%\foxbms-envs\<name-of-the-new-env>\Scripts\activate.bat
source $USERPROFILE/foxbms-envs/<name-of-the-new-env>/Scripts/activate
source $HOME/foxbms-envs/<name-of-the-new-env>/bin/activate
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
@REM cd into the root of the repository cd path\to\foxbms-2 python -m pip install -r requirements.txt --no-deps
cd path/to/foxbms-2 # cd into the root of the repository python -m pip install -r requirements.txt --no-deps
cd path/to/foxbms-2 # cd into the root of the repository python -m pip install -r requirements.txt --no-deps
3.4. 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.