[Tim Schumacher] got a Crazepony Mini quadcopter and has been reprogramming it “bare metal” — that is to say he’s programming the STM32 without using an operating system or do-it-all environment. His post on the subject is a good reference for working with the STM32 and the quadcopter, too.
If you haven’t seen the quadcopter, it is basically a PC board with props. The firmware is open source but uses the Keil IDE. The CPU is an STM32 with 64K of program memory. In addition, the drone sports a wireless module, a digital compass, an altimeter, and a gyro with an accelerometer.
Although the post is really about the quadcopter, [Tim] also gives information about the Blue Pill which could be applied to other STM32 boards, as well. On the hardware side, he’s using a common USB serial port and a Python-based loader.
On the software side, he shows how to set up the linker and, using gcc, control output ports. Of course, there’s more to go to work the other peripherals, and Tim’s planning to investigate CMSIS to make that work easier. Our earlier post on STM32 prompted [Wassim] over on Hackaday.io to review a bunch of IDEs. That could be helpful, too.
7 thoughts on “Quadcopter Uses Bare Metal STM32”
> The firmware is open source but uses the Keil IDE.
uVisiiioonn! *Shakes fist at cloud*
Actually uVision doesn’t seem /that/ bad when you’re stuck using it in conjunction with STM32CubeMX.. Because CubeMX is just that much worse.
Seems like the mechanical engineering is an afterthought here.
Reading this makes it feel like 2010 again.
“Fortunately most STM32 boards like the popular Blue Pill board have a USB to UART bridge with the CP2102 chip on board”
Clearly I purchased the wrong version of Blue Pill, not a USB bridge in sight
I am quite glad that mine has the USB connector connected to the internal USB of the STM32 and not to a CP2102.. And I think that is the standard.
I’m curious as to how this is different to the normal quadcoptor boards you can buy which are based on the STM32 (F3, F4 & F7) which run Betaflight (or the various forks)?
Thank you for documenting a path into STM32, using the GNU toolchain. Having used it exclusively on a variety of targets over the last two decades, it’s a prerequisite for taking the trouble to learn new target hardware – one variable at the time.
(*nix is the IDE, given make, ctags, binutils, gcc, and vim.) A look at ARM is on the todo list, and the power/price point is revelatory after using a lot of AVRs.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)