Announcing Experimental Rust Filesystem and Path Support for Xous PDDB!

The “filesystem” on xous is called PDDB – short for the Plausibly Deniable Data Base. This is a dict-key-value store with built-in overlay support. We’ve just released experimental support for File and Path support for Xous! This requires a recent libstd (version or later), as well as a version of Xous Core from 6 July 2022 or later. The Structure of PDDB The default view of PDDB is a “Union” filesystem.
7 min

Xous Process Creation

A fundamental feature of modern computing is the ability to run programs. In many embedded systems, the list of processes is fixed at startup. In other systems, including mobile phones and desktop computers, new processes can be spawned on a running system. Until now, Xous has been unable to create new processes. Instead, it relied on the bootloader to create memory maps and load processes from disk into those newly-created memory maps.

Introducing Qomu

Three years ago I announced crowdfunding for Tomu – a microcontroller in your USB port. This project brought to mass-market a tiny Arm Cortex-M0 CPU in a package that fits directly into a USB port. Now you could take a standalone USB project anywhere. One year later in 2019, we launched Fomu – an FPGA in your USB port. This FPGA had no CPU, so we had to provide one. We shipped with a Risc-V core, and provided users with a way to add their own modules to the core, or to replace or remove the CPU entirely.
2 min

Precursor + Renode

Precursor is an FPGA-based dev platform for secured applications. The reference design runs a VexRiscv CPU core plus a wide range of peripherals. Developing software for an embedded target can be a challenge in the best of circumstances, and when you’re starting out there is no display, no keyboard, not even a serial port – you might have a blinking LED and a few pads you can probe with an oscilloscope.

Trace Together Token: Teardown and Design Overview

On 19 June, GovTech Singapore invited four members of the community to come and inspect their new TraceTogether Token. This token removes the need to carry a phone at all times, and is designed to help both those who do not have a smart device capable of running TraceTogether well, including those using older Android devices, non-smartphones, and iOS users. I was among the group, which also consisted of Roland Turner, Harish Pillay, and Andrew “bunnie” Huang, who were given the opportunity to see the first public revision of hardware.

Xous: Support Tooling

As part of the Betrusted Project, I am working on an operating system to power the hardware. I’ve talked about the need for a new operating system for the project, which boils down to the need for software to be secure and small. I’ve been working on it for about a month now, and I’ve just had my first black triangle moment. The system isn’t much to look at from the outside, but there’s a lot of infrastructure in place and now the work can really begin.
3 min

Cobbled-together Profiler

