B Duncan Ltd
Embedded Code Review & Optimization
Independent, measurement-led review of your embedded firmware.
What we do
Independent review of your firmware
We review your code and report what we find, with measurements behind it. Engagements range from a one-off audit to recurring reviews in your release process.
Independent Code Review
Firmware reviewed for correctness, reliability, and maintainability, with written findings.
Standards Compliance
Review against MISRA, JPL, and IEC Class B, with a gap analysis against the standard you need to meet.
Performance Optimization
Profiling and tuning to reduce CPU load, close timing budgets, and reclaim headroom on the existing part.
Resource & Memory Analysis
Worst-case stack, heap, and memory-usage analysis to eliminate overflows.
Race Condition & Crash Analysis
Root-cause analysis of system failures, CPU exceptions, and crash dumps on multi-tasking systems.
Problems
Problems we work on
The code has outgrown the hardware
A port to cheaper silicon that will not fit, or a feature that pushed CPU load past what the part can do. Usually recoverable: the common causes are emulated maths, unnecessary work in interrupt handlers, and data types wider than they need to be.
Nobody trusts the codebase
Duplicated modules, dead code, no unit tests, and no linting. The question is usually whether to refactor or rewrite, and that should be answered with a measurement rather than an instinct.
A fault that only appears in the field
Crash dumps and CPU exceptions on systems with many independent tasks. Race conditions found by analyzing recorded failures, evidence of what actually happened rather than an inspection’s guess at what might.
You need to meet a standard
MISRA, JPL, or IEC Class B compliance on a codebase that was not written to it. We produce the gap analysis and a remediation plan sized in effort.
An external team delivered it and you need help assessing it
An independent review before you accept a deliverable, sign off a milestone, or commit to the next phase.
Why us
Why choose us
Independent & impartial
No stake in the original design decisions. Findings stand up to scrutiny.
Root cause, not symptoms
Crash dumps and race conditions traced to the actual cause, not the nearest change that hides it.
Measurable results
Profiling, resource analysis, and before-and-after figures on every optimization engagement.
Deep standards knowledge
MISRA, JPL, NASA, and IEC experience from real audit and development work.
Optimization that extends product life
Software optimization reclaims headroom on existing hardware. We have extended the lifetime of shipped products this way, avoiding redesigns and reducing manufacturing cost.
| Engagement | Before | After |
|---|---|---|
| Production test and configure cycle, mass-produced motors | Over one minute per unit | 10 seconds per unit |
| Motor start-up on the same production tester | Baseline | 20x faster |
| Planned capital spend to lift throughput | New test machines scheduled | No longer required |
| Root cause of field failures on power grid controllers | Client team, several months, unresolved | Located in weeks |
| Reactive and real power measurement accuracy | Measured distortion present | Resolved in software, at no extra cost to system resources |
“Having engaged the services of B Duncan Ltd, I can confirm that this business offers excellent capabilities in terms of feature development, root cause analysis and issue resolution. I have found their approach to be methodical and performed with a high level of diligence and professionalism. I would have no hesitation to recommend the services of B Duncan Ltd as a suitable contractor in the Electrical, Electronic and Software domains.”
FAQ
Common questions
What do we get at the end?
A written report: findings ranked by risk, the evidence behind each, and what resolving it would take. Where we have profiled or measured, the numbers are included. Each candidate improvement comes with the gain it buys and the effort it costs, so the work can be filtered on return.
How long does a review take?
It depends on the size of the codebase and the scope. We scope and estimate it before starting, so you have a figure before you commit.
Will you recommend a rewrite?
Rarely. Rewrites lose the accumulated bug fixes that were never written down. We measure which parts are actually costing you and improve those incrementally, unless the evidence genuinely points to a rewrite.
Can you review hardware as well as firmware?
Yes, as part of our electronics design work: schematic and layout review, including EMC-relevant decisions, obsolescence risk, and design for manufacture.
Do you review against MISRA specifically?
Yes, as a gap analysis against your existing code. Note that a standard is a means rather than the goal: MISRA, code review, and unit tests create value when tied to real risk and measurable outcomes.
Related services
Embedded Firmware
The full firmware development and long-term maintenance capability behind our review work. If a review turns into a build or a fix, it is the same team, already across your codebase.
Safety-Critical Firmware
Where code review assesses firmware you already have, safety-critical develops or audits it to a recognized standard for certification.
Test Automation
Pair the review with automated regression testing of the code under review, so the issues found stay fixed for good.
Discuss a review
Send us the codebase or design and tell us what’s worrying you.