Every entry point in tools/scripts/. None are installed as commands; run them with uv run or
through a wrapper.
uv run --project tools python tools/scripts/<name>.py [flags]
Script Invoked by Purpose generate_project.pyscripts/new.shcreate a CubeMX project update_cmake_cfg.pyscripts/new.shrender a project’s CMake files clangd.pyscripts/build.shrender a project’s .clangd can_header_gen.pyCMake (lib/dbc) DBC to C++ headers config_gen.pyCMake (lib/config) config YAML to C++ header monitor.pyscripts/monitor.shST-LINK serial log viewer config.pyby hand push a board configuration over CAN analyze_flash.pyby hand flash usage breakdown from a .map file abs_zero.pyby hand zero the DE absolute encoders restart_bmc.pyby hand reset a brushed motor controller send_can.pyby hand bench loop driving a BMC
Flag Required Meaning --mcu, --board, -m, -byes MCU part number or board name --src, -syes destination directory; its name becomes the project name
All four target flags write to the same value, so --mcu and --board are interchangeable
spellings. A value starting with STM32 is treated as an MCU, anything else as a board.
Flag Required Meaning --src, -syes project directory --root, -ryes repository root --ctx, -cyes template directory, always lib/stm32g4 --lib, -lno library to link; repeatable
Rewrites CMakeLists.txt, CMakePresets.json and .clangd from scratch. Pass the full --lib
set every time. See Project Anatomy .
Flag Required Meaning --src, -syes project directory --ctx, -cyes template directory, always lib/stm32g4
No-ops if .clangd already exists. Delete the file and re-run after a CubeCLT upgrade.
Argument Required Meaning filesyes one or more .dbc files (positional) --dest, -dyes output directory --ctx, -cyes template directory
Flag Required Default Meaning --name, -nyes project name --input, -iyes config definition YAML --output, -oyes header to write --tabsizeno 4accepted but unused --template-dirno cwd directory holding config_header.hpp.j2
Flag Default Meaning --baud, -b115200must match the firmware UART --log-level, -lINFODEBUG, INFO, WARNING or ERROR
See esw.stlink .
Flag Required Meaning --definition, -dyes register layout from config/ --file, -fyes device values from rover/ --can, -cyes CAN interface, e.g. can0 --id, -iyes the board’s current CAN ID --read, -rno not implemented
See CAN Configuration Interface .
uv run --project tools python tools/scripts/analyze_flash.py src/bmc/build/Debug/bmc.map
Takes a linker map file as its only positional argument, with no flags. Sums the flash region by
object file and prints the 25 largest contributors plus a total. Useful when a build starts
crowding the part’s flash. The .map is produced by every build, next to the ELF.
This is the one script that does not import esw.
Script Interface Targets Sends abs_zero.pycan10x37 pitch, 0x38 rollABSZeroCmd with offset: 0.0, then listens 10 s