How maxkgo/maxkgo-bms-firmware works
Project type and purpose
• Firmware for an STM32-based Battery Management System (ENNOID-BMS).
• Generates production binaries for various hardware variants (MKBMS-LV-MINI, SS-24S, etc.).
• Integrates with three companion repositories: hardware schematics, bootloader, and a PC configuration tool.
File structure
• Top level:
– Config: XML settings + a parser library
– CubeMX: auto-generated CMSIS/HAL code + project files
– Drivers:
· CMSIS DSP library
· CMSIS device templates
· HAL driver layer (STM32F3xx_HAL_Driver)
· HWDrivers: GPIO, ADC, I²C, SPI, UART, EEPROM emulation
· SWDrivers: high-level peripheral drivers (external ADCs, power monitors, sensors, display)
– Libraries: generic C libs (buffers, CRC, graphics, mempools, packet/ring buffers)
– Modules: application layer modules (CAN, UART, Display, Flash, PowerState, StateOfCharge, Commands, Safety checks, etc.)
– Main: entry point (main.c), data types, helper functions
– build_all, GCC, MDK-ARM etc.: build scripts, linker scripts, board binary outputs
– dbc: CAN database files
– makefile: build orchestration for GCC, flashing via STLink/JLink
README insights
• Outlines memory map (flash page layout for EEPROM emulation, application, bootloader).
• Describes chosen toolchain (arm-none-eabi-gcc, Makefile rules).
• Indicates how generalDefines.h toggles target variants.