“A dime-sized, ARM-based Arduino complete with a programming/development system.
Hardware and software design to make a tiny Arduino are shown. Project Logs present project details. Here is how this project unfolds: First Version - STM32L031G6 My first design, and what I learned that drove me to a second version. Second Version - STM32L071KBU Second design. Includes both the tiny version (tArmDuino) and the breadboard version. Adding tArmDuino to the Arduino IDE How to add a custom version to the Arduino IDE. This would work for any board, but has specifics for tArmDuino. tArmDuino Programming and Debug Making a custom board show up in Arduino is one thing, actually programming it from there is another! Here are the details. G-Debugger for tArmDuino To really get the most from an ARM-based processor, gdb is highly desirable. Here’s how to use it with tArmDuino. Uploading Clip for tArmDuino Creating a tiny Arduino is good, but somehow a programming header must be connected to the board. This section shows how.
Once again finding myself in need of a tiny, cheap, yet powerful Arduino that didn’t seem to exist, I decided to create one. What a tiny Arduino should provide is access to as many Arduino hardware features as possible, plenty of flash memory, a programming connection, and a small board size. An ARM with 3.3V I/O seems like the right processor choice, and STMicrosystems makes a huge selection. Program development is done with the Arduino environment since ST has provided libraries for Arduino. Why use Arduino? Libraries can do many tasks and save development time allowing me to focus on “value added” tasks without having to build infrastructure first.
Studying the STM32 product line, I narrowed down my possible choices to the STM32L0 series. My intent was to choose a processor that provided most (possibly all) of the capabilities of an Arduino UNO, with more memory if possible, all while being suitable for battery power. I was not concerned with having more I/O, so a 28 or 32 pin version seemed satisfactory. The STM32L031G6 seemed like a good choice and was my first design. For reasons I’ll discuss, the STM32L071KB emerged as a better choice.
Working in KiCAD and utilizing the debug connector scheme first described in POV programmer, I created the board seen in the picture (the one with parts on it L031G6 version). As mentioned above, this led to the creation of the very similar other design shown (L071KB version). The only parts on the board are the microprocessor and the decoupling capacitors. The reset line is pinned out so a button can be added if desired. Cycling power will also cause a reset. The SWD debug interface goes to the programming footprint. The idea is to provide maximum flexibility so the application can be as small and targeted as desired with no extra baggage. Downloading and debugging is done using the SWD interface. So it’s not plug and play like an Arduino or Teensy, but it’s not difficult. USB can be added to the serial port, but I typically don’t use it for most projects.
To make prototyping as easy as possible, a bread-board compatible version is necessary. The SWD interface lines are pinned out on the breadboard version so jumpers can be user to program and debug. Not that the tiny version can’t be breadboarded, it’s just less convenient. The programming header, while very workable, is still harder to connect and may necessitate disconnecting some other pins. Using a breadboard version makes life easier through early stages of development. Once an application is mostly working then it can be moved to the tiny version.
Creating a new Arduino and adding it to the Arduino environment requires several software steps. Without these, even the slickest hardware won’t be satisfactory. I’ll explain these steps as I go along.”