Remoticon Video: Pigweed Brings Embedded Unit Testing, Library Integration To Commandline

When it comes to embedded engineering, toolchains are the worst. Getting a new toolchain up and running correctly is often hard, and often prone to breaking when the IDE or other software is upgraded. A plethora of different toolchains for different hardware makes things even more murky, and if you want to get into time-saving tricks like automated testing, you’re in for a wild ride.

Those pain points led to the creation of the Pigweed project. As Keir Mierle demonstrates in this workshop from the 2020 Hackaday Remoticon, Pigweed is a set of libraries to make working with embedded development more hacker-friendly. The collection is accessed via commandline, and coordinates work with existing libraries to deliver unit testing, linting, static analysis, logging, and handling key-value stores, all alongside more commonly called-for tasks like compiling and flashing.

Demonstrated on a Teensy microcontroller and an STM32 Discovery board, the presentation drives home the utility of Pigweed, a Google project that was released as open source back in March of 2020. Graphical IDEs for these platforms are nowhere in sight, yet test firmware is built and flashed to these devices with relative ease. Unit testing, traditionally a sticky subject for on-chip applications, is demonstrated both emulated on the computer side, and running on the boards themselves. As the capabilities of microcontrollers have ballooned in recent years, writing tests for existing functions and confirming them during new development is becoming a must-have in your skillset.

There’s much more shown off here, so grab the workshop repository to follow along. It’s still considered experimental, and the irony of having to learn the intricacies of the Pigweed toolchain to ease the pain of other toolchains is not lost on us. However, most people reading will have their own affinity for the ability to use unified tools and commandline automation; this is a fascinating way to deliver a number of powerful software development techniques to low-level hardware projects.

Continue reading “Remoticon Video: Pigweed Brings Embedded Unit Testing, Library Integration To Commandline”

What’s New, ESP-32? Testing The Arduino Library

In case you missed it, the big news is that a minimal Arduino core is up and working on the ESP32. There’s still lots left to do, but the core functionality — GPIO, UART, SPI, I2C, and WiFi — are all up and ready to be tested out. Installing the library is as easy as checking out the code from GitHub into your Arduino install, so that’s exactly what I did.

I then spent a couple days playing around with it. It’s a work in progress, but it’s getting to the point of being useful, and the codebase itself contains some hidden gems. Come on along and take a sneak peek.

Continue reading “What’s New, ESP-32? Testing The Arduino Library”

No Nonsense Mbed Development Demo

This tweeting RFID reader is a great working example for the mbed. When an RFID tag is read it is matched with the name of the owner and a Twitter message is sent out. This is very similar to the RFID cat tracker that used an Arduino.
The code is short and simple due to the use of available mbed libraries. The hardware needs just two extra modules, an RFID reader and an Ethernet socket. If you’re trying to decide if you can make the jump over to ARM development this certainly presents an easy learning curve and an opportunity to get comfortable with the code and the libraries before you make a purchase. It’s also a great set of test code to start with if you have an mbed and the two supplementary modules on hand. The quick video clip after the break will walk you through the components and the code.

Version Control For Eagle

[Jeff] set up version control for Eagle libraries and projects. He mentions that Eagle has become the standard for open source hardware projects and he’s absolutely right. We use it for our projects, and we’ve grown to expect that the posts we feature have Eagle files available in most cases.

But Eagle falls short in its library management. There is some amazing work from SparkFun to support a usable parts library, but who hasn’t added parts themselves? [Jeff] setup libraries using github so that changes and additions to the libraries can benefit all and cut the amount of time spent making custom footprints for new components and packages.