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.
Note
For some installation tasks, batch scripts are provided to automate the installation process as much as possible. However, if you do not want to use these scripts, the manual installation process is also described.
Getting started with foxBMS 2 requires getting the sources and installing all required software dependencies. These are the required steps:
getting the foxBMS 2 sources,
installing the software dependencies:
installing Texas Instruments (TI)’s Code Composer Studio (required for compiling)
installing Texas Instruments (TI)’s HALCoGen (required for code generation)
installing Continuum’s Miniconda (furnishes the Python environment used by foxBMS 2),
installing LLVM (required for code formatting)
installing Ruby and the Ceedling package (required for unit testing)
installing GCC (required for unit testing)
installing Cppcheck (required for static program analysis)
installing VS Code (required for developing)
setting up a development environment
These steps are described below in detail.
3.1. 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 (see Listing 3.1) or download (see Listing 3.2) 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.
Warning
If your user name contains whitespace (e.g., vulpes vulpes
, you MUST
clone or download the repository to another path, that does not contain
whitespace, e.g., C:\foxbms-2
.
C:\Users\vulpes\Documents>git clone https://github.com/foxBMS/foxbms-2
C:\Users\vulpes\Documents>cd foxbms-2
C:\Users\vulpes\Documents>curl -Ss -L -o foxbms-2-v1.0.0.zip https://github.com/foxBMS/foxbms-2/archive/v1.0.0.zip
C:\Users\vulpes\Documents>tar -x -f foxbms-2-v1.0.0.zip
C:\Users\vulpes\Documents>ren foxbms-2-v1.0.0 foxbms-2
C:\Users\vulpes\Documents>cd foxbms-2
Note
Both git
and curl
require 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 |
|
Good |
|
Good |
|
3.2. 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, wether it is explicitly mentioned in
that step or not. The only exception to that rule is VS Code
.
3.2.1. Installing Code Composer Studio¶
Download Code Composer Studio (CCS) version 10.1.1
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 (i.e. C:\ti\...
for CCS 10.1.1
). Select the
Hercules™ Safety MCUs
option during the installation.
Installing Code Composer Studio may take a while.
3.2.1.1. Installing 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.2.2. Installing Miniconda and Configuration¶
Note
If you already have installed miniconda3 in one of the default miniconda3
installation directories (%USERPROFILE%\miniconda3
,
%LOCALAPPDATA%\Continuum\miniconda3
) or C:\miniconda3
you can skip
this installation of miniconda3 and go on to conda configuration
Installation of miniconda3
Automated Installation
Manual Installation
For automated installation of miniconda3 according to foxBMS 2 requirements just run:
C:\Users\vulpes\Documents\foxbms-2>tools\utils\miniconda3-install.bat
The manual installation of miniconda3 is described in Manual Miniconda Installation.
conda configuration
Automated Configuration
Manual Configuration
For automated configuration of conda according to foxBMS 2 requirements just run:
C:\Users\vulpes\Documents\foxbms-2>tools\utils\conda-init.bat
Note
If the script returns Maybe you need to add “foxbms” to your channels list. please follow the instructions at Configuration.
The manual configuration of conda is described in Manual conda Configuration.
3.2.3. Installing LLVM¶
Automated Installation |
Manual Installation |
---|---|
For automated installation of LLVM according to foxBMS 2 requirements just run (the installer will prompt for privileged installation): C:\Users\vulpes\Documents\foxbms-2>tools\utils\llvm-install.bat
|
Download LLVM (version |
3.2.4. Installing Ruby and Required Gems¶
Automated Installation |
Manual Installation |
---|---|
For automated installation of Ruby according to foxBMS 2 requirements just run: C:\Users\vulpes\Documents\foxbms-2>tools\utils\ruby-install.bat
Add |
The manual installation of Ruby is described in Manual Ruby Installation. |
3.2.5. Installing GCC¶
Note
Installing MinWG64 requires 7-Zip to be installed. 7-Zip can be download from https://7-zip.org/ and should be installed in the default directory.
Automated Installation |
Manual Installation |
---|---|
For automated installation of MinGW64 according to foxBMS 2 requirements just run: C:\Users\vulpes\Documents\foxbms-2>tools\utils\mingw64-install.bat
|
The manual installation of MinGW64 is described in Manual MinGW64 Installation. |
3.2.6. Installing Cppcheck¶
Note
The Cppcheck installer does not support installing different versions of
Cppcheck. If there is already some Cppcheck version installed into
C:\Program Files\Cppcheck\*
this installation must be copied to some
temporary folder, and then can be copied back into
C:\Program Files\Cppcheck\other-cppcheck-version
after the installation
has finished.
Download Cppcheck version 2.2 from the project’s GitHub release page.
Install Cppcheck into
C:\Program Files\Cppcheck\Cppcheck-2.2-x64
by running the installer.
3.2.7. Installing VS Code and Extensions¶
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.Let the installer add code to the PATH variable.
Install extensions: To get the best development experience the following extensions are recommended.
code
will list these among the recommended extensions after you have runwaf configure
.¶ Name
Marketplace Link
C/C++
Python
Assembler
Linker script
Code Spell Checker
YAML
TOML
Test Explorer
Test Explorer Ceedling
All required software is now installed.
3.3. Development Environment Setup¶
Open a terminal and navigate into the cloned foxBMS 2 repository and install the development environment. The development environment is installed with the following command:
C:\Users\vulpes\Documents\foxbms-2>tools\utils\conda-update-env.bat
This scripts creates a development environment inside the miniconda installation.
Note
- An update of the foxBMS 2 development environment needs to be done
the first time a foxBMS 2 project is setup on a computer.
each time a new development environment is released. If that is the case it is mentioned in the Changelog.
OPTIONAL: Verify the miniconda environment by running the following script:
C:\Users\vulpes\Documents\foxbms-2>tools\utils\cmd\run-python-script.bat tests\env\packages_test.py -f tests\env\conda_env_win32.json
If all the indicated steps have been followed, at this point all the required dependencies have been installed/updated.