firmware improvement roadmap

6

Click here to load reader

Upload: scott-sweeting

Post on 14-Apr-2017

69 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Firmware Improvement Roadmap

Firmware Improvement Roadmap

A step-by-step guide for improving firmware projects.

Page 2: Firmware Improvement Roadmap

Date Author Reason Revision

2016-04-15 Scott Sweeting Broadened Applicability

C

2014-12-16 Scott Sweeting Added goal details B

2014-12-02 Scott Sweeting Initial Release A

Page 3: Firmware Improvement Roadmap

1. Goals

1. Improve Lead-Time Of New Platform Bring-Up Decrease the amount of time required to bring up new platforms. Quickly bringing up new platforms

improves time-to-market, potentially beating competitors to market, gaining market share and

increasing the on-sale lifetime.

2. Improve Lead-Time Of Major Functionality Addition/Subtraction Decrease the amount of time required to implement new major functions. Quickly adding or removing

major features improves time-to-market, potentially beating competitors to market, gaining market

share and increasing the on-sale lifetime.

3. Improve Customer Feedback Decrease amount and severity of negative customer feedback, reduce turn-around time in addressing

customer issues. This will increase customer satisfaction and improve sales through word-of-mouth.

Page 4: Firmware Improvement Roadmap

2. Strategies

1. Re-Use Code Use a common codebase for all firmware projects. This will improve new platform lead-time by giving us

a head start on writing firmware – simply adapt existing firmware to a new platform by writing drivers

for new platform. Code that can quickly be adapted to different platforms also allows quick and

thorough component supplier evaluations.

2. Create Virtual Devices To the maximum extent possible, use firmware code to develop host PC virtual projects to prototype

changes in host control software and nail down protocols.

3. Improve Reliability Reliability is the quality that the device performs to the specifications (including implied specifications).

Use Continuous Improvement Testing Verify each internal as well as external release according to the test plan & procedure. Importantly,

update the test plan & procedure with the test procedure of each issue as it is resolved.

Use Watchdog Timer Using a watchdog timer will allow the device to reset itself when firmware freezes or RAM is corrupt.

Allows us to recover a device that cannot easily be cold-booted.

Use Long-Term Stability Testing Running tests on units that are powered continuously for days, weeks, and month. This uncovers

memory allocation/freeing errors and timers that roll over after amounts of time greater than normal

bench testing. Coding issues uncovered with long-term stability testing: memory leaks, counter roll-

overs, mutexes that need to be around critical sections.

4. Improve Robustness Robustness is the quality that the device handles unexpected inputs predictably and gracefully.

Improving robustness will allow us to diagnose and fix logical errors before they get to customers and

reduce time spent fixing errors that do make it to customers.

Use Comprehensive Testing Test all possible inputs, not just ones in current use. Use comprehensive testing to verify conformance

to specifications.

Test Parameters To Each Function Prevent null-pointer exceptions and design and input errors by checking each parameter to each

function.

Page 5: Firmware Improvement Roadmap

Add Error Log To Fix Unreproducible Errors Create an error log that can be retrieved by customers using host control software to be sent to

Engineering to allow us to fix errors that cannot be reproduced internally.

Bubble Up Errors, Handle Every Error Fix design flaws by bubbling up errors to a function that can handle them. E.g., a function that does

division given a divisor as a parameter should return an error if the divisor is zero, and the function that

calls it should check for an error.

5. Improve Maintainability Maintainability is the quality that firmware is quick and easy to modify. Improving maintainability will

increase our responsiveness to customer issues and decrease turn-around time on adding new features

and fixing bugs.

Develop A Coding standard Coding standards give code consistency. Coding standards increase readability of code – the most

difficult aspect of firmware development. The coding standard will include friendly variable names. The

identifier “bufsz” is not more efficient than “bufferSize” when compiled to machine code. A “formula”

for naming variables and function reduces development time and developer mental load. E.g.:

“set_Mute(UNMUTE)” and “setNoDspChanges(void)” are inconsistent, whereas “MuteSet(UNMUTE)”

and “DspChangesSet(FALSE)” are consistent, thus easier to remember when being called from another

function.

Perform Code reviews Code reviews disseminate news of changes across the team and concerned people from other teams,

increase group knowledge, and solicit constructive feedback.

Increase Modularity Modularity is the ability to add or remove major functionality independently of other functions. Every

option will be moved into run-time configuration to allow us to test one firmware. We will separate data

from code so the same code can be downloaded to platform variants, reducing the complexity of

testing. A layer of abstraction will increase portability, allowing us to move from one platform to

another.

Use Object-Oriented Design Object-oriented C code is efficient and allows for abstraction – for example, allowing us to change host

communication from Ethernet to serial, or to any other interface since the interface is very similar at a

high level, but very different at a low level. Object-orientated design facilitates high cohesion and low

coupling, and locality. High cohesion and low coupling simplifies design of complicated systems and

locality makes new code development and debugging easier.

Simplify Interrupt Service Routines Remove everything but setting flags in interrupt service routines to increase responsiveness and

decrease number of events missed when handling interrupts.

Page 6: Firmware Improvement Roadmap

6. Improve Security

Add Granular access features Determine the roles that access the device and allow for restrictions to only the areas each role needs.

Add public key validation of firmware. Prevent unauthorized firmware from running on our hardware.

3. Conclusion Following the firmware quality improvement strategies set out in this document will achieve the goals of

reducing cost and lead-time of introducing new hardware platforms, reducing cost and lead-time of

introducing new major functionality, and increasing customer satisfaction by eliminating issues before

they leave Engineering and improving our responsiveness to customer issues.