2. Repository Structure

The foxBMS 2 repository is structured into the following parts (see Table 2.1). All directory names are abbreviated (e.g., conf for configuration) to ensure a compact repository structure and avoid long command lines during build steps.

Table 2.1 foxBMS 2 repository structure

directory

long name

content description

.

repository root

the repository root contains the license information, a changelog and the main build script

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.1. Configuration directory conf

The conf directory is structured into the following parts (see Table 2.2).

Table 2.2 Detailed description of the conf directory

directory

long name

content description

conf/bms

Battery Management System

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

conf/cc

C compiler

compiler configuration (e.g., compiler flags)

conf/env

Environment

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

conf/fmt

Formatting

formatting rules for source files

conf/gl

Guidelines

Guideline check configuration

conf/hcg

HALCoGen

HALCoGen configuration files for the Hardware Abstraction Layer

conf/spa

Static Program Analysis

configuration and template files for static program analysis

conf/tpl

Templates

template files for source files

conf/unit

Unit tests

unit test configuration files

2.2. Documentation directory docs

This directory contains the general documentation and links the API documentation generated by Doxygen.

2.3. Hardware directory hardware

This directory contains the hardware schematics and layouts.

2.4. Source directory src

The src directory is structured into the following parts (see Table 2.3).

Table 2.3 Detailed description of the src directory

directory

long name

content description

src/app

Application

sources files for the BMS application

src/hal

Hardware Abstraction Layer

source files of the Hardware Abstraction Layer

src/opt

Optional

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

src/os

Operating System

source files of the real time operating system

2.5. Tests directory tests

The tests directory is structured into the following parts (see Table 2.4).

Table 2.4 Detailed description of the tests directory

directory

long name

content description

tests/axivion

Axivion

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

tests/scripts

scripts

unit test of scripts (e.g., Python, shell)

tests/unit

unit tests

unit tests for embedded sources

2.6. Tools directory tools

The tools directory is structured into the following parts (see Table 2.5).

Table 2.5 Detailed description of the tools directory

directory

long name

content description

tools/src

Cyclic redundancy check

Jupyter notebooks to help generate CRC-functions

tools/debugger

Debugger

Debugger setups and usage

tools/gui

Graphical User Interface

GUI to interact with foxBMS 2 and foxBMS 2 generated data

tools/ide

Editor/Integrated Development Environment

Setups for editors and IDE

tools/utils

utils

unspecific helper tools and scripts

tools/waf-tools

waf tools

waf tools that are not part of vendored waf

tools/waf

waf

waf binary