I recently got Circuitpython working on Fomu! But there’s an issue with the speed of Fomu’s SPI flash: It’s currently incredibly slow, and that makes for a poor experience. Worse still, the program runs so slowly that the tinyusb stack can’t keep up with the USB protocol, and the host gives up and resets the device. An easy solution is to put frequently-used functions in RAM. This is as simple as annotating them with __attribute__((section(".
3 min

Clocks and Timing are Hard

Computers are binary things, right? A bit is either “1” or “0”. Except when it isn’t. Computers are built from logic gates, which are built up from silicon, which is based in physics. In physics, things very rarely are clear cut, and silicon gates are no exception. Signals take time to transition between “0” and “1”, which is why we have clocks - they guarantee that when the clock signal is a “1”, all other signals are valid.
3 min

Fomu EVT: Prototype or Business Card?

When starting a project from scratch, it’s important to create prototypes. For programming, you usually create small snippets that demonstrate what you want. Fortunately, software is quick to compile, so you’re free to create hyper-specialized programs that exist only to test out particular theories. With hardware, the build cycle is much longer and more expensive, so test widgets must examine multiple theories in one build, and should be as flexible as possible.
5 min

Fomu: An FPGA in your USB Port

We’ve just started crowdfunding Fomu, and FPGA that fits in your USB port! The original project – Tomu – was a really interesting little device. It was a simple ARM Cortex M0 MCU that fit entirely inside a Type A USB port. It was easy to build, yet was actually rather interesting. There’s something fascinating about being able to easily program another computer sitting inside your computer. Now we’re taking it to the next level.
2 min

Making Tomu: Plastic Case Overview

This series of blogposts details the steps I took to create a plastic case for Tomu. Tomu is a project I helped to crowdfund. Initially created by Tim “mithro” Ansell, Tomu is a tiny computer that fits entirely inside a Type-A USB port – the sort usually found on a PC or laptop. Initial designs for Tomu used a variety of methods to mechanically seat the circuit board inside the computer, ranging from 3D printed shims to slightly oversized PCBs to just folding over a business card and jamming it in the slot.
3 min

Palawan project #1: button box

June saw lots of progress on Palawan. Many bugs were fixed in the Grainuum stack, the bootloader was fleshed out, and stability was improved. The system is usable now, and just about feature-complete. Enough to think about shipping. An image is worth many words, so let’s start with a box that uses Palawan: The box is some cheap arcade buttons sourced from the markets of Shenzhen put into a plastic takeout container I got from the local food supply store.

Grainuum 1.3: Now with fewer bugs

In the process of bringing up Palawan DVT1, I’ve run across a number of bugs in Grainuum. Most notably, several subtle timing errors where the loop was one cycle too short or too long. Or in the case of the end-of-packet signal, four cycles too short. There was also an issue with a failure to unstuff everything after the first stuffed bit. That is, if you sent over 0xffffffff, you’d see something like 0xff7ffdf on the embedded host.
1 min

Love-to-Code Debug Shoe

Looking to debug your Chibitronics Love-to-Code board, but don’t want to solder on headers? If you have access to a 3D printer, grab the LtC Debug Shoe, print it out, and crimp on some tinned wires. Read on to learn more about the project. I’ve been working lately on the Chibitronics Love-to-Code project, where we allow users to program a board via audio. To keep file sizes down, the LtC board has an extensive operating system, which means it’s a complicated beast.
2 min

Clustering Novena

Server clustering is a topic I’ve been cirous about for a rather long time, from back in the Slashdot days where one would constantly “imagine a beowulf cluster of” any given low-powered device. With modern clustering software, such thoughts become practical reality. And with some cardboard, everything goes together nicely. To start with, I cut up some shipping boxes, laid the mainboard on top, and made some marks with a pen.

Palawan's USB Stack is Now Known as Grainuum

The USB stack from project Palawan has grown beyond its original scope. The bootloader contains a completely separate copy, and it has been ported to at least one other platform. It is confusing to refer to both the hardware platform and the USB stack as “Palawan”. To help alleviate confusion and help the the projects stand on their own, the USB stack will be broken out into its own project and renamed Grainuum.

Seafile: Filesharing that's pretty great

Seafile is a piece of software that I use every day that I find exceedingly handy. The elevator pitch is something along the lines of “Like Dropbox, but self-hosted, with versioning.” I use it on all of my stuff, and it is fantastic. I run it on Linux, Windows, and Android. Files are quickly synced between machines, and I don’t need to worry about backups on the client. I reformatted my machine to install a fresh copy of Windows 10, and was up and running again very soon after.
3 min

Promising URLs for the future

A statement floating around on Twitter is that “A URL is a promise”. A fine sentiment, and I hope that link continues to work in the future. The Internet is not a static thing, but being able to send someone a link and have it continue to work. I broke a promise by installing a new blogging engine and removing the older content. Links stopped working, external blog posts went nowhere, and the experience for users was generally poor.

Palawan: Part Selection and Schematics

When starting a project, the first step is obviously to decide what it should do. Do you want to do a light blinker or a laptop? Maybe you have something prototyped already on something like an Arduino, and you’d like to move to Mass Production (MP). Either way, entire industries have been built around deciding what to do. Once you’ve selected something, then the physical work begins. The next few steps are also important, and are frequently overlooked, particularly in classroom situations where they are pre-selected.
10 min

Introducing: Project Palawan

I want to learn more about hardware design, and the best way to learn something is to do it. I’ve started work on a new project to create an easy-to-use hardware input platform. The project, codenamed Palawan, allows you to make contraptions that show up wirelessly as a keyboard, joystick, or mouse. All with no software to write and no hardware to solder. Unless you want to, of course. Palawan is built around an NXP Kinetis KW01 CPU with a 48 MHz ARM Cortex M0+ and a sub-GHz wireless radio in it.

Novena Beta Repo

I have a private Novena repo of my own that contains packages that have not yet been released, but are good enough for testing. They may be unreliable in certain ways and have new bugs, but they also fix old bugs, add new features, and pull newer versions of the software. It’s similar in scope to Debian’s -testing branch, in that you’re probably fine to run in day-to-day, but it’s still made from software that’s fresh from a builder.
2 min

Desktop Factory Test

We've just shipped the desktop factory test off to the assembly line, and they'll soon begin the process of turning bare boards into desktop models. We ran the initial factory test -- the one I mentioned earlier -- on every board we produced. This first test ensures that the board is assembled correctly, has its own MAC address assigned, and has a root filesystem image. This test performed well, and actually caught an assembly error that prevented the Ethernet test from running.

Senoko Battery Board as a Device

The Senoko battery board contains an STM32 chip, and runs its own separate operating system. The computer itself has 10 kilobytes of RAM and 64 kilobytes of storage space, where the operating system lives. This operating system is responsible for keeping the battery charged, monitoring the power button, acting as a secondary clock, and acting as a GPIO port expander. Many devices talk to one another using the Inter-Integrated Circuit bus, commonly called I2C.

Factory test

We're doing the factory runs in batches, since there are multiple configurations of boards. Every board that leaves the factory will start out life as a "bare board", and will have features added to it later on. The factory test itself serves to do two things: Test the board, and load the board's firmware image. Since the firmware is so large and we have multiple cores, the task of writing the firmware is done in the background throughout the test as an "

Novena First Run

Right now, I'm in the middle of packaging up various bits and bobs for the final Novena disk image. We have a kernel mostly decided, and we have a base set of packages. Furthermore, we have a script that creates a bootable disk and installs all of the support packages onto it. Creating something you can build has always been a challenge. I've decided to use git-buildpackage, which prepares a Debian package file from a git repo.

Novena progress: RTC, Headphone, Suspend

When designing your own laptop, the most mundane of things become exceptional. When you get something working, life becomes that little bit sweeter. Like cracking your knuckles, or getting that bit of food from between your teeth, getting even the smallest part of the system working well is such a great relief. We got the audio codec upstreamed, as I mentioned before. In earlier versions, we hardcoded the two outputs to be named "

Audio driver merged

The es8328 audio codec driver has been accepted by the ASoC maintainer. That means the driver will make its way upstream, and should land in Linus' tree in a few weeks. One more hurdle down on the road to mainstream. This week we'll be focusing on getting more of our patches upstream. We'll be refining both the PWM driver's low-speed mode (which allows us to dim the LCD), as well as the STMPE610, which is a touchscreen chip we use for various bits and bobs such as volume button detection and a resistive touchscreen if users want to add one after market.

Progress report: Sleep, Audio, and Power

It's been a month since my last post, and things are moving along. We've been hard at work improving both the hardware and software. There's a backer update describing much of what we've been up to, and snce I'm working with the kernel I'll go into some detail on the developments of the past month as well as what we're working on now. I'll talk about the three major areas of improvement in the last month: suspend/resume, audio, and power.

Thank you to our supporters! Here's what we'll work on:

Thank you to each and every one of our supporters. I'm honoured by all of the positive talk about the project. Now that the campaign is over and funded, it's time to get started. Or rather, continue our work. If you've seen either bunnie or myself at conferences, you'll have seen us with our own Novenas. Late last year these were in suede clamshells, but lately we've been sporting the SLA-printed aluminium-bezeled prototypes that we'll eventually ship.

From Chips to a Laptop

There's a certain thrill to board bringup, to be the first person in existence to have code running on a brand-new board. To even get your first "Hello, world!" requires a lot of components to be running correctly. Computers are complicated beasts, but then again they have a great deal of functionality. The one I'm using has four cores that run at 1.2 GHz, high speed RAM that runs at 533 MHz, and a host of hardware peripherals that run at various other frequencies.

Pre-Boot enviroment weirdness

The world of early board boot is a weird one. Hard-and-fast rules of programming don't necessarily apply here, and things have an annoying tendency to work only sometimes. I finally revisited the pre-boot environment this week, due in part to bringing up the dual-core version of Novena, which differs from the quad-core version in a few subtle ways. The most obvious difference is the reduced on-chip SRAM size. The quad offers 256 kB of on-chip RAM we can use for bootloader initialization, but the dual only offers 128 kB.

Novena PVT / Senoko DVT

This post is coming to you from Novena PVT, running off of Senoko PVT on battery. In engineering, there are several different versions of pre-release hardware. Novena itself has gone through three: EVT (engineering verification test), DVT (design verification test), and PVT (production verification test). The first revision was very rough, and required several modifications to fix various problems. We weren't sure what we wanted to do with it, so it had a few unusual features.

Fernvale: The Path Not Taken

Today at 31c3, bunnie and I gave a talk on the Fernvale platform, the core of which is a Mediatek MT6260 System-on-a-Chip. This chip is appealing because it is a 364 MHz ARM chip with four megabytes of built-in flash and eight megabytes of RAM. Additionally, it has the usual accoutrements such as USB 1.1, I2C, LCD controller, and basic GPIO control. The talk centered on how we ended up getting code execution on the chip and ultimately porting