Author Archives: smittytone

About smittytone

Tech Author and Writer

FreeRTOS and the Pi Pico: timers

I made use of FreeRTOS’ timer functionality in the most recent post in this series, but I didn’t go into detail because the post was focused on other features. It’s time to address that deficiency. Today I’m talking about timers.

Continue reading

Notarise macOS command line apps more quickly

It’s June once more, and time for Apple’s Worldwide Developers’ Conference (WWDC). This is a chance to learn about new functionality and, yes, discover initiatives announced at previous WWDCs that you completely missed the first time around. A case in point: Apple’s revamp of how apps are notarised at the command line, which was revealed at WWDC 21 but I only encountered this week.

Continue reading

How to write Unix man pages for macOS command line apps

Over the last few years I’ve released a number of command line utilities for macOS. I’ve always included online help within them, triggered with the --help switch, but I recently wondered how I might provide Unix Manual pages too. It would allow users to call up help with the CLI command man as well as a command switch. Belts and braces, perhaps, but I’m a completist and, more to the point, didn’t know how it was done and wanted to learn.

Continue reading

How to do DNS over HTTPS with macOS

My last post detailed how you set up DNS over HTTPS (DoH) for a client Raspberry Pi. I mentioned that I tried this out first on a Mac, and so I’ve been asked to show how running DoH on macOS works. Here goes.

DNS-over-HTTPS on a Mac via a local DNS proxy
DNS-over-HTTPS on a Mac via a local DNS proxy
Continue reading

How to do DNS over HTTPS on a Raspberry Pi

Last year, at the recommendation of a work colleague, I grabbed one of my spare Raspberry Pi 4s and installed the DNS proxy and content blocker Pi-Hole. It’s now handling all the DNS queries on my home network. Recently, I upgraded my Pi-Hole server to make its DNS requests over HTTPS.

Continue reading

PreviewCode 1.2.0 released to support user-requested programming data file types

PreviewCode, my macOS Finder source code and data file preview app, has had a major update to support a bunch of developer-oriented file types requested by users. The new version, 1.2.0, is available now from the macOS App Store.

PreviewCode’s main UI
Continue reading

FreeRTOS and the Pi Pico: interrupts, semaphores and notifications

One of the reasons why an embedded application developer might choose to build their code on top of a real-time operating system like FreeRTOS is to emphasise the event-driven nature of the application. For “events” read data coming in on a serial link or from an I²C peripheral, or a signal to a GPIO from a sensor that a certain threshold has been exceeded. These events are typically announced by interrupting whatever job the host microcontroller is engaged upon, so interrupts are what I’ve chosen to examine next in my exploration of FreeRTOS on the Raspberry Pi RP2040 chip.

Continue reading

FreeRTOS and the Pi Pico: sizing up scheduling

FreeRTOS scheduling is hard in as much at can be difficult to decide how to configure it. I wanted to try and figure out the options.

The popular real-time operating system provides the configUSE_TIME_SLICING and configUSE_PREEMPTION as settings values. You can add them to your FreeRTOSConfig.h file Tasks themselves can be assigned priority values, and there are API calls to allows tasks to sleep, to yield up the CPU, and be suspended and subsequently resumed.

Continue reading

How to use FreeRTOS with the Raspberry Pi Pico

While documenting Twilio’s in-development Microvisor IoT platform, I’ve been working with FreeRTOS, the Amazon-owned open source real-time operating system for embedded systems. Does FreeRTOS work with the Raspberry Pi Pico’s RP2040 chip? I wondered. It turns out that it can, and this is how you set up a very basic FreeRTOS project which also serves as a demo.

The RP2040-based project uses a Pico board and an extra LED
Running the RP2040 FreeRTOS demo app
Continue reading

Pico USB serial communications with CircuitPython

My Raspberry Pi Pico-based Motorola 6809 emulator uses the RP2040’s built-in serial-over-USB functionality to receive machine code sent from a host computer. The 6809 and its support code is written in C, but can you make use of the same process under Python? Yes, you can, and here’s an easy way to do it.

Computer to display via RP2040 serial comms
Continue reading