Skip to content

April 2019

Auto-formatting/linting Go code

Some things in life you just have to experience to truly appreciate the value. One of these is auto-formatting/linting source code. When I started programming in Go in Vim, I naturally looked for editor support, and found the excellent vim-go project. Through this, I learned about gofmt and then goimports. These tools can be configured in your editor to automatically format your code when you save. goimports goes a step beyond and adds missing imports and removes unused ones.

Auto-formatting is quickly becoming the norm. The Javascript world also has an excellent formatter available named Prettier. There are formatters for many other languages as well including C/C++, shell, Elm, Rust, etc. The neoformat and ALE plugins add auto-formatting functionality to Vim/Neovim. An example of how to enable these plugins in Neovim is included in my dotfiles.

Read More »Auto-formatting/linting Go code

Microcontroller (MCU) or Microprocessor (MPU)?

As technology advances, there are two basic processing platforms for implementing embedded systems. The first is the Microcontroller Unit (MCU). These devices have varying amounts of integrated Flash (<= 2MB) and RAM (<= 1MB), and are designed to run bare-metal code or a real-time operating system (RTOS), like FreeRTOS. The second is the Linux-capable Microprocessor Unit (MPU). An example of an MCU based system is most Arduinos, and an example of an MPU based system is the Raspberry PI. An MPU typically does not have embedded Flash and RAM — at least on the same die. The fundamental difference between MCU/RTOS and MPU/Linux systems is the memory architecture and the amount of memory in the system.

Read More »Microcontroller (MCU) or Microprocessor (MPU)?

Accepting Constraints in Build Systems

As Embedded Systems become more complex, the complexity of the process to build the software for these systems also increases. As humans, our ability to deal with complexity is limited, so we develop tools and processes to manage the complexity. In the end, these tools and processes are about constraints and patterns. A well-designed tool or process encourages you to do things in a way that is consistent and maintainable, which leads to reliable and predictable results.

Read More »Accepting Constraints in Build Systems