B Duncan Ltd
Embedded Firmware Development
Firmware for critical real-time control systems, including motor control, power electronics, and power grid control, since 2010.
What we do
Firmware development and maintenance
We write real-time firmware for microcontrollers with tight memory and timing budgets. We’re often brought in when a product has field failures or firmware nobody can maintain.
New product firmware
Firmware for new products, including microcontroller and DSP bring-up and drivers.
Taking over existing firmware
We regularly take over firmware written by other teams, ensuring it builds and runs on our bench before we change anything.
Safety and regulated firmware
Firmware developed and audited to MISRA, JPL, DO-178C, IEC 60730 Class B, and the IEC 60601 medical standards.
Communication protocols
TCP/IP, Modbus, CAN, and custom protocols, including PLC and DCS integration. DNP3 and IEC 60870 for SCADA and power grid control.
Low-power and IoT
Battery and IoT designs with tight active and sleep power budgets.
Case study
Field failures traced to kernel memory fragmentation
A manufacturer’s controllers were resetting to factory defaults after three to six months in the field, and the client’s team had spent months trying to reproduce it. We got the fault to happen overnight on the bench and found the cause. After the fix, the field failures stopped.
How we design
Simple designs
Many firmware architectures we see are overly complex, and the complexity doesn’t solve a real problem. It’s there because it’s what the original developer knew. We start from the actual problem and build the simplest design that solves it.
Standards like MISRA and JPL’s Power of 10 help when you understand why each rule exists, and make a mess when they’re followed without that understanding.
“Wellington Drive Technologies partnered with B Duncan Ltd. to develop firmware for our low power battery operated IoT product and to maintain firmware for an electronic controlled motor. BDL developed robust, well-tested firmware and provided valuable insights to improve reliability and maintainability of the firmware.”
How we work
Engineering practice
Guided by JPL’s Power of 10 Our code follows the intent of NASA JPL’s Power of 10 rules on every project, including unregulated ones. No heap allocation, no recursion, fixed loop bounds, small functions, and assertions that stay in release builds. Where we depart from a rule, the risk is understood and accepted.
Test-driven development Over 90% of our C code is developed test-first. Unit tests run on a PC in minutes, with no board needed.
Testable requirements Each requirement is written so a test can be derived from it.
Automated builds Every release is built and tested in CI. Each changelog entry links to the ticket it came from.
Our SDK
Built on our own SDK
Our SDK provides parameter storage in flash, event logs, lifetime statistics, a diagnostics CLI, filters, and timers as unit-tested C modules.
The SDK can capture and log faults. Products that use it include it as source, pinned to a fixed version. Ports exist for STM32 and nRF52, and the vendor HAL version stays your choice.
Platforms
Microcontrollers
STM32, Nordic nRF52, Microchip and Atmel SAM, NXP, and older Motorola 68HC parts. Espressif ESP32 for Wi-Fi and BLE.
Operating systems
Bare-metal schedulers by default. FreeRTOS or Zephyr when a product needs one.
Connectivity
CAN, SPI, I2C, UART, RS485, Modbus, and TCP/IP. Bluetooth Low Energy, Wi-Fi, LoRa, and NFC, with over-the-air updates.
How we engage
Engagement
A defined piece of work We can take on a single piece of work, like a bring-up, a driver, a migration, or a specific defect. We scope and estimate it before we start.
Alongside your team We work in your repository, your CI, and your review process, filling a capability or capacity gap.
The whole deliverable We can take responsibility for the firmware, from requirements through to release and ongoing maintenance.
FAQ
Common questions
Do we need an RTOS?
Not always. An RTOS handles scheduling and blocking calls for you, but it costs memory and makes timing harder to analyse. For a device with a handful of periodic tasks, a bare-metal scheduler is simpler to reason about and easier to certify.
How do you hand over?
We hand over the code with its documentation, kept in a wiki that is updated with the code in git and built as part of a pipeline.
From the blog
Articles
How AI-Driven Feedback Transforms Embedded Development
Closing the loop between writing firmware and knowing it works.
Version-Control Your Workflow, Not Just Your Code
How we make project tooling executable and shared across the team.
Related services
Motor Control
Field-oriented control, VFDs, and sensorless drives.
Code Review & Optimization
We review existing firmware for correctness, reliability, performance, and maintainability.
Safety-Critical Firmware
Firmware with the evidence a certification body needs.