Embedded Systems Firmware Demystified

Assume that you are on a firmware development project and that you are working on a hardware platform that has been completed and successfully deployed to the field, but there are new features yet to be delivered. Your assignment is to add some new feature, but when your feature is added, current features start to fail because you don t have enough horsepower to support the additional capability, or you don t have enough memory space left to add your feature.
One solution is to throw up your hands at the hardware people and tell them they need to give you more. This tactic often doesn t go over too well, so you need an alternative. You need to determine if you can rearrange things a bit so that you can get some more bandwidth out of the current implementation. You also need to determine if any functions in the system can be removed because they aren t used. These questions are best answered through a technique known as system profiling (sometimes called runtime analysis).
Function counting, task-ID activity, and basic block coverage are some basic system profiling capabilities. Some of the information you uncover through system profiling is useful for verifying that all code has been executed, and some information is useful for determining where to focus optimization time if you need to speed things up. Note that some of the more sophisticated RTOS packages provide various types of system profiling as a standard component...