Quadcopter Uses Bare Metal STM32

[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

  1. > 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.

  2. “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

  3. 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)?

  4. 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.

Leave a Reply to SebiRCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.