Merging codegen tooling into firmware_xiv

Codegen tooling was originally in a separate repository, GitHub - uw-midsun/codegen-tooling-msxiv: [Deprecated] Codegen tooling for MSXIV!, because back in the MSXII days, firmware, telemetry, and other systems stored in separate repositories needed to download the codegen tooling files. This is also why codegen tooling generated not only C header files but also Go and TypeScript.

However, we’ve since moved away from using generated code for telemetry systems, and now keeping codegen tooling in a separate repository from the rest of our firmware is merely a nuisance: to change a CAN message, we need to open two separate PRs and keep them in sync, and copy over files from one place to another. Thus, we’re merging codegen tooling into the main firmware_xiv repository.

The codegen code is now found under the codegen top-level directory in firmware_xiv; in particular our CAN messages are defined in codegen/can_messages.asciipb. The following commands work:

  • make codegen - generate the codegen-tooling header files from can_messages.asciipb and copy them to libraries/codegen-tooling/inc.

  • make codegen_dbc - generate a DBC file that represents our CAN messages in an industry-standard format, and put it in codegen/system_can.dbc.

  • make codegen_protos - generate code (currently only Python) for dealing with the protobufs that can_messages.asciipb encodes our CAN messages in. Mostly for internal use.

  • make mock_can_data - send mock CAN data on vcan based on the generated DBC file.

We’ve also dropped the Go toolchain since we’re not using it, so there shouldn’t be any more nasties about needing to update Go.

Thanks @Raiyan Sayeed for merging codegen!