Tutorials

Serious Business STM32 Development

Last updated: 03 Jul 2024 - 22:20

Overview

This blog post is meant to cover a bunch of different things about developing large, complex and sophisticated but highly reliable applications on STM32 microcontrollers. Lots of the stuff I'm writing about will have applications on other embedded systems which use FreeRTOS but I'm sticking to the ecosystem I know best. I've done this stuff several times over for various employers over the last decade but it's all locked away in private repositories and each time I feel like I'm reinventing the wheel so I'm going to try and build it all up from scratch on my own time without reference to any proprietary code.

The code I'm writing in this post will all be run on an STM32F429I-DISC1. This board is getting on a bit now but it's still available pretty cheaply and it has an external SDRAM adding 8MB of memory to the system which adds a bit more flexibility and extra requirements for memory segmentation.

Section:
Tutorials
Tags:
 

Debugging STM32 Inside VSCode

Last updated: 24 Oct 2022 - 20:47

In my current series on building my own handheld games console I've been developing for the STM32 inside VSCode. It's a reasonably comfortable IDE that works well on Linux and there's the STM32-for-VSCode extension.

That extension aims to automate everything for you but as usual with embedded development not everything is quite that joined up...

Section:
Tutorials
Tags:
VSCode,
STM32,
OpenOCD

Automatically detect changes in header files in a Makefile

Last updated: 26 Feb 2017 - 21:41

GNU Make is still a brilliant tool for managing embedded software project build systems. The main strength of the system is the way you can define the dependencies of each stage and then let Make figure out what's changed (based on file dates) and build all the bits required. You may be familiar with rules of the form:

file1.o: file1.c
    gcc -c file1.c -o file1.o

Where file1.o is the object file, file1.c is the source file. This declares that if file1.c is changed, file1.o must be re-made.

Section:
Tutorials
Tags:
c,
embedded,
Makefile

ARM toolchain setup

Last updated: 20 Feb 2017 - 06:57

In this article I plan to describe the toolchain I use for bare-metal ARM Cortex-M development. I'm not necessarily advising you to use this toolchain, but it works well for me and this article will help form the basis of various future articles about debugging and robust development.

I use the toolchain developed by ARM under the "GCC ARM Embedded" name. This is a free toolchain based on a patched version of the open source GCC compiler and GNU binutils. Since it's free and available as source, there is a good chance if you are using a free or low cost IDE or other development tool for ARM microcontrollers that it's based on this compiler.

GCC ARM embedded was available from Launchpad recently, but has now moved to ARM's own website for downloads. There's also a PPA for installing on Ubuntu.

I don't really recommend using the PPA. In development for embedded systems you should consider the compiler to be a dependency of your project and make sure that you are

Section:
Tutorials
Tags:
 

Stripboard Circuit Construction

Last updated: 21 May 2014 - 21:59

Before cheap prototype PCB services like OSHPark, Ragworm and iTeadStudio options for building circuits for prototype or hobby projects were much more limited. You could etch your own board, carve a board out of copper clad with an abrasive tool, wire-wrap it all or use stripboard.

Stripboard, sometimes known as Vero-board (after a popular manufacturer) is a kind of circuit board, usually a cheap substrate like SRBP, with long strips of copper about 2mm wide running the length of the board. Holes are typically punched on a 0.1" (2.54mm) grid across the board, making it easy to fit traditional through-hole components.

The basic technique of construction is to use a small drill type tool, known as a spot-face cutter, to cut the long traces to make separate parts of the circuit. Wires are run, perpendicular to the copper tracks to create links in the opposite direction, allowing complex circuits to be built up.

Section:
Tutorials
Tags:
Prototyping,
Tools,
electronics,
hobby

Trimming Silk Screen on KiCad

Last updated: 18 May 2014 - 15:03

A few connectors and the heatsink in this design are over-hanging the board.

Offending Silk Screen: A few connectors and the heatsink in this design are over-hanging the board.

Sometimes when submitting boards for cheap panelised manufacture you need to keep all of the layers of the gerber file within the size of the PCB. In some boards I find there are bits of silk screen (e.g. connector outlines) which overlap the edge of the board. As far as I can see there's no way to limit the silk screen to the edges of the board by default, but I have a work around that might be useful.

Section:
Tutorials
Tags:
kicad,
PCB

OggCamp 13: Forking Hardware!

Last updated: 19 Oct 2013 - 09:31

This year at OggCamp I presented on using version control to manage hardware projects. It's something I think will be really important as the barrier to spinning a new hardware design gets lower and lower. Below are the slides from the talk I did.

Section:
Tutorials
Tags:
GIT,
kicad,
3D printing,
hardware,
work-flow

H-Bridge Tutorial

Last updated: 25 Jan 2012 - 20:21

Typical transistor based H-Bridge circuit.

The H-bridge is a circuit used in electronic control of high current devices, particularly where the device polarity may be reversed, e.g. DC motors. The name comes from the fact that the circuit typically looks like a letter "H".

Section:
Tutorials
Tags:
electronics,
robotics,
H-Bridge,
motors,
tutorial,
design,
IC

How not to build a RepRap

Last updated: 24 Dec 2011 - 16:03

A fairly standard basic RepRap

Actually I have a working RepRap now so it isn't all bad, but there are plenty (too many?) guides about what to do to make a RepRap, I thought I'd just point out the problems and mistakes I made building mine.

Section:
Tutorials
Tags:
electronics,
Open Hardware,
RepRap,
3D printing

VGA Primer

Last updated: 13 Jul 2011 - 21:51

PC-99 coloured blue standard 15 pin high-density VGA plug.

Video Graphics Array "VGA" is a standard for computer display. It has a lot going for it in the hobby electronics field as it is a pretty simple standard and quite straight forward to implement with sufficient signalling speed, there are also a lot of monitors around to test projects on! Colour is a lot easier to generate on a VGA monitor than on a composite video monitor, but it requires a lot more speed as the frames are more detailed and there are more signals to generate.

Section:
Tutorials
Tags:
electronics,
VGA,
making,
hacks,
pinout,
display

Contact

Email: nathan@nathandumont.com

Mastodon: @hairymnstr@mastodon.social