2. Repository Structure

All directory names are abbreviated (e.g., conf for configuration) to ensure a compact repository structure and avoid long command lines during build steps.

2.1. Repository root .

The repository is generally structured as shown below:

Table 2.1 Detailed description of the repository root

Directory Name

Long Name

Content Description

.

Repository root

The repository root contains the license information, installation instructions, a link to the changelog, the main build script

cli

Command line interface

Program to interact with the repository

conf

Configuration

Contains all high level configurations

docs

Documentation

Documentation source files

hardware

Hardware

Hardware schematics and layouts

src

Source

Parent directory for all source files for the BMS embedded software

tests

Tests

Tests for embedded sources, the tool chain, the conda environment and scripts

tools

Tools

Tools needed to build foxBMS 2 binaries and additional tools to work with foxBMS 2

2.2. Configuration directory conf

The conf directory is structured as shown below:

Table 2.2 Detailed description of the conf directory

Directory Name

Long Name

Content Description

bms

Battery Management System

Configuration of the BMS (e.g., which AFE is used)

cc

C compiler

Compiler configuration (e.g., compiler flags)

env

Environment

Environment specifications configuration files (e.g., Conda package dependencies)

hcg

HALCoGen

HALCoGen configuration files for the Hardware Abstraction Layer

tpl

Templates

Template files for source files

unit

Unit tests

Unit test configuration files

2.3. Documentation directory docs

This directory contains the sources of the general documentation generate by Sphinx. It further contains the configuration for the API documentation generated by Doxygen.

2.4. Hardware directory hardware

This directory contains information about the hardware schematics and layouts.

2.5. Source directory src

The src directory is structured as shown below:

Table 2.3 Detailed description of the src directory

Directory Name

Long Name

Content Description

app

Application

Sources files for the BMS application

hal

Hardware

Source files of the Hardware Abstraction Layer

opt

Optional

Optional source files (e.g., specific cell parameters)

os

Operating System

Source files of the real time operating system

2.6. Tests directory tests

The tests directory is structured as shown below:

Table 2.4 Detailed description of the tests directory

Directory Name

Long Name

Content Description

axivion

Axivion

Configuration files to describe the software architecture of foxBMS 2. Additional static program analysis configurations are stored here (e.g., MISRA-C)

can

CAN

Heuristic tests for the correct implementation of DBC file in the code

ccs

Code Composer Studio

Compiler setup for different CCS versions to compile foxBMS with

cli

Command line interface

Tests for the CLI tool, to interact with the repository

c-std

C Standard

Test setup for foxBMS’s C standard detection

dbc

CAN Database

Check the validity of the DBC/SYM files

hil

Hardware-in-the-Loop

Tests and setup of the Hardware-in-the-Loop test (not published)

os-information

OS information

Information to search the sources for OS relevant includes, names etc.

re-names

Regex names

Scripts to verify the regular expressions that are used in Axivion setup

unit

Embedded code unit tests

Unit test code for the embedded code

variants

Variants

foxBMS build configurations (for testing in e.g., CI)

2.7. Tools directory tools

The tools directory is structured as shown below:

Table 2.5 Detailed description of the tools directory

Directory Name

Long Name

Content Description

crc

Cyclic redundancy check

Helper script and information for working with CRC-functions

dbc

CAN Database

CAN message and signal description

debugger

Debugger

Debugger setups and usage

deploy

Deploy

Scripts for deploying the generated documentation internally

ide

Editor/IDEs

Setups for editors and Integrated Development Environments

precharge

Precharge

Script to help dimensioning the precharge resistor

utils

Utils

Unspecific helper tools and scripts

vendor

Vendor

Vendored, unchanged files

waf-tools

Waf tools

Waf tools that are not part of vendored Waf

waf

Waf

Waf binary