fupsrl

03 – Firmware Workspace, Build, and Flash

1 min read Updated 16 July 2026

The checked-in firmware is an STM32CubeIDE project at SW/RT_STACK_V2. It includes the CubeMX .ioc configuration, source code, linker scripts, generated HAL code and a DBC for the status message.

Tooling

  • STM32CubeIDE with STM32CubeMX support.
  • An ST-LINK-compatible debug/programming connection.
  • A CAN interface and analyser.
  • A bench supply, oscilloscope and trigger/load fixtures.

Open and build

  1. Clone the repository and import SW/RT_STACK_V2 as an existing STM32CubeIDE project.
  2. Open RT_STACK_V2.ioc only when reviewing or regenerating CubeMX setup. Preserve all user-code regions if you regenerate.
  3. Build the Debug configuration.
  4. Review warnings and confirm the ELF corresponds to the intended source revision.
  5. Flash through ST-LINK with actuator outputs disconnected.

Boot and first proof

The firmware contains option-byte initialization intended to boot from flash even if BOOT0 is not held low. Treat that as a hardware-level change and record it. After flashing, prove that the MCU starts and that CAN status is present before trigger or output testing. The source configures FDCAN as classic CAN at 500 kbit/s.

Generated code

CubeMX regeneration can replace generated code. Keep engine-specific changes in the intended configuration/module files, review every diff after generation, and do not treat Debug/ build output as the source of truth.

Suggested screenshots: STM32CubeIDE project explorer and ST-LINK flash configuration after the build steps.