The Lean approach to Embedded Systems

My ‘TCP/IP Lean’ books are out of print, but I’m still using the same philosophy when designing embedded systems: trying to understand the fundamentals, so as to avoid the bloat that results from a simplistic building-block approach to hardware & software.

So I’m posting some projects taken from my experience working for the Iosoft consultancy, in the hope they will be of use – feel free to adapt and extend them for your own purposes, but please credit this blog as the origin of the material.

Programming PSoC: an ARM CPU with programmable hardware

Exif_JPEG_PICTURE
PSoC development kit

Want to craft your own high-speed CPU peripheral? Experiment with programmable hardware, but are deterred by the complexity and cost? Read my latest blog post.

Creating real-time Web graphics with Python

Web vector graphics (SVG) are very useful for displaying real-time information in a browser, for example annotating a circuit diagram with real-world values. As a first step, I’m demonstrating how an SVG real-time clock display can be created using Python, with animation in Javascript. See my post here.

Viewing ARM CPU activity in real time

viewing_cpu2

I’ve created a short video of my ‘reporta’ project, demonstrating a real-time graphical display of I/O port activity. The code is pure Python; it accesses the CPU internals via the SWD interface, so its operation is completely transparent to the target CPU.

See this post for a detailed description; the source files are on GitHub

If you’re not a fan of FTDI hardware, or need a faster debug system, take a look at my post OpenOCD on the Raspberry Pi.

Programming FTDI devices in Python

Exif_JPEG_PICTURE
FTDI modules

FTDI chips are frequently used as USB-to-serial adaptors, but the newer devices have the ability to drive more complex protocols such as SPI and I2C.

I like to use Python when first experimenting with new PC hardware, and there are some Python libraries for interfacing to FTDI chips, but I couldn’t find any real projects or complete worked examples.

The following posts demonstrate a step-by-step approach to driving the FTDI chips from Python, to learn about their functionality. In the final part, I implement a pure-Python SWD interface that can access the internals of a CPU while it is running, in a similar way to much more sophisticated debug tools, such as OpenOCD.

Part 1: Initial experimentation

Part 2: Using Linux

Part 3: Using MPSSE to drive an SPI device

Part 4: First steps towards accessing an ARM CPU using SWD

Part 5: Reading CPU internals with SWD

Copyright (c) Jeremy P Bentham 2018. Please credit this blog if you use the information or software in it.