2 is the product. Now the BLDC plan is mature. In fact, the annoying scheme is very simple, which is nothing more than MCU+ pre-driver +MOSFET+ current and Hall position signal feedback.
Regarding the library, ST is FOC, and I wrote it myself according to the control logic of ST.
The above are just a few suggestions for reference only.