I have been working on a BLDC motor controller for some of my projects recently. All of the hardware and software is open source and maintained on github. A technical description on how to order PCBs, parts, setting up a toolchain to compile the code, buildng and testing it can be found here...