Skip to content

Conversation

@itsarune
Copy link
Contributor

@itsarune itsarune commented Jan 1, 2026

Description

I had some free time and cleaned up the mdv6 firmware integration into Bazel that I had.

Commands introduced

bazel build //firmware/motor:mdv6_firmware_main --platforms=//toolchains/cc:motor_board works and compiles

bazel run //firmware/motor:mdv6_firmware_flash --platforms=//toolchains/cc:motor_board works

Testing Done

  • Compiled on device
  • Seemed to flash

Resolved Issues

Length Justification and Key Files to Review

Firmware

  • The bulk of firmware/motor/ is auto-generated
  • firmware/motor/main.c, firmware/motor/crc.h and firmware/motor/crc.c These files are copied from the MDV6 Firmware repo from August. They should comply with our style guidelines but they don't. I would rather have this handled in the future.
  • Long-term: we should get rid of all HAL garbage that STM gave us and write our own firmware. It shouldn't be too complicated.

Toolchains

  • toolchains/cc/cc_toolchains_config.bzl
  • environment_setup/util.sh
  • environment_setup/software.sh

Bazel 8 jank
bazel-embedded provides us with OpenOCD, which is the protocol that's used under-the-hood with STLINK

  • src/defs.bzl
  • src/MODULE.bazel

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

@itsarune itsarune marked this pull request as ready for review January 3, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant