Klaus Elk Books

R&D Handbook

This page is basically a set of checklists that I originally created for myself. It is still work in progress!

Scope Document

It is surprising how differently people can visualize a project. Individuals in Upper management, Sales, Marketing, Project manager, Development Team etc, might all have different visions. They might not even be aware of this discrepancy. I recommend that the Project Manager and Steering Committee agrees on a scope document before starting up with a development team. The scope document could contain:

Requirements Documentation

Even agile projects will typically have requirements. This can be a word-document, an excel-sheet or a database - like e.g. Azure-Devops, Jira or something really big like Jama. Requirements must be: It is highly recommended to "test" the requirements before going too far into the project, using methods like e.g. QFD - also known as "House of Quality". The fastest design/implementation/test/release is the one you don't need at all.

Design

Most projects may inherit existing designs that they build on top of, while a few starts all over. In both cases there are often changes to the design along the way. I recommend that design is described in e.g. Power-Point form with the team before it is implemented. These Powerpoints can be reused to update the design documentation before and/or after implementation. The following "design views" are all important to me although I don't use all the sub-diagrams, -patterns etc: Any design must be evaluated against many Design Considerations.

Coding

It is important not to choose the latest business fad as your main embedded language. The code is probably going to live long, and you will need developers who understand the language in the future. Languages such as C and C++ are still very popular in embedded, and Python is really strong in testing as well as application layer in larger embedded systems. See also the Trends page.

For quality control the team should have at least:

I discuss Static Code Analysis as well as Secure Coding Guidelines here: Cyber Security.

Debugging

I will not go into details about debugging. It is however important to remember that there are many levels of debugging:

When we talk about debugging, most people think about single-stepping and breakpoints. This is great if you have an idea of where in your code to look. To get to this point you may need to start with an eagles view - hence the other debugging levels.

Unit and Integration Tests

When is it a unit-test and when is it an integration test?

The important thing is that the team performs tests on their code before they release it to the main branch (often called master). And that even more testing is used when blocks are integrated. In many cases you can use the same tests for both types.

Obviously the new code should be tested. I recommend that small "test-journals" are written. It is so little work to copy a screen dump from an IDE or a terminal to a Word-doc, but it can save you so much time later, when you start doubting what really worked and what you did or did not test. A test-journal is not a formal document as such, but do yourself a favor and keep it for at least a year.

Don't get caught up in religious wars on unit tests. Some believe that everything should be unit-tested, but there are many cases where your time may be better used in other kinds of tests. James Coplien has some data-based ideas of why unit-tests can be waste.

"Smoke-tests" of the existing code can also be advantageous. The more these can be automated - the bigger the chance of them being run.

Regression Tests

The more people are involved in a project - the more important it is that nightly regression-tests are run. These will often catch unforeseen side-effects. If the project is e.g. PC-software it is possible to run many parallel tests, and therefore have a great code-coverage in the tests.

Embedded projects may depend on hard-to-get HW-prototypes and may have sensitive wiring, or expensive prototypes. Such setups are not easily parallelized. This means that in order to run many tests, each needs to be of short duration. In this case it may make sense to run the longer-running tests over weekends.

The faster a bug is found after being introduced - the faster it is to fix it.

Typically regression tests are run on the main branch. By testing nightly we get a chance to find a defect within 24 hours. But a defect may have disturbed many people just by entering the main branch. For this reason many teams have gated check-ins where fast tests are performed before the code enters the main-branch.

Another approach is to have a "semi-main" branch where code is checked in, and tested nightly. Only if this is passed is the code allowed to find its way into the main branch.

When regressions tests are not just pass/fail, but also qualitatively measure parameters like Idle Time (%), Power-usage (W), Dynamic Range (dB), Packet-loss (%), GPS-deviation (m) etc - then you can depict these measurements on the Y-axis on a graph with time (or builds) as the X-axis. This becomes a valuable trend-analysis, where "jumps" are often related to check-ins - on purpose or not.

This builds up to CI - Continuous Integration.

Other Tests

Production Tests

Many embedded software teams are taken by surprise when the company's own production department requests tests. Such unexpected work can be very time-consuming. It makes a lot of sense to raise the question early:

Are we supposed to deliver production tests - and if so, are there any ways we can plan such tests that we can pre-use tests in our R&D setup?

Customer Premises test

A power-up self-test is often necessary, but more elaborate tests can also be relevant. This depends on your product. An example is expensive B2B products that may be hard to return for service and are hard to live without while at service. The producer and the customer has a shared interest in uncovering as much as possible on premises. It is often possible to ask the customer to run specific tests and return the results in mails.

In the case of consumer products, it is more and more common for the product to autogenerate logs that are transmitted to a cloud-server when convenient - if the customer has approved it.

Defects

Bugs/Defects can come from internally in the project and from the market. In both cases it is important to register the defects with selected key information:

Version Control

Today git is dominating, but other systems can also do the job. The important thing is that:

Compliance

Before the project is too far it is important to understand the compliance requirements, so that the relevant work can be planned into the project.

There are several types of compliance:

Steering Committee Meetings

Most companies have Steering Committees that help the projects to stay on track. It is important to understand that often the same people are in many SCMs. To ease their work, and their ability to compare projects,  all projects should report in the same "template" - often Power-Point. This will contain slides on:

Black Elk

© 2025 KlausElk.com & ElkTronic.dk