I-M-Robotics-Lab/Curl-Drive-Firmware ? reverse-engineered prompt

Reverse engineered prompt

Build me the firmware for a BLDC motor controller called Curl Drive for an STM32G474 board.

I want the project to boot cleanly, set up the motor control peripherals, and provide a basic field oriented control loop for a brushless motor. It should be organized so the core logic, drivers, interfaces, and USB support are easy to follow and extend later. Please include the usual startup and flashing pieces for this chip, and make sure the code is ready to build in an embedded C environment.

If anything in the existing setup is missing or outdated, fill in the gaps in a sensible way. Keep it practical and focused on getting the controller running, and use current docs online if you need to check the STM32 details.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab