GUI-less Development with the Tomu

A brief introduction to GUI-less ARM development with the Tomu board.

Whitney Knitter
6 years ago

To the detriment of my bank account at times, I find myself browsing through Crowd Supply on a regular basis just to see what’s new. A while back, I came across the Tomu, a teeny little Arm development board made to hide in a USB port. Of course I had to have it and backed the project immediately, and it’s been a fun little board to develop with. I’ve found Tomu to be a super handy little IO extension for my laptop with the capacitive touch buttons it has just barely hanging out of the USB port. The community this little board has created is great so there is a ton of available software for these little guys, including a ‘quick-start’ repo on GitHub. While you can find plenty of well-deserved praise for this great little dev board, there is one aspect to it that I think is under-appreciated: the fact that it’s a GUI-less development platform. The Tomu is a great entry-level dev board for those that are new to the GUI-less way of life. With only 12 parts on its bill of materials, and its IO consisting of two LEDs and two capacitive touch buttons, it offers a wide range of potential projects without being too overwhelming. It’s also just endlessly entertaining to me to have a dev board that I can hide in a USB port…

GUI-less development is definitely something you’ll come across if you have an interest in embedded development as a professional job, and it’s important to understand the development process of what your GUI is doing behind the scenes for all sorts of troubleshooting purposes. For example: Xilinx’s Vivado is a great IDE, but as I’ve upgraded from version to version I’ve found various weird glitches where a button in the GUI to synthesize a certain block or generate an output product just wasn’t executing quite right in the background. Luckily, Vivado has its console available at all times in the GUI that allow a user to run individual TCL commands at any time instead fully relying on button clicks. I’ve also found that foregoing the GUI and developing from the command line makes committing to my repositories a bit easier and cleaner. The temporary project files many GUIs create every time a project is even opened make it messy and seem to constantly keep me out of sync and just create more work for me to make sure they aren’t included in my commits.

Development for Arm-based embedded processors requires three main components: the GNU Arm embedded toolchain to provide the Arm embedded GCC complier/libraries/tools, a method for uploading firmware to the target device, and the Make utility to compile project files into the ‘final product’ in the proper order. Since the Tomu is a USB-connected device, Device Firmware Upgrade Utilities (dfu-util) is used as it is a way to implement the USB standard necessary for when a USB device switches to what affectively is a PROM programmer to accept the new firmware. The quick-start repo for the Tomu has a great little table outlining which tools to use for a variety of OS platforms.

Starting off with Make, I already have Xcode installed on my Mac and there are tons of tutorials on how to do that. Just be sure to also install the command line tools. As Tomu’s repo recommends, I am also a fan of homebrew as a method to install the DFU utilities.

And finally, onto installing the Arm toolchain. Installing the Arm toolchain is fairly straightforward, but has a couple of pitfalls to take note of. The first pitfall is the decision of your install directory. While you can technically install it anywhere, the /opt/ directory on a Mac or Linux system is the best location because there are other GNU embedded development tools, such as the GNU MCU Eclipse plugin, that default to looking in this directory for an ARM toolchain. If you choose to install somewhere else, just make sure the file path isn’t too long and the directory isn’t in a networked location.

Step 1 (Mac OS X) — Download the latest archive tarball of the Arm toolchain from the Arm Develop website.

Step 2 (Mac OS X) — Unpack the archive into the desired install directory.

Step 3 (Mac OS X) — If you’re installing the Arm toolchain for a GUI or plugin to use, you’ll want to skip this step (for proper toolchain path management), but since we’re working straight from the command line here, it’s a necessary step. The path where your newly installed Arm toolchain now resides needs to be added to the system path so when Make is ran, it knows where the Arm complier is to call it. To add a new path, open the script that bash calls when a new Terminal window is opened that tells your system what paths to use:

sudo nano /etc/paths

Add the installation path of the Arm toolchain and point to the bin file within the directory. For example: /opt/gcc-arm-none-eabi-/bin Write out the changes and close the script, then close the current Terminal window and open a new one. This is important because when you change what your telling bash to do at startup, it didn’t startup that particular session with the changes you just made. In the new Terminal window, echo back your current system paths to double check the new path is present:

echo $PATH

Once you’ve verified your Arm toolchain installation, you can either write your own project or start off by cloning the Tomu quick-start repo to your local drive. For demonstration purposes, I chose the latter. Once you have a desired project, change directories into that file path and run Make to compile the project (just type make and hit return while in the project directory). At this point, you’re ready to plug in the Tomu. When first plugged in, the Tomu’s LEDs with slowly blink back and forth to indicate that the Tomu is in its bootloader mode. Run the DFU utility to list the current available devices:

dfu-util -l

After verifying the Tomu is recognized by your system, upload the project *.dfu file to the Tomu:

dfu-util -D .dfu

Of course, I chose the miniblink project in the quick-start projects since it’s the Hello World of hardware. Once uploaded, the Tomu’s LEDs started blinking at a faster rate than they had while it was in bootloader.

If your project writes out to the serial port, find the Tomu in your system’s device list by running ls /dev/tty.* It’ll be listed as some variation of usbmodem. Connect to it using a service such as screen and you’re set! The captouch project in the quick-start repo is good example to try this on. It’s reading the two capacitive touch buttons on the Tomu and outputting the proportional value out to the serial terminal.

If you’re not familiar with Makefiles, I recommend doing some research on the topic starting with this tutorial: A Simple Makefile Tutorial. Then you can comeback to the quick-start project directory and experiment by modifying those projects. Going GUI-less and developing from the command line can be a bit overwhelming in the beginning, but tools like the Tomu and the community it’s created are a great way to jump in!

Whitney Knitter
All thoughts/opinions are my own and do not reflect those of any company/entity I currently/previously associate with.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles