Hackaday Prize Entry: A Cheap STM32 Dev Board

Dev boards sporting a powerful ARM microcontroller are the future, despite what a gaggle of Arduino clones from China will tell you. Being the future doesn’t mean there’s not plenty of these boards around, though. The LeafLabs Maple has been around since 2009, and is a fine board if you want all that Processing/Wiring/Arduino goodies in a in an ARM dev board. The Maple has been EOL’d, and that means it’s time for a few new boards that build on what LeafLabs left behind.

This Hackaday Prize entry is for an almost-clone of the Leaflabs Maple Mini. It sports a newer microcontroller, but still has the same bootloader and pinout. The best part? It costs less than four dollars.

The microcontroller inside this Maple Mini clone is the STM32F103, a 32-bit ARM Cortex-M3 running at 72 MHz with 128K of Flash and 20K of SRAM. That’s enough for just about everything you would want to throw at it. It also follows the pinout of the original Maple Mini, and the team also has a version that’s a slight improvement of the original Maple.

The big deal is, of course, the price of the board. It’s four bucks, or about the same price as an Arduino clone from the usual online retailers. Now, finally, there’s a reason for you to wash your hands of the Arduino too.

68 thoughts on “Hackaday Prize Entry: A Cheap STM32 Dev Board

    1. There’s a popular board on Ali that I got for under 2 USD, similar to this, albeit with half Flash.

      I found the low- to mid-end STM32 micros to me more reasonably priced than the big ones like 429. The former are in fact so cheap there’s no reason to use 8-bitters in serious designs anymore.

    1. Check Banggood, Aliexpress, eBay and so on: Maple Mini-clones and a billion different iterations using the various STM32-chips have been available for several years now for as little as 2€ per dev-board.

  1. I have some Maple Minis still in my drawer. I never got around to using them as they are seemingly harder to programm for then my arduino nanos. Had anyone ever find a nice guide for the maple mini on how to use them? Sadly, EOL also menas end of Data available online and I have a hard time finding a toolchain to work with them. Any Maple Mini users here who would like to share how they do it?

          1. You can easily program them in mbed, there is support for STM32F103 – https://developer.mbed.org/platforms/ST-Nucleo-F103RB/ (although, the 128kB version but the code works on 64kB without a problem). There are several topics on developer.mbed.com forum about using the cheap eBay boards.

            The problem of programming the boards (if Maple or generic STM32 bootloader doesn’t work) is easily solved if you have an USB-serial converter…

        1. I am pretty happy with Stm32duino, but I suppose it can’t hurt to give libopencm3 a try, too. I had seen someone mention it, but having a memory like Swiss cheese I managed to forget it almost instantly, so thanks for the tip!

  2. Why bother cloning what the Chinese clone-producers are already churning out in great quantity?

    There are already loads of STM32F103 boards on eBay for well under $4, though they’re the C8 (64k flash) version, not the CB (128k) version used, I think, by Maple. The project page linked here also seems confused; they are asserting incorrectly that the C8 is 128k.

    You want my interest? Put out a $2 STM32L031F6 (TSSOP20) board with RTC xtal, and now you’re talking.

    1. You may be (or perhaps not) surprised to find 128kB of FLASH actually working inside the STM32F103C8.
      The C8 and CB are internally the same chips, but C8 either didn’t pass full FLASH test during manufacturing, or wasn’t actually tested at upper half of FLASH array. I wouldn’t treat C8 as CB for commercial project, but for hobby use – why not. I have something like half a dozen of cheap chinese STM32F103C8 boards and all of them work flawlessly utilizing 128kB of FLASH.
      The same goes for STM32F101 found in cheap chinese ST-link dongles.
      It is actually very common to find the low-end product the same as high-end product, just with disabled/untested/not-guaranteed features.

      1. The chip are often the same until the volume of the smaller one reaches a point where a redesign makes sense.
        I worked at a place that was bitten by than, the code accidentally used some ram that was only there because it was the bigger version of the chip, when the production reached a large volume the manufacturer made a new version of the chip that only had the ram is was supposed to and everything stopped working

    2. What would differenciate this board from all the other 4-dollar Chinese maple-mini clones is a “RC”-chip (instead of a RB or C8). Not only do they offer 64 KB of ram (instead of 20 KB), but it also has a dual-channel 12-bit DAC. (a read DAC, not PWD).

      The STM32F1 CPUs are quite powerfull and are very well capable of doing real-time audio-processing, but if the chip does not have a DAC to output the audio, this really limits the usefullness of the chip.

  3. If and when 32-bit ARM microcontrollers become ‘the future’, 8-bit microcontrollers will be ‘the future + 10 years’. I’ve seen 8-bit programming relegated to the dustbin of history in four different decades by now, and it stubbornly refuses to stay there.

    Any device with the programming resources of an Apple ][ is powerful enough to be interesting, but simple enough to be knowable. Programming them is fun, and a new generation of people discover that every time a new 8-bit platform comes around.

    32-bit ‘hardware store in a very small box’ chips are powerful, but will never achieve the popularity of 8-bit platforms because of their learning curve, and because code portability in that environment sucks. 30% of a program configures the chip in a specific operating condition that may or may not be compatible with any other chunk of existing code. Programmers lock themselves into specific families of hardware because they don’t want to spend a couple of years learning another, roughly equivalent one.

    People who get tired of that move to operating systems in order to get a hardware abstraction layer, then find themselves dealing with time-critical problems that are easily solved with 8-bit peripherals.

    So yes.. 32-bit dev boards can be cool, but for Ghu’s sake *please* keep the bit-measuring contests in your pants.

    1. Four different decades would mean you saw 8-bit programming relegated to the dustbin of history in the 1980s. Admittedly Intel ‘286 and Motorola 68000 (both 16 bit processors) did become the norm for regular computers in the late 1980s, and the ‘386 and 68020 existed at the high-end of the market in the last couple of those years.

      But certainly this wasn’t true for microcontrollers. The Intel 8051 and Motorola HC11 accounted for nearly all microcontroller sales well into the 1990s. Even the first 40 pin AVR released in 1997 was designed to be pinout compatible with the 8051. I’m pretty sure nobody believed 8 bit microcontrollers relegated to the dustbin of history in the 1980s.

      1. By the late 80’s, the sales guys were pushing 16-bit chips as the next big thing, even though everyone was fine using 68HC11 and 8051, and most designs couldn’t afford a 68K. And TMS9900 was a fine 16-bit architecture that has been around since the 1970’s, it just wasn’t as cheap or as popular as 8085/Z80, 6502, and 6809. But I think the popularity had as much to do with mindshare as the price. In the 80’s could find information on programming and hardware design for the main 8-bit families in magazines, on the internet and BBSes.

    2. Fully optimised code on an 8 bit should be able to run a medium sized factory…. fully optimised code on a 32 bit should be able to run a medium sized planet. So every application of a 32 bit system so far should be regarded as a weaksauce failure :-p

    3. By the way, as an example of 8 bit can be fully grokked, although also an impressive feat in any case, a blind guy wrote the first text to speech util available for the Apple II by composing and assembling it in his head, and typing the code in from memory.

  4. Can anyone point me to an up-to-date tutorial on how to install the dev environment for stm?
    Most of what i find is broken in some way or another. Have a stm discovery board gathering dust because i can’t compile/upload/debug depending on which tutorial i follow.

    This is the true value behind arduino, we can just download the (crappy) ide and be compiling/uploading in seconds, in the site for the discovery board i can’t figure out what i need to get started with so many downloads to vendor specific files with no explanation of what to do with them. And they should remove the stupid forced register to download crap, tired of spam and hacked sites spilling my email… again, all they get from me is another disposable mail

    1. Would be worth checking out mbed.
      Though if your discovery board is not one of those supported, they completely stop giving a fu(& about you. Adding your own board is virtually impossible (or so crazy hard/poorly documented that I can’t figure it out). Unsupported VERSIONS of chips.. wtf?! Supports 32 pin but not 64 pin versions is common.

      But IF supported board, it’s pretty decent IDE (for free). You still need a loader for STM, but StLink works just fine for that.

      1. It would if they had an actual toolchain to download and not a saas platform, even the export does not seem to function except to toolchains i’ve never heard about.
        I will not trust my work in another person hands, too many providers quitting/losing data/getting hacked/etc to even consider that.

        Repeat after me:
        There is no “cloud” just other people computers

        1. ‘There is no “cloud” just other people computers’

          A bunch of us are changing that. Check out IPFS, or Interplanetary File System. Yes, it is ‘other peoples computers’, but in a git-repo bittorrent backed kind of way, across the whole network. Here’s an example:

          Star Trek: Horizon (fan made ST movie) http://ipfs.io/ipfs/QmYGD41np8igDK743qMxKuXcJ7JVdryhNnRgXAypD6HH83

          (note, ipfs.io runs a gateway. when you’re running ipfs, you talk to localhost:8080 instead)

          1. If there is a modern day Carrington Event, your biggest concern is not going to be weather or not you Ali-Express STM32 clone can compile your RC-servo code.. Its going to be more like “Where the hell can I get some clean water?” or “How am I going to pay for the food that is rapidly diminishing from the soon to be looted grocery store?”

            I hope to God that I never see it happen.

          1. I’m a big fan of mbed but I find that while the mbed libraries are amazing..the documentation sucks and different platforms can have limited / different documentation. They also keep fragmenting the libraries (mbed 2 vs mbed 3) then merging them again (mbed 5!!!) making the whole damn thing very confusing to use. Also their Online IDE is kind of outdated and desperately needs an overhaul. The mbed libraries from a design perspective are better than arduino libs by far. But from a usability perspective fall short.

        1. Any 4-dollar STM32 maple clone from ebay. They come with bootloader already flashed.
          Or you can flash the bootloader into almost any STM32F103 board.

          I believe there is some kind of support for nucleo F103 boards, or you can use official STM ST-link apllication to load binaries from stm32duino into F103 nucleo board.

          1. Doesn’t have to be a Maple-clone, either. As long as the chip is supported (the F103’s are best-supported atm) it can be used with Stm32duino, no specific kind of a board is needed.

            ST-Link can be used for uploading the binary to the board, too, but one isn’t required to use the official ST-Link app to do that, either — I use some random Chinese ST-Link V2-clone dongle and upload straight from the Arduino IDE under Linux with it without an issue, there are binaries for Windows and Linux in the Stm32duino-package for that already.

    2. ww.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-ides/sw4stm32.html

      you might need to download the stlink USB driver as well but other than that everything just works out of the box

    3. WORD!!

      Finding a (free) IDE that “just works” for the STM was impossible for me ( This was 1 year ago) – Then add in the complexity of using the STM standard peripheral libraries and all of the sudden the crappy-Arduino IDE is not looking too shabby.. Add in 9999999-million Arduino support forums and example projects, and its not looking too shabby at all..

      I switched over to the STM32 for use as the heart of an inexpensive after-market EFI controller. (Previous much more complex version I used an FPGA and an ST-arm chip) Anyway, It took me 2 weeks of F’ing with GCC to get (finally) a stable environment that I could compile code for the STM32F0 and STM32F4’s – Then it took me another full month to become comfortable with the standard peripherals libraries and “documentation” not to mention the poor documentation on the timers / counters. That being said I am now very happy with the ‘F0. The documentation sucks, and the support community is almost as uninformed as I am when it comes to the complexity of the fine details of the hardware.

      Compare this to the Teensy, or any of the other cross-dressing arm-to-Arduno boards… I had the Teensy doing “hello world” in 30 seconds, and doing WS2812 light show controller work in an hour.

      Bottom line: The “out of box experience” of the STM32 (at least a year ago) ain’t no arduino

      1. have a look at the free STM32 systemworkbench IDE. It can be downloaded from http://www.openstm32.org and has been around since at least 2014. It includes IDE, toolchain, libraries and debugging tools all integrated into one tool. It’s pretty decent but for some reason is not popular. No need to muck with makefiles, cli toolchains e.t.c.

        You’ll have to register on the site to download…but that’s standard fare. The IDE works perfectly with STM32’s STM32Cube and/or SPL libraries. For mbed libraries have a look at mbed.org. For Arduino have a look at


        As far as the Teensy LC/3.2 goes they are the best Arduino supported ARM boards out there. I love them!

        1. I hate to say this, and I wish it wasn’t true, but i only have 2 modes of development – I don’t use fancy GUI based IDE’s unless it is expensive. When its expensive, it usually works, or you have someone to call and get help from. The Kiel compiler for BLE tags works great, the IDE is useful, you can single-step code and it actually works right – but you have to pay to play.

          The other mode (and 99% of what I do) is to do it all with Make files, an do my debugging with printf() and IO pin toggling with an o-scope.

          I have never seen a “free” IDE that actually worked right – and more importantly – was easy to “re install / set up up” on a fresh computer. That is what I found with System Workbench, it looks very pretty, but I cant get the damn thing to give me warm fuzzy feelings that I need as a developer.

          1. Not exactly sure. I’m just trying to run the BSP example from CubeF4. Durin build it stops and basically says ” No rule to make target ‘…/lcd.o’ “. Not really sure why its complaining about lcd.o specifically.

        2. I find the System Workbench IDE to work very well especially if you want to use the STM32Cube/SPL libraries.
          Its just eclipse with plugins that work well by default…you can always customize the setup to suit your needs.

          MHB, what exactly didn’t work for you in System Workbench?…..

          1. Sorry, it looks like I commented on the reply above your’s. Basicall, I get an error when trying to build the project, which is the BSP Example from CubeF4. ” No rule to make target ‘…/lcd.o’ “

  5. I just got a NUCLEO-F767ZI, which is granted quite a bit more expensive and more powerful than the boards discussed here. But I was able to put the new version of mbed-os(5.1) on it and get a RTOS up and running and communicating with UDP and TCP test programs pretty quick. Mbed has a cloud ide but I just used the cli tool and Clion to work on the code. They have a whole HAL for a bunch of boards and a common api that is very similar to Arduino C++ classes. I haven’t mess around with those yet but the RTOS is pretty cool.

    One neat feature was: the board shows up as a usb flash drive. You just cp the bin file to the flash drive and the built-in programmer will flash the controller automatically.

  6. I just got a NUCLEO-F767ZI, which is granted quite a bit more expensive and more powerful than the boards discussed here. But I was able to put the new version of mbed-os(5.1) on it and get a RTOS up and running and communicating with UDP and TCP test programs pretty quick. Mbed has a cloud ide but I just used the cli tool and Clion to work on the code. They have a HAL for a bunch of boards and a common api that is very similar to Arduino C++ classes. I haven’t mess around with those yet but the RTOS is pretty cool.

    One neat feature was: the board shows up as a usb flash drive. You just cp the bin file to the flash drive and the built-in programmer will flash the controller automatically.

  7. I’ve had a handful of ST Discovery boards for a few years that I finally started playing around with lately; for me, the key was getting comfortable with the libopencm3 project. I never used libraries beyond ‘avr’ and ‘avr-interrupt’ while playing around with 8-bit microcontrollers, but using a comprehensive library like libopencm3 seems to make sense to me for STM32 development. The whole toolchain is open-source and works quite nicely.

  8. > The microcontroller inside this Maple Mini clone is the STM32F103, a 32-bit ARM Cortex-M3 running at 72 MHz with 128K of Flash and 20K of SRAM. That’s enough for just about everything you would want to throw at it.

    Brian, you didn’t really say that did you?

    I’ll toss the MQTT library with SSL at it and see what we get. I bet that 20K/128K will be a bit thin.

  9. The stm32 platform is very easy to get started with and using gcc makes it free and no size limits.

    A quick outline:

    1. download cubemx and install.
    2. under cubemx install the libraries for the flavor of chip your using F0, F2, F3, F4, F7 etc.
    3. generate a cubemx project and initial setup of the chip, select the SW4STM32 project output.
    4. download STM32CubeMX to Makefile https://github.com/baoshi/CubeMX2Makefile.
    5. create a shortcut to the CubeMX2Makefile.py on your desktop.
    6. install python if on windows.
    7. drag the cubemx project folder onto the CubeMX2Makefile.py shortcut to generate a proper gcc make file.
    8. download gnu arm gcc https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q2-update/+download/gcc-arm-none-eabi-5_4-2016q2-20160622-win32.zip
    9. unzip gcc to a know folder location.
    10. download make for windows http://www.ba0sh1.com/wp-content/uploads/2013/05/make.zip
    11. unzip make to a know folder location.
    12. add the gcc bin folder and make folder to the windows system variables path by right click my computer – properties – advanced system setttings – environment variables
    13. cd to the cubemx folder location and type make.
    14. modify the optimization under the make file to -o1 from the normal -o0 to optimize code.
    15. thats it.


    1. This looks a lot simpler than the last time I checked, but it still far from a ‘download a file and install all’ approach. Fine if you do it once at home, but be in the situation of doing this many times and it gets complicated.

  10. For those of you interested in learning more about the STM32 Microcontroller and specifically mastering the STM32Cube
    HAL, I highly recommend Carmine Noviello’s ebook in progress “Mastering STM32” https://leanpub.com/mastering-stm32?utm_campaign=mastering-stm32&utm_medium=embed&utm_source=embedder

    At 70% completion, the book is quite comprehensive and covers all the ins & outs of the STM32Cube HAL libs, building a custom dev environment as well as hardware design and using FreeRTOS. I highly recommend it. You can also visit his blog: http://www.carminenoviello.com/

    1. Those “Blue Pill”-modules use wrong-sized resistor for USB, ie. they have a 10kOhm resistor connected to it. That’s easy enough to fix, though. Aside from that there isn’t any meaningful difference.

          1. According to the more-knowledgeable people of the Stm32duino-forums and e.g. the Maple Mini – schematics it should be 1.5kOhm (I do not have the knowledge of USB-specs to actually verify this or not, but my board didn’t work right until I replaced the resistor)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s