6.1. Checksum Tool

This section of the documentation shows the software build process and the integration of the checksum into that process in foxBMS. To setup and enabling/disabling the checksum verification on the microcontroller, see Checksum.

6.1.1. Module Files

Source:

  • tools\checksum\chksum.py

Configuration:

  • tools\checksum\chksum.yml

6.1.2. Procedure

Checksum is an after-build process.

python tools\waf configure
python tools\waf build_primary
python tools\waf build_secondary

6.1.3. Principle

  1. The step

    python tools\waf configure
    

    configures waf as needed to build.

  2. The step

    python tools\waf build
    

    builds the files

    • foxbms.elf
    • foxbms.hex
    • foxbms_flash.bin
    • foxbms_flashheader.bin

    The chksum featured task is perfmored at next as defined in the main wscript. The steps are of this task are:

    1. Reading the foxbms.hex file and calculates the checksum. The checksum is written back into the foxbms.hex file by the checksum script.
    2. Calling the GDB debugger and replaces the initial ver_sw_validation.Checksum_u32 in foxbms.elf with the correct checksum.
    3. Calling the objcopy to regenerate the foxbms_flashheader.bin of foxbms.elf.