Technique: Refactoring Global Data to Support Multiple Instances

5 August 2020 by Phillip Johnston • Last updated 14 December 2021Many applications are initially written to support a single instance of an object in a system. This often maps directly to the initial design of a system. However, future growth often requires these assumptions to be adjusted. Functions built around the assumption of a single instance of global data will often need to be updated to support multiple instances. In other cases, the use of concurrency requires that a function is made reentrant by removing internal references to global data and converting functions to use pointers or values as …

To access this content, you must purchase a Membership - check out the different options here. If you're a member, log in.

Leveraging Our Build Systems to Support Portability

We’ve shared practical decoupling techniques and discussed lightweight abstractions that help us create portable firmware modules. These techniques help us create portable software, but they don’t prevent anyone directly using vendor SDKs and native OS function calls in portable modules. In this article we will share techniques that leverage build systems and repository structures to enforce loose coupling between firmware and …

Prototyping and Design for Change: Lightweight Architectural Strategies

Tom Anderson asked this excellent question in the Embedded.fm Slack group: Many designs start as feasibility investigations using Arduino and then move to a lower power or otherwise better embedded platform. Is there anything that these Arduino practitioners can do to make this transition easier? As we outlined in “Musings on the Tight Coupling Between …