1. 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.
1.1. Repository root .
The repository is generally structured as shown below:
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 |
|
Command line interface |
CLI tool to interact with the repository |
|
Configuration |
Contains all high level configurations |
|
Documentation |
Documentation source files |
|
Hardware |
Hardware schematics and layouts |
|
Source |
Parent directory for all source files for the BMS embedded software |
|
Tests |
Tests for embedded sources, the toolchain, and scripts |
|
Tools |
Tools needed to build foxBMS 2 binaries and additional tools to work with foxBMS 2 |
1.2. fox CLI directory cli
The cli directory is structured as shown below:
Directory Name |
Long Name |
Content Description |
|---|---|---|
|
Command_* |
Actual implementation of the specific CLI command |
|
Communication |
Wrapper for different communication interfaces (e.g., CAN) |
|
Commands |
Definition of all CLI commands |
|
Database |
Light weight battery specific database implementation for foxBMS |
|
Helpers |
Helper functions that are used by several parts of the CLI tool |
|
pre-commit |
Scripts that are run as part of the pre-commit framework |
1.3. Configuration directory conf
The conf directory is structured as shown below:
Directory Name |
Long Name |
Content Description |
|---|---|---|
|
Battery Management System |
Configuration of the BMS (e.g., which AFE is used) |
|
C compiler |
Compiler configuration (e.g., compiler flags) |
|
Environment |
Environment specifications configuration files (e.g., PATH setup) |
|
TI HALCoGen |
TI HALCoGen configuration files for the Hardware Abstraction Layer |
|
Templates |
Template files for source files |
|
Unit tests |
Unit test configuration files |
1.4. 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.
1.5. Hardware directory hardware
This directory contains information about the hardware schematics and layouts.
1.6. Source directory src
The src directory is structured as shown below:
Directory Name |
Long Name |
Content Description |
|---|---|---|
|
Application |
Source files for the BMS application |
|
Bootloader |
Source files of the bootloader |
|
Operating System |
Source files of the real time operating system |
|
Portable sources |
Source for processor specific code |
|
Version information |
Definition of embedded version information |
1.7. Tests directory tests
The tests directory is structured as shown below:
Directory Name |
Long Name |
Content Description |
|---|---|---|
|
CAN |
Heuristic tests for the correct implementation of DBC file in the code |
|
Code Composer Studio |
Compiler setup for different CCS versions to compile foxBMS with |
|
Command line interface |
Unit tests for the fox CLI tool |
|
C Standard |
Test setup for foxBMS’s C standard detection |
|
CAN Database |
Check the validity of the DBC/SYM files |
|
fox CLI integration tests |
Integration tests for the fox CLI tool |
|
OS information |
Information to search the sources for OS relevant includes, names etc. |
|
Package build unit tests |
Unit tests for the Python package build functionalities |
|
Embedded code unit tests |
Unit test code for the embedded code |
|
Embedded code unit tests |
Unit test code for the embedded code that need to run on the target |
|
Variants |
foxBMS build configurations (for testing in e.g., CI) |
|
Waf tools unit tests |
Unit tests for custom foxBMS Waf tool |
1.8. Tools directory tools
The tools directory is structured as shown below:
Directory Name |
Long Name |
Content Description |
|---|---|---|
|
CMock |
vendored CMock sources |
|
Cyclic redundancy check |
Helper script and information for working with CRC-functions |
|
CAN database |
CAN message and signal description |
|
Debugger |
Debugger setups and usage |
|
Editor/IDEs |
Setups for editors and Integrated Development Environments |
|
Waf tools |
Waf tools that are not part of vendored Waf |
|
Waf |
Waf binary |