How to Program Custom FOC Code on ODrive v3.6 Using STM32 Software

Hi,

I am working on a robotic motor controller project and now decided to use ODrive v3.6 board based on the STM32F405 MCU.

I would like to do custom programming on the ODrive board using:
STM32CubeMX
X-CUBE-MCSDK
STM32CubeIDE

My goal is to remove the original ODrive firmware and program my own custom FOC (Field Oriented Control) code using ST’s Motor Control SDK or using CubeMX.

I have a few questions:

  1. Is it possible to directly use X-CUBE-MCSDK or CubeMX on the ODrive v3.6 hardware?
  2. How should I configure CubeMX for this board (PWM, ADC, current sensing, timers)?
  3. Can I generate a project in CubeIDE and upload it using ST-LINK without issues?
  4. What is the correct approach to implement my own custom FOC algorithm on this hardware?

If anyone has experience using MCSDK on non-ST reference hardware like ODrive.
if MCSDK not possible can i use CUBEMX to configure my Own, please guide me.
Thank you.